forgecraft-mcp 1.1.0 → 1.3.2

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 (142) hide show
  1. package/README.md +525 -525
  2. package/dist/cli/help.js +44 -44
  3. package/dist/registry/renderer-skeletons.js +92 -92
  4. package/dist/shared/gs-score-logger.js +6 -6
  5. package/dist/tools/add-module.js +123 -123
  6. package/dist/tools/advice-registry.js +18 -18
  7. package/dist/tools/check-cascade-report.js +64 -64
  8. package/dist/tools/configure-mcp.d.ts +3 -0
  9. package/dist/tools/configure-mcp.d.ts.map +1 -1
  10. package/dist/tools/configure-mcp.js +10 -0
  11. package/dist/tools/configure-mcp.js.map +1 -1
  12. package/dist/tools/forgecraft-dispatch.d.ts.map +1 -1
  13. package/dist/tools/forgecraft-dispatch.js +3 -0
  14. package/dist/tools/forgecraft-dispatch.js.map +1 -1
  15. package/dist/tools/forgecraft-schema-params.d.ts +9 -0
  16. package/dist/tools/forgecraft-schema-params.d.ts.map +1 -1
  17. package/dist/tools/forgecraft-schema-params.js +21 -0
  18. package/dist/tools/forgecraft-schema-params.js.map +1 -1
  19. package/dist/tools/forgecraft-schema.d.ts +9 -0
  20. package/dist/tools/forgecraft-schema.d.ts.map +1 -1
  21. package/dist/tools/refresh-output.js +14 -14
  22. package/dist/tools/scaffold-spec-stubs.d.ts +43 -0
  23. package/dist/tools/scaffold-spec-stubs.d.ts.map +1 -1
  24. package/dist/tools/scaffold-spec-stubs.js +166 -24
  25. package/dist/tools/scaffold-spec-stubs.js.map +1 -1
  26. package/dist/tools/scaffold-templates.js +62 -62
  27. package/dist/tools/scaffold-writer.d.ts.map +1 -1
  28. package/dist/tools/scaffold-writer.js +11 -3
  29. package/dist/tools/scaffold-writer.js.map +1 -1
  30. package/dist/tools/setup-artifact-writers.d.ts +30 -0
  31. package/dist/tools/setup-artifact-writers.d.ts.map +1 -1
  32. package/dist/tools/setup-artifact-writers.js +120 -8
  33. package/dist/tools/setup-artifact-writers.js.map +1 -1
  34. package/dist/tools/setup-phase1.d.ts +3 -0
  35. package/dist/tools/setup-phase1.d.ts.map +1 -1
  36. package/dist/tools/setup-phase1.js +79 -35
  37. package/dist/tools/setup-phase1.js.map +1 -1
  38. package/dist/tools/setup-phase2.d.ts +2 -0
  39. package/dist/tools/setup-phase2.d.ts.map +1 -1
  40. package/dist/tools/setup-phase2.js +10 -1
  41. package/dist/tools/setup-phase2.js.map +1 -1
  42. package/dist/tools/setup-project.d.ts +18 -0
  43. package/dist/tools/setup-project.d.ts.map +1 -1
  44. package/dist/tools/setup-project.js +77 -1
  45. package/dist/tools/setup-project.js.map +1 -1
  46. package/dist/tools/spec-parser-tags.d.ts +9 -0
  47. package/dist/tools/spec-parser-tags.d.ts.map +1 -1
  48. package/dist/tools/spec-parser-tags.js +92 -0
  49. package/dist/tools/spec-parser-tags.js.map +1 -1
  50. package/package.json +89 -86
  51. package/templates/analytics/instructions.yaml +37 -37
  52. package/templates/analytics/mcp-servers.yaml +11 -11
  53. package/templates/analytics/structure.yaml +25 -25
  54. package/templates/api/instructions.yaml +231 -231
  55. package/templates/api/mcp-servers.yaml +22 -13
  56. package/templates/api/nfr.yaml +23 -23
  57. package/templates/api/review.yaml +103 -103
  58. package/templates/api/structure.yaml +34 -34
  59. package/templates/api/verification.yaml +132 -132
  60. package/templates/cli/instructions.yaml +31 -31
  61. package/templates/cli/mcp-servers.yaml +11 -11
  62. package/templates/cli/review.yaml +53 -53
  63. package/templates/cli/structure.yaml +16 -16
  64. package/templates/data-lineage/instructions.yaml +28 -28
  65. package/templates/data-lineage/mcp-servers.yaml +22 -22
  66. package/templates/data-pipeline/instructions.yaml +84 -84
  67. package/templates/data-pipeline/mcp-servers.yaml +13 -13
  68. package/templates/data-pipeline/nfr.yaml +39 -39
  69. package/templates/data-pipeline/structure.yaml +23 -23
  70. package/templates/fintech/hooks.yaml +55 -55
  71. package/templates/fintech/instructions.yaml +112 -112
  72. package/templates/fintech/mcp-servers.yaml +13 -13
  73. package/templates/fintech/nfr.yaml +46 -46
  74. package/templates/fintech/playbook.yaml +210 -210
  75. package/templates/fintech/verification.yaml +239 -239
  76. package/templates/game/instructions.yaml +289 -289
  77. package/templates/game/mcp-servers.yaml +38 -38
  78. package/templates/game/nfr.yaml +64 -64
  79. package/templates/game/playbook.yaml +214 -214
  80. package/templates/game/review.yaml +97 -97
  81. package/templates/game/structure.yaml +67 -67
  82. package/templates/game/verification.yaml +174 -174
  83. package/templates/healthcare/instructions.yaml +42 -42
  84. package/templates/healthcare/mcp-servers.yaml +13 -13
  85. package/templates/healthcare/nfr.yaml +47 -47
  86. package/templates/hipaa/instructions.yaml +41 -41
  87. package/templates/hipaa/mcp-servers.yaml +13 -13
  88. package/templates/infra/instructions.yaml +104 -104
  89. package/templates/infra/mcp-servers.yaml +20 -20
  90. package/templates/infra/nfr.yaml +46 -46
  91. package/templates/infra/review.yaml +65 -65
  92. package/templates/infra/structure.yaml +25 -25
  93. package/templates/library/instructions.yaml +36 -36
  94. package/templates/library/mcp-servers.yaml +20 -20
  95. package/templates/library/review.yaml +56 -56
  96. package/templates/library/structure.yaml +19 -19
  97. package/templates/medallion-architecture/instructions.yaml +41 -41
  98. package/templates/medallion-architecture/mcp-servers.yaml +22 -22
  99. package/templates/ml/instructions.yaml +85 -85
  100. package/templates/ml/mcp-servers.yaml +11 -11
  101. package/templates/ml/nfr.yaml +39 -39
  102. package/templates/ml/structure.yaml +25 -25
  103. package/templates/ml/verification.yaml +156 -156
  104. package/templates/mobile/instructions.yaml +44 -44
  105. package/templates/mobile/mcp-servers.yaml +11 -11
  106. package/templates/mobile/nfr.yaml +49 -49
  107. package/templates/mobile/structure.yaml +27 -27
  108. package/templates/mobile/verification.yaml +121 -121
  109. package/templates/observability-xray/instructions.yaml +40 -40
  110. package/templates/observability-xray/mcp-servers.yaml +15 -15
  111. package/templates/realtime/instructions.yaml +42 -42
  112. package/templates/realtime/mcp-servers.yaml +13 -13
  113. package/templates/soc2/instructions.yaml +41 -41
  114. package/templates/soc2/mcp-servers.yaml +24 -24
  115. package/templates/social/instructions.yaml +43 -43
  116. package/templates/social/mcp-servers.yaml +24 -24
  117. package/templates/state-machine/instructions.yaml +42 -42
  118. package/templates/state-machine/mcp-servers.yaml +11 -11
  119. package/templates/tools-registry.yaml +164 -164
  120. package/templates/universal/hooks.yaml +531 -531
  121. package/templates/universal/instructions.yaml +1692 -1681
  122. package/templates/universal/mcp-servers.yaml +50 -50
  123. package/templates/universal/nfr.yaml +197 -197
  124. package/templates/universal/reference.yaml +326 -326
  125. package/templates/universal/review.yaml +204 -204
  126. package/templates/universal/skills.yaml +262 -262
  127. package/templates/universal/structure.yaml +67 -67
  128. package/templates/universal/verification.yaml +416 -416
  129. package/templates/web-react/hooks.yaml +44 -44
  130. package/templates/web-react/instructions.yaml +207 -207
  131. package/templates/web-react/mcp-servers.yaml +20 -20
  132. package/templates/web-react/nfr.yaml +27 -27
  133. package/templates/web-react/review.yaml +94 -94
  134. package/templates/web-react/structure.yaml +46 -46
  135. package/templates/web-react/verification.yaml +126 -126
  136. package/templates/web-static/instructions.yaml +115 -115
  137. package/templates/web-static/mcp-servers.yaml +20 -20
  138. package/templates/web3/instructions.yaml +44 -44
  139. package/templates/web3/mcp-servers.yaml +11 -11
  140. package/templates/web3/verification.yaml +159 -159
  141. package/templates/zero-trust/instructions.yaml +41 -41
  142. package/templates/zero-trust/mcp-servers.yaml +15 -15
