agents-templated 2.2.10 → 2.2.12

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.
Files changed (53) hide show
  1. package/README.md +100 -86
  2. package/agents/commands/README.md +64 -0
  3. package/agents/commands/SCHEMA.md +22 -0
  4. package/agents/commands/arch-check.md +58 -0
  5. package/agents/commands/audit.md +58 -0
  6. package/agents/commands/debug-track.md +58 -0
  7. package/agents/commands/docs.md +58 -0
  8. package/agents/commands/fix.md +58 -0
  9. package/agents/commands/learn-loop.md +58 -0
  10. package/agents/commands/perf.md +58 -0
  11. package/agents/commands/plan.md +58 -0
  12. package/agents/commands/pr.md +58 -0
  13. package/agents/commands/problem-map.md +58 -0
  14. package/agents/commands/release-ready.md +58 -0
  15. package/agents/commands/release.md +58 -0
  16. package/agents/commands/risk-review.md +58 -0
  17. package/agents/commands/scope-shape.md +58 -0
  18. package/agents/commands/task.md +58 -0
  19. package/agents/commands/test.md +58 -0
  20. package/agents/commands/ux-bar.md +58 -0
  21. package/agents/rules/planning.mdc +69 -0
  22. package/bin/cli.js +116 -4
  23. package/index.js +12 -1
  24. package/lib/workflow.js +177 -0
  25. package/package.json +2 -1
  26. package/templates/CLAUDE.md +5 -0
  27. package/templates/README.md +103 -61
  28. package/templates/agents/commands/README.md +43 -3
  29. package/templates/agents/commands/arch-check.md +58 -0
  30. package/templates/agents/commands/audit.md +58 -38
  31. package/templates/agents/commands/debug-track.md +58 -0
  32. package/templates/agents/commands/docs.md +58 -34
  33. package/templates/agents/commands/fix.md +58 -34
  34. package/templates/agents/commands/learn-loop.md +58 -0
  35. package/templates/agents/commands/perf.md +58 -34
  36. package/templates/agents/commands/plan.md +58 -34
  37. package/templates/agents/commands/pr.md +58 -35
  38. package/templates/agents/commands/problem-map.md +58 -0
  39. package/templates/agents/commands/release-ready.md +58 -0
  40. package/templates/agents/commands/release.md +58 -39
  41. package/templates/agents/commands/risk-review.md +58 -0
  42. package/templates/agents/commands/scope-shape.md +58 -0
  43. package/templates/agents/commands/task.md +58 -35
  44. package/templates/agents/commands/test.md +58 -34
  45. package/templates/agents/commands/ux-bar.md +58 -0
  46. package/templates/agents/skills/README.md +15 -0
  47. package/templates/agents/skills/debug-skill/SKILL.md +39 -0
  48. package/templates/agents/skills/emilkowalski-skill/SKILL.md +51 -0
  49. package/templates/agents/skills/feature-forge/SKILL.md +39 -0
  50. package/templates/agents/skills/raphaelsalaja-userinterface-wiki/SKILL.md +51 -0
  51. package/templates/agents/skills/secure-code-guardian/SKILL.md +39 -0
  52. package/templates/agents/commands/refactor.md +0 -34
  53. package/templates/agents/commands/scaffold.md +0 -34
package/README.md CHANGED
@@ -9,67 +9,45 @@
9
9
 
10
10
  ---
11
11
 
