sdd-cli 0.1.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 (186) hide show
  1. package/README.md +566 -0
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.js +308 -0
  4. package/dist/commands/ai-exec.d.ts +1 -0
  5. package/dist/commands/ai-exec.js +18 -0
  6. package/dist/commands/ai-status.d.ts +1 -0
  7. package/dist/commands/ai-status.js +12 -0
  8. package/dist/commands/doctor.d.ts +1 -0
  9. package/dist/commands/doctor.js +101 -0
  10. package/dist/commands/gen-architecture.d.ts +1 -0
  11. package/dist/commands/gen-architecture.js +61 -0
  12. package/dist/commands/gen-best-practices.d.ts +1 -0
  13. package/dist/commands/gen-best-practices.js +64 -0
  14. package/dist/commands/gen-functional-spec.d.ts +1 -0
  15. package/dist/commands/gen-functional-spec.js +67 -0
  16. package/dist/commands/gen-project-readme.d.ts +1 -0
  17. package/dist/commands/gen-project-readme.js +72 -0
  18. package/dist/commands/gen-requirements.d.ts +1 -0
  19. package/dist/commands/gen-requirements.js +7 -0
  20. package/dist/commands/gen-technical-spec.d.ts +1 -0
  21. package/dist/commands/gen-technical-spec.js +67 -0
  22. package/dist/commands/gen-utils.d.ts +4 -0
  23. package/dist/commands/gen-utils.js +44 -0
  24. package/dist/commands/hello.d.ts +1 -0
  25. package/dist/commands/hello.js +63 -0
  26. package/dist/commands/init.d.ts +1 -0
  27. package/dist/commands/init.js +9 -0
  28. package/dist/commands/learn-deliver.d.ts +1 -0
  29. package/dist/commands/learn-deliver.js +55 -0
  30. package/dist/commands/learn-refine.d.ts +1 -0
  31. package/dist/commands/learn-refine.js +71 -0
  32. package/dist/commands/learn-start.d.ts +1 -0
  33. package/dist/commands/learn-start.js +63 -0
  34. package/dist/commands/learn-utils.d.ts +22 -0
  35. package/dist/commands/learn-utils.js +78 -0
  36. package/dist/commands/list.d.ts +1 -0
  37. package/dist/commands/list.js +69 -0
  38. package/dist/commands/pr-audit.d.ts +1 -0
  39. package/dist/commands/pr-audit.js +59 -0
  40. package/dist/commands/pr-finish.d.ts +1 -0
  41. package/dist/commands/pr-finish.js +51 -0
  42. package/dist/commands/pr-report.d.ts +1 -0
  43. package/dist/commands/pr-report.js +59 -0
  44. package/dist/commands/pr-respond.d.ts +1 -0
  45. package/dist/commands/pr-respond.js +65 -0
  46. package/dist/commands/pr-start.d.ts +1 -0
  47. package/dist/commands/pr-start.js +79 -0
  48. package/dist/commands/pr-utils.d.ts +8 -0
  49. package/dist/commands/pr-utils.js +54 -0
  50. package/dist/commands/req-archive.d.ts +1 -0
  51. package/dist/commands/req-archive.js +33 -0
  52. package/dist/commands/req-create.d.ts +10 -0
  53. package/dist/commands/req-create.js +94 -0
  54. package/dist/commands/req-export.d.ts +1 -0
  55. package/dist/commands/req-export.js +37 -0
  56. package/dist/commands/req-finish.d.ts +1 -0
  57. package/dist/commands/req-finish.js +120 -0
  58. package/dist/commands/req-lint.d.ts +1 -0
  59. package/dist/commands/req-lint.js +58 -0
  60. package/dist/commands/req-list.d.ts +1 -0
  61. package/dist/commands/req-list.js +36 -0
  62. package/dist/commands/req-plan.d.ts +1 -0
  63. package/dist/commands/req-plan.js +200 -0
  64. package/dist/commands/req-refine.d.ts +1 -0
  65. package/dist/commands/req-refine.js +108 -0
  66. package/dist/commands/req-report.d.ts +1 -0
  67. package/dist/commands/req-report.js +44 -0
  68. package/dist/commands/req-start.d.ts +1 -0
  69. package/dist/commands/req-start.js +131 -0
  70. package/dist/commands/req-status.d.ts +1 -0
  71. package/dist/commands/req-status.js +29 -0
  72. package/dist/commands/route.d.ts +1 -0
  73. package/dist/commands/route.js +30 -0
  74. package/dist/commands/test-plan.d.ts +1 -0
  75. package/dist/commands/test-plan.js +81 -0
  76. package/dist/context/flags.d.ts +7 -0
  77. package/dist/context/flags.js +17 -0
  78. package/dist/paths.d.ts +1 -0
  79. package/dist/paths.js +10 -0
  80. package/dist/providers/codex.d.ts +7 -0
  81. package/dist/providers/codex.js +19 -0
  82. package/dist/router/flow.d.ts +1 -0
  83. package/dist/router/flow.js +17 -0
  84. package/dist/router/intent.d.ts +3 -0
  85. package/dist/router/intent.js +69 -0
  86. package/dist/router/prompt-map.d.ts +1 -0
  87. package/dist/router/prompt-map.js +20 -0
  88. package/dist/router/prompt-packs.d.ts +8 -0
  89. package/dist/router/prompt-packs.js +20 -0
  90. package/dist/router/validate-prompt-packs.d.ts +4 -0
  91. package/dist/router/validate-prompt-packs.js +16 -0
  92. package/dist/templates/render.d.ts +2 -0
  93. package/dist/templates/render.js +25 -0
  94. package/dist/templates/validate.d.ts +4 -0
  95. package/dist/templates/validate.js +58 -0
  96. package/dist/types.d.ts +7 -0
  97. package/dist/types.js +2 -0
  98. package/dist/ui/prompt.d.ts +2 -0
  99. package/dist/ui/prompt.js +49 -0
  100. package/dist/utils/list.d.ts +2 -0
  101. package/dist/utils/list.js +20 -0
  102. package/dist/validation/validate.d.ts +4 -0
  103. package/dist/validation/validate.js +20 -0
  104. package/dist/workspace/index.d.ts +21 -0
  105. package/dist/workspace/index.js +103 -0
  106. package/flows/ADMISSIONS_ADMIN.md +33 -0
  107. package/flows/ART.md +33 -0
  108. package/flows/BUG_FIX.md +32 -0
  109. package/flows/COURT_SYSTEM.md +33 -0
  110. package/flows/DATA_SCIENTIST.md +33 -0
  111. package/flows/ECOMMERCE.md +33 -0
  112. package/flows/ECONOMICS.md +33 -0
  113. package/flows/GRAPHIC_DESIGN.md +33 -0
  114. package/flows/HISTORY.md +33 -0
  115. package/flows/LAWYER.md +34 -0
  116. package/flows/PROGRAMMER.md +33 -0
  117. package/flows/PR_REVIEW.md +33 -0
  118. package/flows/README.md +29 -0
  119. package/flows/RETAIL_STORE.md +33 -0
  120. package/flows/SOCIOLOGY.md +33 -0
  121. package/flows/STATE_ADMIN.md +33 -0
  122. package/flows/STUDENT_UNIVERSITY.md +33 -0
  123. package/flows/TAXES_ADMIN.md +33 -0
  124. package/flows/TEACHER.md +33 -0
  125. package/package.json +32 -0
  126. package/router/BUG_FIX.flow.md +63 -0
  127. package/router/BUSINESS.flow.md +57 -0
  128. package/router/DATA_SCIENCE.flow.md +58 -0
  129. package/router/DESIGN.flow.md +58 -0
  130. package/router/FLOW_TEMPLATE.md +26 -0
  131. package/router/GENERIC.flow.md +37 -0
  132. package/router/HUMANITIES.flow.md +58 -0
  133. package/router/LEARN.flow.md +52 -0
  134. package/router/LEGAL.flow.md +58 -0
  135. package/router/PR_REVIEW.flow.md +55 -0
  136. package/router/README.md +23 -0
  137. package/router/SOFTWARE_FEATURE.flow.md +59 -0
  138. package/schemas/architecture.schema.json +13 -0
  139. package/schemas/decision-log.schema.json +16 -0
  140. package/schemas/diagram.schema.json +11 -0
  141. package/schemas/domain.schema.json +20 -0
  142. package/schemas/functional-spec.schema.json +15 -0
  143. package/schemas/gate.schema.json +10 -0
  144. package/schemas/learn-session.schema.json +15 -0
  145. package/schemas/pr-review.schema.json +20 -0
  146. package/schemas/progress-log.schema.json +21 -0
  147. package/schemas/project-readme.schema.json +23 -0
  148. package/schemas/project.schema.json +16 -0
  149. package/schemas/prompt-pack.schema.json +12 -0
  150. package/schemas/quality.schema.json +23 -0
  151. package/schemas/requirement.schema.json +34 -0
  152. package/schemas/role.schema.json +17 -0
  153. package/schemas/router-flow.schema.json +15 -0
  154. package/schemas/router-intent.schema.json +13 -0
  155. package/schemas/technical-spec.schema.json +15 -0
  156. package/schemas/template.schema.json +10 -0
  157. package/schemas/test-plan.schema.json +13 -0
  158. package/schemas/workspace.schema.json +12 -0
  159. package/templates/architecture.md +16 -0
  160. package/templates/changelog.md +3 -0
  161. package/templates/ci-checklist.md +14 -0
  162. package/templates/decision-log.md +16 -0
  163. package/templates/diagrams/component.mmd +3 -0
  164. package/templates/diagrams/container.mmd +3 -0
  165. package/templates/diagrams/context.mmd +3 -0
  166. package/templates/functional-spec.md +22 -0
  167. package/templates/gate-index.json +20 -0
  168. package/templates/implementation-plan.md +13 -0
  169. package/templates/pr-comment-audit.md +19 -0
  170. package/templates/pr-comment-lifecycle.md +11 -0
  171. package/templates/pr-comment-severity.md +13 -0
  172. package/templates/pr-dispute-resolution.md +16 -0
  173. package/templates/pr-metrics.md +10 -0
  174. package/templates/pr-response-generator.md +11 -0
  175. package/templates/pr-response-style.md +13 -0
  176. package/templates/pr-review-report.md +22 -0
  177. package/templates/pr-review-summary.md +16 -0
  178. package/templates/progress-log.md +6 -0
  179. package/templates/project-readme.md +19 -0
  180. package/templates/prompt-pack-index.json +127 -0
  181. package/templates/quality.yml +17 -0
  182. package/templates/requirement.md +33 -0
  183. package/templates/summary.md +10 -0
  184. package/templates/technical-spec.md +22 -0
  185. package/templates/template-index.json +212 -0
  186. package/templates/test-plan.md +16 -0