@@ -2,23 +2,25 @@
2
2
  * scaffold-spec-stubs: Spec stub writers for scaffold_project.
3
3
  *
4
4
  * Manages UNFILLED stub documents that are detectable by check_cascade.
5
+ * Diagram stubs are structured (real Mermaid syntax with placeholder labels)
6
+ * so they function as grammar production rules from day one, not empty files.
5
7
  */
6
8
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
7
9
  import { dirname } from "node:path";
8
- export const USE_CASES_STUB = `<!-- UNFILLED: Use Cases -->
9
- # Use Cases
10
-
11
- ## UC-01: [Name]
12
- **Actor**: <!-- FILL: who? -->
13
- **Precondition**: <!-- FILL: what must be true before? -->
14
- **Steps**: <!-- FILL: numbered steps -->
15
- **Success**: <!-- FILL: what changed? -->
16
-
17
- ## UC-02: [Name]
18
- <!-- FILL -->
19
-
20
- ## UC-03: [Name]
21
- <!-- FILL -->
10
+ export const USE_CASES_STUB = `<!-- UNFILLED: Use Cases -->
11
+ # Use Cases
12
+
13
+ ## UC-01: [Name]
14
+ **Actor**: <!-- FILL: who? -->
15
+ **Precondition**: <!-- FILL: what must be true before? -->
16
+ **Steps**: <!-- FILL: numbered steps -->
17
+ **Success**: <!-- FILL: what changed? -->
18
+
19
+ ## UC-02: [Name]
20
+ <!-- FILL -->
21
+
22
+ ## UC-03: [Name]
23
+ <!-- FILL -->
22
24
  `;
23
25
  /**
24
26
  * Build the UNFILLED stub content for docs/diagrams/c4-context.md.
@@ -27,16 +29,156 @@ export const USE_CASES_STUB = `<!-- UNFILLED: Use Cases -->
27
29
  * @returns Stub content with UNFILLED markers
