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
@@ -32,10 +32,15 @@ All policy, routing, and skill governance lives here — edit this file directly
32
32
  |-------|------|------------------|
33
33
  | app-hardening | `.github/skills/app-hardening/SKILL.md` | Hardening, anti-tamper, integrity controls |
34
34
  | bug-triage | `.github/skills/bug-triage/SKILL.md` | Something is broken, failing, or crashing |
35
+ | debug-skill | `.github/skills/debug-skill/SKILL.md` | Breakpoint-first debugging, execution tracing, state inspection |
36
+ | secure-code-guardian | `.github/skills/secure-code-guardian/SKILL.md` | Secure-by-default coding for auth, secrets, and user input |
37
+ | feature-forge | `.github/skills/feature-forge/SKILL.md` | Turn feature ideas into execution-ready requirements and acceptance criteria |
35
38
  | error-patterns | `.github/skills/error-patterns/SKILL.md` | Debugging with persistent lessons memory and automatic fix recording |
36
39
  | feature-delivery | `.github/skills/feature-delivery/SKILL.md` | Build/add/implement feature work |
37
40
  | find-skills | `.github/skills/find-skills/SKILL.md` | User asks to discover a skill |
38
41
  | ui-ux-pro-max | `.github/skills/ui-ux-pro-max/SKILL.md` | UI, layout, design, visual work |
42
+ | emilkowalski-skill | `.github/skills/emilkowalski-skill/SKILL.md` | Frontend polish, animation quality, interaction refinement |
43
+ | raphaelsalaja-userinterface-wiki | `.github/skills/raphaelsalaja-userinterface-wiki/SKILL.md` | UI hierarchy, readability, and interface best-practice audits |
39
44
  | api-design | `.github/skills/api-design/SKILL.md` | REST/GraphQL API design, OpenAPI specs, versioning |
40
45
  | llm-integration | `.github/skills/llm-integration/SKILL.md` | LLM integrations, RAG, prompt engineering, evaluation |
41
46
 
@@ -9,48 +9,45 @@
9
9
 
10
10
  ---
11
11
 
12
- ## What is Agents Templated?
12
+ ## Why This Package Exists
13
13
 
14
- Agents Templated scaffolds your project with:
14
+ Most starter templates only create files. This package creates operating rules for how teams build, review, test, and ship.
15
15
 
16
- **AI Agent Configurations** – Auto-discovery files for 4 major AI coding assistants
17
- ✅ **Security-First Patterns** – OWASP Top 10 protection guidelines built-in
18
- ✅ **Testing Strategy** – 80/15/5 coverage targets (unit/integration/e2e)
19
- ✅ **Agent-Based Architecture** – Specialized patterns for frontend, backend, database, testing, security
20
- ✅ **Technology-Agnostic** – Works with React, Django, Go, FastAPI, Next.js, or any stack you choose
16
+ You get:
21
17
 
22
- **Important:** This package does **NOT** install frameworks or libraries. It scaffolds the structure, patterns, and AI configurations—you install your chosen tech stack separately.
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
23
22
 
24
- ---
23
+ Important: this package does not install your framework. It installs the operating layer around your framework.
25
24
 
26
- ## 🚀 Quick Start
25
+ ## 30-Second Start
27
26
 
28
- ### 1. Run the Interactive Wizard (Recommended)
27
+ ### 1. Install setup
29
28
 
30
29
  ```bash
31
- # Using npx (no installation needed) - RECOMMENDED
32
30
  npx agents-templated@latest wizard
31
+ ```
33
32
 
34
- # Or install globally first
35
- npm install -g agents-templated
36
- 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"
37
38
  ```
38
39
 
39
- **Or use a preset for fast setup:**
40
+ ### 3. Optional preset bootstrap
40
41
 
41
42
  ```bash
42
- # Initialize with a specific preset
43
43
  npx agents-templated@latest init --preset=nextjs # Next.js
44
44
  npx agents-templated@latest init --preset=express-api # Express
45
45
  npx agents-templated@latest init --preset=django-react # Django
46
46
  npx agents-templated@latest init --preset=fastapi # FastAPI
47
47
  npx agents-templated@latest init --preset=go-api # Go
48
-
49
- # Or install all components without a preset
50
- npx agents-templated@latest init --all
51
48
  ```
52
49
 
53
- ### 2. Install Your Tech Stack
50
+ ### 4. Install your tech stack
54
51
 
55
52
  After initializing, install your chosen framework:
56
53
 
@@ -72,44 +69,58 @@ pip install sqlalchemy alembic # SQLAlchemy
72
69
  npm install mongoose # Mongoose (MongoDB)
73
70
  ```
