sdd-mcp-server 3.5.0 → 4.0.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.
Files changed (95) hide show
  1. package/README.md +97 -671
  2. package/agents/architect.md +15 -93
  3. package/agents/implementer.md +16 -141
  4. package/agents/planner.md +16 -84
  5. package/agents/reviewer.md +16 -239
  6. package/agents/security-auditor.md +16 -114
  7. package/agents/tdd-guide.md +17 -228
  8. package/dist/adapters/cli/SDDToolAdapter.d.ts +14 -5
  9. package/dist/adapters/cli/SDDToolAdapter.js +189 -362
  10. package/dist/adapters/cli/SDDToolAdapter.js.map +1 -1
  11. package/dist/application/services/ContextCompactionService.d.ts +81 -16
  12. package/dist/application/services/ContextCompactionService.js +370 -187
  13. package/dist/application/services/ContextCompactionService.js.map +1 -1
  14. package/dist/application/services/SpecPathResolver.d.ts +24 -0
  15. package/dist/application/services/SpecPathResolver.js +70 -0
  16. package/dist/application/services/SpecPathResolver.js.map +1 -0
  17. package/dist/application/services/WorkflowEngineService.d.ts +100 -46
  18. package/dist/application/services/WorkflowEngineService.js +468 -288
  19. package/dist/application/services/WorkflowEngineService.js.map +1 -1
  20. package/dist/cli/install-skills.d.ts +3 -9
  21. package/dist/cli/install-skills.js +130 -175
  22. package/dist/cli/install-skills.js.map +1 -1
  23. package/dist/cli/install-target.d.ts +45 -14
  24. package/dist/cli/install-target.js +26 -12
  25. package/dist/cli/install-target.js.map +1 -1
  26. package/dist/cli/sdd-mcp-cli.d.ts +1 -1
  27. package/dist/cli/sdd-mcp-cli.js +7 -6
  28. package/dist/cli/sdd-mcp-cli.js.map +1 -1
  29. package/dist/cli/tool-support/claude-code.js +13 -34
  30. package/dist/cli/tool-support/claude-code.js.map +1 -1
  31. package/dist/cli/tool-support/codex.d.ts +0 -53
  32. package/dist/cli/tool-support/codex.js +6 -94
  33. package/dist/cli/tool-support/codex.js.map +1 -1
  34. package/dist/cli/tool-support/index.d.ts +3 -2
  35. package/dist/cli/tool-support/index.js +3 -1
  36. package/dist/cli/tool-support/index.js.map +1 -1
  37. package/dist/cli/tool-support/omp.d.ts +5 -0
  38. package/dist/cli/tool-support/omp.js +43 -0
  39. package/dist/cli/tool-support/omp.js.map +1 -0
  40. package/dist/cli/tool-support/root-guidance.d.ts +2 -9
  41. package/dist/cli/tool-support/root-guidance.js +44 -37
  42. package/dist/cli/tool-support/root-guidance.js.map +1 -1
  43. package/dist/cli/tool-support/target-agent-renderer.d.ts +1 -0
  44. package/dist/cli/tool-support/target-agent-renderer.js +37 -4
  45. package/dist/cli/tool-support/target-agent-renderer.js.map +1 -1
  46. package/dist/cli/tool-support/target-installer.d.ts +8 -2
  47. package/dist/cli/tool-support/target-installer.js +94 -26
  48. package/dist/cli/tool-support/target-installer.js.map +1 -1
  49. package/dist/cli/utils/preserving-writer.d.ts +22 -0
  50. package/dist/cli/utils/preserving-writer.js +233 -11
  51. package/dist/cli/utils/preserving-writer.js.map +1 -1
  52. package/dist/domain/ports.d.ts +4 -0
  53. package/dist/index.d.ts +13 -10
  54. package/dist/index.js +16 -1199
  55. package/dist/index.js.map +1 -1
  56. package/dist/infrastructure/adapters/NodeFileSystemAdapter.d.ts +3 -0
  57. package/dist/infrastructure/adapters/NodeFileSystemAdapter.js +10 -0
  58. package/dist/infrastructure/adapters/NodeFileSystemAdapter.js.map +1 -1
  59. package/dist/infrastructure/mcp/CapabilityNegotiator.js +3 -3
  60. package/dist/infrastructure/mcp/CapabilityNegotiator.js.map +1 -1
  61. package/dist/infrastructure/mcp/sddToolDefinitions.d.ts +6 -0
  62. package/dist/infrastructure/mcp/sddToolDefinitions.js +124 -0
  63. package/dist/infrastructure/mcp/sddToolDefinitions.js.map +1 -0
  64. package/dist/utils/atomicWrite.d.ts +8 -35
  65. package/dist/utils/atomicWrite.js +12 -60
  66. package/dist/utils/atomicWrite.js.map +1 -1
  67. package/mcp-server.js +5 -2883
  68. package/package.json +5 -2
  69. package/scripts/context-usage-report.mjs +602 -0
  70. package/sdd-entry.js +17 -6
  71. package/skills/sdd-commit/REFERENCE.md +31 -0
  72. package/skills/sdd-commit/SKILL.md +17 -273
  73. package/skills/sdd-design/REFERENCE.md +35 -0
  74. package/skills/sdd-design/SKILL.md +19 -265
  75. package/skills/sdd-implement/REFERENCE.md +26 -0
  76. package/skills/sdd-implement/SKILL.md +22 -283
  77. package/skills/sdd-requirements/REFERENCE.md +31 -0
  78. package/skills/sdd-requirements/SKILL.md +23 -135
  79. package/skills/sdd-review/REFERENCE.md +26 -0
  80. package/skills/sdd-review/SKILL.md +17 -181
  81. package/skills/sdd-security-check/REFERENCE.md +19 -0
  82. package/skills/sdd-security-check/SKILL.md +18 -184
  83. package/skills/sdd-steering/REFERENCE.md +25 -0
  84. package/skills/sdd-steering/SKILL.md +18 -216
  85. package/skills/sdd-steering-custom/REFERENCE.md +27 -0
  86. package/skills/sdd-steering-custom/SKILL.md +19 -203
  87. package/skills/sdd-tasks/REFERENCE.md +25 -0
  88. package/skills/sdd-tasks/SKILL.md +19 -248
  89. package/skills/sdd-test-gen/REFERENCE.md +15 -0
  90. package/skills/sdd-test-gen/SKILL.md +17 -287
  91. package/skills/simple-task/REFERENCE.md +22 -0
  92. package/skills/simple-task/SKILL.md +17 -138
  93. package/templates/CLAUDE.md +18 -30
  94. package/rules/git-workflow.md +0 -92
  95. package/rules/sdd-workflow.md +0 -116