28
30
  */
29
31
  export function buildC4ContextStub(projectName) {
30
- return `<!-- UNFILLED: C4 Context Diagram -->
31
- <!-- Run \`forgecraft generate_diagram\` to auto-generate from your spec -->
32
- # System Context Diagram
33
- \`\`\`mermaid
34
- C4Context
35
- title System Context: ${projectName}
36
- Person(user, "User", "<!-- FILL: Who uses the system? -->")
37
- System(system, "${projectName}", "<!-- FILL: What does the system do in one sentence? -->")
38
- Rel(user, system, "<!-- FILL: Primary interaction -->")
39
- \`\`\`
32
+ return `<!-- UNFILLED: C4 Context Diagram -->
33
+ <!-- Run \`forgecraft generate_diagram\` to auto-generate from your spec -->
34
+ # System Context Diagram
35
+ \`\`\`mermaid
36
+ C4Context
37
+ title System Context: ${projectName}
38
+ Person(user, "User", "<!-- FILL: Who uses the system? -->")
39
+ System(system, "${projectName}", "<!-- FILL: What does the system do in one sentence? -->")
40
+ Rel(user, system, "<!-- FILL: Primary interaction -->")
41
+ \`\`\`
42
+ `;
43
+ }
44
+ /**
45
+ * Build the UNFILLED stub content for a sequence diagram.
46
+ *
47
+ * Emits a structured Mermaid sequenceDiagram with participant declarations and
48
+ * labelled message arrows — a real grammar production rule, not an empty file.
49
+ *
50
+ * @param feature - Human-readable feature name (e.g. "User Authentication")
51
+ * @returns Stub content with UNFILLED markers and structural Mermaid syntax
52
+ */
53
+ export function buildSequenceDiagramStub(feature) {
54
+ return `<!-- UNFILLED: Sequence Diagram — ${feature} -->
55
+ <!-- Replace participant labels and messages with real actors and contracts -->
56
+ # Sequence Diagram: ${feature}
57
+
58
+ \`\`\`mermaid
59
+ sequenceDiagram
60
+ participant Client as <!-- FILL: initiating actor, e.g. Browser / CLI / Service -->
61
+ participant API as <!-- FILL: entry-point service, e.g. API Gateway -->
62
+ participant Service as <!-- FILL: domain service, e.g. AuthService -->
63
+ participant Store as <!-- FILL: persistence layer, e.g. Database -->
64
+
65
+ Note over Client,Store: <!-- FILL: describe the primary flow in one sentence -->
66
+
67
+ Client->>API: <!-- FILL: request, e.g. POST /login {credentials} -->
68
+ API->>Service: <!-- FILL: delegate, e.g. authenticate(credentials) -->
69
+ Service->>Store: <!-- FILL: query, e.g. findUserByEmail(email) -->
70
+ Store-->>Service: <!-- FILL: result, e.g. User | null -->
71
+
72
+ alt <!-- FILL: failure case, e.g. User not found or wrong password -->
73
+ Service-->>API: <!-- FILL: error response, e.g. AuthError -->
74
+ API-->>Client: <!-- FILL: HTTP error, e.g. 401 Unauthorized -->
75
+ else <!-- FILL: success case -->
76
+ Service-->>API: <!-- FILL: success result, e.g. JWT token -->
77
+ API-->>Client: <!-- FILL: HTTP success, e.g. 200 OK {token} -->
78
+ end
79
+ \`\`\`
80
+ `;
81
+ }
82
+ /**
83
+ * Build the UNFILLED stub content for a state machine diagram.
84
+ *
85
+ * Emits a stateDiagram-v2 with an initial transition, named states, transitions
86
+ * between them, and terminal states — a grammar that directly generates state
87
+ * transition test cases.
88
+ *
89
+ * @param entityName - Domain entity whose lifecycle is modelled (e.g. "Order")
90
+ * @returns Stub content with UNFILLED markers and structural Mermaid syntax
91
+ */
92
+ export function buildStateMachineDiagramStub(entityName) {
93
+ return `<!-- UNFILLED: State Machine — ${entityName} -->
94
+ <!-- Replace state names (Draft, Pending, Active, etc.) and transition labels -->
95
+ <!-- with the actual lifecycle states of your domain entity. -->
96
+ # State Machine: ${entityName}
97
+
98
+ \`\`\`mermaid
99
+ stateDiagram-v2
100
+ [*] --> Draft
101
+
102
+ Draft --> Pending: submit()
103
+ Pending --> Active: approve()
104
+ Pending --> Rejected: reject()
105
+ Active --> Completed: complete()
106
+ Active --> Cancelled: cancel()
107
+
108
+ Completed --> [*]
109
+ Rejected --> [*]
110
+ Cancelled --> [*]
111
+
112
+ note right of Active
113
+ FILL: add invariant or constraint
114
+ e.g. "requires valid payment method"
115
+ end note
116
+ \`\`\`
117
+ `;
118
+ }
119
+ /**
120
+ * Build the UNFILLED stub content for a user flow / flowchart diagram.
121
+ *
122
+ * Emits a flowchart TD with Start/End rounded nodes, a decision diamond, and
123
+ * labelled edges — the script for E2E tests and user documentation in one artifact.
124
+ *
125
+ * @param ucName - Use case name (e.g. "UC-01: Register User")
126
+ * @returns Stub content with UNFILLED markers and structural Mermaid syntax
127
+ */
128
+ export function buildFlowDiagramStub(ucName) {
129
+ return `<!-- UNFILLED: Flow Diagram — ${ucName} -->
130
+ <!-- Replace node labels and edge conditions with real user journey steps -->
131
+ # Flow: ${ucName}
132
+
133
+ \`\`\`mermaid
134
+ flowchart TD
135
+ Start([<!-- FILL: trigger, e.g. User opens registration page -->])
136
+
137
+ Start --> Input[<!-- FILL: first action, e.g. Fill in name, email, password -->]
138
+ Input --> Validate{<!-- FILL: validation check, e.g. All fields valid? -->}
139
+
140
+ Validate -->|<!-- FILL: failure label, e.g. Invalid -->| Error[<!-- FILL: error action, e.g. Show validation errors -->]
141
+ Error --> Input
142
+
143
+ Validate -->|<!-- FILL: success label, e.g. Valid -->| Process[<!-- FILL: main action, e.g. Create account -->]
144
+ Process --> Check{<!-- FILL: guard check, e.g. Email already exists? -->}
145
+
146
+ Check -->|<!-- FILL: conflict label, e.g. Yes -->| Conflict[<!-- FILL: conflict action, e.g. Show duplicate email error -->]
147
+ Conflict --> End([<!-- FILL: exit label, e.g. User corrects email -->])
148
+
149
+ Check -->|<!-- FILL: proceed label, e.g. No -->| Success[<!-- FILL: success action, e.g. Send confirmation email -->]
150
+ Success --> End
151
+ \`\`\`
152
+ `;
153
+ }
154
+ /**
155
+ * Build the UNFILLED stub content for a C4 Container diagram.
156
+ *
157
+ * Emits Container declarations and Rel statements for a multi-container system —
158
+ * the topology layer that C4 Context does not capture.
159
+ *
160
+ * @param projectName - Human-readable project name for the diagram title
161
+ * @returns Stub content with UNFILLED markers and structural Mermaid syntax
162
+ */
163
+ export function buildC4ContainerStub(projectName) {
164
+ return `<!-- UNFILLED: C4 Container Diagram -->
165
+ <!-- Replace container labels, technology fields, and relations with your stack -->
166
+ # Container Diagram — ${projectName}
167
+
168
+ \`\`\`mermaid
169
+ C4Container
170
+ title Container Diagram: ${projectName}
171
+
172
+ Person(user, "<!-- FILL: actor name -->", "<!-- FILL: actor description -->")
173
+
174
+ Container(web, "<!-- FILL: frontend name, e.g. Web Application -->", "<!-- FILL: technology, e.g. React -->", "<!-- FILL: responsibility -->")
175
+ Container(api, "<!-- FILL: backend name, e.g. API Server -->", "<!-- FILL: technology, e.g. Node.js / Express -->", "<!-- FILL: responsibility -->")
176
+ Container(db, "<!-- FILL: database name, e.g. Primary Database -->", "<!-- FILL: technology, e.g. PostgreSQL -->", "<!-- FILL: responsibility -->")
177
+
178
+ Rel(user, web, "<!-- FILL: interaction, e.g. Uses -->", "<!-- FILL: protocol, e.g. HTTPS -->")
179
+ Rel(web, api, "<!-- FILL: call, e.g. API calls -->", "<!-- FILL: protocol, e.g. REST / JSON -->")
180
+ Rel(api, db, "<!-- FILL: query, e.g. Reads and writes -->", "<!-- FILL: protocol, e.g. SQL -->")
181
+ \`\`\`
40
182
  `;
41
183
  }
