forge-orkes 0.3.11 → 0.3.14

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.
@@ -1,15 +1,13 @@
1
1
  ---
2
2
  name: initializing
3
- description: "Run once per project to detect brownfield/greenfield, scan tech stack, absorb existing frameworks, configure design system, and set up constitutional gates. Invoked by the forge skill when no .forge/project.yml exists."
3
+ description: "Detect brownfield/greenfield, scan stack, absorb frameworks, configure design system + constitution. Runs when no .forge/project.yml exists."
4
4
  ---
5
5
 
6
- # Initializing: Project Setup
6
+ # Initializing
7
7
 
8
- Runs once when no `.forge/project.yml` exists. Detect **brownfield** vs **greenfield**, then run the matching init path.
8
+ Once (no `.forge/project.yml`). Detect **brownfield** vs **greenfield**.
9
9
 
10
- ## Detect Project Type
11
-
12
- Check for existing codebase signals:
10
+ ## Detect Type
13
11
 
14
12
  ```
15
13
  Check: package.json OR requirements.txt OR go.mod OR Cargo.toml (dependency manifest)
@@ -18,22 +16,13 @@ Check: src/ OR app/ OR lib/ (source directories)
18
16
  Check: existing config files (tsconfig.json, .eslintrc, vite.config, etc.)
19
17
  ```
20
18
 
21
- - **2+ signals** → **Brownfield path**
22
- - **0-1 signals** → **Greenfield path**
23
-
24
- Confirm with user: *"This looks like an [existing project / new project]. Is that right?"*
25
-
26
- ---
27
-
28
- ## Brownfield Path: Discover Existing Project
19
+ **2+** → Brownfield. **0-1**Greenfield. Confirm.
29
20
 
30
- Scan first, confirm with user second. Don't ask what you can discover.
21
+ ## Brownfield
31
22
 
32
- ### Discovery Step 0: Framework Detection
23
+ Scan first, confirm second. Discover, don't ask.
33
24
 
34
- Check for: (1) meta-prompting frameworks with project knowledge to absorb, (2) companion tools to preserve.
35
-
36
- **Meta-Framework Signatures:**
25
+ ### Step 0: Framework Detection
37
26
 
38
27
  ```
39
28
  # GSD (Get Shit Done)
@@ -59,23 +48,11 @@ Check: CLAUDE.md with framework-like routing tables
59
48
  Check: Any structured agent/workflow system
60
49
  ```
61
50
 
62
- **Companion Tool Signatures:**
63
-
64
- ```
65
- # Beads (persistent cross-session memory)
66
- Check: .beads/ directory
67
- Check: beads.jsonl or beads.db
68
- Check: bd CLI available (Bash: which bd)
69
- → If found: Enable forge.beads_integration in settings.json. Do NOT absorb or archive.
70
- → Beads is independent — it runs alongside Forge, not inside it.
71
- ```
72
-
73
- **If a meta-framework is detected**, offer three options:
51
+ **Companion:** Beads (.beads/, beads.jsonl, `bd`) → enable `forge.beads_integration`, don't absorb.
74
52
 
75
- *"I found [{framework name}] in this project with valuable project documentation. How would you like to handle it?"*
53
+ **If meta-framework found**, offer:
76
54
 
77
- **Option A: Absorb & Convert** (recommended)
78
- Read existing framework docs, extract project knowledge, convert to Forge format:
55
+ **A: Absorb** (recommended) — extract → Forge:
79
56
 
80
57
  | Source | Target |
81
58
  |--------|--------|
@@ -87,19 +64,13 @@ Read existing framework docs, extract project knowledge, convert to Forge format
87
64
  | Constitutional rules | `.forge/constitution.md` |
88
65
  | Design system rules | `.forge/design-system.md` |
89
66
 
90
- Go to **Framework Absorption** below.
91
-
92
- **Option B: Archive & Start Fresh**
93
- Move framework files to `.forge/archive/{framework-name}/` for reference, then run standard brownfield discovery.
94
-
95
- **Option C: Keep Both (Transition Period)**
96
- Initialize Forge alongside the existing framework. Remove the old framework later when confident.
67
+ **B: Archive** — `.forge/archive/{name}/`, run brownfield. **C: Keep Both** — init alongside, remove later.
97
68
 
