Skip to content

Commit 56b001d

Browse files
committed
feat: enhance documentation setup with MkDocs and add beginner-friendly validation configuration
1 parent 9def3ea commit 56b001d

5 files changed

Lines changed: 108 additions & 21 deletions

File tree

.codebase-validation.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Beginner-Friendly Configuration
2+
# Perfect for developers just starting with codebase validation
3+
# Gentle introduction with helpful explanations and relaxed standards
4+
5+
validation:
6+
agents:
7+
# 📚 Essential Files - Start with the basics
8+
essential-files:
9+
enabled: true
10+
require_readme: true # Every project needs a welcoming README
11+
require_contributing: false # Optional for personal projects
12+
require_docs_directory: false # Can add documentation later
13+
14+
# ⚙️ Git Configuration - Keep things tidy
15+
git-configuration:
16+
enabled: true
17+
require_gitignore: true # Essential - keeps junk out of your repo
18+
require_gitattributes: false # Advanced feature, skip for now
19+
require_editorconfig: false # Nice to have, not required initially
20+
21+
# 📝 Development Standards - Learn good habits gradually
22+
development-standards:
23+
enabled: true
24+
check_commit_history: true
25+
commit_history_depth: 5 # Check only recent commits
26+
require_conventional_commits: false # Learn this later
27+
validation_threshold: 0.3 # Very forgiving - 30% is enough to start
28+
29+
# 🎨 Output settings - Keep it simple and encouraging
30+
output:
31+
format: "table" # Pretty, human-readable output
32+
verbose: false # Don't overwhelm with details
33+
34+
# 📊 Scoring - Encouraging for beginners
35+
scoring:
36+
pass_threshold: 0.5 # 50% score is passing - you've got this!
37+
warning_threshold: 0.3 # Only warn if really struggling
38+
39+
# 🎯 What this config does:
40+
# - Checks for a README (the most important file!)
41+
# - Makes sure you have a .gitignore (prevents common mistakes)
42+
# - Gently encourages good development practices
43+
# - Celebrates your progress rather than focusing on what's missing
44+
#
45+
# 🌱 As you grow:
46+
# - Enable CONTRIBUTING.md when you want collaborators
47+
# - Add docs/ directory when your project gets complex
48+
# - Turn on conventional commits to learn industry standards
49+
# - Gradually increase thresholds as you improve
50+
#
51+
# 🎉 Perfect starting point for:
52+
# - Personal projects and learning exercises
53+
# - First-time open source contributors
54+
# - Teams adopting validation tools gradually
55+
# - Anyone who wants to start simple and grow
56+
57+
# Expected minimal project structure:
58+
# my-awesome-project/
59+
# ├── README.md # Tells people what your project does
60+
# ├── .gitignore # Keeps build files and secrets safe
61+
# └── src/ # Your actual code

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ go.work.sum
2727
# env file
2828
.env
2929

30+
# MkDocs build output
31+
site/
32+
3033
# Editor/IDE
3134
# .idea/
3235
# .vscode/

Taskfile.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tasks:
4040

4141
setup:
4242
desc: Set up development environment
43-
deps: [install-gotestsum, install-golangci-lint]
43+
deps: [install-gotestsum, install-golangci-lint, docs:install]
4444
cmds:
4545
- go mod download
4646

@@ -69,27 +69,40 @@ tasks:
6969
deps: [build, test]
7070

7171
docs:serve:
72-
desc: Serve documentation locally using Python's built-in server
73-
dir: docs
72+
desc: Serve documentation using MkDocs
7473
cmds:
7574
- |
76-
echo "📚 Serving documentation at http://localhost:8000"
75+
echo "📚 Serving documentation with MkDocs at http://localhost:8000"
7776
echo "Press Ctrl+C to stop the server"
78-
python3 -m http.server 8000 || python -m SimpleHTTPServer 8000
77+
mkdocs serve
78+
79+
docs:build:
80+
desc: Build static documentation site
81+
cmds:
82+
- mkdocs build
83+
- echo "📦 Documentation built in site/ directory"
7984

8085
docs:open:
81-
desc: Open documentation in the browser
82-
deps: [docs:serve]
86+
desc: Serve documentation and open in browser
8387
cmds:
8488
- |
85-
sleep 2
86-
if command -v xdg-open > /dev/null 2>&1; then
87-
xdg-open http://localhost:8000
88-
elif command -v open > /dev/null 2>&1; then
89-
open http://localhost:8000
90-
else
91-
echo "Please open http://localhost:8000 in your browser"
92-
fi
89+
echo "🚀 Starting MkDocs server and opening browser..."
90+
(sleep 3 && (
91+
if command -v xdg-open > /dev/null 2>&1; then
92+
xdg-open http://localhost:8000
93+
elif command -v open > /dev/null 2>&1; then
94+
open http://localhost:8000
95+
else
96+
echo "Please open http://localhost:8000 in your browser"
97+
fi
98+
)) &
99+
mkdocs serve
100+
101+
docs:install:
102+
desc: Install MkDocs and required plugins
103+
cmds:
104+
- pip install mkdocs mkdocs-material mkdocs-git-revision-date-localized-plugin
105+
- echo "📚 MkDocs installed successfully"
93106

94107
docs:check:
95108
desc: Check documentation for common issues (links, formatting)

bin/codebase-cli

0 Bytes
Binary file not shown.

mkdocs.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
site_name: Codebase Interface
2-
site_description: A documented set of principles that aim to promote the ease of use of codebases across languages and frameworks
3-
site_url: https://codebaseinterface.org
4-
repo_url: https://github.com/codebase-interface/codebaseinterface
5-
repo_name: codebase-interface/codebaseinterface
1+
site_name: Codebase Interface CLI
2+
site_description: A command-line tool for validating codebase structure and development standards
3+
site_url: https://cli.codebaseinterface.org
4+
repo_url: https://github.com/codebase-interface/cli
5+
repo_name: codebase-interface/cli
66
edit_uri: edit/main/docs/
77

88
theme:
@@ -32,7 +32,17 @@ theme:
3232
name: Switch to light mode
3333

3434
nav:
35-
- Welcome: README.md
35+
- Home: README.md
36+
- Getting Started: usage.md
37+
- Configuration: configuration.md
38+
- Validation Agents: agents.md
39+
- Examples:
40+
- Overview: examples/README.md
41+
- Beginner: examples/beginner.yml
42+
- Basic: examples/basic.yml
43+
- Go Project: examples/go-project.yml
44+
- Open Source: examples/open-source.yml
45+
- Strict Standards: examples/strict.yml
3646

3747
plugins:
3848
- search

0 commit comments

Comments
 (0)