42
184
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold-spec-stubs.js","sourceRoot":"","sources":["../../src/tools/scaffold-spec-stubs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;CAc7B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IACpD,OAAO;;;;;0BAKiB,WAAW;;oBAEjB,WAAW;;;CAG9B,CAAC;AACF,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAC3B,YAAoB,EACpB,QAAgB,EAChB,OAAe,EACf,KAAc,EACd,YAAsB,EACtB,YAAsB;IAEtB,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAElD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,KAAK,IAAI,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QAChD,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"scaffold-spec-stubs.js","sourceRoot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,CAAC,EAAE,CAAC;QAC1B,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,KAAK,IAAI,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QAChD,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;AACH,CAAC"}
@@ -1,76 +1,76 @@
1
1
  /**
2
2
  * scaffold-templates: Static template strings and render functions for scaffold_project.
3
3
  */
4
- export const PROJECT_SPECIFIC_TEMPLATE = `# Project-Specific Rules
5
- <!-- This file is owned by YOU. ForgeCraft will never overwrite it. -->
6
- <!-- Add project-specific rules, framework choices, conventions, and corrections here. -->
7
- <!-- The sentinel CLAUDE.md links here so any AI reading your project can find it. -->
8
-
9
- ## Framework & Stack Choices
10
- <!-- e.g. We use Prisma for ORM. Deploy target is Railway. Python 3.11+. -->
11
-
12
- ## Custom Corrections Log
13
- <!-- Log AI corrections so the pattern isn't repeated. -->
14
- <!-- Format: - YYYY-MM-DD: [description of correction] -->
15
-
16
- ## Project-Specific Gates
17
- <!-- Add quality rules specific to this project that don't belong in universal standards. -->
4
+ export const PROJECT_SPECIFIC_TEMPLATE = `# Project-Specific Rules
5
+ <!-- This file is owned by YOU. ForgeCraft will never overwrite it. -->
6
+ <!-- Add project-specific rules, framework choices, conventions, and corrections here. -->
7
+ <!-- The sentinel CLAUDE.md links here so any AI reading your project can find it. -->
8
+
9
+ ## Framework & Stack Choices
10
+ <!-- e.g. We use Prisma for ORM. Deploy target is Railway. Python 3.11+. -->
11
+
12
+ ## Custom Corrections Log
13
+ <!-- Log AI corrections so the pattern isn't repeated. -->
14
+ <!-- Format: - YYYY-MM-DD: [description of correction] -->
15
+
16
+ ## Project-Specific Gates
17
+ <!-- Add quality rules specific to this project that don't belong in universal standards. -->
18
18
  `;
19
19
  export const EXCEPTIONS_TEMPLATE = JSON.stringify({
20
20
  version: "1",
21
21
  _comment: "Hook false-positive exceptions. Add entries here to prevent rediscovering the same false positive each session. Each entry: {id, hook, pattern, reason, addedAt, addedBy, adr?}",
22
22
  exceptions: [],
23
23
  }, null, 2) + "\n";
24
- export const PROJECT_GATES_TEMPLATE = `version: "1"
25
- # Project-specific quality gates.
26
- # Gates you discover while working that should be enforced for this project.
27
- # Set generalizable: true + fill in evidence to contribute to the community registry.
28
- # See: https://github.com/jghiringhelli/quality-gates/issues/new?template=quality-gate-proposal.md
29
- gates: []
24
+ export const PROJECT_GATES_TEMPLATE = `version: "1"
25
+ # Project-specific quality gates.
26
+ # Gates you discover while working that should be enforced for this project.
27
+ # Set generalizable: true + fill in evidence to contribute to the community registry.
28
+ # See: https://github.com/jghiringhelli/quality-gates/issues/new?template=quality-gate-proposal.md
29
+ gates: []
30
30
  `;