98
69
  ---
99
70
 
100
- ### Framework Absorption (Option A)
71
+ ### Absorption (A)
101
72
 
102
- **GSD Absorption Map:**
73
+ **GSD:**
103
74
 
104
75
  | GSD Source | Extract | Write to Forge |
105
76
  |-----------|---------|---------------|
@@ -113,7 +84,7 @@ Initialize Forge alongside the existing framework. Remove the old framework late
113
84
  | `references/tdd.md` | Testing approach | Constitution articles |
114
85
  | Agent customizations | Custom behaviors, tool restrictions | `.claude/agents/*.md` (if custom) |
115
86
 
116
- **Spec-Kit Absorption Map:**
87
+ **Spec-Kit:**
117
88
 
118
89
  | Spec-Kit Source | Extract | Write to Forge |
119
90
  |----------------|---------|---------------|
@@ -123,31 +94,13 @@ Initialize Forge alongside the existing framework. Remove the old framework late
123
94
  | `extensions/` | Specialized skills | `.claude/skills/` (if relevant) |
124
95
  | Project specs (if filled in) | Locked decisions | `.forge/context.md` |
125
96
 
126
- **Generic Framework Absorption:**
127
-
128
- For unknown frameworks, use the `researching` skill to:
129
- 1. Read all markdown and config files in the framework directory
130
- 2. Identify: project descriptions, requirements, decisions, state, design rules
131
- 3. Map each to the closest Forge equivalent
132
- 4. Present the mapping to the user for confirmation before writing
133
-
134
- **Absorption Process:**
135
-
136
- 1. Read all source files from the existing framework
137
- 2. For each Forge target file, synthesize content from the relevant sources
138
- 3. Convert prose to YAML where Forge expects YAML (project, requirements, roadmap, state)
139
- 4. Preserve markdown where Forge expects markdown (constitution, context, design-system)
140
- 5. If something doesn't map to a Forge file, note it in `.forge/context.md` under "Carried Forward"
141
- 6. Move originals to `.forge/archive/{framework-name}/`
142
- 7. Present a diff-style summary: *"Here's what I converted: [list]. Archived for reference: [list]. Anything to handle differently?"*
97
+ **Generic:** `researching` reads all markdown/config, maps to Forge equivalents, confirms with user.
143
98
 
144
- After absorption, **always** continue with the standard brownfield steps below see the verification step next.
99
+ **Process:** Read sources → synthesize per target → prose to YAML where expected, keep markdown where expected unmapped to `.forge/context.md` "Carried Forward" originals to `.forge/archive/{name}/` → show summary. Then continue brownfield steps.
145
100
 
146
- ### Documentation vs. Codebase Verification
101
+ ### Docs vs. Code
147
102
 
148
- **Never trust framework documentation at face value.** The codebase is the source of truth.
149
-
150
- After reading framework docs, cross-reference every claim against actual code:
103
+ **Never trust docs.** Code = truth.
151
104
 
152
105
  ```
153
106
  For each claim in the documentation:
@@ -156,8 +109,6 @@ For each claim in the documentation:
156
109
  3. Flag any discrepancies
157
110
  ```
158
111
 
159
- **Common drift patterns:**
160
-
161
112
  | Documentation Says | Verify Against |
162
113
  |-------------------|----------------|
163
114
  | "Tech stack: React + PostgreSQL" | `package.json` deps, actual imports in `src/` |
@@ -169,15 +120,10 @@ For each claim in the documentation:
169
120
  | Requirements list features A, B, C | Do routes/components for A, B, C exist? Partially implemented? |
170
121
  | Roadmap says "Phase 2 complete" | Are Phase 2 features wired and working, or stubs? |
171
122
 
172
- **When discrepancies are found**, present them clearly and ask whether Forge config should match the code or whether features were removed/deferred.
123
+ Discrepancies: ask if config matches code or features removed/deferred. Priority: Code > User > Docs.
124
+ Verified → Forge files. Unresolved → `.forge/context.md` "Needs Resolution".
173
125
 