@@ -1,195 +1,31 @@
1
1
  ---
2
2
  name: sdd-review
3
- description: Perform thorough Linus-style code review focusing on correctness, maintainability, and adherence to project conventions. Use after completing implementation to ensure code quality. Invoked via /sdd-review [file-path or PR-number].
3
+ description: Review a focused change for correctness, regressions, security, and maintainability.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- # SDD Code Review
7
+ # Code Review
7
8
 
8
- Perform comprehensive code reviews in the style of Linus Torvalds - direct, thorough, and focused on what matters: correctness, simplicity, and long-term maintainability.
9
+ ## Required Review
9
10
 
10
- ## Review Philosophy
11
+ 1. Establish the exact diff or artifact scope. Read related requirements, design, tests, and local conventions.
12
+ 2. Verify behavior and error paths from code and focused test evidence; do not infer correctness from style.
13
+ 3. Review data flow, state transitions, concurrency, resource ownership, compatibility, and boundary conditions.
14
+ 4. Check authorization, validation, injection, secret handling, sensitive logging, and dependency risk where applicable.
15
+ 5. Remove false positives and preference-only remarks. Cite each finding with a path and line, triggering scenario, impact, and concrete remediation.
16
+ 6. Rank findings: **critical** (security/data loss), **important** (incorrect behavior/regression), then **minor** (maintainability with real cost).
17
+ 7. State verification evidence and residual risk. If no findings remain, say so explicitly.
11
18
 