31
- export const SMOKE_TESTS_README = `# Smoke Tests
32
-
33
- Generated by ForgeCraft scaffold. Fill in the critical paths from your tech spec.
34
-
35
- ## What smoke tests cover
36
- - Every API entry point that serves real users
37
- - Every critical user journey end-to-end
38
- - Every DB migration (verify schema applied correctly)
39
- - Every external integration handshake
40
-
41
- ## Format
42
- Use the tool configured in forgecraft.yaml deployment.testing.smokeTool (or default to HTTP assertions).
43
- All smoke tests must complete in < 60 seconds total.
44
-
45
- ## Running
46
- See forgecraft.yaml tools.test or your project's test runner.
47
- Results are written to .forgecraft/reports/smoke-latest.json.
48
-
49
- ## Required before deployment
50
- All smoke tests must pass against staging before any production deploy.
51
- See verification.yaml deployment-gates phase.
31
+ export const SMOKE_TESTS_README = `# Smoke Tests
32
+
33
+ Generated by ForgeCraft scaffold. Fill in the critical paths from your tech spec.
34
+
35
+ ## What smoke tests cover
36
+ - Every API entry point that serves real users
37
+ - Every critical user journey end-to-end
38
+ - Every DB migration (verify schema applied correctly)
39
+ - Every external integration handshake
40
+
41
+ ## Format
42
+ Use the tool configured in forgecraft.yaml deployment.testing.smokeTool (or default to HTTP assertions).
43
+ All smoke tests must complete in < 60 seconds total.
44
+
45
+ ## Running
46
+ See forgecraft.yaml tools.test or your project's test runner.
47
+ Results are written to .forgecraft/reports/smoke-latest.json.
48
+
49
+ ## Required before deployment
50
+ All smoke tests must pass against staging before any production deploy.
51
+ See verification.yaml deployment-gates phase.
52
52
  `;
53
- export const LOAD_TESTS_README = `# Load Tests
54
-
55
- Generated by ForgeCraft scaffold. Fill in the parameters from your tech spec.
56
-
57
- ## Parameters (fill in from forgecraft.yaml deployment.testing.load)
58
- - Concurrent users: [TODO: concurrentUsers from forgecraft.yaml]
59
- - Target RPS: [TODO: targetRps from forgecraft.yaml]
60
- - p99 ceiling: [TODO: p99CeilingMs ms]
61
- - Duration: [TODO: durationSeconds seconds minimum]
62
-
63
- ## When these parameters are missing
64
- Deploying without stated load test parameters is full deployment with manual monitoring.
65
- The paper requires: parameters named in spec BEFORE the test runs, not after.
66
- Add them to forgecraft.yaml deployment.testing.load before running.
67
-
68
- ## Tool
69
- Use the tool configured in forgecraft.yaml deployment.testing.load.tool (k6, Artillery, Locust, etc.)
70
- Results are written to .forgecraft/reports/load-latest.json.
71
-
72
- ## Required before pre-release
73
- See verification.yaml pre-release-hardening phase, load-test step.
53
+ export const LOAD_TESTS_README = `# Load Tests
54
+
55
+ Generated by ForgeCraft scaffold. Fill in the parameters from your tech spec.
56
+
57
+ ## Parameters (fill in from forgecraft.yaml deployment.testing.load)
58
+ - Concurrent users: [TODO: concurrentUsers from forgecraft.yaml]
59
+ - Target RPS: [TODO: targetRps from forgecraft.yaml]
60
+ - p99 ceiling: [TODO: p99CeilingMs ms]
61
+ - Duration: [TODO: durationSeconds seconds minimum]
62
+
63
+ ## When these parameters are missing
64
+ Deploying without stated load test parameters is full deployment with manual monitoring.
65
+ The paper requires: parameters named in spec BEFORE the test runs, not after.
66
+ Add them to forgecraft.yaml deployment.testing.load before running.
67
+
68
+ ## Tool
69
+ Use the tool configured in forgecraft.yaml deployment.testing.load.tool (k6, Artillery, Locust, etc.)
70
+ Results are written to .forgecraft/reports/load-latest.json.
71
+
72
+ ## Required before pre-release
73
+ See verification.yaml pre-release-hardening phase, load-test step.
74
74
  `;