174
- **Truth priority:** (1) What the code does, (2) What the user confirms, (3) What the docs say.
175
-
176
- Write verified state to Forge files. Unresolved discrepancies go in `.forge/context.md` under "Needs Resolution".
177
-
178
- ---
179
-
180
- ### Discovery Step 1: Tech Stack Scan
126
+ ### Step 1: Tech Stack
181
127
 
182
128
  ```bash
183
129
  # Package manifest
@@ -193,11 +139,9 @@ Bash: find src/ -type f | head -50 # understand file organization
193
139
  Bash: wc -l src/**/*.{ts,tsx,js,jsx} 2>/dev/null | tail -1 # codebase size
194
140
  ```
195
141
 
196
- Auto-detect: language, framework, build tools, test framework, database, project name/description.
197
-
198
- ### Discovery Step 1.5: Verification Command Detection
142
+ Auto-detect: language, framework, build tools, tests, DB, name.
199
143
 
200
- Auto-detect verification commands from the project's package manifest and config:
144
+ ### Step 1.5: Verification Commands
201
145
 
202
146
  ```bash
203
147
  # Node.js projects — scan package.json scripts
@@ -214,7 +158,7 @@ Check: Makefile, tox.ini, pyproject.toml for test/lint commands
214
158
  # Rust projects — cargo test, cargo clippy
215
159
  ```
216
160
 
217
- **Node.js auto-detection rules:**
161
+ **Node.js:**
218
162
 
219
163
  | `package.json` script | Verification command |
220
164
  |----------------------|---------------------|
@@ -224,7 +168,7 @@ Check: Makefile, tox.ini, pyproject.toml for test/lint commands
224
168
  | `tsc` in scripts or `typescript` in devDeps | `npx tsc --noEmit` |
225
169
  | `eslint` in devDeps but no `lint` script | `npx eslint .` |
226
170
 