12
- ## What is Agents Templated?
13
-
14
- Agents Templated scaffolds your project with:
15
-
16
- ✅ **AI Agent Configurations** – Auto-discovery files for 4 major AI coding assistants
17
- ✅ **Deterministic Command Contracts** – Structured slash-command protocol in `agents/commands/`
18
- ✅ **Security-First Patterns** – OWASP Top 10 protection guidelines built-in
19
- ✅ **Hardening Guidance** – Risk-based hardening/obfuscation and release evidence gates
20
- ✅ **Testing Strategy** – 80/15/5 coverage targets (unit/integration/e2e)
21
- ✅ **Agent-Based Architecture** – Specialized patterns for frontend, backend, database, testing, security
22
- ✅ **Technology-Agnostic** – Works with React, Django, Go, FastAPI, Next.js, or any stack you choose
23
-
24
- **Important:** This package does **NOT** install frameworks or libraries. It scaffolds the structure, patterns, and AI configurations—you install your chosen tech stack separately.
25
-
26
- ### What’s New in This Version
27
-
28
- - Deterministic slash-command standard in `AGENTS.MD` and modular contracts in `agents/commands/`
29
- - Implicit natural-language routing support (`slash-command-auto`) for non-technical prompts
30
- - New workflow/routing/hardening rule set:
31
- - `.claude/rules/intent-routing.md`
32
- - `.claude/rules/system-workflow.md`
33
- - `.claude/rules/hardening.md`
34
- - `.claude/rules/lessons-learned.md`
35
- - New baseline skills:
36
- - `.github/skills/feature-delivery/`
37
- - `.github/skills/bug-triage/`
38
- - `.github/skills/error-patterns/`
39
- - `.github/skills/app-hardening/`
40
- - `.github/skills/shadcn-ui/`
41
- - Release and audit contracts now require hardening evidence when risk profile requires it
12
+ ## Why This Package Exists
42
13
 
43
- ---
14
+ Most starter templates only create files. This package creates operating rules for how teams build, review, test, and ship.
15
+
16
+ You get:
17
+
18
+ - Multi-agent configuration for Cursor, Copilot, Claude, and generic hosts
19
+ - Deterministic command contracts in `agents/commands/`
20
+ - Security-first and testing-first rule baselines
21
+ - Reusable skills and optional subagents
44
22
 
45
- ## 🚀 Quick Start
23
+ Important: this package does not install your framework. It installs the operating layer around your framework.
46
24
 
47
- ### 1. Run the Interactive Wizard (Recommended)
25
+ ## 30-Second Start
26
+
27
+ ### 1. Install setup
48
28
 
49
29
  ```bash
50
- # Using npx (no installation needed) - RECOMMENDED
51
30
  npx agents-templated@latest wizard
31
+ ```
52
32
 
53
- # Or install globally first
54
- npm install -g agents-templated
55
- agents-templated wizard
33
+ ### 2. Start the command workflow
34
+
35
+ ```bash
36
+ agents-templated workflow
37
+ agents-templated problem-map "daily briefing assistant for founders"
56
38
  ```
57
39
 
58
- **Or use a preset for fast setup:**
40
+ ### 3. Optional preset bootstrap
59
41
 
60
42
  ```bash
61
- # Initialize with a specific preset
62
43
  npx agents-templated@latest init --preset=nextjs # Next.js
63
44
  npx agents-templated@latest init --preset=express-api # Express
64
45
  npx agents-templated@latest init --preset=django-react # Django
65
46
  npx agents-templated@latest init --preset=fastapi # FastAPI
66
47
  npx agents-templated@latest init --preset=go-api # Go
67
-
68
- # Or install all components without a preset
69
- npx agents-templated@latest init --all
70
48
  ```
71
49
 
72
- ### 2. Install Your Tech Stack
50
+ ### 4. Install your tech stack
73
51
 
74
52
  After initializing, install your chosen framework:
75
53
 
@@ -91,47 +69,59 @@ pip install sqlalchemy alembic # SQLAlchemy
91
69
  npm install mongoose # Mongoose (MongoDB)