12
- > "Talk is cheap. Show me the code."
13
- > — Linus Torvalds
14
-
15
- This review focuses on:
16
- 1. **Correctness** - Does it actually work? Does it handle edge cases?
17
- 2. **Simplicity** - Is it more complex than necessary?
18
- 3. **Maintainability** - Will future developers understand this?
19
- 4. **Convention Adherence** - Does it follow project patterns?
20
-
21
- ## Workflow
22
-
23
- ### Step 1: Identify Review Scope
24
-
25
- Determine what to review:
26
- - **Single file**: `/sdd-review src/services/UserService.ts`
27
- - **Directory**: `/sdd-review src/services/`
28
- - **Git diff**: `/sdd-review HEAD~3..HEAD`
29
- - **PR/MR**: `/sdd-review PR-123` or `/sdd-review MR-45`
30
-
31
- ### Step 2: Load Project Context
32
-
33
- Before reviewing:
34
- 1. Read project steering documents from `.spec/steering/`
35
- 2. Understand existing patterns in the codebase
36
- 3. Check if there's a related spec in `.spec/specs/`
37
-
38
- ### Step 3: Perform Review
39
-
40
- #### Code Correctness Checks
41
-
42
- ```markdown
43
- ## Correctness Issues
44
-
45
- ### Critical
46
- - [ ] Logic errors that will cause bugs
47
- - [ ] Race conditions or threading issues
48
- - [ ] Resource leaks (files, connections, memory)
49
- - [ ] Unhandled error conditions
50
-
51
- ### Important
52
- - [ ] Edge cases not handled
53
- - [ ] Assumptions that may not hold
54
- - [ ] Off-by-one errors
55
- - [ ] Type mismatches or unsafe casts
56
- ```
19
+ Do not edit code unless asked. Never claim a test or security check ran when it did not.
57
20
 
58
21
  ## Specialist Delegation
59
22
 
60
- When the host supports subagents, delegate the focused review to the `reviewer` role with a compact handoff containing only the diff or scope, approved requirements, project conventions, and verification evidence. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
61
-
62
- #### Simplicity Assessment
63
-
64
- Ask these questions:
65
- - Could this be done with less code?
66
- - Is there a standard library function for this?
67
- - Is this abstraction earning its keep?
68
- - Would a junior developer understand this in 6 months?
69
-
70
- #### Pattern Violations
71
-
72
- Check against project conventions:
73
- ```markdown
74
- ## Pattern Violations
75
-
76
- ### Naming
77
- - [ ] Variables don't follow naming convention
78
- - [ ] Functions named for implementation, not purpose
79
-
80
- ### Structure
81
- - [ ] Logic in wrong layer (controller doing business logic)
82
- - [ ] Missing separation of concerns
83
- - [ ] Circular dependencies introduced
84
-
85
- ### Error Handling
86
- - [ ] Swallowed exceptions
87
- - [ ] Generic error messages
88
- - [ ] Missing error propagation
89
- ```
90
-
91
- ### Step 4: Provide Feedback
92
-
93
- Structure feedback with clear categories:
94
-
95
- ```markdown
96
- # Code Review: {file/PR description}
97
-
98
- ## Summary
99
- Brief overall assessment (1-2 sentences)
100
-
101
- ## 🚨 Must Fix (Blocking)
102
- Issues that must be resolved before merge:
103
- 1. **Line 42**: Memory leak - connection never closed
104
- ```diff
105
- - const conn = await getConnection();
106
- + const conn = await getConnection();
107
- + try { ... } finally { conn.close(); }
108
- ```
109
-
110
- ## ⚠️ Should Fix (Non-blocking)
111
- Issues that should be addressed but won't block:
112
- 1. **Line 78**: Magic number should be a named constant
113
- 2. **Line 103**: Consider extracting this to a helper function
114
-
115
- ## 💡 Suggestions (Optional)
116
- Improvements that would be nice but are truly optional:
117
- 1. **Line 156**: This could be simplified with `Array.flatMap()`
118
-
119
- ## ✅ What's Good
120
- Acknowledge good patterns to reinforce them:
121
- 1. Good use of dependency injection
122
- 2. Clear separation of concerns
123
- 3. Comprehensive error handling in auth module
124
- ```
125
-
126
- ### Step 5: Verify Tests
127
-
128
- For any code changes:
129
- 1. Check if tests exist for modified code
130
- 2. Verify edge cases are tested
131
- 3. Run existing tests to ensure no regressions
132
-
133
- ```bash
134
- # Run tests for affected files
135
- npm test -- --findRelatedTests {changed-files}
136
- ```
137
-
138
- ## Review Severity Levels
139
-
140
- | Level | Meaning | Action Required |
141
- |-------|---------|-----------------|
142
- | 🚨 **Critical** | Bug, security issue, data loss risk | Must fix before merge |
143
- | ⚠️ **Warning** | Code smell, potential issue | Should fix, discuss if disagree |
144
- | 💡 **Info** | Suggestion, style preference | Optional, author's choice |
145
-
146
- ## Common Issues to Watch For
147
-
148
- ### TypeScript/JavaScript Specific
149
- - `any` type usage without justification
150
- - Missing null/undefined checks
151
- - Promises not awaited
152
- - Event listener memory leaks
153
- - Mutable shared state
154
-
155
- ### General
156
- - Functions doing too much
157
- - Deep nesting (> 3 levels)
158
- - Boolean parameters (use options object)
159
- - Comments explaining *what* instead of *why*
160
- - Dead code or unused imports
161
-
162
- ## Integration with SDD Workflow
163
-
164
- When reviewing implementation:
165
- 1. Compare against requirements in `.spec/specs/{feature}/requirements.md`
166
- 2. Verify design patterns from `.spec/specs/{feature}/design.md`
167
- 3. Check task completion against `.spec/specs/{feature}/tasks.md`
168
-
169
- ## Example Review
170
-
171
- ```markdown
172
- # Code Review: UserAuthService.ts
173
-
174
- ## Summary
175
- Good overall structure but has a critical security issue and some error handling gaps.
23
+ Target renderers provide the `reviewer` route. When a native advisor is required, dispatch exactly one compact handoff with `specialistDepth: 1`; include only the diff/scope, approved contracts, conventions, and verification evidence. The specialist must not delegate again. Keep the handoff and returned summary at or below 2,048 estimated tokens. If the advisor or routed model is unavailable, record one fallback and continue in the parent without retrying or selecting a generic child. Where a native per-turn model override applies, execute in this turn.
176
24
 
177
- ## 🚨 Must Fix
178
- 1. **Line 67**: Password stored in plain text in error log
179
- ```typescript
180
- // BAD: Leaks credentials
181
- logger.error(`Login failed for ${email} with password ${password}`);
25
+ ## Output
182
26
 