227
- **Advisory mode detection:** Run each command once to check baseline health. Commands that fail on the current codebase (before Forge changes anything) get `advisory: true` — they run but don't block. This prevents pre-existing tech debt from blocking execution.
171
+ Run once for baseline. Pre-existing failures `advisory: true` (run, don't block).
228
172
 
229
173
  ```yaml
230
174
  # Example auto-detected config:
@@ -240,9 +184,9 @@ verification:
240
184
  max_retries: 2
241
185
  ```
242
186
 
243
- Present findings to user with pass/fail status and advisory flags. Ask if they want to add, remove, or adjust commands.
187
+ Present pass/fail + flags. User adjusts.
244
188
 
245
- ### Discovery Step 2: Design System Detection
189
+ ### Step 2: Design System
246
190
 
247
191
  ```bash
248
192
  # Check dependencies for known UI libraries
@@ -257,9 +201,9 @@ Grep: src/ for icon usage: "pi pi-", "Material", "lucide-react"
257
201
  Glob: **/*theme*, **/*variables.scss, **/tailwind.config*, **/globals.css
258
202
  ```
259
203
 
260
- Auto-detect: component library (+ version), icon set, layout system, theme approach.
204
+ Auto-detect: library (+version), icons, layout, theme.
261
205
 
262
- ### Discovery Step 3: Pattern Analysis
206
+ ### Step 3: Patterns
263
207
 
264
208
  ```bash
265
209
  # Existing conventions
@@ -274,33 +218,26 @@ Glob: src/**/index.{ts,tsx,js} # barrel exports
274
218
  Grep: src/ for "import.*from.*@/" # path aliases
275
219
  ```
276
220
 
277
- ### Discovery Step 4: Present Findings
278
-
279
- Present a structured summary:
280
-
281
- *"Project: {name} — {description}*
282
- *Stack: {language} + {framework} + {database}*
283
- *UI: {component library} with {icon set}, layout via {layout system}*
284
- *Testing: {test framework}, {X} test files*
285
- *Size: ~{N} source files, ~{N}K lines*
286
- *Patterns: {commit style}, {folder structure}, {key conventions}*
221
+ ### Step 4: Present
287
222
 
288
- *Does this look right? Anything I missed or got wrong?"*
223
+ *"Project: {name} {description}
224
+ Stack: {language} + {framework} + {database}
225
+ UI: {library} + {icons}, layout: {system}
226
+ Testing: {framework}, {X} files
227
+ Size: ~{N} files, ~{N}K lines
228
+ Right? Anything missed?"*
289
229
 
290
- ### Discovery Step 5: Design System Mapping
230
+ ### Step 5: Design System Mapping
291
231
 
292
- If a component library was detected:
293
- 1. Check `.forge/templates/design-systems/` for a starter config
294
- 2. If found → copy as starting point for `.forge/design-system.md`
295
- 3. If notuse `researching` skill to build a component mapping from docs
296
- 4. Cross-reference with actual usage: scan for which components are already used
297
- 5. Present mapping to user for validation
232
+ Library detected:
233
+ 1. Check `.forge/templates/design-systems/` for starter
234
+ 2. Found → copy to `.forge/design-system.md`
235
+ 3. Not found → `researching` builds mapping
236
+ 4. Cross-ref actual usage, present for validation
298
237
 
299
- If no library detected but UI files exist, ask: *"I see UI code but no component library. Are you using a design system, or custom HTML/CSS?"*
238
+ No library + UI files *"No component library. Design system or custom?"*
300
239
 
301
- ### Discovery Step 6: Constitutional Inference
302
-
303
- Suggest articles based on discovered patterns:
240
+ ### Step 6: Constitutional Inference
304
241
 
305
242
  | Discovery | Suggested Articles |
306
243
  |-----------|-------------------|
@@ -311,30 +248,19 @@ Suggest articles based on discovered patterns:
311
248
  | package-lock.json or yarn.lock | Article I: Library-First |
312
249
  | Logging/monitoring deps | Article IX: Observability |
313
250
 
314
- Present grouped recommendations. User confirms, adds, or removes.
315
-
316
- ---
317
-
318
- ## Greenfield Path: Build from Description
251
+ Present grouped. User confirms/adds/removes.
319
252
 
320
- ### Greenfield Step 1: Project Basics
253
+ ## Greenfield
321
254
 
322
- Ask the user to describe the project. From their description, fill in `.forge/project.yml`:
255
+ ### Step 1: Basics
323
256
 
324
- - Project name and description
325
- - Primary goal
326
- - Tech stack (language, framework, database, testing)
327
- - Time and scope constraints
328
- - Success criteria
329
- - Known risks
257
+ User describes project → `.forge/project.yml`: name, goal, stack, constraints, success criteria, risks.
330
258
 
331
- Confirm: *"Does this capture your project correctly? Anything to add or change?"*
259
+ ### Step 2: Design System
332
260
 
333
- ### Greenfield Step 2: Design System Setup
261
+ *"UI library?"*
334
262
 
335
- Ask: *"Does this project use a UI component library or design system?"*
336
-
337
- **If yes**, ask which one and configure `design_system` in `project.yml`:
263
+ **Yes** configure in `project.yml`:
338
264
 
339
265
  ```yaml
340
266
  design_system:
@@ -346,20 +272,11 @@ design_system:
346
272
  docs_url: "" # e.g., https://primereact.org/datatable/
347
273
  ```
348
274
 
349
- Then:
350
- 1. Check `.forge/templates/design-systems/` for a starter config
351
- 2. If found → copy and customize
352
- 3. If not → use `researching` skill to build a component mapping from docs
353
- 4. Write mapping to `.forge/design-system.md`
354
-
355
- **If no** (plain HTML/CSS, utility-only, or non-UI project):
356
- - Set `design_system.library: none` in project.yml
357
- - Skip design-system.md creation
358
- - Disable Article V in the constitution
275
+ Check `.forge/templates/design-systems/` for starter → copy/customize, or `researching` builds mapping → `.forge/design-system.md`.
359
276
 
360
- ### Greenfield Step 2.5: Verification Commands
277
+ **No**: `library: none`, skip design-system.md, disable Article V.
361
278
 
362
- Ask: *"What verification commands should run after each task?"*
279
+ ### Step 2.5: Verification
363
280
 
364
281
  | Stack | Suggested commands |
365
282
  |-------|-------------------|
@@ -371,43 +288,24 @@ Ask: *"What verification commands should run after each task?"*
371
288
  | Go | `go test ./...`, `go vet ./...` |
372
289
  | Rust | `cargo test`, `cargo clippy` |
373
290
 
374
- Pre-fill based on the chosen tech stack. User confirms or adjusts. Write to the `verification` section of `project.yml`.
375
-
376
- If the user doesn't want verification gates: set `verification.commands: []`.
377
-
378
- ### Greenfield Step 3: Constitutional Setup
379
-
380
- Present the 9 articles grouped by domain:
291
+ Pre-fill from stack `verification` in `project.yml`. No gates → `[]`.
381
292
 
382
- **Code quality** (recommended for most projects):
383
- - Article I: Library-First — prefer proven libraries over custom code
384
- - Article II: Test-First — tests before or alongside implementation
385
- - Article III: Simplicity — simplest solution wins
386
- - Article IV: Consistency — follow existing project patterns
293
+ ### Step 3: Constitution
387
294
 
388
- **Design & UI** (if project has UI):
389
- - Article V: Design System Fidelity — use the design system, don't fight it
295
+ **Code quality** (most projects): I Library-First, II Test-First, III Simplicity, IV Consistency
296
+ **Design & UI** (if UI): V Design System Fidelity
297
+ **Security & data** (if auth/data/APIs): VI Security by Default
298
+ **Architecture** (by complexity): VII Integration-First, VIII Documentation-Driven, IX Observability
390
299
 
391
- **Security & data** (if auth, user data, or APIs involved):
392
- - Article VI: Security by Default — auth, validation, secrets are requirements
393
-
394
- **Architecture** (based on project complexity):
395
- - Article VII: Integration-First — real dependencies before mocks
396
- - Article VIII: Documentation-Driven — decisions documented where code lives
397
- - Article IX: Observability — logging, error reporting, health checks
398
-
399
- Ask: *"Which articles apply? I'd recommend [suggest based on stack]. You can also add project-specific articles."*
400
-
401
- ---
300
+ User selects per stack.
402
301
 
403
- ## Finalize Init (Both Paths)
302
+ ## Finalize
404
303
 
405
- 1. Write `.forge/project.yml` with all gathered/discovered info (including `verification` section)
406
- 2. Write `.forge/constitution.md` with selected articles
407
- 3. Write `.forge/design-system.md` (if design system configured)
408
- 4. Initialize milestone-aware state:
409
- - Create `.forge/state/` directory
410
- - Write `.forge/state/index.yml`:
304
+ 1. Write `.forge/project.yml` (all info + `verification`)
305
+ 2. Write `.forge/constitution.md`
306
+ 3. Write `.forge/design-system.md` (if configured)
307
+ 4. Init state:
308
+ - `.forge/state/index.yml`:
411
309
  ```yaml
412
310
  milestones:
413
311
  - id: 1
@@ -415,7 +313,7 @@ Ask: *"Which articles apply? I'd recommend [suggest based on stack]. You can als
415
313
  status: active
416
314
  last_updated: "{date}"
417
315
  ```
418
- - Write `.forge/state/milestone-1.yml`:
316
+ - `.forge/state/milestone-1.yml`:
419
317
  ```yaml
420
318
  milestone:
421
319
  id: 1
@@ -428,8 +326,8 @@ Ask: *"Which articles apply? I'd recommend [suggest based on stack]. You can als
428
326
  task: null
429
327
  status: not_started
430
328
  ```
431
- 5. Copy remaining templates as needed
329
+ 5. Templates as needed
432
330
 
433
- Confirm: *"Project initialized: [summary]. Ready to start working?"*
331
+ *"Initialized. Ready?"*
434
332
 
435
- Return control to the `forge` skill for tier detection and routing.
333
+ Return to `forge`.