92
70
  ```
93
71
 
94
- ### 3. Start Coding with AI
72
+ ### 5. Run the specialist sequence
73
+
74
+ Start with a product objective, then move through specialist commands:
75
+
76
+ ```bash
77
+ agents-templated workflow
78
+ agents-templated problem-map "daily briefing assistant for founders"
79
+ agents-templated scope-shape "scope the first release"
80
+ agents-templated risk-review "audit branch changes before merge"
81
+ agents-templated release-ready "prepare release checklist"
82
+ ```
83
+
84
+ ### 6. Start Coding with AI
95
85
 
96
86
  Your AI assistant will auto-load the configurations and follow enterprise patterns automatically!
97
87
 
98
88
  ---
99
89
 
100
- ## Key Features
90
+ ## Key Features
101
91
 
102
92
  | Feature | Description |
103
93
  |---------|-------------|
104
- | 🚀 **Quick Start Presets** | 5 popular tech stack presets (Next.js, Express, Django, FastAPI, Go) |
105
- | 🧙 **Interactive Wizard** | Guided setup with personalized recommendations |
106
- | 🤖 **AI Agents Supported** | Cursor, GitHub Copilot, Claude, and generic agents via `AGENTS.MD` |
107
- | 🧭 **Deterministic Commands** | Slash-command contracts with strict structured outputs |
108
- | 💬 **Auto Intent Routing** | Non-slash prompts can map to command contracts (`slash-command-auto`) |
109
- | 🔒 **Security-First** | OWASP Top 10 protection patterns built-in |
110
- | 🛡️ **Hardening Workflow** | Risk-based hardening rules plus verification/release gates |
111
- | 🧪 **Testing Strategy** | 80/15/5 coverage targets (unit/integration/e2e) |
112
- | **Project Validation** | `validate` and `doctor` commands for health checks |
113
- | 🔄 **Template Updates** | Keep your templates in sync with `update` command |
114
- | 🎯 **Technology-Agnostic** | Works with React, Django, Go, FastAPI, Next.js, or any stack |
115
- | **Accessibility** | WCAG 2.1 AA compliance patterns included |
94
+ | **Quick Start Presets** | 5 popular tech stack presets (Next.js, Express, Django, FastAPI, Go) |
95
+ | **Interactive Wizard** | Guided setup with personalized recommendations |
96
+ | **AI Agents Supported** | Cursor, GitHub Copilot, Claude, and generic agents via `AGENTS.MD` |
97
+ | **Deterministic Commands** | Slash-command contracts with strict structured outputs |
98
+ | **Intent-Routing Ready** | Command schema supports `slash-command-auto` mode for agent-side routing policies |
99
+ | **Security-First** | OWASP Top 10 protection patterns built-in |
100
+ | **Hardening Workflow** | Risk-based hardening rules plus verification/release gates |
101
+ | **Testing Strategy** | 80/15/5 coverage targets (unit/integration/e2e) |
102
+ | **Project Validation** | `validate` and `doctor` commands for health checks |
103
+ | **Template Updates** | Keep your templates in sync with `update` command |
104
+ | **Technology-Agnostic** | Works with React, Django, Go, FastAPI, Next.js, or any stack |
105
+ | **Accessibility** | WCAG 2.1 AA compliance patterns included |
116
106
 
117
107
  ---
118
108
 
119
- ## 🤖 AI Agent Support
109
+ ## AI Agent Support
120
110
 
121
111
  Agents Templated automatically configures compatible wrappers for major AI coding assistants:
122
112
 
123
113
  | AI Agent | Config File | Auto-Discovery |
124
114
  |----------|-------------|----------------|
125
- | **Cursor** | `.cursorrules` | Auto-loads in Cursor IDE |
126
- | **GitHub Copilot** | `.github/copilot-instructions.md` | Auto-loads in VS Code |
127
- | **Claude** | `CLAUDE.md` | Compatible |
128
- | **Generic agents** | `AGENTS.MD` | Compatible |
115
+ | **Cursor** | `.cursorrules` | Auto-loads in Cursor IDE |
116
+ | **GitHub Copilot** | `.github/copilot-instructions.md` | Auto-loads in VS Code |
117
+ | **Claude** | `CLAUDE.md` | Compatible |
118
+ | **Generic agents** | `AGENTS.MD` | Compatible |
129
119
 
130
120
  **Single source of truth:** `CLAUDE.md` drives generated tool-compatible instruction files.
131
121
 
132
122
  ---
133
123
 
134
- ## 📦 What Gets Installed
124
+ ## What Gets Installed
135
125
 
136
126
  When you run `agents-templated init`, you get:
137
127
 
@@ -141,7 +131,7 @@ your-project/
141
131
  │ └── source/
142
132
  │ └── core.md # Canonical instruction source of truth
143
133
 
144
- ├── agent-docs/ # 📚 Comprehensive documentation
134
+ ├── agent-docs/ # Comprehensive documentation
145
135
  │ ├── ARCHITECTURE.md # Project architecture & tech stack
146
136
  │ └── README.md # Human-readable setup guide
147
137
 
@@ -173,7 +163,7 @@ your-project/
173
163
  │ │ └── lessons-learned.md
174
164
  │ └── agents/ # Optional subagents
175
165
 
176
- ├── agents/ # 🤖 Deterministic command contracts
166
+ ├── agents/ # Deterministic command contracts
177
167
  │ └── commands/
178
168
  │ │ ├── SCHEMA.md # Global slash-command response schema
179
169
  │ │ ├── plan.md # /plan contract
@@ -192,49 +182,73 @@ your-project/
192
182
 
193
183
  ---
194
184
 
195
- ## 📋 Command Reference
185
+ ## Command Reference
196
186
 
197
187
  ### Setup Commands
198
188
 
199
189
  ```bash