75
75
  /**
76
76
  * Render the bootstrap README for docs/adrs/.
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold-writer.d.ts","sourceRoot":"","sources":["../../src/tools/scaffold-writer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,oBAAoB,CAAC;AAEzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAYzE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,kBAAkB,EACzB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Ae,EAAE,MAAM,EACvB,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,EAAE,gBAAgB,GAAG,IAAI,GAClC,mBAAmB,CAoOrB"}
@@ -12,7 +12,7 @@ import { writeFileIfMissing } from "../shared/filesystem.js";
12
12
  import { ensureGateDirs } from "../shared/project-gates.js";
13
13
  import { resolveTemplatePlaceholders } from "../shared/template-resolver.js";
14
14
  import { PROJECT_SPECIFIC_TEMPLATE, EXCEPTIONS_TEMPLATE, PROJECT_GATES_TEMPLATE, renderAdrsReadme, renderGitignore, renderSmokeTestsReadme, renderLoadTestsReadme, } from "./scaffold-templates.js";
15
- import { buildC4ContextStub, USE_CASES_STUB, writeSpecStub } from "./scaffold-spec-stubs.js";
15
+ import { buildC4ContextStub, buildC4ContainerStub, buildSequenceDiagramStub, buildStateMachineDiagramStub, buildFlowDiagramStub, USE_CASES_STUB, writeSpecStub, } from "./scaffold-spec-stubs.js";
16
16
  /**
17
17
  * Write all scaffold files for a project.
18
18
  *
@@ -64,7 +64,9 @@ export function writeScaffoldFiles(input, composed, context, statusMdContent, pr
64
64
  ? join(input.project_dir, targetConfig.directory, targetConfig.filename)
65
65
  : join(input.project_dir, targetConfig.filename);
66
66
  mkdirSync(dirname(outputPath), { recursive: true });
67
- const relativePath = targetConfig.directory ? `${targetConfig.directory}/${targetConfig.filename}` : targetConfig.filename;
67
+ const relativePath = targetConfig.directory
68
+ ? `${targetConfig.directory}/${targetConfig.filename}`
69
+ : targetConfig.filename;
68
70
  trackWrite(relativePath, outputPath, resolveTemplatePlaceholders(content, placeholderContext));
69
71
  }
70
72
  }
@@ -73,6 +75,10 @@ export function writeScaffoldFiles(input, composed, context, statusMdContent, pr
73
75
  trackWrite("docs/PRD.md", join(input.project_dir, "docs", "PRD.md"), prdContent);
74
76
  trackWrite("docs/TechSpec.md", join(input.project_dir, "docs", "TechSpec.md"), techSpecContent);
75
77
  writeSpecStub("docs/diagrams/c4-context.md", join(input.project_dir, "docs", "diagrams", "c4-context.md"), buildC4ContextStub(input.project_name), input.force, filesCreated, filesSkipped);
78
+ writeSpecStub("docs/diagrams/c4-container.md", join(input.project_dir, "docs", "diagrams", "c4-container.md"), buildC4ContainerStub(input.project_name), input.force, filesCreated, filesSkipped);
79
+ writeSpecStub("docs/diagrams/sequence-primary.md", join(input.project_dir, "docs", "diagrams", "sequence-primary.md"), buildSequenceDiagramStub("Primary Flow"), input.force, filesCreated, filesSkipped);
80
+ writeSpecStub("docs/diagrams/state-primary.md", join(input.project_dir, "docs", "diagrams", "state-primary.md"), buildStateMachineDiagramStub("Primary Entity"), input.force, filesCreated, filesSkipped);
81
+ writeSpecStub("docs/diagrams/flow-primary.md", join(input.project_dir, "docs", "diagrams", "flow-primary.md"), buildFlowDiagramStub("UC-01: Primary Use Case"), input.force, filesCreated, filesSkipped);
76
82
  writeSpecStub("docs/use-cases.md", join(input.project_dir, "docs", "use-cases.md"), USE_CASES_STUB, input.force, filesCreated, filesSkipped);
77
83
  const adrsDir = join(input.project_dir, "docs", "adrs");
78
84
  mkdirSync(adrsDir, { recursive: true });
@@ -86,7 +92,9 @@ export function writeScaffoldFiles(input, composed, context, statusMdContent, pr
86
92
  try {
87
93
  chmodSync(hookPath, 0o755);
88
94
  }
89
- catch { /* chmod may fail on Windows */ }
95
+ catch {
96
+ /* chmod may fail on Windows */
97
+ }
90
98
  }