74
71
 
75
- ### 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
76
85
 
77
86
  Your AI assistant will auto-load the configurations and follow enterprise patterns automatically!
78
87
 
79
88
  ---
80
89
 
81
- ## Key Features
90
+ ## Key Features
82
91
 
83
92
  | Feature | Description |
84
93
  |---------|-------------|
85
- | 🚀 **Quick Start Presets** | 5 popular tech stack presets (Next.js, Express, Django, FastAPI, Go) |
86
- | 🧙 **Interactive Wizard** | Guided setup with personalized recommendations |
87
- | 🤖 **AI Agents Supported** | Cursor, GitHub Copilot, Claude, and generic agents via `AGENTS.MD` |
88
- | 🔒 **Security-First** | OWASP Top 10 protection patterns built-in |
89
- | 🧪 **Testing Strategy** | 80/15/5 coverage targets (unit/integration/e2e) |
90
- | **Project Validation** | `validate` and `doctor` commands for health checks |
91
- | 🔄 **Template Updates** | Keep your templates in sync with `update` command |
92
- | 🎯 **Technology-Agnostic** | Works with React, Django, Go, FastAPI, Next.js, or any stack |
93
- | **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
+ | **Deterministic Commands** | Slash-command contracts with strict structured outputs |
97
+ | **Intent-Routing Ready** | Command schema supports `slash-command-auto` mode for agent-side routing policies |
98
+ | **Security-First** | OWASP Top 10 protection patterns built-in |
99
+ | **Hardening Workflow** | Risk-based hardening rules plus verification/release gates |
100
+ | **Testing Strategy** | 80/15/5 coverage targets (unit/integration/e2e) |
101
+ | **Project Validation** | `validate` and `doctor` commands for health checks |
102
+ | **Template Updates** | Keep your templates in sync with `update` command |
103
+ | **Technology-Agnostic** | Works with React, Django, Go, FastAPI, Next.js, or any stack |
104
+ | **Accessibility** | WCAG 2.1 AA compliance patterns included |
94
105
 
95
106
  ---
96
107
 
97
- ## 🤖 AI Agent Support
108
+ ## AI Agent Support
98
109
 
99
110
  Agents Templated automatically configures compatible wrappers for major AI coding assistants:
100
111
 
101
112
  | AI Agent | Config File | Auto-Discovery |
102
113
  |----------|-------------|----------------|
103
- | **Cursor** | `.cursorrules` | Auto-loads in Cursor IDE |
104
- | **GitHub Copilot** | `.github/copilot-instructions.md` | Auto-loads in VS Code |
105
- | **Claude** | `CLAUDE.md` | Compatible |
106
- | **Generic agents** | `AGENTS.MD` | Compatible |
114
+ | **Cursor** | `.cursorrules` | Auto-loads in Cursor IDE |
115
+ | **GitHub Copilot** | `.github/copilot-instructions.md` | Auto-loads in VS Code |
116
+ | **Claude** | `CLAUDE.md` | Compatible |
117
+ | **Generic agents** | `AGENTS.MD` | Compatible |
107
118
 
108
119
  **Single source of truth:** `CLAUDE.md` drives generated tool-compatible instruction files.
109
120
 
110
121
  ---
111
122
 
112
- ## 📦 What Gets Installed
123
+ ## What Gets Installed
113
124
 
114
125
  When you run `agents-templated init`, you get:
115
126
 
@@ -119,14 +130,17 @@ your-project/
119
130
  │ └── source/
120
131
  │ └── core.md # Canonical instruction source of truth
121
132
 
122
- ├── agent-docs/ # 📚 Comprehensive documentation
133
+ ├── agent-docs/ # Comprehensive documentation
123
134
  │ ├── ARCHITECTURE.md # Project architecture & tech stack
124
135
  │ └── README.md # Human-readable setup guide
125
136
 
126
137
  ├── .github/
127
138
  │ ├── skills/
128
139
  │ │ ├── find-skills/ # Skill discovery helper
140
+ │ │ ├── feature-delivery/ # Scoped feature delivery workflow
141
+ │ │ ├── bug-triage/ # Reproduction-first defect workflow
129
142
  │ │ ├── error-patterns/ # Persistent error-debugging memory workflow
143
+ │ │ ├── app-hardening/ # Hardening and release-evidence workflow
130
144
  │ │ ├── ui-ux-pro-max/ # Advanced UI/UX design implementation skill
131
145
  │ │ ├── shadcn-ui/ # shadcn/ui setup and component patterns