200
- # 🧙 Interactive wizard (recommended for beginners)
190
+ # Interactive wizard (recommended for beginners)
201
191
  agents-templated wizard
202
192
 
203
- # 🚀 Quick start with presets
193
+ # Quick start with presets
204
194
  agents-templated init --preset=nextjs # Next.js full-stack
205
195
  agents-templated init --preset=express-api # Express.js API
206
196
  agents-templated init --preset=django-react # Django + React
207
197
  agents-templated init --preset=fastapi # FastAPI
208
198
  agents-templated init --preset=go-api # Go API
209
199
 
210
- # 🔧 Manual component selection
200
+ # Manual component selection
211
201
  agents-templated init --all # All components
212
202
  agents-templated init --docs # Documentation only
213
203
  agents-templated init --rules # Agent rules only
214
204
  agents-templated init --skills # Skills only
205
+ agents-templated init --commands # Command contracts only
215
206
 
216
- # ⚠️ Force overwrite existing files
207
+ # Force overwrite existing files
217
208
  agents-templated init --all --force
218
209
  ```
219
210
 
220
211
  ### Maintenance Commands
221
212
 
222
213
  ```bash
223
- # Validate your project setup
214
+ # Validate your project setup
224
215
  agents-templated validate # Quick validation
225
216
  agents-templated doctor # Comprehensive health check
226
217
 
227
- # 🔄 Update templates to latest version
218
+ # Update templates to latest version
228
219
  agents-templated update # Apply updates with backup
229
220
  agents-templated update --check-only # Check without installing
230
221
 
231
- # 📚 List available components and presets
222
+ # List available components and presets
232
223
  agents-templated list