183
- // GOOD: Never log credentials
184
- logger.error(`Login failed for ${email}`);
185
- ```
27
+ Return findings first, ordered by severity, then assumptions, verification evidence, and unresolved blockers. Do not echo the reviewed artifact.
186
28
 
187
- ## ⚠️ Should Fix
188
- 1. **Line 89**: Catch block swallows all errors
189
- 2. **Line 112-130**: This block should be extracted to a private method
29
+ ## Optional Reference
190
30
 
191
- ## ✅ What's Good
192
- - Clean separation between auth logic and data access
193
- - Good use of TypeScript discriminated unions for auth result
194
- - Comprehensive input validation
195
- ```
31
+ Read [REFERENCE.md](REFERENCE.md) only for language-specific review prompts, severity examples, or the extended checklist.
@@ -0,0 +1,19 @@
1
+ # Security Audit Reference
2
+
3
+ Read only for the branch being audited.
4
+
5
+ ## OWASP Prompts
6
+
7
+ - Access control: object ownership, function-level checks, tenant isolation, deny-by-default paths.
8
+ - Cryptography: approved primitives, key lifecycle, transport/storage protection, password hashing.
9
+ - Injection: query parameters, process arguments, templates, headers, paths, deserialization.
10
+ - Design: abuse cases, rate limits, replay/idempotency, resource exhaustion.
11
+ - Configuration: debug/default settings, CORS, headers, unnecessary capabilities.
12
+ - Components/integrity: vulnerable dependencies, lockfiles, update/build provenance.
13
+ - Authentication: session fixation, credential recovery, MFA/rate-limit requirements.
14
+ - Logging: security events without credentials, tokens, personal or regulated data.
15
+ - SSRF: URL parsing, redirects, DNS rebinding, private-address blocking, allowlists.
16
+
17
+ ## Finding Checklist
18
+
19
+ A finding names the threat actor, preconditions, source-to-sink path, affected asset, impact, severity rationale, location, remediation, and regression test. Redact secrets. Separate confirmed vulnerabilities from hardening opportunities and tool warnings. If a control is outside scope, record it as unverified rather than absent.
@@ -1,197 +1,31 @@
1
1
  ---
2
2
  name: sdd-security-check
3
- description: Perform OWASP-aligned security audit of code. Checks for common vulnerabilities including injection, authentication flaws, sensitive data exposure, and more. Invoked via /sdd-security-check [file-path or scope].
3
+ description: Audit a focused scope for exploitable security flaws and prioritized remediation.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- # SDD Security Check
7
+ # Security Audit
7
8
 
8
- Perform comprehensive security audits aligned with OWASP Top 10 and security best practices. Identify vulnerabilities before they reach production.
9
+ ## Required Audit
9
10
 