@@ -0,0 +1,33 @@
1
+ # Flow: Retail store
2
+
3
+ ## Goal
4
+ Support in-store sales, inventory, and customer management in a reliable, low-latency system.
5
+
6
+ ## Discovery prompts
7
+ - What POS systems and devices are in scope?
8
+ - What inventory sources are authoritative?
9
+ - What promotions and discount rules exist?
10
+ - How should returns and exchanges work?
11
+ - What offline mode is required?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with store operations constraints
15
+ - `functional-spec.md` for POS, inventory, and staff flows
16
+ - `technical-spec.md` for device integration and offline sync
17
+ - `architecture.md` for store-local resiliency
18
+ - `test-plan.md` for offline/online transitions
19
+
20
+ ## Risk and compliance
21
+ - Inventory drift across locations
22
+ - Offline mode data loss
23
+ - PCI compliance for payments
24
+
25
+ ## Acceptance criteria examples
26
+ - Store can operate for 8+ hours offline.
27
+ - Inventory reconciles within SLA after reconnect.
28
+ - Payment flows pass compliance checks.
29
+
30
+ ## Recommended outputs
31
+ - POS workflow diagram
32
+ - Offline sync strategy
33
+ - Store ops checklist
@@ -0,0 +1,33 @@
1
+ # Flow: Sociology research
2
+
3
+ ## Goal
4
+ Design a study or analysis of social behavior with clear methods and ethical safeguards.
5
+
6
+ ## Discovery prompts
7
+ - What is the research question?
8
+ - What population or group is studied?
9
+ - What method is used (survey, interviews, observation)?
10
+ - What ethical requirements apply?
11
+ - What outcomes or hypotheses are tested?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with research scope
15
+ - `functional-spec.md` for research workflow
16
+ - `technical-spec.md` for data collection and analysis tools
17
+ - `architecture.md` for dataset and analysis pipeline
18
+ - `test-plan.md` for validity and bias checks
19
+
20
+ ## Risk and compliance
21
+ - Informed consent and privacy
22
+ - Sampling bias
23
+ - Misinterpretation of data
24
+
25
+ ## Acceptance criteria examples
26
+ - Method aligns with research question.
27
+ - Data collection respects consent and privacy.
28
+ - Findings are reproducible and transparent.
29
+
30
+ ## Recommended outputs
31
+ - Ethics checklist
32
+ - Survey or interview guide
33
+ - Data analysis plan
@@ -0,0 +1,33 @@
1
+ # Flow: State administration
2
+
3
+ ## Goal
4
+ Deliver reliable public services with strict compliance, transparency, and audit trails.
5
+
6
+ ## Discovery prompts
7
+ - What service is being delivered (permits, benefits, licenses)?
8
+ - What laws and regulations apply?
9
+ - What are the SLA requirements for response times?
10
+ - Who are the actors (citizens, clerks, supervisors)?
11
+ - What data must be retained and for how long?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with legal constraints and SLA targets
15
+ - `functional-spec.md` for service request and approval flows
16
+ - `technical-spec.md` for identity and access management
17
+ - `architecture.md` for resiliency and data governance
18
+ - `test-plan.md` for SLA compliance and failure scenarios
19
+
20
+ ## Risk and compliance
21
+ - Legal compliance and transparency
22
+ - Accessibility for public services
23
+ - Disaster recovery requirements
24
+
25
+ ## Acceptance criteria examples
26
+ - Requests are tracked end-to-end with timestamps.
27
+ - Service availability meets SLA targets.
28
+ - Decisions can be audited by authorized parties.
29
+
30
+ ## Recommended outputs
31
+ - Citizen request tracking
32
+ - Compliance dashboard
33
+ - Audit-ready reports
@@ -0,0 +1,33 @@
1
+ # Flow: Student (university)
2
+
3
+ ## Goal
4
+ Plan and deliver a project or research task with clear milestones, requirements, and documentation.
5
+
6
+ ## Discovery prompts
7
+ - What is the course or program requirement?
8
+ - What is the deliverable format (report, prototype, presentation)?
9
+ - What is the grading rubric or success criteria?
10
+ - What is the timeline and milestones?
11
+ - Who are the stakeholders (advisor, team members)?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with assignment constraints
15
+ - `functional-spec.md` for user stories or research tasks
16
+ - `technical-spec.md` for tools and stack
17
+ - `architecture.md` for system or study design
18
+ - `test-plan.md` or validation plan
19
+
20
+ ## Risk and compliance
21
+ - Plagiarism rules and citation requirements
22
+ - Data privacy for any collected data
23
+ - Academic integrity constraints
24
+
25
+ ## Acceptance criteria examples
26
+ - Deliverable meets rubric and formatting rules.
27
+ - All claims are supported with citations.
28
+ - Prototype demonstrates required functionality.
29
+
30
+ ## Recommended outputs
31
+ - Milestone plan
32
+ - Research log
33
+ - Final submission checklist
@@ -0,0 +1,33 @@
1
+ # Flow: Taxes administration
2
+
3
+ ## Goal
4
+ Manage tax filing, validation, audits, and compliance with strong security and traceability.
5
+
6
+ ## Discovery prompts
7
+ - What tax types are supported (income, sales, corporate)?
8
+ - What validation rules are mandatory?
9
+ - What are the filing deadlines and penalty rules?
10
+ - Who can access taxpayer data?
11
+ - What integrations exist (banking, identity, government systems)?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with compliance and validation constraints
15
+ - `functional-spec.md` for filing and audit workflows
16
+ - `technical-spec.md` covering encryption and access controls
17
+ - `architecture.md` with data segregation and audit trails
18
+ - `test-plan.md` for validation accuracy and security
19
+
20
+ ## Risk and compliance
21
+ - Sensitive financial data
22
+ - Regulatory compliance and auditability
23
+ - Fraud detection requirements
24
+
25
+ ## Acceptance criteria examples
26
+ - All filings are validated against latest rules.
27
+ - Every data access is logged and auditable.
28
+ - Audit workflows can be triggered and tracked.
29
+
30
+ ## Recommended outputs
31
+ - Filing validation engine
32
+ - Audit case management
33
+ - Compliance reporting
@@ -0,0 +1,33 @@
1
+ # Flow: Teacher (education)
2
+
3
+ ## Goal
4
+ Create a system for lesson planning, assessments, and feedback with clear learning outcomes.
5
+
6
+ ## Discovery prompts
7
+ - What grade levels and subjects are supported?
8
+ - What is the grading model (rubrics, points, mastery)?
9
+ - How are students and guardians notified?
10
+ - Are there accessibility requirements?
11
+ - What data privacy rules apply to students?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with learning objectives and scope
15
+ - `functional-spec.md` covering lesson, assignment, and grading flows
16
+ - `technical-spec.md` for integrations (LMS, email, calendars)
17
+ - `architecture.md` for content storage and versioning
18
+ - `test-plan.md` with grading accuracy and accessibility checks
19
+
20
+ ## Risk and compliance
21
+ - Student data privacy
22
+ - Accessibility standards
23
+ - Content versioning and auditability
24
+
25
+ ## Acceptance criteria examples
26
+ - Teachers can reuse and version lessons.
27
+ - Students receive feedback within configured SLAs.
28
+ - Accessibility checks are enforced for uploaded content.
29
+
30
+ ## Recommended outputs
31
+ - Lesson plan templates
32
+ - Grading rubric engine
33
+ - Student progress analytics
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "sdd-cli",
3
+ "version": "0.1.0",
4
+ "description": "SDD-first, AI-native CLI for end-to-end delivery.",
5
+ "bin": {
6
+ "sdd-tool": "dist/cli.js",
7
+ "sdd": "dist/cli.js"
8
+ },
9
+ "main": "dist/cli.js",
10
+ "types": "dist/cli.d.ts",
11
+ "files": [
12
+ "dist",
13
+ "router",
14
+ "templates",
15
+ "schemas",
16
+ "flows"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsc -p tsconfig.json",
20
+ "start": "node dist/cli.js",
21
+ "dev": "ts-node src/cli.ts"
22
+ },
23
+ "dependencies": {
24
+ "ajv": "^8.17.1",
25
+ "commander": "^12.1.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^22.13.1",
29
+ "ts-node": "^10.9.2",
30
+ "typescript": "^5.7.3"
31
+ }
32
+ }
@@ -0,0 +1,63 @@
1
+ # Router flow: Bug fix
2
+
3
+ ## Entry signals
4
+ - "bug", "issue", "error", stack trace, "crash", "regression"
5
+
6
+ ## Steps
7
+ 1) Ask permission to open external links or repos.
8
+ 2) If approved, fetch and summarize issue/context.
9
+ 3) Ask user perspective: what they see, expected vs actual, impact.
10
+ 4) Require repro steps, environment, severity, and recent changes.
11
+ 5) Generate 5+ solution paths with trade-offs.
12
+ 6) Ask user to choose preferred path or request `--improve`.
13
+ 7) Generate requirements and specs for the selected path.
14
+ 8) Gate implementation until test plan and quality profile are set.
15
+
16
+ ## Required questions
17
+ - What is the expected behavior?
18
+ - What is the actual behavior?
19
+ - Steps to reproduce?
20
+ - Environment and version details?
21
+ - Severity and impact?
22
+ - Recent changes or related issues?
23
+
24
+ ## Scripted Q/A tree
25
+
26
+ ### Q1: Link access
27
+ Q: "You shared a link. Do you approve opening it?"
28
+ A: Yes -> fetch + summarize
29
+ A: No -> ask user to paste relevant details
30
+
31
+ ### Q2: User perspective
32
+ Q: "Describe what you see vs what you expect."
33
+ A: Capture expected/actual and impact
34
+
35
+ ### Q3: Repro and env
36
+ Q: "Can you share steps to reproduce and environment details?"
37
+ A: Capture steps, version, OS, config
38
+
39
+ ### Q4: Severity and scope
40
+ Q: "How severe is this and who is impacted?"
41
+ A: Capture severity, user count, business impact
42
+
43
+ ### Q5: Path selection
44
+ Q: "Here are 5+ possible fixes with trade-offs. Which path should we pursue?"
45
+ A: Capture chosen path or request `--improve`
46
+
47
+ ### Q6: Approval gate
48
+ Q: "Do you approve moving to requirements and specs?"
49
+ A: Yes -> generate artifacts
50
+ A: No -> refine answers
51
+
52
+ ## Required outputs
53
+ - `requirement.md` (bug scope)
54
+ - `technical-spec.md` (root cause + fix)
55
+ - `test-plan.md` (repro + regression)
56
+ - `progress-log.md`
57
+
58
+ ## Gates
59
+ - Repro steps required before planning
60
+ - At least one regression test required before finish
61
+
62
+ ## Agents
63
+ - Req Analyst, Tech Lead, QA
@@ -0,0 +1,57 @@
1
+ # Router flow: Business / economics
2
+
3
+ ## Entry signals
4
+ - "market", "pricing", "policy", "forecast", "economics"
5
+
6
+ ## Steps
7
+ 1) Interview for objective, scope, and stakeholders.
8
+ 2) Define assumptions and model approach.
9
+ 3) Generate analysis plan and outputs.
10
+ 4) Ask for approval or `--improve`.
11
+ 5) Produce sensitivity checks and executive summary.
12
+
13
+ ## Required questions
14
+ - What decision will this analysis support?
15
+ - What scope and timeframe apply?
16
+ - What data sources are available?
17
+ - What assumptions are acceptable?
18
+ - What risk tolerance is required?
19
+
20
+ ## Required outputs
21
+ - `requirement.md`
22
+ - `technical-spec.md`
23
+ - `architecture.md`
24
+ - `test-plan.md` (sensitivity checks)
25
+
26
+ ## Scripted Q/A tree
27
+
28
+ ### Q1: Decision
29
+ Q: "What decision will this analysis support?"
30
+ A: capture decision context
31
+
32
+ ### Q2: Scope and timeline
33
+ Q: "What scope and timeframe apply?"
34
+ A: capture scope and horizon
35
+
36
+ ### Q3: Data sources
37
+ Q: "What data sources are available and trusted?"
38
+ A: capture sources
39
+
40
+ ### Q4: Assumptions
41
+ Q: "What assumptions are acceptable?"
42
+ A: capture assumptions
43
+
44
+ ### Q5: Risk tolerance
45
+ Q: "What level of risk or uncertainty is acceptable?"
46
+ A: capture tolerance
47
+
48
+ ### Q6: Approval gate
49
+ Q: "Approve analysis plan and move to specs?"
50
+ A: Yes -> generate specs
51
+ A: No -> refine
52
+
53
+ ## Gates
54
+ - Assumptions must be explicit before analysis
55
+
56
+ ## Agents
57
+ - Analyst, Economist, Critic
@@ -0,0 +1,58 @@
1
+ # Router flow: Data science
2
+
3
+ ## Entry signals
4
+ - "model", "prediction", "dataset", "ML", "analytics"
5
+
6
+ ## Steps
7
+ 1) Interview for objective, metrics, data sources, constraints.
8
+ 2) Define evaluation criteria and monitoring needs.
9
+ 3) Generate specs and architecture for pipelines.
10
+ 4) Ask for approval or `--improve`.
11
+ 5) Create test plan for data validation and model evaluation.
12
+
13
+ ## Required questions
14
+ - What is the success metric?
15
+ - What data sources and quality risks exist?
16
+ - What fairness or compliance rules apply?
17
+ - What latency/cost constraints exist?
18
+ - How will drift be monitored?
19
+
20
+ ## Required outputs
21
+ - `requirement.md`
22
+ - `technical-spec.md`
23
+ - `architecture.md`
24
+ - `test-plan.md`
25
+ - `quality.yml`
26
+
27
+ ## Scripted Q/A tree
28
+
29
+ ### Q1: Objective and metric
30
+ Q: "What is the business or research objective and the primary metric?"
31
+ A: capture target metric
32
+
33
+ ### Q2: Data sources
34
+ Q: "What data sources exist and what are the quality risks?"
35
+ A: capture sources and gaps
36
+
37
+ ### Q3: Constraints
38
+ Q: "Any latency, cost, or compliance constraints?"
39
+ A: capture constraints
40
+
41
+ ### Q4: Fairness and bias
42
+ Q: "Any fairness or bias concerns to monitor?"
43
+ A: capture fairness criteria
44
+
45
+ ### Q5: Monitoring
46
+ Q: "How will we monitor drift post-release?"
47
+ A: capture monitoring plan
48
+
49
+ ### Q6: Approval gate
50
+ Q: "Approve requirements and move to specs?"
51
+ A: Yes -> generate specs
52
+ A: No -> refine
53
+
54
+ ## Gates
55
+ - Metrics and validation criteria required before plan
56
+
57
+ ## Agents
58
+ - Data Scientist, MLOps, QA
@@ -0,0 +1,58 @@
1
+ # Router flow: Design / creative
2
+
3
+ ## Entry signals
4
+ - "logo", "brand", "UI", "layout", "visual", "art"
5
+
6
+ ## Steps
7
+ 1) Interview for goals, audience, references, constraints.
8
+ 2) Define deliverables and review cadence.
9
+ 3) Generate requirements and design system structure.
10
+ 4) Ask for approval or `--improve`.
11
+ 5) Produce delivery checklist and accessibility checks.
12
+
13
+ ## Required questions
14
+ - What is the message or brand?
15
+ - Who is the audience?
16
+ - What formats are needed?
17
+ - What constraints or references exist?
18
+ - What is the approval process?
19
+
20
+ ## Required outputs
21
+ - `requirement.md`
22
+ - `functional-spec.md`
23
+ - `technical-spec.md`
24
+ - `architecture.md`
25
+ - `test-plan.md`
26
+
27
+ ## Scripted Q/A tree
28
+
29
+ ### Q1: Message and audience
30
+ Q: "What is the message and who is the audience?"
31
+ A: capture audience and goal
32
+
33
+ ### Q2: Deliverables
34
+ Q: "What formats are required (logo, web, print, social)?"
35
+ A: capture deliverables
36
+
37
+ ### Q3: References
38
+ Q: "Any style references or inspirations?"
39
+ A: capture references
40
+
41
+ ### Q4: Constraints
42
+ Q: "What constraints apply (timeline, budget, tools)?"
43
+ A: capture constraints
44
+
45
+ ### Q5: Approval cadence
46
+ Q: "Who approves and how often should we review?"
47
+ A: capture review cadence
48
+
49
+ ### Q6: Approval gate
50
+ Q: "Approve requirements and move to specs?"
51
+ A: Yes -> generate specs
52
+ A: No -> refine
53
+
54
+ ## Gates
55
+ - Deliverables and approval process must be defined
56
+
57
+ ## Agents
58
+ - Creative Lead, Design Systems, Critic
@@ -0,0 +1,26 @@
1
+ # Router flow template
2
+
3
+ ## Entry signals
4
+ - <signal1>
5
+ - <signal2>
6
+
7
+ ## Steps
8
+ 1) <step>
9
+ 2) <step>
10
+
11
+ ## Required questions
12
+ - <question>
13
+
14
+ ## Scripted Q/A tree
15
+ ### Q1: <title>
16
+ Q: "<question>"
17
+ A: <expected response>
18
+
19
+ ## Required outputs
20
+ - <artifact>
21
+
22
+ ## Gates
23
+ - <gate>
24
+
25
+ ## Agents
26
+ - <role>
@@ -0,0 +1,37 @@
1
+ # Router flow: Generic
2
+
3
+ ## Entry signals
4
+ - Unclassified or mixed intent
5
+
6
+ ## Steps
7
+ 1) Ask the user what they want to achieve and why.
8
+ 2) Ask if it is software, research, design, or policy.
9
+ 3) Route to the closest specialized flow.
10
+
11
+ ## Required questions
12
+ - What is the goal?
13
+ - Who is the audience?
14
+ - What output format is expected?
15
+
16
+ ## Required outputs
17
+ - Minimal `requirement.md`
18
+
19
+ ## Scripted Q/A tree
20
+
21
+ ### Q1: Goal
22
+ Q: "What is the goal and why does it matter?"
23
+ A: capture objective and motivation
24
+
25
+ ### Q2: Domain
26
+ Q: "Is this software, research, design, or policy?"
27
+ A: route to specific flow
28
+
29
+ ### Q3: Output
30
+ Q: "What output format do you need?"
31
+ A: capture expected format
32
+
33
+ ## Gates
34
+ - Must select a domain before proceeding
35
+
36
+ ## Agents
37
+ - Generalist
@@ -0,0 +1,58 @@
1
+ # Router flow: Humanities research
2
+
3
+ ## Entry signals
4
+ - "history", "sociology", "philosophy", "essay", "thesis"
5
+
6
+ ## Steps
7
+ 1) Interview for thesis, scope, sources, and format.
8
+ 2) Define structure and methodology.
9
+ 3) Generate plan and section outline.
10
+ 4) Ask for approval or `--improve`.
11
+ 5) Produce reading list and source checks.
12
+
13
+ ## Required questions
14
+ - What is the thesis or research question?
15
+ - What scope and timeframe apply?
16
+ - What source types are acceptable?
17
+ - What format is required?
18
+ - What perspectives must be included?
19
+
20
+ ## Required outputs
21
+ - `requirement.md`
22
+ - `functional-spec.md`
23
+ - `technical-spec.md` (citation rules)
24
+ - `architecture.md` (structure)
25
+ - `test-plan.md` (bias and source checks)
26
+
27
+ ## Scripted Q/A tree
28
+
29
+ ### Q1: Thesis
30
+ Q: "What is the thesis or research question?"
31
+ A: capture thesis
32
+
33
+ ### Q2: Scope
34
+ Q: "What period, region, or population is in scope?"
35
+ A: capture scope boundaries
36
+
37
+ ### Q3: Sources
38
+ Q: "What sources are acceptable or required?"
39
+ A: capture source types and citation style
40
+
41
+ ### Q4: Format
42
+ Q: "What output format is required?"
43
+ A: capture format
44
+
45
+ ### Q5: Perspectives
46
+ Q: "Which perspectives must be included?"
47
+ A: capture perspectives
48
+
49
+ ### Q6: Approval gate
50
+ Q: "Approve research plan and move to structure?"
51
+ A: Yes -> generate specs
52
+ A: No -> refine
53
+
54
+ ## Gates
55
+ - Thesis and scope required before deep research
56
+
57
+ ## Agents
58
+ - Researcher, Critic, Synthesizer
@@ -0,0 +1,52 @@
1
+ # Router flow: Learn / knowledge
2
+
3
+ ## Entry signals
4
+ - "learn", "teach me", "explain", "what is", "history of"
5
+
6
+ ## Steps
7
+ 1) Interview for depth, format, purpose, and constraints.
8
+ 2) Build a research plan and scope boundaries.
9
+ 3) Run multi-agent synthesis and critique.
10
+ 4) Deliver layered outputs (brief, deep-dive, reading list, QA).
11
+
12
+ ## Required questions
13
+ - Why do you want this knowledge?
14
+ - What depth and format do you want?
15
+ - What focus areas matter most?
16
+ - Time available to read or study?
17
+
18
+ ## Required outputs
19
+ - `brief.md`
20
+ - `deep-dive.md`
21
+ - `reading-list.md`
22
+ - `qa.md`
23
+ - `progress-log.md`
24
+
25
+ ## Scripted Q/A tree
26
+
27
+ ### Q1: Motivation
28
+ Q: "Why do you want to learn this topic?"
29
+ A: capture intent (curiosity, work, study)
30
+
31
+ ### Q2: Depth and format
32
+ Q: "What depth and format do you want (overview, academic, expert)?"
33
+ A: select depth and output format
34
+
35
+ ### Q3: Focus areas
36
+ Q: "Any specific aspects to emphasize?"
37
+ A: capture focus areas
38
+
39
+ ### Q4: Time budget
40
+ Q: "How much time do you have to read or study?"
41
+ A: capture time window
42
+
43
+ ### Q5: Approval gate
44
+ Q: "Approve research plan and scope?"
45
+ A: Yes -> run synthesis
46
+ A: No -> refine scope
47
+
48
+ ## Gates
49
+ - Scope must be defined before deep-dive generation
50
+
51
+ ## Agents
52
+ - Researcher, Critic, Synthesizer