132
146
  │ │ ├── README.md # Guide for creating custom skills
@@ -141,9 +155,14 @@ your-project/
141
155
  │ │ ├── frontend.md
142
156
  │ │ ├── database.md
143
157
  │ │ ├── style.md
158
+ │ │ ├── workflows.md
159
+ │ │ ├── intent-routing.md
160
+ │ │ ├── system-workflow.md
161
+ │ │ ├── hardening.md
144
162
  │ │ └── lessons-learned.md
163
+ │ └── agents/ # Optional subagents
145
164
 
146
- ├── agents/ # 🤖 Deterministic command contracts
165
+ ├── agents/ # Deterministic command contracts
147
166
  │ └── commands/
148
167
  │ │ ├── SCHEMA.md # Global slash-command response schema
149
168
  │ │ ├── plan.md # /plan contract
@@ -162,49 +181,72 @@ your-project/
162
181
 
163
182
  ---
164
183
 
165
- ## 📋 Command Reference
184
+ ## Command Reference
166
185
 
167
186
  ### Setup Commands
168
187
 
169
188
  ```bash
170
- # 🧙 Interactive wizard (recommended for beginners)
189
+ # Interactive wizard (recommended for beginners)
171
190
  agents-templated wizard
172
191
 
173
- # 🚀 Quick start with presets
192
+ # Quick start with presets
174
193
  agents-templated init --preset=nextjs # Next.js full-stack
175
194
  agents-templated init --preset=express-api # Express.js API
176
195
  agents-templated init --preset=django-react # Django + React
177
196
  agents-templated init --preset=fastapi # FastAPI
178
197
  agents-templated init --preset=go-api # Go API
179
198
 
180
- # 🔧 Manual component selection
199
+ # Manual component selection
181
200
  agents-templated init --all # All components
182
201
  agents-templated init --docs # Documentation only
183
202
  agents-templated init --rules # Agent rules only
184
203
  agents-templated init --skills # Skills only
204
+ agents-templated init --commands # Command contracts only
185
205
 
186
- # ⚠️ Force overwrite existing files
206
+ # Force overwrite existing files
187
207
  agents-templated init --all --force
188
208
  ```
189
209
 
190
210
  ### Maintenance Commands
191
211
 
192
212
  ```bash
193
- # Validate your project setup
213
+ # Validate your project setup
194
214
  agents-templated validate # Quick validation
195
215
  agents-templated doctor # Comprehensive health check
196
216
 
197
- # 🔄 Update templates to latest version
217
+ # Update templates to latest version
198
218
  agents-templated update # Apply updates with backup
199
219
  agents-templated update --check-only # Check without installing
200
220
 
201
- # 📚 List available components and presets
221
+ # List available components and presets
202
222
  agents-templated list
223
+
224
+ # Lifecycle workflow and specialist commands
225
+ agents-templated workflow
203
226
  ```
204
227
 
228
+ ### Workflow Commands
229
+
230
+ These commands provide deterministic specialist guidance aligned to the sprint lifecycle:
231
+
232
+ | Command | Specialist | Primary Outcome |
233
+ |---------|------------|-----------------|
234
+ | `problem-map` | Problem Strategist | Clarify user pain and define the actual problem |
235
+ | `scope-shape` | Scope Director | Challenge scope and set high-leverage direction |
236
+ | `arch-check` | Architecture Reviewer | Lock architecture and edge-case coverage |
237
+ | `ux-bar` | Design Quality Lead | Raise UX quality before implementation |
238
+ | `debug-track` | Root-Cause Investigator | Reproduce and isolate root cause |
239
+ | `risk-review` | Release Risk Reviewer | Surface production-risk issues before merge |
240
+ | `perf` | Performance Analyst | Optimize performance and guard against regressions |
241
+ | `release-ready` | Release Coordinator | Prepare release artifacts and final checks |
242
+ | `docs` | Documentation Engineer | Sync docs with shipped behavior |
243
+ | `learn-loop` | Iteration Lead | Capture lessons and next-cycle actions |
244
+
245
+ Each command maps to deterministic contract files in `agents/commands/` and uses the schema in `agents/commands/SCHEMA.md`.
246
+
205
247
  ---
206
248
 
207
- ## 🎯 After Installation: Next Steps
249
+ ## After Installation: Next Steps
208
250
 
209
251
  ### 1. Install Your Tech Stack
210
252
 
@@ -293,15 +335,15 @@ Your AI will follow the enterprise patterns automatically!
293
335
 
294
336
  ---
295
337
 