10
- ## Security Philosophy
11
+ 1. Define trust boundaries, assets, actors, entry points, data sensitivity, and the exact review scope.
12
+ 2. Trace untrusted input through validation, authorization, storage, commands, queries, templates, URLs, and output.
13
+ 3. Check relevant OWASP risks: access control, cryptography, injection, insecure design, misconfiguration, vulnerable components, authentication, integrity, logging, and SSRF.
14
+ 4. Search for embedded secrets and unsafe sensitive-data logging. Never print a discovered secret; redact it and identify only its location/type.
15
+ 5. Inspect dependency and automated scan results only when the project provides safe focused commands; distinguish tool evidence from manual review.
16
+ 6. For each finding, prove the path to impact, assign severity, cite location, and give a minimal remediation plus a regression test.
17
+ 7. Compare implementation with security requirements and design controls. Record coverage gaps and residual risk.
11
18
 
12
- Security is not a feature—it's a requirement. Every code change should be reviewed through a security lens.
19
+ Do not make destructive probes, contact external systems, or claim exploitability without evidence.
13
20
 
14
- ## OWASP Top 10 Checks (2021)
15
-
16
- ### A01: Broken Access Control
17
-
18
- Check for:
19
- - Missing authorization checks on endpoints
20
- - Insecure Direct Object References (IDOR)
21
- - Missing function-level access control
22
- - CORS misconfiguration
23
- - JWT validation bypass
24
-
25
- **Pattern**: Ensure every endpoint has explicit authorization checks.
26
-
27
- ### A02: Cryptographic Failures
28
-
29
- Check for:
30
- - Sensitive data transmitted without TLS
31
- - Weak or deprecated algorithms (MD5, SHA1, DES)
32
- - Hardcoded secrets or API keys
33
- - Insufficient key length
34
- - Missing encryption at rest
35
-
36
- **Pattern**: Use strong algorithms (bcrypt for passwords, AES-256 for data).
37
-
38
- ### A03: Injection
39
-
40
- Check for:
41
- - SQL injection (use parameterized queries)
42
- - NoSQL injection (validate/sanitize inputs)
43
- - Command injection (use execFile with array args, not string interpolation)
44
- - LDAP injection
45
- - Template injection
46
-
47
- **Pattern**: Never interpolate user input into queries or commands.
48
-
49
- ### A04: Insecure Design
50
-
51
- Check for:
52
- - Missing rate limiting
53
- - No brute force protection
54
- - Predictable resource IDs
55
- - Missing threat modeling
56
-
57
- ### A05: Security Misconfiguration
58
-
59
- Check for:
60
- - Debug mode in production
61
- - Default credentials
62
- - Unnecessary features enabled
63
- - Missing security headers
64
- - Verbose error messages in production
65
-
66
- **Required Headers**: CSP, X-Frame-Options, X-Content-Type-Options, HSTS
67
-
68
- ### A06: Vulnerable Components
69
-
70
- - Check dependencies with `npm audit`
71
- - Review for known CVEs
72
- - Verify component versions
73
-
74
- ### A07: Authentication Failures
75
-
76
- Check for:
77
- - Weak password requirements
78
- - Missing MFA where required
79
- - Session fixation vulnerabilities
80
- - Credential stuffing exposure
81
- - Insecure password recovery
82
-
83
- **Session Config**: secure=true, httpOnly=true, sameSite='strict'
84
-
85
- ### A08: Software and Data Integrity Failures
86
-
87
- Check for:
88
- - Missing integrity verification on downloads
89
- - Insecure CI/CD pipeline
90
- - Unsigned code or packages
91
- - Auto-update without verification
92
-
93
- ### A09: Security Logging and Monitoring Failures
94
-
95
- Check for:
96
- - No logging of security events
97
- - Sensitive data in logs (never log passwords!)
98
- - Missing audit trail
99
- - Logs not protected from tampering
100
-
101
- **Required Events**: Auth attempts, auth failures, admin actions, data access anomalies
102
-
103
- ### A10: Server-Side Request Forgery (SSRF)
104
-
105
- Check for:
106
- - User-controlled URLs in server requests
107
- - Missing URL validation
108
- - Internal network access possible
109
-
110
- **Pattern**: Use URL allowlists for server-side requests.
111
-
112
- ## Security Check Workflow
113
-
114
- ### Step 1: Define Scope
115
-
116
- ```
117
- /sdd-security-check src/api/ # Check API layer
118
- /sdd-security-check src/auth/ # Focus on authentication
119
- /sdd-security-check HEAD~5..HEAD # Check recent changes
120
- ```
121
-
122
- ### Step 2: Automated Scans
123
-
124
- Run these checks:
125
- ```bash
126
- # Dependency vulnerabilities
127
- npm audit
128
-
129
- # Secret detection
130
- npx gitleaks detect
131
-
132
- # SAST scan if configured
133
- npx semgrep --config=p/security-audit
134
- ```
135
-
136
- ### Step 3: Manual Review
137
-
138
- For each file, check:
139
- 1. Input validation
140
- 2. Output encoding
141
- 3. Authentication/Authorization
142
- 4. Data handling
143
- 5. Error handling
144
- 6. Logging practices
145
-
146
- ### Step 4: Generate Report
147
-
148
- ```markdown
149
- # Security Audit Report: {scope}
150
-
151
- ## Summary
152
- - 🔴 Critical: {count}
153
- - 🟠 High: {count}
154
- - 🟡 Medium: {count}
155
- - 🟢 Low: {count}
156
-
157
- ## Critical Findings
158
-
159
- ### SEC-001: {Finding Title}
160
- **Location**: {file:line}
161
- **Risk**: Critical
162
- **OWASP**: {category}
163
-
164
- **Issue**: {description}
165
- **Recommendation**: {fix}
166
-
167
- ## Remediation Priority
168
- 1. Critical findings - Fix immediately
169
- 2. High findings - Fix before deployment
170
- 3. Medium findings - Fix this sprint
171
- 4. Low findings - Track and schedule
172
- ```
173
-
174
- ## Quick Security Checklist
21
+ ## Specialist Delegation
175
22
 