91
99
  if (composed.skills.length > 0) {
92
100
  const commandsDir = join(input.project_dir, ".claude", "commands");
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold-writer.js","sourceRoot":"","sources":["../../src/tools/scaffold-writer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,E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CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAElC,IAAI,UAAU,EAAE,UAAU,EAAE,CAAC;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;QACrE,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACzC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACxC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,UAAU,CACR,uBAAuB,EACvB,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,EAC3B,sBAAsB,CAAC,UAAU,CAAC,UAAU,CAAC,CAC9C,CAAC;QACF,UAAU,CACR,sBAAsB,EACtB,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,EAC1B,qBAAqB,CAAC,UAAU,CAAC,UAAU,CAAC,CAC7C,CAAC;QACF,UAAU,CACR,8BAA8B,EAC9B,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,EAC5B,EAAE,CACH,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AACxC,CAAC"}
@@ -3,6 +3,23 @@
3
3
  */
4
4
  import type { CascadeDecision } from "../shared/types.js";
5
5
  import { deriveDefaultCascadeDecisions } from "./cascade-defaults.js";
6
+ /**
7
+ * Result of a pre-flight git environment check.
8
+ *
9
+ * - `repo` — a `.git` directory exists; all good.
10
+ * - `no-repo` — git is installed but no repository exists yet; ForgeCraft will init one.
11
+ * - `no-git` — git binary not found; user must install git before setup can proceed.
12
+ */
13
+ export type GitStatus = "repo" | "no-repo" | "no-git";
14
+ /**
15
+ * Check whether a git repository and the git binary are present.
16
+ *
17
+ * Does NOT modify the filesystem. Safe to call at any time.
18
+ *
19
+ * @param projectDir - Absolute path to the project root
20
+ * @returns Current git status for the directory
21
+ */
22
+ export declare function checkGitStatus(projectDir: string): GitStatus;
6
23
  /**
7
24
  * Initialise a git repository in projectDir if one does not already exist.
8
25
  * Falls back gracefully when git is not installed.
@@ -60,6 +77,19 @@ export declare function writePrd(projectDir: string, projectName: string, aiFiel
60
77
  */
61
78
  export declare function writeUseCases(projectDir: string, projectName: string, aiFields: AiExtractedFields, _specContent: string | null): boolean;
62
79
  export { deriveDefaultCascadeDecisions };
80
+ /**
81
+ * Write docs/sample-outcome.md — a stub for the first real deliverable of
82
+ * a generative tool. Created when Phase 2 receives tool_sample_split = "tool_and_sample".
83
+ *
84
+ * The AI assistant should fill in the sections from the creative content
85
+ * described in the spec (the book, song, game, artwork, etc.).
86
+ * Never overwrites an existing file.
87
+ *
88
+ * @param projectDir - Project root
89
+ * @param toolName - Name of the core generative tool
90
+ * @returns True if the file was written
91
+ */
92
+ export declare function writeSampleOutcome(projectDir: string, toolName: string): boolean;
63
93
  /**
64
94
  * Load cascade decisions from forgecraft.yaml (convenience re-used in writers).
65
95
  */
@@ -1 +1 @@
1
- {"version":3,"file":"setup-artifact-writers.d.ts","sourceRoot":"","sources":["../../src/tools/setup-artifact-writers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAItE;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAwBtD;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,I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