@sixsevenai/ai-dlc-installer 1.2.2 → 1.2.4
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.
- package/library/agents/intent-clarifier.md +134 -0
- package/library/commands/ai-dlc/analyze-refinement-scope.md +1 -1
- package/library/commands/ai-dlc/apply-refinements.md +1 -1
- package/library/commands/ai-dlc/archive-session.md +5 -5
- package/library/commands/ai-dlc/build-tests.md +45 -37
- package/library/commands/ai-dlc/code-skeptic.md +358 -0
- package/library/commands/ai-dlc/collect-refinement-feedback.md +1 -1
- package/library/commands/ai-dlc/complete-bolt.md +1 -1
- package/library/commands/ai-dlc/create-diagram.md +31 -34
- package/library/commands/ai-dlc/create-excalidraw-diagram.md +33 -38
- package/library/commands/ai-dlc/create-pipeline.md +35 -38
- package/library/commands/ai-dlc/create-runbook.md +140 -95
- package/library/commands/ai-dlc/deploy.md +136 -132
- package/library/commands/ai-dlc/design-database.md +71 -32
- package/library/commands/ai-dlc/design-ui-tests.md +80 -34
- package/library/commands/ai-dlc/design-ui.md +81 -36
- package/library/commands/ai-dlc/generate-code.md +45 -37
- package/library/commands/ai-dlc/generate-docs.md +30 -33
- package/library/commands/ai-dlc/handle-cross-phase-refinement.md +1 -1
- package/library/commands/ai-dlc/implement-ui-tests.md +46 -35
- package/library/commands/ai-dlc/incident-respond.md +125 -91
- package/library/commands/ai-dlc/next-bolt.md +68 -39
- package/library/commands/ai-dlc/plan-workflow.md +2 -1
- package/library/commands/ai-dlc/review-code.md +79 -42
- package/library/commands/ai-dlc/run-workflow.md +3 -3
- package/library/commands/ai-dlc/security-audit.md +77 -37
- package/library/commands/ai-dlc/validate-framework.md +3 -3
- package/library/commands/ai-dlc/workflow-cancel.md +3 -3
- package/library/commands/ai-dlc/workflow-pause.md +1 -1
- package/library/commands/ai-dlc/workflow-resume.md +1 -1
- package/library/commands/ai-dlc/workflow-status.md +5 -5
- package/library/commands/brn/plan.md +1 -1
- package/library/commands/docs/ask-codebase.md +1 -1
- package/library/commands/docs/document-solution.md +1 -1
- package/library/commands/docs/shard.md +1 -1
- package/library/commands/elicit/brainstorm.md +1 -1
- package/library/commands/git/check-duplicates.md +1 -1
- package/library/commands/spec/clarify.md +39 -4
- package/library/commands/spec/plan.md +2 -2
- package/library/commands/spec/specify.md +51 -0
- package/library/commands/task/clarify.md +147 -0
- package/library/commands/task/execute.md +281 -0
- package/library/commands/task/plan.md +250 -0
- package/library/docs/NAMING_CONVENTIONS.md +21 -18
- package/library/skills/design-thinking/SKILL.md +5 -0
- package/library/skills/prompt-design/SKILL.md +5 -0
- package/library/skills/strategic-thinking/SKILL.md +5 -0
- package/library/templates/task/task-plan-template.md +98 -0
- package/package.json +1 -1
|
@@ -259,6 +259,101 @@ Options:
|
|
|
259
259
|
- Let me specify: "I have specific exclusions in mind"
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
+
**Integration Landscape Questions** (if integration needs unclear):
|
|
263
|
+
```
|
|
264
|
+
Question: "What existing systems does this need to integrate with?"
|
|
265
|
+
Options:
|
|
266
|
+
- Internal APIs: "Connects to our own backend services or databases"
|
|
267
|
+
- Third-party SaaS: "Integrates with external platforms (Salesforce, Stripe, etc.)"
|
|
268
|
+
- Legacy systems: "Must interface with older systems (mainframe, SOAP, file drops)"
|
|
269
|
+
- Standalone: "No integrations needed — this operates independently"
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Question: "What does the data flow look like between systems?"
|
|
274
|
+
Options:
|
|
275
|
+
- Inbound only: "We consume data from other systems"
|
|
276
|
+
- Outbound only: "We push data to other systems"
|
|
277
|
+
- Bidirectional: "Data flows both directions with sync requirements"
|
|
278
|
+
- Event-driven: "Systems communicate through events/messages asynchronously"
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Data Governance & Privacy Questions** (if data handling unclear):
|
|
282
|
+
```
|
|
283
|
+
Question: "What kind of data will this system handle?"
|
|
284
|
+
Options:
|
|
285
|
+
- PII: "Names, emails, addresses, phone numbers — personally identifiable info"
|
|
286
|
+
- Financial: "Payment data, account numbers, transaction records"
|
|
287
|
+
- Health/Medical: "Patient records, diagnoses, treatment data (PHI)"
|
|
288
|
+
- Non-sensitive: "Operational data with no privacy implications"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
Question: "What compliance or data regulations apply?"
|
|
293
|
+
Options:
|
|
294
|
+
- GDPR: "Serves EU users — data residency, right to erasure, consent tracking"
|
|
295
|
+
- HIPAA: "Handles protected health information — audit trails, encryption, BAAs"
|
|
296
|
+
- SOC 2: "Enterprise SaaS — security controls, access logging, incident response"
|
|
297
|
+
- Industry-specific: "PCI-DSS, FERPA, CCPA, or other sector regulation"
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Security Posture Questions** (if security requirements unclear):
|
|
301
|
+
```
|
|
302
|
+
Question: "What authentication model does this need?"
|
|
303
|
+
Options:
|
|
304
|
+
- SSO/OIDC: "Integrate with existing identity provider (Azure AD, Okta, Auth0)"
|
|
305
|
+
- Custom auth: "Build our own authentication (username/password, MFA)"
|
|
306
|
+
- API keys: "Service-to-service authentication via API keys or tokens"
|
|
307
|
+
- Mixed: "Different auth for different user types or access patterns"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
Question: "What level of audit trail is required?"
|
|
312
|
+
Options:
|
|
313
|
+
- Full audit: "Every action logged with who, what, when — regulatory requirement"
|
|
314
|
+
- Change tracking: "Track data modifications and user actions for troubleshooting"
|
|
315
|
+
- Basic logging: "Standard application logs for debugging and monitoring"
|
|
316
|
+
- Minimal: "No specific audit requirements beyond standard observability"
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Scalability & Growth Questions** (if scale expectations unclear):
|
|
320
|
+
```
|
|
321
|
+
Question: "What's the expected user/load scale at launch?"
|
|
322
|
+
Options:
|
|
323
|
+
- Small: "Under 100 concurrent users, low transaction volume"
|
|
324
|
+
- Medium: "100-1,000 concurrent users, moderate throughput"
|
|
325
|
+
- Large: "1,000-10,000 concurrent users, high throughput requirements"
|
|
326
|
+
- Enterprise-scale: "10,000+ concurrent users, needs horizontal scaling from day one"
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
Question: "How do you expect usage to grow over the next 12 months?"
|
|
331
|
+
Options:
|
|
332
|
+
- Steady: "Predictable, gradual growth — no spikes expected"
|
|
333
|
+
- Rapid ramp: "Aggressive rollout — doubling or tripling within 6 months"
|
|
334
|
+
- Seasonal/burst: "Predictable peaks (holidays, end-of-quarter, campaigns)"
|
|
335
|
+
- Unknown: "New market — can't predict adoption curve yet"
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Migration & Transition Questions** (if replacing existing systems):
|
|
339
|
+
```
|
|
340
|
+
Question: "Does this replace an existing system or process?"
|
|
341
|
+
Options:
|
|
342
|
+
- Full replacement: "Retiring an existing system completely"
|
|
343
|
+
- Partial replacement: "Replacing specific functionality while keeping the rest"
|
|
344
|
+
- Net new: "No existing system — this is greenfield"
|
|
345
|
+
- Augmentation: "Adding capability alongside existing systems that stay"
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
Question: "If replacing something, how should users transition?"
|
|
350
|
+
Options:
|
|
351
|
+
- Big bang: "Hard cutover on a target date — old system goes away"
|
|
352
|
+
- Phased rollout: "Migrate users/features incrementally over weeks/months"
|
|
353
|
+
- Parallel running: "Run both systems simultaneously during transition period"
|
|
354
|
+
- Not applicable: "This is greenfield, no migration needed"
|
|
355
|
+
```
|
|
356
|
+
|
|
262
357
|
**Anti-Pattern - DO NOT DO THIS**:
|
|
263
358
|
```
|
|
264
359
|
❌ WRONG: Outputting all questions as text:
|
|
@@ -343,6 +438,36 @@ Present recommendations:
|
|
|
343
438
|
**Budget**: [If known]
|
|
344
439
|
**Compliance**: [e.g., "HIPAA compliance required"]
|
|
345
440
|
|
|
441
|
+
## Integration Landscape
|
|
442
|
+
**Systems**: [List specific systems this integrates with]
|
|
443
|
+
**Data Flow**: [Inbound, outbound, bidirectional, event-driven]
|
|
444
|
+
**Protocols/APIs**: [REST, gRPC, SOAP, file-based, message queues]
|
|
445
|
+
**Ownership**: [Who owns the APIs/contracts we depend on?]
|
|
446
|
+
|
|
447
|
+
## Data & Compliance
|
|
448
|
+
**Data Classification**: [PII, financial, health/PHI, non-sensitive]
|
|
449
|
+
**Regulations**: [GDPR, HIPAA, SOC 2, PCI-DSS, CCPA, none]
|
|
450
|
+
**Data Residency**: [Geographic requirements for data storage]
|
|
451
|
+
**Retention**: [How long must data be kept? Deletion requirements?]
|
|
452
|
+
|
|
453
|
+
## Security Requirements
|
|
454
|
+
**Authentication**: [SSO/OIDC provider, custom auth, API keys]
|
|
455
|
+
**Authorization**: [RBAC, ABAC, tenant isolation requirements]
|
|
456
|
+
**Audit Trail**: [Full audit, change tracking, basic logging]
|
|
457
|
+
**Encryption**: [At rest, in transit, field-level requirements]
|
|
458
|
+
|
|
459
|
+
## Scale & Growth
|
|
460
|
+
**Launch Scale**: [Concurrent users, transaction volume, data size]
|
|
461
|
+
**12-Month Growth**: [Expected trajectory — steady, rapid, seasonal]
|
|
462
|
+
**Multi-tenancy**: [Single-tenant, multi-tenant, tenant isolation needs]
|
|
463
|
+
**Geographic**: [Single region, multi-region, CDN requirements]
|
|
464
|
+
|
|
465
|
+
## Migration & Transition
|
|
466
|
+
**Replaces**: [System being replaced, or "greenfield"]
|
|
467
|
+
**Transition Strategy**: [Big bang, phased, parallel running]
|
|
468
|
+
**Data Migration**: [Volume, complexity, transformation needs]
|
|
469
|
+
**Rollback Plan**: [How to revert if transition fails]
|
|
470
|
+
|
|
346
471
|
## Scope
|
|
347
472
|
|
|
348
473
|
### In Scope
|
|
@@ -409,6 +534,10 @@ Present recommendations:
|
|
|
409
534
|
**Don't**: Accept "it should be fast" or "users should like it"
|
|
410
535
|
**Do**: Require measurable success criteria
|
|
411
536
|
|
|
537
|
+
### Surface-Level Answers
|
|
538
|
+
**Don't**: Accept "yes, there are compliance requirements" or "it needs to scale"
|
|
539
|
+
**Do**: Probe for specifics — which regulations, what user counts, which systems, what data types
|
|
540
|
+
|
|
412
541
|
### Path Invention
|
|
413
542
|
**Don't**: Create your own file path for the artifact
|
|
414
543
|
**Do**: Use ONLY the enforced `outputPath` from your prompt
|
|
@@ -423,6 +552,11 @@ Intent is complete when:
|
|
|
423
552
|
- [ ] Constraints are documented and realistic
|
|
424
553
|
- [ ] Out-of-scope items prevent scope creep
|
|
425
554
|
- [ ] Stakeholders are identified
|
|
555
|
+
- [ ] Integration touchpoints identified with specific systems named
|
|
556
|
+
- [ ] Data classification and applicable regulations documented
|
|
557
|
+
- [ ] Authentication model and audit requirements specified
|
|
558
|
+
- [ ] Scale expectations quantified with actual numbers
|
|
559
|
+
- [ ] Migration strategy defined (or confirmed greenfield)
|
|
426
560
|
- [ ] Saved to EXACT enforced path
|
|
427
561
|
|
|
428
562
|
## Integration Points
|
|
@@ -64,7 +64,7 @@ ai-dlc prepare ai-dlc:analyze-refinement-scope
|
|
|
64
64
|
"agentContext": {
|
|
65
65
|
"sessionId": "20251219-001",
|
|
66
66
|
"phase": "cross-cutting",
|
|
67
|
-
"workflowState": "artifacts/workflows/state/workflow-wf-20251219-001-state.json",
|
|
67
|
+
"workflowState": "artifacts/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json",
|
|
68
68
|
"feedbackPath": "artifacts/refinement/feedback-20251219-001.md",
|
|
69
69
|
"minConfidence": 0.8
|
|
70
70
|
}
|
|
@@ -69,7 +69,7 @@ ai-dlc prepare ai-dlc:apply-refinements
|
|
|
69
69
|
"refinementType": "same_phase",
|
|
70
70
|
"targetSteps": ["design-ui", "generate-code"],
|
|
71
71
|
"dependentSteps": ["build-tests"],
|
|
72
|
-
"workflowState": "artifacts/workflows/state/workflow-wf-20251219-001-state.json",
|
|
72
|
+
"workflowState": "artifacts/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json",
|
|
73
73
|
"dryRun": false,
|
|
74
74
|
"autoCommit": true
|
|
75
75
|
}
|
|
@@ -74,7 +74,7 @@ ai-dlc prepare ai-dlc:archive-session --id 20251219-001
|
|
|
74
74
|
"artifacts/construction/logical-designs/logical-design-unit-auth-20251219-001.md",
|
|
75
75
|
"artifacts/construction/bolts/bolt-unit-auth-001-20251219-001.md",
|
|
76
76
|
"artifacts/operations/runbooks/runbook-api-20251219-001.md",
|
|
77
|
-
"artifacts/workflows/state/workflow-wf-20251219-001-state.json",
|
|
77
|
+
"artifacts/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json",
|
|
78
78
|
"artifacts/sessions/session-20251219-001.md"
|
|
79
79
|
],
|
|
80
80
|
"totalFiles": 10,
|
|
@@ -129,8 +129,8 @@ Execute archival:
|
|
|
129
129
|
5. MOVE ARTIFACT FILES
|
|
130
130
|
- Move (not copy) each file to its mirrored location in archive
|
|
131
131
|
- Preserve exact relative path from artifacts/ root
|
|
132
|
-
- Example: `artifacts/workflows/state/workflow-wf-20251219-001-state.json`
|
|
133
|
-
→ `artifacts/archive/{folder}/workflows/state/workflow-wf-20251219-001-state.json`
|
|
132
|
+
- Example: `artifacts/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json`
|
|
133
|
+
→ `artifacts/archive/{folder}/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json`
|
|
134
134
|
6. GENERATE README.md - Session summary, key findings, next steps
|
|
135
135
|
7. GENERATE METRICS.md - Detailed statistics, quality assessment
|
|
136
136
|
8. UPDATE SESSION STATE - Mark as archived, clear active session
|
|
@@ -203,7 +203,7 @@ artifacts/archive/{date}-{meaningful-name}/
|
|
|
203
203
|
|-------------------|-------------------|
|
|
204
204
|
| `artifacts/inception/intent-20251219-001.md` | `artifacts/archive/20251219-payment/inception/intent-20251219-001.md` |
|
|
205
205
|
| `artifacts/construction/domain-models/domain-model-unit-auth-20251219-001.md` | `artifacts/archive/20251219-payment/construction/domain-models/domain-model-unit-auth-20251219-001.md` |
|
|
206
|
-
| `artifacts/workflows/state/workflow-wf-20251219-001-state.json` | `artifacts/archive/20251219-payment/workflows/state/workflow-wf-20251219-001-state.json` |
|
|
206
|
+
| `artifacts/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json` | `artifacts/archive/20251219-payment/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json` |
|
|
207
207
|
| `artifacts/sessions/session-20251219-001.md` | `artifacts/archive/20251219-payment/sessions/session-20251219-001.md` |
|
|
208
208
|
|
|
209
209
|
## Archive Naming Convention
|
|
@@ -222,7 +222,7 @@ artifacts/archive/{date}-{meaningful-name}/
|
|
|
222
222
|
### File Matching
|
|
223
223
|
Files are matched by checking if the **filename** contains the session ID:
|
|
224
224
|
- Session ID: `20251219-001`
|
|
225
|
-
- Matches: `intent-20251219-001.md`, `workflow-wf-20251219-001-state.json`, `session-20251219-001.md`
|
|
225
|
+
- Matches: `intent-20251219-001.md`, `workflow-wf-greenfield-project-20251219-001-state.json`, `session-20251219-001.md`
|
|
226
226
|
- Does NOT match: `20251218-001` (different session), `workflow-config.json` (no session ID)
|
|
227
227
|
|
|
228
228
|
### Supported File Types
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
command: ai-dlc:build-tests
|
|
3
3
|
description: Generate comprehensive test suites (unit, integration, E2E) for generated code
|
|
4
4
|
phase: construction
|
|
5
5
|
agent: unit-test-builder
|
|
@@ -42,33 +42,9 @@ Generate comprehensive test suites for production code.
|
|
|
42
42
|
|
|
43
43
|
**MANDATORY**: Use the Task tool to spawn the unit-test-builder subagent. Do NOT execute test generation in this context.
|
|
44
44
|
|
|
45
|
-
Use Task tool with
|
|
45
|
+
Use Task tool with:
|
|
46
46
|
- **subagent_type**: `unit-test-builder`
|
|
47
|
-
- **prompt**:
|
|
48
|
-
|
|
49
|
-
## Subagent Prompt
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
User is generating tests for Unit.
|
|
53
|
-
Unit: ${unit-name}
|
|
54
|
-
Test Type: ${type || 'all'}
|
|
55
|
-
Framework: ${framework || 'xunit'}
|
|
56
|
-
|
|
57
|
-
Execute the full test generation workflow:
|
|
58
|
-
|
|
59
|
-
1. LOAD DOMAIN MODEL - Read domain model for behavior understanding
|
|
60
|
-
2. SCAN SOURCE CODE - Identify all classes, methods, and interfaces
|
|
61
|
-
3. GENERATE UNIT TESTS - Create xUnit/NUnit tests with mocking
|
|
62
|
-
4. GENERATE INTEGRATION TESTS - Create service-level tests
|
|
63
|
-
5. GENERATE E2E TESTS - Create Playwright/Stagehand tests for user flows
|
|
64
|
-
6. GENERATE TEST FIXTURES - Create test data and helpers
|
|
65
|
-
7. CONFIGURE COVERAGE - Set up coverage collection
|
|
66
|
-
8. VALIDATE TESTS COMPILE - Run dotnet build on tests
|
|
67
|
-
9. SAVE TEST FILES - Save to tests/{TestType}/{UnitName}/
|
|
68
|
-
|
|
69
|
-
Output to: tests/
|
|
70
|
-
Session ID format: YYYYMMDD-NNN
|
|
71
|
-
```
|
|
47
|
+
- **prompt**: Include the EXACT `outputPath` and context files from Step 1
|
|
72
48
|
|
|
73
49
|
## Syntax
|
|
74
50
|
|
|
@@ -153,19 +129,51 @@ ai-dlc verify ai-dlc:build-tests "tests/Unit/Checkout/"
|
|
|
153
129
|
| Source Code | Yes | Checks `src/Units/{UnitName}/` exists |
|
|
154
130
|
| Domain Model | Recommended | Used for behavior verification |
|
|
155
131
|
|
|
156
|
-
##
|
|
132
|
+
## Subagent Prompt
|
|
157
133
|
|
|
158
|
-
|
|
134
|
+
```
|
|
135
|
+
Generate tests for Unit: ${unit-id}
|
|
159
136
|
|
|
160
|
-
```markdown
|
|
161
|
-
Generate tests for Unit: {unit-name}
|
|
162
137
|
**CRITICAL: OUTPUT PATH IS ENFORCED**
|
|
163
|
-
You MUST generate tests in EXACTLY this directory: {outputPath}
|
|
164
|
-
Session ID: {sessionId}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
138
|
+
You MUST generate tests in EXACTLY this directory: ${outputPath}
|
|
139
|
+
Session ID: ${agentContext.sessionId}
|
|
140
|
+
|
|
141
|
+
**CONTEXT FILES TO READ:**
|
|
142
|
+
- Source Code: ${agentContext.sourceCodePath}
|
|
143
|
+
- Domain Model: ${agentContext.domainModelPath}
|
|
144
|
+
|
|
145
|
+
Do NOT create files at any other location.
|
|
146
|
+
|
|
147
|
+
REQUIREMENTS:
|
|
148
|
+
1. Read context artifacts from provided paths
|
|
149
|
+
2. For unit ${unit-id}, execute the full test generation workflow:
|
|
150
|
+
- LOAD DOMAIN MODEL - Read domain model for behavior understanding
|
|
151
|
+
- SCAN SOURCE CODE - Identify all classes, methods, and interfaces
|
|
152
|
+
- GENERATE UNIT TESTS - Create xUnit/NUnit tests with mocking
|
|
153
|
+
- GENERATE INTEGRATION TESTS - Create service-level tests
|
|
154
|
+
- GENERATE E2E TESTS - Create Playwright/Stagehand tests for user flows
|
|
155
|
+
- GENERATE TEST FIXTURES - Create test data and helpers
|
|
156
|
+
- CONFIGURE COVERAGE - Set up coverage collection
|
|
157
|
+
- VALIDATE TESTS COMPILE - Run dotnet build on tests
|
|
158
|
+
3. Test Type: ${agentContext.testType}
|
|
159
|
+
4. Framework: ${agentContext.framework}
|
|
160
|
+
5. Save to EXACTLY the enforced output path
|
|
161
|
+
|
|
162
|
+
OUTPUT FORMAT:
|
|
163
|
+
Generate comprehensive test suites including:
|
|
164
|
+
- Unit tests with mocking and assertions
|
|
165
|
+
- Integration tests for service interactions
|
|
166
|
+
- E2E tests for user workflows
|
|
167
|
+
- Test fixtures and helpers
|
|
168
|
+
- Coverage configuration
|
|
169
|
+
|
|
170
|
+
## Next Steps
|
|
171
|
+
- Run /ai-dlc:review-code ${unit-id} to review code and tests
|
|
172
|
+
- Run /ai-dlc:complete-bolt to complete the current bolt
|
|
173
|
+
|
|
174
|
+
**POST-COMPLETION**: The orchestrator will run:
|
|
175
|
+
ai-dlc verify ai-dlc:build-tests ${outputPath}
|
|
176
|
+
If verification fails, you may be asked to correct the artifact.
|
|
169
177
|
```
|
|
170
178
|
|
|
171
179
|
## Test Types
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: ai-dlc:code-skeptic
|
|
3
|
+
description: Critical analysis of code, designs, and approaches - challenges assumptions, discovers edge cases, identifies risks
|
|
4
|
+
phase: construction
|
|
5
|
+
agent: code-skeptic
|
|
6
|
+
tools: Read, Write, Edit, Glob, Grep
|
|
7
|
+
activation_keywords: skeptic, challenge, assumptions, edge cases, stress test, critical analysis
|
|
8
|
+
requires_unit: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# /ai-dlc:code-skeptic
|
|
12
|
+
|
|
13
|
+
## CRITICAL: User-Facing Output Rules
|
|
14
|
+
|
|
15
|
+
**NEVER output internal CLI commands to users.**
|
|
16
|
+
|
|
17
|
+
When presenting next steps to the user, ALWAYS use slash commands:
|
|
18
|
+
- `/ai-dlc:review-code`
|
|
19
|
+
- `/ai-dlc:complete-bolt`
|
|
20
|
+
- `/ai-dlc:generate-code`
|
|
21
|
+
- `/ai-dlc:build-tests`
|
|
22
|
+
- `/ai-dlc:code-skeptic`
|
|
23
|
+
- `/ai-dlc:validate-phase construction`
|
|
24
|
+
|
|
25
|
+
All CLI commands in this document are for your internal execution only - never show them to users.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
> **ENFORCEMENT REQUIRED** - This command uses TypeScript enforcement
|
|
30
|
+
> ```bash
|
|
31
|
+
> ai-dlc prepare ai-dlc:code-skeptic --unit ${unit-name} # BEFORE agent
|
|
32
|
+
> ai-dlc verify ai-dlc:code-skeptic <path> --unit ${unit-name} # AFTER agent
|
|
33
|
+
> ```
|
|
34
|
+
> **DO NOT** skip enforcement. **DO NOT** let agents pick their own paths.
|
|
35
|
+
|
|
36
|
+
Perform critical skeptical analysis of code, designs, and approaches. Challenges assumptions, discovers edge cases, identifies risks, and stress-tests thinking through structured questioning frameworks.
|
|
37
|
+
|
|
38
|
+
## Syntax
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
/ai-dlc:code-skeptic <unit-name> [--focus all|assumptions|edge-cases|failures|scalability|integration|alternatives] [--severity red-flag|concern|all]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## ENFORCEMENT INTEGRATION (MANDATORY)
|
|
47
|
+
|
|
48
|
+
**STEP 1: PREPARE (Before Agent)**
|
|
49
|
+
|
|
50
|
+
Run the TypeScript enforcement to validate and get the output path:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
ai-dlc prepare ai-dlc:code-skeptic --unit unit-checkout
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This returns JSON like:
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"canProceed": true,
|
|
60
|
+
"outputPath": "artifacts/construction/reviews/skeptic-unit-checkout-20251219-001.md",
|
|
61
|
+
"agentContext": {
|
|
62
|
+
"sessionId": "20251219-001",
|
|
63
|
+
"phase": "construction",
|
|
64
|
+
"unitName": "unit-checkout",
|
|
65
|
+
"sourceCodePath": "src/Units/Checkout/",
|
|
66
|
+
"testsPath": "tests/Unit/Checkout/",
|
|
67
|
+
"domainModelPath": "artifacts/construction/domain-models/domain-model-unit-checkout-20251219-001.md"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**IF `canProceed: false`** → **STOP IMMEDIATELY**. Do NOT spawn the agent.
|
|
73
|
+
|
|
74
|
+
**Error Handling - Example Error Response:**
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"canProceed": false,
|
|
78
|
+
"validation": {
|
|
79
|
+
"blocked": true,
|
|
80
|
+
"errors": [{
|
|
81
|
+
"code": "MISSING_SOURCE_CODE",
|
|
82
|
+
"message": "No source code found for unit-checkout",
|
|
83
|
+
"suggestion": "Run /ai-dlc:generate-code unit-checkout first"
|
|
84
|
+
}]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Display the error message and suggestion to the user. DO NOT proceed.**
|
|
90
|
+
|
|
91
|
+
**Blocking Conditions:**
|
|
92
|
+
- `NO_SESSION` - No active session exists. Run `/ai-dlc:start-intent` first.
|
|
93
|
+
- `UNIT_NOT_FOUND` - Unit not found. Check unit name.
|
|
94
|
+
- `MISSING_SOURCE_CODE` - No source code found. Run `/ai-dlc:generate-code` first.
|
|
95
|
+
|
|
96
|
+
### STEP 2: SPAWN AGENT (With Enforced Path)
|
|
97
|
+
|
|
98
|
+
**ONLY if `canProceed: true`** from Step 1.
|
|
99
|
+
|
|
100
|
+
Use Task tool with:
|
|
101
|
+
- **subagent_type**: `code-skeptic`
|
|
102
|
+
- **prompt**: Include the EXACT `outputPath` and context files from Step 1
|
|
103
|
+
|
|
104
|
+
### STEP 3: VERIFY (After Agent)
|
|
105
|
+
|
|
106
|
+
After the agent completes, **ALWAYS** run verification:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
ai-dlc verify ai-dlc:code-skeptic "artifacts/construction/reviews/skeptic-unit-checkout-20251219-001.md" --unit unit-checkout
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Expected Success Response:**
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"valid": true,
|
|
116
|
+
"blocked": false,
|
|
117
|
+
"errors": [],
|
|
118
|
+
"warnings": [],
|
|
119
|
+
"confidenceScore": 72,
|
|
120
|
+
"redFlags": 1,
|
|
121
|
+
"concerns": 4,
|
|
122
|
+
"observations": 7
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**IF `valid: false`** → Report the error. The agent did not create the artifact correctly.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Context Isolation: Required
|
|
131
|
+
|
|
132
|
+
**MANDATORY**: Use the Task tool to spawn the code-skeptic subagent. Do NOT execute skeptical analysis in this context.
|
|
133
|
+
|
|
134
|
+
Use Task tool with:
|
|
135
|
+
- **subagent_type**: `code-skeptic`
|
|
136
|
+
- **prompt**: Include the EXACT `outputPath` and context files from Step 1
|
|
137
|
+
|
|
138
|
+
## Subagent Prompt
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Perform skeptical analysis for Unit: ${unit-name}
|
|
142
|
+
|
|
143
|
+
**CRITICAL: OUTPUT PATH IS ENFORCED**
|
|
144
|
+
You MUST create the Skeptic Report artifact at EXACTLY this path: ${outputPath}
|
|
145
|
+
Session ID: ${agentContext.sessionId}
|
|
146
|
+
|
|
147
|
+
**CONTEXT FILES TO READ:**
|
|
148
|
+
- Source Code: ${agentContext.sourceCodePath}
|
|
149
|
+
- Tests: ${agentContext.testsPath}
|
|
150
|
+
- Domain Model: ${agentContext.domainModelPath}
|
|
151
|
+
|
|
152
|
+
Do NOT create files at any other location.
|
|
153
|
+
|
|
154
|
+
REQUIREMENTS:
|
|
155
|
+
1. Read context artifacts from provided paths
|
|
156
|
+
2. Execute critical skeptical analysis across 6 dimensions:
|
|
157
|
+
|
|
158
|
+
a. ASSUMPTION CHALLENGES - Identify hidden assumptions in the code/design.
|
|
159
|
+
What beliefs are baked in? What if they're wrong? What constraints are assumed
|
|
160
|
+
but never validated? Are there unstated dependencies on external behavior?
|
|
161
|
+
|
|
162
|
+
b. EDGE CASES - Discover boundary conditions, null/empty cases, race conditions,
|
|
163
|
+
off-by-one errors. What inputs were never considered? What happens at limits
|
|
164
|
+
(0, 1, MAX, overflow)? What about concurrent access patterns?
|
|
165
|
+
|
|
166
|
+
c. FAILURE MODES - What happens when things go wrong? Missing error paths?
|
|
167
|
+
Unhandled exceptions? Partial failures in multi-step operations? Data corruption
|
|
168
|
+
scenarios? Recovery mechanisms? What if external dependencies fail?
|
|
169
|
+
|
|
170
|
+
d. SCALABILITY CONCERNS - Will this approach hold under load? What are the
|
|
171
|
+
bottlenecks? Memory growth patterns? Database query performance at scale?
|
|
172
|
+
Connection pool exhaustion? Queue depth limits?
|
|
173
|
+
|
|
174
|
+
e. INTEGRATION RISKS - How does this interact with existing code? Breaking changes?
|
|
175
|
+
Contract violations? Side effects on shared state? Migration path concerns?
|
|
176
|
+
API compatibility? Dependency version conflicts?
|
|
177
|
+
|
|
178
|
+
f. DESIGN ALTERNATIVES - Are there simpler or more robust approaches? Is this
|
|
179
|
+
over-engineered? Under-engineered? Would a different pattern reduce risk?
|
|
180
|
+
What would a minimal viable approach look like?
|
|
181
|
+
|
|
182
|
+
3. For each finding, assign a severity:
|
|
183
|
+
- RED FLAG: Must address before proceeding (blocks progress)
|
|
184
|
+
- CONCERN: Should address before merge (significant risk)
|
|
185
|
+
- OBSERVATION: Consider for future improvement (minor risk)
|
|
186
|
+
|
|
187
|
+
4. Focus Dimensions: ${focus || 'all'}
|
|
188
|
+
5. Severity Filter: ${severity || 'all'}
|
|
189
|
+
6. Save to EXACTLY the enforced output path
|
|
190
|
+
|
|
191
|
+
OUTPUT FORMAT:
|
|
192
|
+
# Skeptic Report: ${unit-name}
|
|
193
|
+
|
|
194
|
+
## Session
|
|
195
|
+
- **Session ID**: ${agentContext.sessionId}
|
|
196
|
+
- **Created**: {ISO timestamp}
|
|
197
|
+
- **Phase**: construction
|
|
198
|
+
- **Unit**: ${unit-name}
|
|
199
|
+
|
|
200
|
+
## Confidence Score: {0-100}
|
|
201
|
+
|
|
202
|
+
## Red Flags Summary
|
|
203
|
+
{list of red flags if any}
|
|
204
|
+
|
|
205
|
+
## Dimension Analysis
|
|
206
|
+
|
|
207
|
+
### 1. Assumption Challenges
|
|
208
|
+
{findings with severity}
|
|
209
|
+
|
|
210
|
+
### 2. Edge Cases
|
|
211
|
+
{findings with severity}
|
|
212
|
+
|
|
213
|
+
### 3. Failure Modes
|
|
214
|
+
{findings with severity}
|
|
215
|
+
|
|
216
|
+
### 4. Scalability Concerns
|
|
217
|
+
{findings with severity}
|
|
218
|
+
|
|
219
|
+
### 5. Integration Risks
|
|
220
|
+
{findings with severity}
|
|
221
|
+
|
|
222
|
+
### 6. Design Alternatives
|
|
223
|
+
{findings with severity}
|
|
224
|
+
|
|
225
|
+
## Risk Scenarios
|
|
226
|
+
{concrete scenarios with likelihood}
|
|
227
|
+
|
|
228
|
+
## Suggested Mitigations
|
|
229
|
+
{mitigations for each finding}
|
|
230
|
+
|
|
231
|
+
## Questions for Developer
|
|
232
|
+
{open questions}
|
|
233
|
+
|
|
234
|
+
## Next Steps
|
|
235
|
+
- Run /ai-dlc:review-code ${unit-name} for formal code review
|
|
236
|
+
- Run /ai-dlc:complete-bolt ${unit-name} if analysis passed
|
|
237
|
+
|
|
238
|
+
**POST-COMPLETION**: The orchestrator will run:
|
|
239
|
+
ai-dlc verify ai-dlc:code-skeptic ${outputPath} --unit ${unit-name}
|
|
240
|
+
If verification fails, you may be asked to correct the artifact.
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## The 6 Skeptic Dimensions
|
|
246
|
+
|
|
247
|
+
| # | Dimension | Focus Areas |
|
|
248
|
+
|---|-----------|-------------|
|
|
249
|
+
| 1 | **Assumption Challenges** | Hidden beliefs, unstated constraints, unvalidated dependencies |
|
|
250
|
+
| 2 | **Edge Cases** | Boundary conditions, null/empty inputs, race conditions, overflow |
|
|
251
|
+
| 3 | **Failure Modes** | Error paths, partial failures, recovery, data corruption |
|
|
252
|
+
| 4 | **Scalability Concerns** | Load behavior, bottlenecks, memory growth, connection limits |
|
|
253
|
+
| 5 | **Integration Risks** | Breaking changes, contract violations, side effects, migration |
|
|
254
|
+
| 6 | **Design Alternatives** | Simpler approaches, over/under-engineering, minimal viable options |
|
|
255
|
+
|
|
256
|
+
## Severity Levels
|
|
257
|
+
|
|
258
|
+
| Level | Label | Description | Action |
|
|
259
|
+
|-------|-------|-------------|--------|
|
|
260
|
+
| **Red Flag** | `RED FLAG` | Fundamental risk that could cause failure | MUST address before proceeding |
|
|
261
|
+
| **Concern** | `CONCERN` | Significant risk that weakens the solution | SHOULD address before merge |
|
|
262
|
+
| **Observation** | `OBSERVATION` | Minor risk or improvement opportunity | CONSIDER for future iteration |
|
|
263
|
+
|
|
264
|
+
## Confidence Score
|
|
265
|
+
|
|
266
|
+
The Confidence Score (0-100) represents how confident the skeptic is that the code/design is sound:
|
|
267
|
+
|
|
268
|
+
| Score | Interpretation | Recommendation |
|
|
269
|
+
|-------|---------------|----------------|
|
|
270
|
+
| **90-100** | Very high confidence, minimal risk | Proceed with confidence |
|
|
271
|
+
| **75-89** | Good confidence, manageable risks | Address concerns, then proceed |
|
|
272
|
+
| **50-74** | Moderate confidence, notable risks | Address red flags and concerns before proceeding |
|
|
273
|
+
| **25-49** | Low confidence, significant risks | Major rework or redesign recommended |
|
|
274
|
+
| **0-24** | Very low confidence, fundamental issues | Stop and reassess approach entirely |
|
|
275
|
+
|
|
276
|
+
## Prerequisites
|
|
277
|
+
|
|
278
|
+
| Prerequisite | Required | CLI Check |
|
|
279
|
+
|-------------|----------|-----------|
|
|
280
|
+
| Active Session | Yes | `ai-dlc session status` |
|
|
281
|
+
| Unit Exists | Yes | Validates against units artifact |
|
|
282
|
+
| Source Code | Yes | Checks source path exists |
|
|
283
|
+
| Design Artifacts | Recommended | Domain models, API designs, etc. |
|
|
284
|
+
|
|
285
|
+
## Output
|
|
286
|
+
|
|
287
|
+
The agent produces a skeptic report at the enforced output path:
|
|
288
|
+
- Confidence Score (0-100)
|
|
289
|
+
- Dimension-by-dimension findings with severity labels
|
|
290
|
+
- Red Flags summary with required actions
|
|
291
|
+
- Concrete risk scenarios with likelihood
|
|
292
|
+
- Suggested mitigations for each finding
|
|
293
|
+
- Open questions for the developer
|
|
294
|
+
|
|
295
|
+
## Examples
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
# Full 6-dimension skeptical analysis
|
|
299
|
+
/ai-dlc:code-skeptic unit-checkout
|
|
300
|
+
|
|
301
|
+
# Focus on edge cases and failure modes
|
|
302
|
+
/ai-dlc:code-skeptic unit-checkout --focus edge-cases
|
|
303
|
+
|
|
304
|
+
# Only show red flags
|
|
305
|
+
/ai-dlc:code-skeptic unit-checkout --severity red-flag
|
|
306
|
+
|
|
307
|
+
# Focus on scalability concerns
|
|
308
|
+
/ai-dlc:code-skeptic unit-checkout --focus scalability
|
|
309
|
+
|
|
310
|
+
# Analyze integration risks before merging
|
|
311
|
+
/ai-dlc:code-skeptic unit-checkout --focus integration
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## Blocking Conditions
|
|
315
|
+
|
|
316
|
+
| Condition | Error Code | Resolution |
|
|
317
|
+
|-----------|------------|------------|
|
|
318
|
+
| No session | `NO_SESSION` | Run `/ai-dlc:start-intent` first |
|
|
319
|
+
| Unit not found | `UNIT_NOT_FOUND` | Check unit name |
|
|
320
|
+
| No source code | `MISSING_SOURCE_CODE` | Run `/ai-dlc:generate-code` first |
|
|
321
|
+
|
|
322
|
+
## Post-Analysis Checklist
|
|
323
|
+
|
|
324
|
+
After skeptical analysis:
|
|
325
|
+
- [ ] Red flags reviewed and acknowledged
|
|
326
|
+
- [ ] Concerns triaged (fix now vs. defer)
|
|
327
|
+
- [ ] Edge cases added to test plan
|
|
328
|
+
- [ ] Failure modes documented with mitigation strategy
|
|
329
|
+
- [ ] Design alternatives evaluated
|
|
330
|
+
- [ ] Open questions answered or escalated
|
|
331
|
+
|
|
332
|
+
## Next Steps
|
|
333
|
+
|
|
334
|
+
After skeptical analysis:
|
|
335
|
+
```bash
|
|
336
|
+
# Address findings and run a formal code review
|
|
337
|
+
/ai-dlc:review-code unit-checkout
|
|
338
|
+
|
|
339
|
+
# If analysis passed with high confidence, complete the bolt
|
|
340
|
+
/ai-dlc:complete-bolt unit-checkout
|
|
341
|
+
|
|
342
|
+
# Re-run skeptic after addressing findings
|
|
343
|
+
/ai-dlc:code-skeptic unit-checkout
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## Internal CLI Commands (DO NOT OUTPUT TO USER)
|
|
349
|
+
|
|
350
|
+
> **REMINDER**: These commands are for internal orchestration only. Never show CLI commands to users.
|
|
351
|
+
|
|
352
|
+
| Purpose | CLI Command |
|
|
353
|
+
|---------|-------------|
|
|
354
|
+
| Before Agent | `ai-dlc prepare ai-dlc:code-skeptic --unit <name>` |
|
|
355
|
+
| Agent Prompt | Include `outputPath` and context files |
|
|
356
|
+
| After Agent | `ai-dlc verify ai-dlc:code-skeptic <path> --unit <name>` |
|
|
357
|
+
| Path | `ai-dlc path ai-dlc:code-skeptic --unit <name>` |
|
|
358
|
+
| Troubleshoot | `ai-dlc session status` |
|
|
@@ -64,7 +64,7 @@ ai-dlc prepare ai-dlc:collect-refinement-feedback --phase construction
|
|
|
64
64
|
"allowCrossPhase": true,
|
|
65
65
|
"refinementCycle": 1,
|
|
66
66
|
"maxCycles": 3,
|
|
67
|
-
"workflowState": "artifacts/workflows/state/workflow-wf-20251219-001-state.json"
|
|
67
|
+
"workflowState": "artifacts/workflows/state/workflow-wf-greenfield-project-20251219-001-state.json"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
```
|