176
- Before any deployment:
177
- - [ ] No hardcoded secrets in code
178
- - [ ] All inputs validated and sanitized
179
- - [ ] All outputs properly encoded
180
- - [ ] Authentication on all protected routes
181
- - [ ] Authorization checks at function level
182
- - [ ] Security headers configured
183
- - [ ] Dependencies scanned for vulnerabilities
184
- - [ ] Error messages don't leak sensitive info
185
- - [ ] Security events are logged
186
- - [ ] Rate limiting in place
23
+ Target renderers provide the `security-auditor` route. When a native advisor is required, dispatch exactly one compact handoff with `specialistDepth: 1`; include only threat context, relevant diff, security requirements, and scan evidence. The specialist must not delegate again. Keep the handoff and returned summary at or below 2,048 estimated tokens. If the advisor or routed model is unavailable, record one fallback and continue in the parent without retrying or selecting a generic child. Where a native per-turn model override applies, execute in this turn.
187
24
 
188
- ## Integration with SDD Workflow
25
+ ## Output
189
26
 
190
- When checking implementation against spec:
191
- 1. Verify security NFRs from requirements.md are met
192
- 2. Check security considerations from design.md are implemented
193
- 3. Ensure security-related tasks in tasks.md are complete
27
+ Return findings ordered critical/high/medium/low, each with evidence, impact, remediation, and verification. Then list checked areas, unresolved blockers, and residual risk.
194
28
 
195
- ## Specialist Delegation
29
+ ## Optional Reference
196
30
 
197
- When the host supports subagents, delegate the audit to the `security-auditor` role with a compact handoff containing only the review scope, threat context, security requirements, and relevant diff. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
31
+ Read [REFERENCE.md](REFERENCE.md) only for OWASP prompts, severity guidance, or the report checklist.
@@ -0,0 +1,25 @@
1
+ # Steering Reference
2
+
3
+ Read only when creating a missing section.
4
+
5
+ ## Product
6
+
7
+ Record verified purpose, primary users, core capabilities, explicit boundaries, and success measures. Avoid roadmap promises and marketing prose.
8
+
9
+ ## Technology
10
+
11
+ Record runtime/language versions, package manager, frameworks, important dependencies, architecture boundaries, persistence/integration choices, and commands proven by manifests or configuration. Label inferred architecture as such.
12
+
13
+ ## Structure
14
+
15
+ Record responsibilities of top-level directories, source/test locations, naming and import conventions observed repeatedly, public boundaries, generated artifacts, and placement rules for new work.
16
+
17
+ ## Validation Checklist
18
+
19
+ - each fact cites a repository source or is labeled unknown;
20
+ - commands and paths exist and use current names;
21
+ - existing user guidance remains intact unless directly updated;
22
+ - no credential, endpoint secret, personal data, or machine-specific value appears;
23
+ - guidance describes this project rather than generic best practices;
24
+ - conflicts between documentation and code are reported instead of silently resolved;
25
+ - update mode changes only sections supported by new evidence.