224
+
225
+ # Lifecycle workflow and specialist commands
226
+ agents-templated workflow
233
227
  ```
234
228
 
229
+ ### Workflow Commands
230
+
231
+ These commands provide deterministic specialist guidance aligned to the sprint lifecycle:
232
+
233
+ | Command | Specialist | Primary Outcome |
234
+ |---------|------------|-----------------|
235
+ | `problem-map` | Problem Strategist | Clarify user pain and define the actual problem |
236
+ | `scope-shape` | Scope Director | Challenge scope and set high-leverage direction |
237
+ | `arch-check` | Architecture Reviewer | Lock architecture and edge-case coverage |
238
+ | `ux-bar` | Design Quality Lead | Raise UX quality before implementation |
239
+ | `debug-track` | Root-Cause Investigator | Reproduce and isolate root cause |
240
+ | `risk-review` | Release Risk Reviewer | Surface production-risk issues before merge |
241
+ | `perf` | Performance Analyst | Optimize performance and guard against regressions |
242
+ | `release-ready` | Release Coordinator | Prepare release artifacts and final checks |
243
+ | `docs` | Documentation Engineer | Sync docs with shipped behavior |
244
+ | `learn-loop` | Iteration Lead | Capture lessons and next-cycle actions |
245
+
246
+ Each command maps to deterministic contract files in `agents/commands/` and uses the schema in `agents/commands/SCHEMA.md`.
247
+
248
+
235
249
  ---
236
250
 
237
- ## 🎯 After Installation: Next Steps
251
+ ## After Installation: Next Steps
238
252
 
239
253
  ### 1. Install Your Tech Stack
240
254
 
@@ -323,15 +337,15 @@ Your AI will follow the enterprise patterns automatically!
323
337
 
324
338
  ---
325
339
 
326
- ## 🏗️ Core Principles
340
+ ## Core Principles
327
341
 
328
342
  ### Security-First Development
329
343
 
330
- Validate all inputs at application boundaries with schema validation
331
- Authenticate and authorize every protected endpoint
332
- Rate limit public endpoints to prevent abuse
333
- Sanitize outputs to prevent injection attacks
334
- Never expose sensitive data in error messages or logs
344
+ - Validate all inputs at application boundaries with schema validation
345
+ - Authenticate and authorize every protected endpoint
346
+ - Rate limit public endpoints to prevent abuse
347
+ - Sanitize outputs to prevent injection attacks
348
+ - Never expose sensitive data in error messages or logs
335
349
 
336
350
  **Reference**: [.claude/rules/security.md](.claude/rules/security.md)
337
351
 
@@ -357,7 +371,7 @@ Your AI will follow the enterprise patterns automatically!
357
371
 
358
372
  ---
359
373
 
360
- ## 📚 Available Presets
374
+ ## Available Presets
361
375
 
362
376
  | Preset | Tech Stack | Best For |
363
377
  |--------|-----------|----------|
@@ -375,7 +389,7 @@ Each preset includes:
375
389
 
376
390
  ---
377
391
 
378
- ## 🔧 Programmatic API
392
+ ## Programmatic API
379
393
 
380
394
  Use agents-templated in your build scripts or automation:
381
395
 
@@ -399,7 +413,7 @@ await agentsTemplated.install('./my-project', {
399
413
 
400
414
  ---
401
415
 
402
- ## 📝 Usage Examples
416
+ ## Usage Examples
403
417
 
404
418
  ### Frontend Development
405
419
  ```
