forge-orkes 0.1.0 → 0.2.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.
- package/package.json +1 -1
- package/template/.claude/skills/architecting/SKILL.md +12 -0
- package/template/.claude/skills/auditing/SKILL.md +12 -0
- package/template/.claude/skills/discussing/SKILL.md +26 -1
- package/template/.claude/skills/executing/SKILL.md +14 -0
- package/template/.claude/skills/forge/SKILL.md +55 -4
- package/template/.claude/skills/planning/SKILL.md +12 -0
- package/template/.claude/skills/researching/SKILL.md +12 -0
- package/template/.claude/skills/verifying/SKILL.md +28 -0
- package/template/CLAUDE.md +3 -0
package/package.json
CHANGED
|
@@ -119,3 +119,15 @@ After completing architectural work:
|
|
|
119
119
|
3. API contracts defined (if applicable)
|
|
120
120
|
4. Constitutional gates verified
|
|
121
121
|
5. User has approved significant decisions
|
|
122
|
+
|
|
123
|
+
## Phase Handoff
|
|
124
|
+
|
|
125
|
+
After architectural decisions are documented:
|
|
126
|
+
|
|
127
|
+
1. **Verify persistence** — Confirm ADRs are written to `.forge/decisions/`, data models and API contracts to `.forge/phases/{N}-{name}/`
|
|
128
|
+
2. **Update state** — Set `current.status` to `planning` in `.forge/state/milestone-{id}.yml`
|
|
129
|
+
3. **Recommend context clear:**
|
|
130
|
+
|
|
131
|
+
*"Architecting phase complete. Decisions are documented in `.forge/decisions/` and phase artifacts. I recommend clearing context (`/clear`) before starting the planning phase — the planner will load ADRs, contracts, and state from disk.*
|
|
132
|
+
|
|
133
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
@@ -300,3 +300,15 @@ This is a soft gate — critical issues strongly recommend fixing before complet
|
|
|
300
300
|
- The user always has final authority over ship decisions
|
|
301
301
|
|
|
302
302
|
The report documents the decision either way, creating an audit trail.
|
|
303
|
+
|
|
304
|
+
## Phase Handoff
|
|
305
|
+
|
|
306
|
+
After auditing routes to refactoring (all three paths: HEALTHY, accepted risk, accepted warnings):
|
|
307
|
+
|
|
308
|
+
1. **Verify persistence** — Confirm health report is written to `.forge/audits/milestone-{id}-health-report.md`
|
|
309
|
+
2. **Update state** — Set `current.status` to `refactoring` in `.forge/state/milestone-{id}.yml`
|
|
310
|
+
3. **Recommend context clear:**
|
|
311
|
+
|
|
312
|
+
*"Health audit complete. Report written to `.forge/audits/`. I recommend clearing context (`/clear`) before the refactoring review — the refactoring scanner spawns a fresh agent with the git diff and health report, so a clean context ensures accurate scanning.*
|
|
313
|
+
|
|
314
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
@@ -29,7 +29,20 @@ The only output is the conversation itself and, at the end, a summary of decisio
|
|
|
29
29
|
|
|
30
30
|
## Pre-Planning Discussion
|
|
31
31
|
|
|
32
|
-
When entering from `researching`
|
|
32
|
+
When entering from `researching` (potentially after a context clear):
|
|
33
|
+
|
|
34
|
+
### Step 0: Load Context
|
|
35
|
+
|
|
36
|
+
If entering with a fresh context (after `/clear`):
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Read: .forge/state/milestone-{id}.yml → current position, progress
|
|
40
|
+
Read: .forge/project.yml → tech stack, project description
|
|
41
|
+
Read: .forge/context.md → any existing locked decisions (if exists)
|
|
42
|
+
Read: .forge/constitution.md → active gates (if exists)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Check if research findings were written to files (`.forge/phases/` or similar). If so, read them. If research was inline-only (conversation context), the findings may need to be re-summarized from the user — ask briefly: *"We're picking up after the research phase. Can you summarize the key findings, or should I re-scan the relevant areas?"*
|
|
33
46
|
|
|
34
47
|
### Step 1: Present the Landscape
|
|
35
48
|
|
|
@@ -227,3 +240,15 @@ If re-planning is needed, route back to the `planning` skill with the discussion
|
|
|
227
240
|
- **Premature convergence** — locking decisions before the user has had a chance to think. Don't rush the summary.
|
|
228
241
|
- **Scope creep via discussion** — "While we're at it, should we also..." Keep discussion focused on the work at hand.
|
|
229
242
|
- **Discussion as procrastination** — if the user keeps wanting to discuss but never approves a plan, gently surface the pattern.
|
|
243
|
+
|
|
244
|
+
## Phase Handoff
|
|
245
|
+
|
|
246
|
+
After discussion converges on decisions:
|
|
247
|
+
|
|
248
|
+
1. **Persist decisions** — The decision summary from Step 5 (pre-planning) or Step 6 (post-planning) will flow into `context.md` when the planning skill runs. For post-planning revisions, note the changes clearly so planning can pick them up.
|
|
249
|
+
2. **Update state** — Set `current.status` to `planning` (or `architecting` for Full tier) in `.forge/state/milestone-{id}.yml`
|
|
250
|
+
3. **Recommend context clear:**
|
|
251
|
+
|
|
252
|
+
*"Discussion phase complete. Decisions are captured and will be written to context.md during planning. I recommend clearing context (`/clear`) before starting the {planning/architecting} phase — the planner will load everything it needs from `.forge/` state files.*
|
|
253
|
+
|
|
254
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
@@ -152,3 +152,17 @@ While executing, watch for and log these patterns in `.forge/state/index.yml →
|
|
|
152
152
|
- **Agent struggles**: If you need multiple attempts to get something right, or the user has to guide you through it, log the task type as an `agent_struggle`.
|
|
153
153
|
|
|
154
154
|
This takes seconds per signal. Don't skip it — this data drives framework evolution.
|
|
155
|
+
|
|
156
|
+
## Phase Handoff
|
|
157
|
+
|
|
158
|
+
After all plans in the phase are executed:
|
|
159
|
+
|
|
160
|
+
1. **Verify persistence** — Confirm execution summary is documented, all commits are made, milestone state is updated with progress and deviations, and desire path signals are logged
|
|
161
|
+
2. **Update state** — Set `current.status` to `verifying` in `.forge/state/milestone-{id}.yml`
|
|
162
|
+
3. **Recommend context clear:**
|
|
163
|
+
|
|
164
|
+
*"Execution phase complete. All tasks committed, state updated, deviations logged. I recommend clearing context (`/clear`) before starting verification — the verifier needs a fresh window to objectively assess the work against must_haves, without carrying the executor's assumptions.*
|
|
165
|
+
|
|
166
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
167
|
+
|
|
168
|
+
This handoff is especially important after execution — the verifier should approach the code with fresh eyes, not the executor's memory of what it intended to build.
|
|
@@ -512,13 +512,64 @@ While working at any tier, if you encounter:
|
|
|
512
512
|
|
|
513
513
|
When uncertain → Rule 4 (ask). Never silently make architectural decisions.
|
|
514
514
|
|
|
515
|
+
## Context Handoff Protocol
|
|
516
|
+
|
|
517
|
+
Phase transitions are natural context-clearing boundaries. After each phase completes and writes its state to disk, **recommend the user clear context** before the next phase begins. This prevents context rot — the #1 cause of quality degradation in long sessions.
|
|
518
|
+
|
|
519
|
+
### Why Clear Between Phases
|
|
520
|
+
|
|
521
|
+
Each phase produces persistent artifacts (state files, plans, reports, backlogs) that the next phase reads from disk. The next phase does NOT need the previous phase's working memory — it needs the artifacts. Carrying forward stale context wastes tokens and degrades output quality.
|
|
522
|
+
|
|
523
|
+
### When to Recommend
|
|
524
|
+
|
|
525
|
+
Recommend clearing context at every phase boundary in Standard and Full tiers:
|
|
526
|
+
|
|
527
|
+
```
|
|
528
|
+
researching → [clear] → discussing → [clear] → architecting → [clear] → planning → [clear] → executing → [clear] → verifying → [clear] → auditing → [clear] → refactoring
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
**Skip the recommendation when:**
|
|
532
|
+
- Quick tier (single phase, no boundary to clear)
|
|
533
|
+
- The phase was very short (under 5 minutes of work) and context is well under 40%
|
|
534
|
+
- The user has explicitly said they don't want context-clearing prompts
|
|
535
|
+
|
|
536
|
+
### The Handoff Prompt
|
|
537
|
+
|
|
538
|
+
Each skill ends with a standard handoff message. The pattern is:
|
|
539
|
+
|
|
540
|
+
1. **Confirm state is written** — skill verifies its outputs are persisted to `.forge/`
|
|
541
|
+
2. **Summarize what was produced** — brief list of artifacts the next phase will need
|
|
542
|
+
3. **Recommend clearing context** — present the prompt to the user:
|
|
543
|
+
|
|
544
|
+
*"Phase complete. All state has been written to disk. I recommend clearing context (`/clear`) before starting {next phase} — this gives the next phase a fresh context window to work with. The {next phase} skill will load everything it needs from `.forge/` state files.*
|
|
545
|
+
|
|
546
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
547
|
+
|
|
548
|
+
4. **If user declines** — proceed normally. The recommendation is advisory, not blocking.
|
|
549
|
+
|
|
550
|
+
### What Each Phase Writes (Handoff Artifacts)
|
|
551
|
+
|
|
552
|
+
| Phase | Writes to Disk | Next Phase Reads |
|
|
553
|
+
|-------|---------------|------------------|
|
|
554
|
+
| researching | Research summary (markdown in conversation or `.forge/` files) | discussing reads research findings |
|
|
555
|
+
| discussing | Decision summary → carried into planning via context.md | planning reads context.md |
|
|
556
|
+
| architecting | ADRs in `.forge/decisions/`, data models, API contracts | planning reads decisions |
|
|
557
|
+
| planning | Plans in `.forge/phases/`, requirements.yml, roadmap.yml, context.md | executing reads plans |
|
|
558
|
+
| executing | Committed code, execution summary, milestone state updated | verifying reads must_haves from plans |
|
|
559
|
+
| verifying | Verification report, desire paths updated | auditing reads project.yml + source files |
|
|
560
|
+
| auditing | Health report in `.forge/audits/` | refactoring reads health report + git diff |
|
|
561
|
+
|
|
562
|
+
### Context Loading on Resume
|
|
563
|
+
|
|
564
|
+
When a skill starts after a context clear, it must load its required state from disk. Each skill's "Read Context" or "Pre-Execution Checklist" step handles this. The `forge` orchestrator reads `milestone-{id}.yml` to determine which skill to route to, then that skill loads its own dependencies.
|
|
565
|
+
|
|
515
566
|
## State Transitions
|
|
516
567
|
|
|
517
568
|
```
|
|
518
|
-
not_started → [init if new] → researching → discussing → planning → executing → verifying → auditing → refactoring → complete
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
569
|
+
not_started → [init if new] → researching → [clear] → discussing → [clear] → planning → [clear] → executing → [clear] → verifying → [clear] → auditing → [clear] → refactoring → complete
|
|
570
|
+
↗ debugging (if stuck)
|
|
571
|
+
↗ designing (if UI)
|
|
572
|
+
↗ securing (if auth/data)
|
|
522
573
|
```
|
|
523
574
|
|
|
524
575
|
Update `.forge/state/milestone-{id}.yml` at each transition. Update `.forge/state/index.yml` milestone `last_updated` timestamp.
|
|
@@ -223,3 +223,15 @@ Show the user:
|
|
|
223
223
|
4. Ask: "Does this plan match your expectations? Any changes?"
|
|
224
224
|
|
|
225
225
|
Planning is complete when user approves.
|
|
226
|
+
|
|
227
|
+
## Phase Handoff
|
|
228
|
+
|
|
229
|
+
After the user approves the plan:
|
|
230
|
+
|
|
231
|
+
1. **Verify persistence** — Confirm all plans are written to `.forge/phases/{N}-{name}/plan-{NN}.md`, requirements to `.forge/requirements.yml`, roadmap to `.forge/roadmap.yml`, and context to `.forge/context.md`
|
|
232
|
+
2. **Update state** — Set `current.status` to `executing` in `.forge/state/milestone-{id}.yml`
|
|
233
|
+
3. **Recommend context clear:**
|
|
234
|
+
|
|
235
|
+
*"Planning phase complete. Plans, requirements, and context are all written to `.forge/`. I recommend clearing context (`/clear`) before starting execution — the executor will load the plan files and context.md fresh, giving it maximum context window for building.*
|
|
236
|
+
|
|
237
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
@@ -115,3 +115,15 @@ Research output should be under 500 lines. If larger, split into focused documen
|
|
|
115
115
|
- `research-codebase.md` for codebase findings
|
|
116
116
|
- `research-tech.md` for technology evaluation
|
|
117
117
|
- `research-requirements.md` for requirements analysis
|
|
118
|
+
|
|
119
|
+
## Phase Handoff
|
|
120
|
+
|
|
121
|
+
After research is complete:
|
|
122
|
+
|
|
123
|
+
1. **Persist findings** — Write research summary to `.forge/phases/` or present inline (for Standard tier, inline is fine; for Full tier with multiple research topics, write to files)
|
|
124
|
+
2. **Update state** — Set `current.status` to `discussing` in `.forge/state/milestone-{id}.yml`
|
|
125
|
+
3. **Recommend context clear:**
|
|
126
|
+
|
|
127
|
+
*"Research phase complete. Findings are summarized above [or written to .forge/phases/]. I recommend clearing context (`/clear`) before starting the discussion phase — this gives discussing a fresh window to work with. The discussing skill will reference the research findings.*
|
|
128
|
+
|
|
129
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
@@ -12,6 +12,20 @@ Prove completed work actually delivers what was promised. Task completion ≠ go
|
|
|
12
12
|
Don't ask: "Did we complete all the tasks?"
|
|
13
13
|
Ask: "Does the user get what they were promised?"
|
|
14
14
|
|
|
15
|
+
## Load Context
|
|
16
|
+
|
|
17
|
+
When entering with a fresh context (after `/clear`):
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Read: .forge/state/milestone-{id}.yml → current phase, plans completed
|
|
21
|
+
Read: .forge/project.yml → tech stack (for running tests)
|
|
22
|
+
Read: .forge/phases/{N}-{name}/plan-{NN}.md → must_haves (truths, artifacts, key_links)
|
|
23
|
+
Read: .forge/context.md → locked decisions (to understand intent)
|
|
24
|
+
Read: .forge/requirements.yml → requirement IDs for coverage check
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This is critical — the verifier should assess the code with fresh eyes, not carry the executor's assumptions. Load must_haves from the plan files and verify against the actual codebase.
|
|
28
|
+
|
|
15
29
|
## 3-Level Goal-Backward Verification
|
|
16
30
|
|
|
17
31
|
### Level 1: Observable Truths
|
|
@@ -199,3 +213,17 @@ When any pattern reaches **3+ occurrences**, surface it to the user:
|
|
|
199
213
|
- *"Should I add a new constitutional article: 'Error Boundaries Required'?"*
|
|
200
214
|
|
|
201
215
|
Only suggest changes when there's clear evidence (3+ occurrences). One-off issues are noise, not signal.
|
|
216
|
+
|
|
217
|
+
## Phase Handoff
|
|
218
|
+
|
|
219
|
+
After verification completes with a PASSED verdict:
|
|
220
|
+
|
|
221
|
+
1. **Verify persistence** — Confirm verification results are documented, desire paths retrospective is logged to `.forge/state/index.yml`
|
|
222
|
+
2. **Update state** — Set `current.status` to `auditing` in `.forge/state/milestone-{id}.yml`
|
|
223
|
+
3. **Recommend context clear:**
|
|
224
|
+
|
|
225
|
+
*"Verification phase complete — all truths verified, artifacts substantive and wired. I recommend clearing context (`/clear`) before the health audit — the auditing skill spawns fresh subagents anyway, and a clean orchestrator context ensures nothing is missed.*
|
|
226
|
+
|
|
227
|
+
*Ready to continue? Clear context and invoke `/forge` to resume."*
|
|
228
|
+
|
|
229
|
+
Note: If verification found GAPS, route back to planning in gap-closure mode instead. The context clear recommendation applies after the re-verified PASSED verdict.
|
package/template/CLAUDE.md
CHANGED
|
@@ -61,6 +61,9 @@ Forge auto-detects complexity. Override with: "Use Quick/Standard/Full tier."
|
|
|
61
61
|
### Fresh Agent Pattern
|
|
62
62
|
When a task touches 20+ files or a complex subsystem, spawn a fresh executor agent with isolated context. This prevents context rot — the #1 cause of quality degradation in long sessions.
|
|
63
63
|
|
|
64
|
+
### Context Handoff Between Phases
|
|
65
|
+
Each phase writes its outputs to `.forge/` before completing. At every phase boundary (researching → discussing → planning → executing → verifying → auditing → refactoring), the completing skill recommends clearing context (`/clear`) before the next phase begins. The next phase loads what it needs from disk. This is advisory — skip for short phases where context is under 40%. See the `forge` skill's "Context Handoff Protocol" for full details.
|
|
66
|
+
|
|
64
67
|
### Lazy Loading
|
|
65
68
|
Skills load only when invoked. CLAUDE.md stays in context; skill details load on demand. This keeps base context lean (~300 lines) while making full framework available.
|
|
66
69
|
|