296
- ## 🏗️ Core Principles
338
+ ## Core Principles
297
339
 
298
340
  ### Security-First Development
299
341
 
300
- Validate all inputs at application boundaries with schema validation
301
- Authenticate and authorize every protected endpoint
302
- Rate limit public endpoints to prevent abuse
303
- Sanitize outputs to prevent injection attacks
304
- Never expose sensitive data in error messages or logs
342
+ - Validate all inputs at application boundaries with schema validation
343
+ - Authenticate and authorize every protected endpoint
344
+ - Rate limit public endpoints to prevent abuse
345
+ - Sanitize outputs to prevent injection attacks
346
+ - Never expose sensitive data in error messages or logs
305
347
 
306
348
  **Reference**: [.claude/rules/security.md](.claude/rules/security.md)
307
349
 
@@ -327,7 +369,7 @@ Your AI will follow the enterprise patterns automatically!
327
369
 
328
370
  ---
329
371
 
330
- ## 📚 Available Presets
372
+ ## Available Presets
331
373
 
332
374
  | Preset | Tech Stack | Best For |
333
375
  |--------|-----------|----------|
@@ -345,7 +387,7 @@ Each preset includes:
345
387
 
346
388
  ---
347
389
 
348
- ## 🔧 Programmatic API
390
+ ## Programmatic API
349
391
 
350
392
  Use agents-templated in your build scripts or automation:
351
393
 
@@ -369,7 +411,7 @@ await agentsTemplated.install('./my-project', {
369
411
 
370
412
  ---
371
413
 
372
- ## 📝 Usage Examples
414
+ ## Usage Examples
373
415
 
374
416
  ### Frontend Development
375
417
  ```
@@ -394,7 +436,7 @@ await agentsTemplated.install('./my-project', {
394
436
 
395
437
  ---
396
438
 
397
- ## 🤝 Contributing
439
+ ## Contributing
398
440
 
399
441
  When contributing to this template:
400
442
  1. Maintain technology-agnostic patterns
@@ -407,13 +449,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
407
449
 
408
450
  ---
409
451
 
410
- ## 📖 License
452
+ ## License
411
453
 
412
454
  MIT License - See [LICENSE](LICENSE) for details.
413
455
 
414
456
  ---
415
457
 
416
- ## 🔗 Links
458
+ ## Links
417
459
 
418
460
  - **NPM Package**: https://www.npmjs.com/package/agents-templated
419
461
  - **GitHub Repository**: https://github.com/rickandrew2/agents-templated
@@ -7,18 +7,58 @@ This directory is the modular source of truth for slash-command execution contra
7
7
  - Command contracts:
8
8
  - `plan.md`
9
9
  - `task.md`
10
- - `scaffold.md`
11
10
  - `fix.md`
12
- - `refactor.md`
13
11
  - `audit.md`
14
12
  - `perf.md`
15
13
  - `test.md`
16
14
  - `pr.md`
17
15
  - `release.md`
18
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`
19
25
 
20
26
  Execution requirements:
21
27
  - Parse slash commands deterministically.
22
28
  - Return structured output only.
23
29
  - No conversational fallback in slash mode.
24
- - Enforce destructive confirmation token: `CONFIRM-DESTRUCTIVE:<target>`.
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,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
@@ -1,38 +1,58 @@
1
- # /audit
2
-
3
- ## A. Intent
4
- Run structured engineering audit across security, correctness, and maintainability.
5
-
6
- ## B. When to Use
7
- Use before high-impact merges, releases, and external reviews.
8
-
9
- ## C. Required Inputs
10
- - Audit scope
11
- - Risk profile
12
- - Compliance baseline
13
- - Hardening profile requirement (if applicable)
14
-
15
- ## D. Deterministic Execution Flow
16
- 1. Resolve audit scope.
17
- 2. Run static checks.
18
- 3. Run security checks.
19
- 4. Run dependency/config checks.
20
- 5. Verify hardening evidence when hardening-required profile applies.
21
- 6. Classify findings by severity.
22
- 7. Emit audit report.
23
-
24
- ## E. Structured Output Template
25
- - `scope`
26
- - `checks_executed[]`
27
- - `findings[]`
28
- - `severity_summary`
29
- - `remediation_plan[]`
30
- - `hardening_evidence_status`
31
-
32
- ## F. Stop Conditions
33
- - Inaccessible scope.
34
- - Unavailable tooling.
35
-
36
- ## G. Safety Constraints
37
- - Classify secret leaks and auth bypass as critical.
38
- - Classify missing hardening verification evidence as release-blocking when hardening is required.
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