@@ -424,7 +438,7 @@ await agentsTemplated.install('./my-project', {
424
438
 
425
439
  ---
426
440
 
427
- ## 🤝 Contributing
441
+ ## Contributing
428
442
 
429
443
  When contributing to this template:
430
444
  1. Maintain technology-agnostic patterns
@@ -437,13 +451,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
437
451
 
438
452
  ---
439
453
 
440
- ## 📖 License
454
+ ## License
441
455
 
442
456
  MIT License - See [LICENSE](LICENSE) for details.
443
457
 
444
458
  ---
445
459
 
446
- ## 🔗 Links
460
+ ## Links
447
461
 
448
462
  - **NPM Package**: https://www.npmjs.com/package/agents-templated
449
463
  - **GitHub Repository**: https://github.com/rickandrew2/agents-templated
@@ -0,0 +1,64 @@
1
+ # Deterministic Slash Command Contracts
2
+
3
+ This directory is the modular source of truth for slash-command execution contracts.
4
+
5
+ - Global protocol and safety framework: `AGENTS.MD` → `Deterministic Slash Command System Standard`
6
+ - Global response schema: `agents/commands/SCHEMA.md`
7
+ - Command contracts:
8
+ - `plan.md`
9
+ - `task.md`
10
+ - `fix.md`
11
+ - `audit.md`
12
+ - `perf.md`
13
+ - `test.md`
14
+ - `pr.md`
15
+ - `release.md`
16
+ - `docs.md`
17
+ - `problem-map.md`
18
+ - `scope-shape.md`
19
+ - `arch-check.md`
20
+ - `ux-bar.md`
21
+ - `debug-track.md`
22
+ - `risk-review.md`
23
+ - `release-ready.md`
24
+ - `learn-loop.md`
25
+
26
+ Execution requirements:
27
+ - Parse slash commands deterministically.
28
+ - Return structured output only.
29
+ - No conversational fallback in slash mode.
30
+ - Enforce destructive confirmation token: `CONFIRM-DESTRUCTIVE:<target>`.
31
+ - Enforce unique command purpose for each primary workflow command.
32
+
33
+ ## Command Integrity Guards
34
+
35
+ - Primary workflow commands must have unique purpose identifiers.
36
+ - Duplicate command purpose definitions fail CLI startup validation.
37
+ - Deprecated aliases are not part of the active command surface.
38
+
39
+ ## Publish Inclusion
40
+
41
+ The npm package includes command contracts from both:
42
+
43
+ - `agents/commands/` (root mirror)
44
+ - `templates/agents/commands/` (scaffold source)
45
+
46
+ ## Workflow Command Mapping
47
+
48
+ Use these lifecycle commands as the recommended specialist sequence:
49
+
50
+ - `problem-map` -> `plan.md`
51
+ - `scope-shape` -> `plan.md`
52
+ - `arch-check` -> `plan.md`
53
+ - `ux-bar` -> `plan.md`
54
+ - `debug-track` -> `fix.md`
55
+ - `risk-review` -> `audit.md`
56
+ - `perf` -> `perf.md`
57
+ - `release-ready` -> `release.md`
58
+ - `docs` -> `docs.md`
59
+ - `learn-loop` -> `task.md`
60
+
61
+ The CLI command `agents-templated workflow` prints this lifecycle in order:
62
+
63
+ Think -> Plan -> Build -> Review -> Test -> Ship -> Reflect
64
+
@@ -0,0 +1,22 @@
1
+ # Slash Command Output Schema
2
+
3
+ All slash command responses MUST include the following top-level fields:
4
+
5
+ - `command`
6
+ - `execution_id`
7
+ - `mode`
8
+ - `status`
9
+ - `inputs`
10
+ - `prechecks`
11
+ - `execution_log`
12
+ - `artifacts`
13
+ - `risks`
14
+ - `safety_checks`
15
+ - `stop_condition`
16
+ - `next_action`
17
+
18
+ Constraints:
19
+ - `mode` MUST be one of: `slash-command`, `slash-command-auto`.
20
+ - `status` MUST be one of: `completed`, `blocked`, `failed`.
21
+ - If a field value is unknown, set it to `null`.
22
+ - Unknown or malformed slash commands MUST return structured error output and stop.
@@ -0,0 +1,58 @@
1
+ # /arch-check
2
+
3
+ ## A. Intent
4
+ Validate architecture readiness and implementation constraints before build begins.
5
+
6
+ ## B. When to Use
7
+ - Use after scope lock and before implementation starts.
8
+ - Do not use for post-release retrospectives.
9
+
10
+ ## C. Context Assumptions
11
+ - Scope is frozen for current increment.
12
+ - Architecture options are documented.
13
+ - Test strategy can be defined.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `architecture_goal` | string | "multi-tenant API isolation" |
19
+ | `design_options` | string[] | ["shared schema", "schema-per-tenant"] |
20
+ | `design_artifact` | artifact | ADR doc, sequence diagram |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] design options are comparable
24
+ - [ ] key edge cases are identified
25
+ - [ ] test strategy exists for selected design
26
+
27
+ ## F. Execution Flow
28
+ 1. Review architecture options and constraints.
29
+ 2. Evaluate edge cases and failure modes.
30
+ 3. Validate selected option against requirements.
31
+ 4. Decision point ->
32
+ - condition A -> critical gap found -> block readiness
33
+ - condition B -> no critical gaps -> continue.
34
+ 5. Build architecture decision and test implications.
35
+ 6. Emit architecture readiness report.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "architecture_id": "string",
42
+ "decisions": ["array","of","strings"],
43
+ "risk_level": "low | medium | high",
44
+ "blocker": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - selected architecture lacks testable validation path
54
+ - critical edge case has no mitigation
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block on architecture with unresolved critical failure modes
58
+ - Warn only: warn when non-critical tradeoffs are accepted
@@ -0,0 +1,58 @@
1
+ # /audit
2
+
3
+ ## A. Intent
4
+ Produce a deterministic risk and compliance audit with prioritized findings.
5
+
6
+ ## B. When to Use
7
+ - Use before release or for targeted quality/security reviews.
8
+ - Do not use as a substitute for implementation planning.
9
+
10
+ ## C. Context Assumptions
11
+ - Audit scope is defined.
12
+ - Relevant artifacts are available.
13
+ - Severity rubric is agreed.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `audit_scope` | string | "authentication flows" |
19
+ | `checklist` | string[] | ["security", "tests", "rollback"] |
20
+ | `evidence_set` | artifact | PR diff, logs, reports |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] scope is explicit
24
+ - [ ] evidence artifacts are accessible
25
+ - [ ] severity model is available
26
+
27
+ ## F. Execution Flow
28
+ 1. Collect scoped evidence and standards.
29
+ 2. Evaluate checks against evidence.
30
+ 3. Classify findings by severity.
31
+ 4. Decision point ->
32
+ - condition A -> critical unresolved finding -> block recommendation
33
+ - condition B -> no critical blocker -> continue.
34
+ 5. Assemble remediation actions and owners.
35
+ 6. Emit audit report.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "audit_id": "string",
42
+ "findings": ["array","of","strings"],
43
+ "severity": "low | medium | high",
44
+ "blocker": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - scope cannot be determined
54
+ - critical evidence is missing
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block when critical finding lacks mitigation
58
+ - Warn only: warn when medium findings are deferred
@@ -0,0 +1,58 @@
1
+ # /debug-track
2
+
3
+ ## A. Intent
4
+ Run root-cause-first debugging workflow and guarantee evidence-backed defect diagnosis.
5
+
6
+ ## B. When to Use
7
+ - Use when behavior is broken, failing, or regressing in runtime.
8
+ - Do not use to apply speculative patches without diagnosis.
9
+
10
+ ## C. Context Assumptions
11
+ - Defect symptom is captured.
12
+ - A reproduction path is available or can be derived.
13
+ - Runtime context is accessible.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `defect_symptom` | string | "payment retries loop forever" |
19
+ | `repro_steps` | string[] | ["submit order", "disconnect network"] |
20
+ | `runtime_artifact` | artifact | error logs, trace screenshot, failing test |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] reproduction path is actionable
24
+ - [ ] evidence can be collected at runtime
25
+ - [ ] investigation scope is bounded
26
+
27
+ ## F. Execution Flow
28
+ 1. Reproduce issue and capture trace.
29
+ 2. Follow execution and state transitions.
30
+ 3. Confirm root cause with evidence.
31
+ 4. Decision point ->
32
+ - condition A -> root cause unverified -> continue investigation
33
+ - condition B -> verified -> continue.
34
+ 5. Draft minimal patch strategy and checks.
35
+ 6. Emit debug investigation report.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "debug_id": "string",
42
+ "evidence": ["array","of","strings"],
43
+ "certainty": "low | medium | high",
44
+ "root_cause": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - issue cannot be reproduced with available context
54
+ - root cause cannot be evidenced
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block on symptom-only fixes without diagnosis
58
+ - Warn only: warn when reproduction is intermittent
@@ -0,0 +1,58 @@
1
+ # /docs
2
+
3
+ ## A. Intent
4
+ Create deterministic documentation outputs aligned with current implementation behavior.
5
+
6
+ ## B. When to Use
7
+ - Use when generating or updating docs as a direct deliverable.
8
+ - Do not use for release decision making.
9
+
10
+ ## C. Context Assumptions
11
+ - Source behavior is known.
12
+ - Target audience is defined.
13
+ - Doc destination is available.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `doc_scope` | string | "API auth endpoints" |
19
+ | `source_refs` | string[] | ["src/auth.ts", "openapi.yaml"] |
20
+ | `doc_artifact` | artifact | existing README path or docs URL |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] scope is explicit
24
+ - [ ] source refs are accessible
25
+ - [ ] destination path is writable
26
+
27
+ ## F. Execution Flow
28
+ 1. Collect implementation references.
29
+ 2. Draft structured documentation content.
30
+ 3. Validate examples and references.
31
+ 4. Decision point ->
32
+ - condition A -> mismatch with implementation -> revise doc content
33
+ - condition B -> aligned -> continue.
34
+ 5. Assemble final documentation package.
35
+ 6. Emit documentation output.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "doc_id": "string",
42
+ "updated_sections": ["array","of","strings"],
43
+ "confidence": "low | medium | high",
44
+ "gap": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: file
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - source references are unavailable
54
+ - critical behavior cannot be documented accurately
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block on knowingly incorrect implementation claims
58
+ - Warn only: warn when sections remain TODO with owner