aiknowsys 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,14 +34,16 @@
34
34
  - [ ] Read @CODEBASE_ESSENTIALS.md (patterns, conventions)
35
35
  - [ ] Read relevant skill if applicable
36
36
  - [ ] Make changes + write/update tests
37
- - [ ] **VALIDATE** (see validation matrix below)
37
+ - [ ] **VALIDATE** (see validation matrix in ESSENTIALS)
38
38
  - [ ] Update docs if patterns changed
39
39
 
40
- **Validation Matrix (ALWAYS run after changes):**
40
+ **Validation Matrix:**
41
41
 
42
- | Changed | Commands | Required |
43
- |---------|----------|----------|
44
- {{VALIDATION_MATRIX}}
42
+ 👉 **See [CODEBASE_ESSENTIALS.md - Validation Matrix](CODEBASE_ESSENTIALS.md#validation-matrix)**
43
+
44
+ The validation matrix lives in CODEBASE_ESSENTIALS.md as the single source of truth. Always run all commands from that matrix after making changes.
45
+
46
+ **🚨 RULE: Never claim work is complete without running validation!**
45
47
 
46
48
  ---
47
49
 
@@ -75,6 +77,19 @@
75
77
 
76
78
  Follow patterns from CODEBASE_ESSENTIALS.md and the skill you read.
77
79
 
80
+ **💡 TDD Recommended:** For new features, practice Test-Driven Development:
81
+ 1. **RED**: Write a failing test first
82
+ 2. **GREEN**: Write minimal code to make it pass
83
+ 3. **REFACTOR**: Clean up code while tests stay green
84
+
85
+ See `.github/skills/tdd-workflow/SKILL.md` for detailed TDD guidance.
86
+
87
+ **Benefits of TDD:**
88
+ - Better code design (forces decoupling)
89
+ - Fewer bugs (issues caught before implementation)
90
+ - Confidence in refactoring (tests catch regressions)
91
+ - Living documentation (tests show intent)
92
+
78
93
  ### 4ī¸âƒŖ VALIDATE: Run Tests & Checks (MANDATORY - DO NOT SKIP!)
79
94
 
80
95
  **âš ī¸ CRITICAL: Run validation EVERY TIME you make a change (even small fixes!)**
@@ -178,30 +193,100 @@ This project uses Developer + Architect agents for automated code review.
178
193
 
179
194
  ---
180
195
 
196
+ ## ✅ Pre-Commit Validation Checklist
197
+
198
+ **Run this checklist BEFORE every commit. Copy-paste into terminal:**
199
+
200
+ ### Quick Check (1 minute)
201
+ ```bash
202
+ # 1. Validation Matrix commands
203
+ {{VALIDATION_CMD_1}} # e.g., npm test
204
+ {{VALIDATION_CMD_2}} # e.g., npm run lint
205
+
206
+ # 2. No debug code
207
+ grep -r "console.log\|debugger\|TODO:" src/ || echo "✓ No debug code"
208
+
209
+ # 3. No secrets
210
+ grep -r "password\|api_key\|secret" . --exclude-dir={node_modules,.git} || echo "✓ No secrets"
211
+ ```
212
+
213
+ ### Full Check (5 minutes)
214
+ ```bash
215
+ # Run all validation commands from matrix
216
+ {{ALL_VALIDATION_COMMANDS}}
217
+
218
+ # Additional checks
219
+ git status # No untracked files
220
+ git diff # Review changes
221
+ grep "{{" {{TEMPLATE_FILES}} # No unfilled placeholders
222
+ ```
223
+
224
+ ### Before Push
225
+ ```bash
226
+ # Final validation
227
+ {{VALIDATION_CMD_1}}
228
+
229
+ # Check commits
230
+ git log origin/main..HEAD # Review commits
231
+
232
+ # Push
233
+ git push
234
+ ```
235
+
236
+ ---
237
+
238
+ ## 🔍 Troubleshooting Validation Failures
239
+
240
+ ### Tests Failing
241
+ 1. Read error message carefully
242
+ 2. Check CODEBASE_ESSENTIALS.md for test patterns
243
+ 3. Review "Common Gotchas" section
244
+ 4. Run single failing test: `{{SINGLE_TEST_CMD}}`
245
+ 5. Check if pattern violated (Critical Invariants)
246
+
247
+ ### Linting Errors
248
+ 1. Auto-fix if possible: `{{AUTO_FIX_CMD}}`
249
+ 2. Review Core Patterns for style rules
250
+ 3. Don't disable rules - fix the code
251
+ 4. If rule is wrong, update ESSENTIALS first
252
+
253
+ ### Build Errors
254
+ 1. Check dependency versions (Technology Stack section)
255
+ 2. Clear cache: `{{CLEAR_CACHE_CMD}}`
256
+ 3. Rebuild from scratch: `{{CLEAN_BUILD_CMD}}`
257
+ 4. Check environment variables
258
+
259
+ ---
260
+
181
261
  ## 📝 Customization Instructions
182
262
 
183
263
  **This is a template file. To customize:**
184
264
 
185
- 1. **{{VALIDATION_MATRIX}}** - Replace with your actual validation commands
186
- ```markdown
187
- | Backend | pytest | ✅ MANDATORY |
188
- | Frontend | npm run type-check | ✅ MANDATORY |
189
- ```
190
-
191
- 2. **{{SKILL_MAPPING}}** - Add your project's skill trigger words
265
+ 1. **{{SKILL_MAPPING}}** - Add your project's skill trigger words
192
266
  ```markdown
193
267
  | "refactor", "clean up" | code-refactoring | Test-driven refactoring |
194
268
  | "update deps" | dependency-updates | Safe dependency updates |
269
+ | "write tests", "TDD", "test first" | tdd-workflow | Test-driven development |
195
270
  ```
196
271
 
272
+ 2. **Validation Checklist Placeholders:**
273
+ - `{{VALIDATION_CMD_1}}` → Your primary test command (e.g., `npm test`)
274
+ - `{{VALIDATION_CMD_2}}` → Your lint command (e.g., `npm run lint`)
275
+ - `{{ALL_VALIDATION_COMMANDS}}` → All commands from validation matrix in ESSENTIALS
276
+ - `{{TEMPLATE_FILES}}` → Files to check for placeholders
277
+ - `{{SINGLE_TEST_CMD}}` → How to run one test (e.g., `npm test -- file.test.js`)
278
+ - `{{AUTO_FIX_CMD}}` → Auto-fix linting (e.g., `npm run lint:fix`)
279
+ - `{{CLEAR_CACHE_CMD}}` → Clear build cache
280
+ - `{{CLEAN_BUILD_CMD}}` → Clean rebuild command
281
+
197
282
  3. **Add project-specific sections** as needed
198
283
 
199
284
  4. **Remove placeholder text** and instructions
200
285
 
201
- 5. **Rename to `AGENTS.md`** when complete
286
+ **Note:** Validation Matrix is in CODEBASE_ESSENTIALS.md - no need to duplicate it here.
202
287
 
203
288
  ---
204
289
 
205
290
  *This file helps AI agents follow a consistent workflow: Read → Plan → Implement → Validate → Document → Confirm*
206
291
 
207
- *Part of the Knowledge System Template. See [README](README.md) for full documentation.*
292
+ *Part of aiknowsys. See [README](README.md) and [SETUP_GUIDE.md](SETUP_GUIDE.md) for full documentation.*
@@ -34,18 +34,79 @@
34
34
 
35
35
  ---
36
36
 
37
- ## Document Purpose & Usage
37
+ ## 📚 Knowledge System: Document Roles
38
+
39
+ **Your project has three core knowledge files that work together:**
40
+
41
+ ### 1ī¸âƒŖ CODEBASE_ESSENTIALS.md (This File)
42
+ **Role:** Single source of truth for architecture, patterns, and invariants
43
+ **Read:** At the start of EVERY session before making changes
44
+ **Contains:**
45
+ - Technology stack and versions
46
+ - Validation commands (test, lint, build)
47
+ - Project structure and file organization
48
+ - Code patterns and conventions
49
+ - Critical rules that must never be violated
50
+ - Common gotchas and workarounds
51
+
52
+ **Use this when:**
53
+ - Starting a coding session (read first!)
54
+ - Implementing new features (check existing patterns)
55
+ - Debugging issues (review gotchas)
56
+ - Onboarding new developers (comprehensive reference)
57
+
58
+ ### 2ī¸âƒŖ AGENTS.md
59
+ **Role:** AI assistant workflow and session procedures
60
+ **Read:** When working with AI coding assistants
61
+ **Contains:**
62
+ - Mandatory session start protocol
63
+ - Validation matrix (copy from this file)
64
+ - Skill trigger words and workflows
65
+ - Project-specific invariants for AI
66
+ - Changelog update procedures
67
+
68
+ **Use this when:**
69
+ - Using GitHub Copilot, Claude, ChatGPT, etc.
70
+ - Need workflow reminders (read → plan → implement → validate → document)
71
+ - Looking for relevant skills for a task
72
+
73
+ ### 3ī¸âƒŖ CODEBASE_CHANGELOG.md
74
+ **Role:** Session-by-session development history
75
+ **Read:** When you need project history or context
76
+ **Contains:**
77
+ - Session entries (what changed, when, why)
78
+ - Validation results for each session
79
+ - Key learnings and discoveries
80
+ - Links to changed files with line numbers
81
+
82
+ **Use this when:**
83
+ - Understanding why a decision was made
84
+ - Tracking down when a bug was introduced
85
+ - Reviewing project evolution
86
+ - After each session (add new entry)
87
+
88
+ ### 🔄 How They Work Together
38
89
 
39
- **When to read this document:**
40
- - At the start of EVERY session before making changes
41
- - Before implementing new features (patterns + constraints)
42
- - When debugging issues (gotchas + known quirks)
43
- - Before updating dependencies (stack snapshot)
90
+ ```
91
+ ┌─────────────────────────────────────────────────────────┐
92
+ │ 1. Session Start: Read CODEBASE_ESSENTIALS.md │
93
+ │ (Get current architecture, patterns, invariants) │
94
+ └──────────────────────â”Ŧ──────────────────────────────────┘
95
+ │
96
+ â–ŧ
97
+ ┌─────────────────────────────────────────────────────────┐
98
+ │ 2. Work Session: Follow AGENTS.md workflow │
99
+ │ (AI-guided: read → plan → code → validate → doc) │
100
+ └──────────────────────â”Ŧ──────────────────────────────────┘
101
+ │
102
+ â–ŧ
103
+ ┌─────────────────────────────────────────────────────────┐
104
+ │ 3. Session End: Update CODEBASE_CHANGELOG.md │
105
+ │ (Document what changed, validation, learnings) │
106
+ └─────────────────────────────────────────────────────────┘
107
+ ```
44
108
 
45
- **Related documentation:**
46
- - Session history: [CODEBASE_CHANGELOG.md](CODEBASE_CHANGELOG.md)
47
- - AI workflow: [AGENTS.md](AGENTS.md)
48
- - Skills: [.github/skills/](.github/skills/)
109
+ **Golden Rule:** ESSENTIALS = "what is", AGENTS = "how to work", CHANGELOG = "what happened"
49
110
 
50
111
  ---
51
112
 
@@ -342,6 +403,89 @@ openspec archive X --yes # Archive after deployment
342
403
 
343
404
  ---
344
405
 
406
+ ## 🚀 First Implementation Guide
407
+
408
+ **Once this template is filled, here's your recommended build order:**
409
+
410
+ ### Step 1: Foundation (Week 1)
411
+ **Goal:** Get basic project running with validation
412
+
413
+ **Build:**
414
+ 1. Set up project structure (directories from "Project Structure" section)
415
+ 2. Initialize package manager and install dependencies
416
+ 3. Configure build tools and linters
417
+ 4. Write "Hello World" or minimal working version
418
+ 5. Set up validation commands from Validation Matrix
419
+
420
+ **Validate:**
421
+ - [ ] All validation commands work (`npm test`, etc.)
422
+ - [ ] Can build and run the project
423
+ - [ ] Linting passes
424
+
425
+ **Document:** Update CODEBASE_CHANGELOG.md with first session
426
+
427
+ ---
428
+
429
+ ### Step 2: Core Patterns (Week 2-3)
430
+ **Goal:** Implement fundamental patterns from this document
431
+
432
+ **Build:**
433
+ 1. Create pattern examples (from "Core Patterns" section)
434
+ 2. Set up error handling structure
435
+ 3. Implement logging/monitoring basics
436
+ 4. Add configuration management
437
+ 5. Write tests for core patterns
438
+
439
+ **Validate:**
440
+ - [ ] Pattern examples work as documented
441
+ - [ ] Tests cover core patterns
442
+ - [ ] No critical invariants violated
443
+
444
+ **Why this order:** Patterns guide all future code. Establish them early.
445
+
446
+ ---
447
+
448
+ ### Step 3: Feature Development (Ongoing)
449
+ **Goal:** Build actual features following established patterns
450
+
451
+ **Build:**
452
+ 1. Reference "Core Patterns" for each implementation
453
+ 2. Follow "Critical Invariants" religiously
454
+ 3. Watch out for "Common Gotchas"
455
+ 4. Run validation before each commit
456
+ 5. Update changelog after each session
457
+
458
+ **Validate:**
459
+ - [ ] New code follows documented patterns
460
+ - [ ] All validation passes
461
+ - [ ] No gotchas violated
462
+
463
+ **When stuck:** Review this document, check AGENTS.md for relevant skills
464
+
465
+ ---
466
+
467
+ ### Step 4: Hardening (Before Production)
468
+ **Goal:** Production-ready quality
469
+
470
+ **Build:**
471
+ 1. Implement security measures (Security section)
472
+ 2. Add performance optimizations (Performance section)
473
+ 3. Ensure accessibility (Accessibility section)
474
+ 4. Set up monitoring and alerting
475
+ 5. Document deployment process
476
+
477
+ **Validate:**
478
+ - [ ] Security checklist complete
479
+ - [ ] Performance targets met
480
+ - [ ] Accessibility standards met
481
+ - [ ] Deployment tested
482
+
483
+ ---
484
+
485
+ **Golden Rule:** Always refer back to this document. Don't drift from documented patterns.
486
+
487
+ ---
488
+
345
489
  ## Version Control
346
490
 
347
491
  **Branch strategy:** {{BRANCH_STRATEGY}}
@@ -354,43 +498,21 @@ openspec archive X --yes # Archive after deployment
354
498
 
355
499
  ## 📝 Customization Instructions
356
500
 
357
- **This is a template file. To use it:**
358
-
359
- 1. **Replace all {{PLACEHOLDERS}}** with your actual values
360
- 2. **Remove sections** that don't apply to your project
361
- 3. **Add sections** for your specific patterns
362
- 4. **Fill in examples** with real code from your project
363
- 5. **Update regularly** as patterns evolve
364
-
365
- **âš ī¸ CRITICAL RULES FOR AI AGENTS:**
366
-
367
- When filling this template, you MUST:
368
- - ✅ Replace `{{PLACEHOLDERS}}` with **REAL values from the project**, not generic text
369
- - ✅ Keep section headings **EXACTLY as written** (e.g., "Testing Patterns" stays "Testing Patterns")
370
- - ✅ Use actual commands, file paths, and code snippets from the codebase
371
- - ✅ Make content specific to THIS project, not generic advice
372
-
373
- When filling this template, you MUST NOT:
374
- - ❌ Change section headings (e.g., "Testing Patterns" → "Testing Guidelines")
375
- - ❌ Replace placeholders with other placeholders (e.g., `{{TEST_ORGANIZATION}}` → "Manual testing only")
376
- - ❌ Add generic content that could apply to any project
377
- - ❌ Skip sections - fill them or remove them
378
-
379
- **Common placeholders:**
380
- - `{{PROJECT_NAME}}` - Your project name
381
- - `{{DATE}}` - Current date
382
- - `{{FRAMEWORK}}` - Framework name and version
383
- - `{{LANGUAGE}}` - Programming language
384
- - `{{*_CMD}}` - Actual commands to run
385
- - `{{*_DESCRIPTION}}` - Your explanations
386
- - `{{*_EXAMPLE}}` - Real code examples
387
-
388
- **After customization:**
389
- 1. Rename to `CODEBASE_ESSENTIALS.md`
390
- 2. Commit to repository
391
- 3. Reference in AGENTS.md
392
- 4. Update as patterns change
501
+ **This is a template file. To customize it for your project:**
502
+
503
+ 👉 **See [SETUP_GUIDE.md](SETUP_GUIDE.md) for detailed instructions**
504
+
505
+ **Quick start:**
506
+ 1. Replace all `{{PLACEHOLDERS}}` with real values from your project
507
+ 2. Use actual commands, file paths, and code examples (not generic descriptions)
508
+ 3. Keep section headings exactly as written
509
+ 4. Remove sections that don't apply to your project
510
+
511
+ **âš ī¸ Critical:** Replace placeholders with REAL values, not other placeholders
512
+ Example: `{{TEST_CMD}}` → `npm test` (not "run your tests")
513
+
514
+ **AI-Assisted:** Use the prompt from `npx aiknowsys init` to have AI fill this automatically
393
515
 
394
516
  ---
395
517
 
396
- *This template is part of the Knowledge System Template. See [README](README.md) for full documentation.*
518
+ *This template is part of aiknowsys. See [README](README.md) and [SETUP_GUIDE.md](SETUP_GUIDE.md) for full documentation.*
package/README.md CHANGED
@@ -54,6 +54,9 @@ From production use in gnwebsite:
54
54
  # For new projects - interactive setup
55
55
  npx aiknowsys init
56
56
 
57
+ # For new projects with pre-built stack template
58
+ npx aiknowsys init --stack nextjs
59
+
57
60
  # For existing projects - auto-detect and migrate
58
61
  npx aiknowsys migrate
59
62
 
@@ -62,6 +65,35 @@ npm install -g aiknowsys
62
65
  aiknowsys init
63
66
  ```
64
67
 
68
+ **🚀 Pre-built Stack Templates:**
69
+
70
+ Skip most customization work with production-ready stack templates:
71
+
72
+ ```bash
73
+ # List available stacks
74
+ npx aiknowsys init --list-stacks
75
+
76
+ # Initialize with Next.js stack
77
+ npx aiknowsys init --stack nextjs
78
+
79
+ # Initialize with Vue + Express full-stack monorepo
80
+ npx aiknowsys init --stack vue-express
81
+ ```
82
+
83
+ **Available stacks:**
84
+ - `nextjs` - Next.js 15 + App Router + TypeScript + Tailwind + Prisma
85
+ - `vue-express` - Vue 3 + Express full-stack monorepo with shared types
86
+
87
+ Each stack template includes:
88
+ - ✅ Pre-filled Technology Snapshot
89
+ - ✅ Stack-specific validation matrix with proper commands
90
+ - ✅ Core patterns and conventions for the stack
91
+ - ✅ Common gotchas and solutions
92
+ - ✅ Testing patterns and examples
93
+ - ✅ Architecture decisions (why this stack)
94
+
95
+ **Setup time:** 2-3 minutes (vs 10-15 min interactive, vs 45 min manual)
96
+
65
97
  **Available commands:**
66
98
 
67
99
  | Command | Description | Auto-installs agents/skills? |
@@ -70,11 +102,73 @@ aiknowsys init
70
102
  | `npx aiknowsys migrate` | Full migration for existing projects | ✅ Yes |
71
103
  | `npx aiknowsys scan` | Scan codebase and generate draft ESSENTIALS | ❌ No (run install-agents after) |
72
104
  | `npx aiknowsys update` | Update agents, skills, and workflow to latest version | N/A (updates existing) |
105
+ | `npx aiknowsys check` | Validate knowledge system setup and configuration | N/A (validation) |
106
+ | `npx aiknowsys sync` | Sync AGENTS.md validation reference with ESSENTIALS.md | N/A (maintenance) |
107
+ | `npx aiknowsys audit` | Find common issues and pattern violations | N/A (analysis) |
73
108
  | `npx aiknowsys install-agents` | Install Developer + Architect agents | N/A (standalone) |
74
109
  | `npx aiknowsys install-skills` | Install universal skills | N/A (standalone) |
75
110
 
76
111
  **💡 AI-Assisted Completion:** When using `init` in AI-guided mode, `migrate`, or `scan`, you'll receive a ready-to-copy prompt that you can paste to your AI assistant (Claude, GPT-4, Copilot Chat, etc.) to automatically complete the TODO sections based on your actual codebase. Manual mode lets you fill sections yourself, but you can always use AI later.
77
112
 
113
+ **📋 Template Options:**
114
+
115
+ - **Minimal Template** (10 sections): For learning projects, prototypes, and simple tools
116
+ ```bash
117
+ npx aiknowsys init --template minimal
118
+ ```
119
+ Includes: Tech Stack, Validation Matrix, Structure, Patterns, Invariants, Gotchas, Testing, Architecture, Change Management, Workflow
120
+
121
+ - **Full Template** (13+ sections): For production projects and complex systems (default)
122
+ ```bash
123
+ npx aiknowsys init --template full # or just: npx aiknowsys init
124
+ ```
125
+ Includes all minimal sections + Security, Performance, Accessibility
126
+
127
+ See [examples/filled-simple-api](examples/filled-simple-api) for a realistic filled example using the minimal template.
128
+
129
+ **🚀 Enhanced Interactive Setup (Manual Mode):**
130
+
131
+ Manual mode now asks intelligent questions about your project and automatically fills many placeholders:
132
+
133
+ - ✅ **Technology Snapshot**: Framework, language, build tool, package manager
134
+ - ✅ **Validation Matrix**: Auto-generates test, lint, type-check commands
135
+ - ✅ **Tooling Details**: Database, linter, test framework selections
136
+ - ✅ **Individual Commands**: {{TEST_CMD}}, {{LINT_CMD}}, {{TYPE_CHECK_CMD}} all filled
137
+
138
+ **Before**: 50+ placeholders to fill manually
139
+ **After**: Only structure and pattern placeholders remain (for AI or human completion)
140
+
141
+ This significantly reduces setup time while maintaining flexibility for project-specific details.
142
+
143
+ **🔍 Verification & Maintenance Commands:**
144
+
145
+ New commands to validate and maintain your knowledge system:
146
+
147
+ ```bash
148
+ # Validate your setup
149
+ npx aiknowsys check
150
+ # ✓ Checks required files exist
151
+ # ✓ Verifies agents and skills installed
152
+ # ✓ Detects unfilled placeholders
153
+ # ✓ Validates validation matrix
154
+
155
+ # Fix redundancy (sync validation matrix reference)
156
+ npx aiknowsys sync
157
+ # Updates AGENTS.md to reference ESSENTIALS.md (DRY principle)
158
+
159
+ # Find issues and violations
160
+ npx aiknowsys audit
161
+ # âš ī¸ Detects validation matrix duplication
162
+ # âš ī¸ Finds generic placeholder values
163
+ # âš ī¸ Checks file size bloat
164
+ # â„šī¸ Suggests improvements
165
+ ```
166
+
167
+ **When to use:**
168
+ - `check` - Before committing, after setup, or when troubleshooting
169
+ - `sync` - After upgrading from old templates with duplicated validation matrix
170
+ - `audit` - Periodic health checks, before releases, or when reviewing code quality
171
+
78
172
  ---
79
173
 
80
174
  ## AI Tool Compatibility
@@ -206,6 +300,7 @@ User → @Developer → Implements feature → Auto-handoff → @SeniorArchitect
206
300
  - `code-refactoring` - Test-driven refactoring patterns
207
301
  - `testing-best-practices` - Framework-agnostic testing guide
208
302
  - `skill-creator` - How to create new skills
303
+ - `tdd-workflow` - Test-Driven Development (RED-GREEN-REFACTOR cycle)
209
304
 
210
305
  **Custom skills you can add:**
211
306
  - Feature implementation workflows
package/bin/cli.js CHANGED
@@ -11,6 +11,9 @@ import { migrate } from '../lib/commands/migrate.js';
11
11
  import { installAgents } from '../lib/commands/install-agents.js';
12
12
  import { installSkills } from '../lib/commands/install-skills.js';
13
13
  import { update } from '../lib/commands/update.js';
14
+ import { check } from '../lib/commands/check.js';
15
+ import { sync } from '../lib/commands/sync.js';
16
+ import { audit } from '../lib/commands/audit.js';
14
17
 
15
18
  // Get version from package.json
16
19
  const __filename = fileURLToPath(import.meta.url);
@@ -38,6 +41,9 @@ program
38
41
  .description('Initialize knowledge system with AI-assisted setup')
39
42
  .option('-d, --dir <directory>', 'Target directory', '.')
40
43
  .option('-y, --yes', 'Skip prompts and use defaults')
44
+ .option('-t, --template <type>', 'Template size: minimal (10 sections) or full (13+ sections)', 'full')
45
+ .option('-s, --stack <name>', 'Use pre-built stack template (nextjs, vue-express, etc.)')
46
+ .option('--list-stacks', 'List available stack templates')
41
47
  .action(init);
42
48
 
43
49
  program
@@ -75,6 +81,24 @@ program
75
81
  .option('-f, --force', 'Force update even if already up to date')
76
82
  .action(update);
77
83
 
84
+ program
85
+ .command('check')
86
+ .description('Validate knowledge system setup and configuration')
87
+ .option('-d, --dir <directory>', 'Target directory', '.')
88
+ .action(check);
89
+
90
+ program
91
+ .command('sync')
92
+ .description('Sync AGENTS.md validation reference with CODEBASE_ESSENTIALS.md')
93
+ .option('-d, --dir <directory>', 'Target directory', '.')
94
+ .action(sync);
95
+
96
+ program
97
+ .command('audit')
98
+ .description('Find common issues and pattern violations in knowledge system')
99
+ .option('-d, --dir <directory>', 'Target directory', '.')
100
+ .action(audit);
101
+
78
102
  // Default command - show help with styled banner
79
103
  program
80
104
  .action(() => {