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,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ask = ask;
7
+ exports.confirm = confirm;
8
+ const fs_1 = __importDefault(require("fs"));
9
+ const readline_1 = __importDefault(require("readline"));
10
+ const flags_1 = require("../context/flags");
11
+ let queuedAnswers = null;
12
+ function getQueuedAnswers() {
13
+ if (queuedAnswers) {
14
+ return queuedAnswers;
15
+ }
16
+ if (!process.stdin.isTTY) {
17
+ const raw = fs_1.default.readFileSync(0, "utf-8");
18
+ queuedAnswers = raw.split(/\r?\n/).filter((line) => line.length > 0);
19
+ return queuedAnswers;
20
+ }
21
+ queuedAnswers = [];
22
+ return queuedAnswers;
23
+ }
24
+ const rl = readline_1.default.createInterface({
25
+ input: process.stdin,
26
+ output: process.stdout
27
+ });
28
+ process.on("exit", () => rl.close());
29
+ function ask(question) {
30
+ if (!process.stdin.isTTY) {
31
+ const queue = getQueuedAnswers();
32
+ const answer = queue.shift() ?? "";
33
+ return Promise.resolve(answer.trim());
34
+ }
35
+ return new Promise((resolve) => {
36
+ rl.question(question, (answer) => {
37
+ resolve(answer.trim());
38
+ });
39
+ });
40
+ }
41
+ async function confirm(question) {
42
+ const flags = (0, flags_1.getFlags)();
43
+ if (flags.approve) {
44
+ return true;
45
+ }
46
+ const response = await ask(question);
47
+ const normalized = response.trim().toLowerCase();
48
+ return normalized === "y" || normalized === "yes";
49
+ }
@@ -0,0 +1,2 @@
1
+ export declare function formatList(input: string): string;
2
+ export declare function parseList(input: string): string[];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatList = formatList;
4
+ exports.parseList = parseList;
5
+ function formatList(input) {
6
+ const items = input
7
+ .split(",")
8
+ .map((item) => item.trim())
9
+ .filter((item) => item.length > 0);
10
+ if (items.length === 0) {
11
+ return "- N/A";
12
+ }
13
+ return items.map((item) => `- ${item}`).join("\n");
14
+ }
15
+ function parseList(input) {
16
+ return input
17
+ .split(",")
18
+ .map((item) => item.trim())
19
+ .filter((item) => item.length > 0);
20
+ }
@@ -0,0 +1,4 @@
1
+ export declare function validateJson(schemaFile: string, data: unknown): {
2
+ valid: boolean;
3
+ errors: string[];
4
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validateJson = validateJson;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const _2020_1 = __importDefault(require("ajv/dist/2020"));
10
+ const paths_1 = require("../paths");
11
+ function validateJson(schemaFile, data) {
12
+ const root = (0, paths_1.getRepoRoot)();
13
+ const schemaPath = path_1.default.join(root, "schemas", schemaFile);
14
+ const schema = JSON.parse(fs_1.default.readFileSync(schemaPath, "utf-8"));
15
+ const ajv = new _2020_1.default();
16
+ const validate = ajv.compile(schema);
17
+ const valid = validate(data);
18
+ const errors = (validate.errors ?? []).map((error) => `${error.instancePath} ${error.message}`.trim());
19
+ return { valid: Boolean(valid), errors };
20
+ }
@@ -0,0 +1,21 @@
1
+ export type ProjectSummary = {
2
+ name: string;
3
+ status: string;
4
+ };
5
+ export type ProjectMetadata = {
6
+ name: string;
7
+ status: string;
8
+ domain: string;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ };
12
+ export type WorkspaceInfo = {
13
+ root: string;
14
+ indexPath: string;
15
+ };
16
+ export declare function getWorkspaceInfo(): WorkspaceInfo;
17
+ export declare function ensureWorkspace(workspace: WorkspaceInfo): void;
18
+ export declare function listProjects(workspace: WorkspaceInfo): ProjectSummary[];
19
+ export declare function ensureProject(workspace: WorkspaceInfo, name: string, domain: string): ProjectMetadata;
20
+ export declare function createProject(workspace: WorkspaceInfo, name: string, domain: string): ProjectMetadata;
21
+ export declare function updateProjectStatus(workspace: WorkspaceInfo, name: string, status: string): void;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getWorkspaceInfo = getWorkspaceInfo;
7
+ exports.ensureWorkspace = ensureWorkspace;
8
+ exports.listProjects = listProjects;
9
+ exports.ensureProject = ensureProject;
10
+ exports.createProject = createProject;
11
+ exports.updateProjectStatus = updateProjectStatus;
12
+ const fs_1 = __importDefault(require("fs"));
13
+ const path_1 = __importDefault(require("path"));
14
+ const os_1 = __importDefault(require("os"));
15
+ function getWorkspaceInfo() {
16
+ const root = process.env.APPDATA
17
+ ? path_1.default.join(process.env.APPDATA, "sdd-tool", "workspaces")
18
+ : path_1.default.join(os_1.default.homedir(), ".config", "sdd-tool", "workspaces");
19
+ const indexPath = path_1.default.join(root, "workspaces.json");
20
+ return { root, indexPath };
21
+ }
22
+ function ensureWorkspace(workspace) {
23
+ if (!fs_1.default.existsSync(workspace.root)) {
24
+ fs_1.default.mkdirSync(workspace.root, { recursive: true });
25
+ }
26
+ if (!fs_1.default.existsSync(workspace.indexPath)) {
27
+ const emptyIndex = { projects: [] };
28
+ fs_1.default.writeFileSync(workspace.indexPath, JSON.stringify(emptyIndex, null, 2), "utf-8");
29
+ }
30
+ }
31
+ function listProjects(workspace) {
32
+ if (!fs_1.default.existsSync(workspace.indexPath)) {
33
+ return [];
34
+ }
35
+ const raw = fs_1.default.readFileSync(workspace.indexPath, "utf-8");
36
+ const parsed = JSON.parse(raw);
37
+ return (parsed.projects ?? []).map((project) => ({
38
+ name: project.name ?? "unknown",
39
+ status: project.status ?? "unknown"
40
+ }));
41
+ }
42
+ function ensureProject(workspace, name, domain) {
43
+ ensureWorkspace(workspace);
44
+ const projectRoot = path_1.default.join(workspace.root, name);
45
+ if (!fs_1.default.existsSync(projectRoot)) {
46
+ fs_1.default.mkdirSync(projectRoot, { recursive: true });
47
+ }
48
+ const requirementsRoot = path_1.default.join(projectRoot, "requirements", "backlog");
49
+ fs_1.default.mkdirSync(requirementsRoot, { recursive: true });
50
+ const metadataPath = path_1.default.join(projectRoot, "metadata.json");
51
+ let metadata;
52
+ if (fs_1.default.existsSync(metadataPath)) {
53
+ metadata = JSON.parse(fs_1.default.readFileSync(metadataPath, "utf-8"));
54
+ }
55
+ else {
56
+ const now = new Date().toISOString();
57
+ metadata = {
58
+ name,
59
+ status: "backlog",
60
+ domain,
61
+ createdAt: now,
62
+ updatedAt: now
63
+ };
64
+ fs_1.default.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2), "utf-8");
65
+ }
66
+ const indexRaw = fs_1.default.readFileSync(workspace.indexPath, "utf-8");
67
+ const index = JSON.parse(indexRaw);
68
+ index.projects = index.projects ?? [];
69
+ const existing = index.projects.find((project) => project.name === name);
70
+ if (existing) {
71
+ existing.status = metadata.status;
72
+ }
73
+ else {
74
+ index.projects.push({ name, status: metadata.status });
75
+ }
76
+ fs_1.default.writeFileSync(workspace.indexPath, JSON.stringify(index, null, 2), "utf-8");
77
+ return metadata;
78
+ }
79
+ function createProject(workspace, name, domain) {
80
+ return ensureProject(workspace, name, domain);
81
+ }
82
+ function updateProjectStatus(workspace, name, status) {
83
+ ensureWorkspace(workspace);
84
+ const indexRaw = fs_1.default.readFileSync(workspace.indexPath, "utf-8");
85
+ const index = JSON.parse(indexRaw);
86
+ index.projects = index.projects ?? [];
87
+ const existing = index.projects.find((project) => project.name === name);
88
+ if (existing) {
89
+ existing.status = status;
90
+ }
91
+ else {
92
+ index.projects.push({ name, status });
93
+ }
94
+ fs_1.default.writeFileSync(workspace.indexPath, JSON.stringify(index, null, 2), "utf-8");
95
+ const projectRoot = path_1.default.join(workspace.root, name);
96
+ const metadataPath = path_1.default.join(projectRoot, "metadata.json");
97
+ if (fs_1.default.existsSync(metadataPath)) {
98
+ const metadata = JSON.parse(fs_1.default.readFileSync(metadataPath, "utf-8"));
99
+ metadata.status = status;
100
+ metadata.updatedAt = new Date().toISOString();
101
+ fs_1.default.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2), "utf-8");
102
+ }
103
+ }
@@ -0,0 +1,33 @@
1
+ # Flow: Admissions admin
2
+
3
+ ## Goal
4
+ Manage applications, documents, approvals, and communication with clear audit trails.
5
+
6
+ ## Discovery prompts
7
+ - What application stages exist (submitted, reviewed, approved, waitlist)?
8
+ - What documents are required and how are they verified?
9
+ - Who has approval authority and what rules apply?
10
+ - Are there quotas or priority rules?
11
+ - What integrations exist (email, CRM, identity verification)?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with eligibility and decision rules
15
+ - `functional-spec.md` for intake, review, and decision workflows
16
+ - `technical-spec.md` for document verification and notifications
17
+ - `architecture.md` including workflow engine and queueing
18
+ - `test-plan.md` for fairness and correctness checks
19
+
20
+ ## Risk and compliance
21
+ - Data privacy and retention
22
+ - Bias and fairness risks
23
+ - Auditability for decisions
24
+
25
+ ## Acceptance criteria examples
26
+ - Every decision is traceable to a reviewer and criteria.
27
+ - Documents cannot be edited without history tracking.
28
+ - Applicants get status updates within defined time windows.
29
+
30
+ ## Recommended outputs
31
+ - Application pipeline dashboard
32
+ - Document verification checklist
33
+ - Decision audit report
package/flows/ART.md ADDED
@@ -0,0 +1,33 @@
1
+ # Flow: Art project
2
+
3
+ ## Goal
4
+ Create an art piece or series with a clear concept, process, and critique cycle.
5
+
6
+ ## Discovery prompts
7
+ - What is the concept or theme?
8
+ - What medium and format are required?
9
+ - What is the audience or exhibition context?
10
+ - What is the timeline and budget?
11
+ - What references or inspirations apply?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with concept and constraints
15
+ - `functional-spec.md` for narrative or interaction flow
16
+ - `technical-spec.md` for materials and production steps
17
+ - `architecture.md` for series structure or installation layout
18
+ - `test-plan.md` for critique and iteration checkpoints
19
+
20
+ ## Risk and compliance
21
+ - Material constraints and safety
22
+ - Copyright and reference usage
23
+ - Delivery and installation risks
24
+
25
+ ## Acceptance criteria examples
26
+ - Concept is clear and articulated.
27
+ - Production steps are feasible in the timeline.
28
+ - Final piece aligns with exhibition constraints.
29
+
30
+ ## Recommended outputs
31
+ - Concept brief
32
+ - Production plan
33
+ - Critique log
@@ -0,0 +1,32 @@
1
+ # Flow: Bug fix
2
+
3
+ ## Goal
4
+ Diagnose, fix, and verify a production or QA bug with minimal regression risk.
5
+
6
+ ## Discovery prompts
7
+ - What is the exact observed behavior?
8
+ - What is the expected behavior?
9
+ - Steps to reproduce (deterministic if possible)
10
+ - Environment details (version, OS, data)
11
+ - Impact and severity
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with bug description and scope
15
+ - `functional-spec.md` focusing on expected behavior
16
+ - `technical-spec.md` with root cause and fix strategy
17
+ - `test-plan.md` with repro and regression checks
18
+
19
+ ## Risk and compliance
20
+ - Hidden dependencies and regressions
21
+ - Data corruption risk
22
+ - SLA impact
23
+
24
+ ## Acceptance criteria examples
25
+ - Bug can no longer be reproduced.
26
+ - No regressions in related flows.
27
+ - A regression test is added.
28
+
29
+ ## Recommended outputs
30
+ - Root cause analysis
31
+ - Fix plan
32
+ - Rollback plan if needed
@@ -0,0 +1,33 @@
1
+ # Flow: Court system
2
+
3
+ ## Goal
4
+ Manage case intake, hearings, rulings, and records with strict auditability and compliance.
5
+
6
+ ## Discovery prompts
7
+ - What case types and jurisdictions are included?
8
+ - What rules govern access and privacy?
9
+ - What is the expected SLA for filings and responses?
10
+ - What are the archival and retention requirements?
11
+ - What integrations exist with external justice systems?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with legal constraints and actors
15
+ - `functional-spec.md` for filing, scheduling, and ruling flows
16
+ - `technical-spec.md` for access control and audit logs
17
+ - `architecture.md` for resiliency and record management
18
+ - `test-plan.md` for permissions and compliance verification
19
+
20
+ ## Risk and compliance
21
+ - Evidence integrity and chain of custody
22
+ - Unauthorized access risks
23
+ - Retention and public records compliance
24
+
25
+ ## Acceptance criteria examples
26
+ - All case actions are logged and immutable.
27
+ - Access is enforced by role and jurisdiction.
28
+ - Records can be produced for audit in minutes.
29
+
30
+ ## Recommended outputs
31
+ - Court docket workflow
32
+ - Evidence chain-of-custody log
33
+ - Compliance audit pack
@@ -0,0 +1,33 @@
1
+ # Flow: Data scientist
2
+
3
+ ## Goal
4
+ Deliver a data product or model with reproducible experiments and measurable impact.
5
+
6
+ ## Discovery prompts
7
+ - What business or research question are we answering?
8
+ - What data sources exist and what is their quality?
9
+ - What are the target metrics (accuracy, recall, ROI)?
10
+ - What constraints exist (latency, cost, fairness)?
11
+ - How will the model be monitored post-release?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with objective and success metrics
15
+ - `functional-spec.md` for data flows and user interactions
16
+ - `technical-spec.md` for pipelines, features, and infra
17
+ - `architecture.md` for data storage and serving
18
+ - `test-plan.md` for data validation and model evaluation
19
+
20
+ ## Risk and compliance
21
+ - Data bias and fairness
22
+ - Privacy and consent
23
+ - Model drift and monitoring gaps
24
+
25
+ ## Acceptance criteria examples
26
+ - Model meets minimum metric thresholds.
27
+ - Data validation passes for all critical datasets.
28
+ - Monitoring alerts exist for drift and anomalies.
29
+
30
+ ## Recommended outputs
31
+ - Feature catalog
32
+ - Experiment tracking plan
33
+ - Model card summary
@@ -0,0 +1,33 @@
1
+ # Flow: Ecommerce
2
+
3
+ ## Goal
4
+ Build or extend an ecommerce platform with reliable checkout and inventory integrity.
5
+
6
+ ## Discovery prompts
7
+ - What products and catalog rules exist?
8
+ - What payment providers are used?
9
+ - What are peak traffic expectations?
10
+ - What are return/refund rules?
11
+ - What are compliance requirements (PCI, taxes)?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with revenue and conversion goals
15
+ - `functional-spec.md` for browse, cart, checkout, returns
16
+ - `technical-spec.md` for payment and order integrations
17
+ - `architecture.md` for scaling and availability
18
+ - `test-plan.md` for checkout and payment validation
19
+
20
+ ## Risk and compliance
21
+ - Payment failures and data leakage
22
+ - Inventory inconsistencies
23
+ - Peak traffic and downtime
24
+
25
+ ## Acceptance criteria examples
26
+ - Checkout success rate above threshold.
27
+ - Inventory updates are consistent across channels.
28
+ - Payment data never stored in plaintext.
29
+
30
+ ## Recommended outputs
31
+ - Checkout flow diagram
32
+ - Fraud prevention checklist
33
+ - Post-purchase email templates
@@ -0,0 +1,33 @@
1
+ # Flow: Economics / policy analysis
2
+
3
+ ## Goal
4
+ Analyze economic scenarios or policy impacts with clear assumptions and models.
5
+
6
+ ## Discovery prompts
7
+ - What policy or market question is being analyzed?
8
+ - What scope and geography are covered?
9
+ - What time horizon is relevant?
10
+ - What data sources or models are required?
11
+ - What stakeholders need the results?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with objectives and constraints
15
+ - `functional-spec.md` for analysis flow and outputs
16
+ - `technical-spec.md` for models and datasets
17
+ - `architecture.md` for data pipeline and reporting
18
+ - `test-plan.md` for sensitivity and robustness checks
19
+
20
+ ## Risk and compliance
21
+ - Model assumptions and bias
22
+ - Data quality issues
23
+ - Overconfidence in forecasts
24
+
25
+ ## Acceptance criteria examples
26
+ - Assumptions are explicit and defensible.
27
+ - Sensitivity analysis is included.
28
+ - Results are reproducible.
29
+
30
+ ## Recommended outputs
31
+ - Assumptions log
32
+ - Scenario matrix
33
+ - Executive summary
@@ -0,0 +1,33 @@
1
+ # Flow: Graphic design
2
+
3
+ ## Goal
4
+ Deliver a visual system (brand, UI, or campaign) with clear requirements and critique loops.
5
+
6
+ ## Discovery prompts
7
+ - What is the brand or message?
8
+ - Who is the audience and context?
9
+ - What formats are required (logo, web, print, social)?
10
+ - What references or style directions exist?
11
+ - What are the constraints (budget, timeline, tools)?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with audience and goals
15
+ - `functional-spec.md` for usage scenarios
16
+ - `technical-spec.md` for file formats and delivery specs
17
+ - `architecture.md` for design system structure
18
+ - `test-plan.md` for accessibility and brand consistency checks
19
+
20
+ ## Risk and compliance
21
+ - Trademark conflicts
22
+ - Accessibility and contrast compliance
23
+ - Usage inconsistency across channels
24
+
25
+ ## Acceptance criteria examples
26
+ - Color palette meets contrast ratios.
27
+ - Logo works at small and large sizes.
28
+ - Deliverables match required formats.
29
+
30
+ ## Recommended outputs
31
+ - Brand guidelines
32
+ - Component library
33
+ - Asset delivery checklist
@@ -0,0 +1,33 @@
1
+ # Flow: History research
2
+
3
+ ## Goal
4
+ Produce a credible historical analysis with sources, timelines, and context.
5
+
6
+ ## Discovery prompts
7
+ - What period or region is in scope?
8
+ - What is the research question or thesis?
9
+ - What depth is required (overview vs academic)?
10
+ - What sources are allowed or preferred?
11
+ - What format is required (essay, lecture, timeline)?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with scope and thesis
15
+ - `functional-spec.md` for narrative flow
16
+ - `technical-spec.md` for citation style and source rules
17
+ - `architecture.md` for section structure
18
+ - `test-plan.md` for source verification and bias checks
19
+
20
+ ## Risk and compliance
21
+ - Source bias and reliability
22
+ - Misinterpretation of primary sources
23
+ - Citation or attribution mistakes
24
+
25
+ ## Acceptance criteria examples
26
+ - Claims are supported by sources.
27
+ - Timeline is consistent and verifiable.
28
+ - Multiple perspectives are represented.
29
+
30
+ ## Recommended outputs
31
+ - Annotated bibliography
32
+ - Timeline map
33
+ - Thesis refinement log
@@ -0,0 +1,34 @@
1
+ # Flow: Lawyer (legal practice)
2
+
3
+ ## Goal
4
+ Build a system to manage cases, documents, deadlines, and client communication with strong audit trails.
5
+
6
+ ## Discovery prompts
7
+ - What case types are supported (civil, criminal, corporate)?
8
+ - What jurisdictions and compliance rules apply?
9
+ - What data is sensitive or privileged?
10
+ - Who are the actors (partners, associates, paralegals, clients)?
11
+ - What are the legal deadlines and escalation rules?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with scope and compliance constraints
15
+ - `functional-spec.md` including case lifecycle and document review flows
16
+ - `technical-spec.md` detailing access control and audit logging
17
+ - `architecture.md` with secure storage and encryption at rest
18
+ - `test-plan.md` with permission boundary tests
19
+ - `decision-log/ADR-XXXX.md` for storage and retention choices
20
+
21
+ ## Risk and compliance
22
+ - Data confidentiality (client privilege)
23
+ - Retention and legal hold policies
24
+ - Audit trails for all access and edits
25
+
26
+ ## Acceptance criteria examples
27
+ - Every document access is logged with user, timestamp, and reason.
28
+ - Retention rules can be configured per case type.
29
+ - Access is role-based and least-privilege by default.
30
+
31
+ ## Recommended outputs
32
+ - Secure storage and audit module
33
+ - Role-based access matrix
34
+ - Case timeline dashboard
@@ -0,0 +1,33 @@
1
+ # Flow: Programmer
2
+
3
+ ## Goal
4
+ Implement a feature or system change with clean code, tests, and documentation.
5
+
6
+ ## Discovery prompts
7
+ - What is the feature and who needs it?
8
+ - What are the acceptance criteria?
9
+ - What existing code areas are impacted?
10
+ - What constraints exist (performance, security, compatibility)?
11
+ - What is the expected rollout strategy?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with scope and constraints
15
+ - `functional-spec.md` for behavior and edge cases
16
+ - `technical-spec.md` for design and dependencies
17
+ - `architecture.md` for component-level impact
18
+ - `test-plan.md` for coverage and regression
19
+
20
+ ## Risk and compliance
21
+ - Regression risk on critical flows
22
+ - Backward compatibility
23
+ - Operational impacts
24
+
25
+ ## Acceptance criteria examples
26
+ - Feature works in primary and edge scenarios.
27
+ - Tests cover new logic and critical regressions.
28
+ - Documentation updated for users and developers.
29
+
30
+ ## Recommended outputs
31
+ - Implementation plan
32
+ - Code review checklist
33
+ - Rollout plan
@@ -0,0 +1,33 @@
1
+ # Flow: PR review (code review)
2
+
3
+ ## Goal
4
+ Resolve pull request feedback with high confidence, clean changes, and documented decisions.
5
+
6
+ ## Discovery prompts
7
+ - What repository and PR link should be reviewed?
8
+ - What is the target branch and scope of the PR?
9
+ - Are there blocking comments or requested changes?
10
+ - What tests or checks are required?
11
+ - Are there deadlines or merge constraints?
12
+
13
+ ## Required artifacts
14
+ - `requirement.md` with review objectives
15
+ - `functional-spec.md` summarizing behavior expectations
16
+ - `technical-spec.md` with planned fixes
17
+ - `test-plan.md` covering affected areas
18
+ - `progress-log.md` for review status
19
+
20
+ ## Risk and compliance
21
+ - Regression risk from changes
22
+ - Breaking API or behavior changes
23
+ - Incomplete test coverage
24
+
25
+ ## Acceptance criteria examples
26
+ - All review comments addressed or resolved.
27
+ - Changes validated by tests or checks.
28
+ - Summary of changes posted back to PR.
29
+
30
+ ## Recommended outputs
31
+ - Review checklist
32
+ - Change summary for PR comments
33
+ - Verified test results
@@ -0,0 +1,29 @@
1
+ # Flows (domain playbooks)
2
+
3
+ These flows show how the tool should guide real users from discovery to completion.
4
+
5
+ - `LAWYER.md`
6
+ - `TEACHER.md`
7
+ - `ADMISSIONS_ADMIN.md`
8
+ - `STATE_ADMIN.md`
9
+ - `TAXES_ADMIN.md`
10
+ - `STUDENT_UNIVERSITY.md`
11
+ - `DATA_SCIENTIST.md`
12
+ - `PROGRAMMER.md`
13
+ - `BUG_FIX.md`
14
+ - `ECOMMERCE.md`
15
+ - `RETAIL_STORE.md`
16
+ - `COURT_SYSTEM.md`
17
+ - `GRAPHIC_DESIGN.md`
18
+ - `ART.md`
19
+ - `HISTORY.md`
20
+ - `SOCIOLOGY.md`
21
+ - `ECONOMICS.md`
22
+ - `PR_REVIEW.md`
23
+
24
+ Each flow includes:
25
+ - Discovery questions
26
+ - Required artifacts
27
+ - Risk and compliance notes
28
+ - Acceptance criteria examples
29
+ - Recommended outputs and handoff steps