@azure-id/orc 1.9.2 → 2.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.
- package/CHANGELOG.md +722 -0
- package/README-id.md +56 -42
- package/README.md +58 -41
- package/bin/build-agents.js +125 -29
- package/bin/clear-logs.js +620 -0
- package/bin/cli.js +1873 -180
- package/bin/fix.js +459 -0
- package/bin/gotcha-import.js +1081 -0
- package/bin/gotcha.js +1566 -0
- package/bin/graph-query.js +1 -1
- package/bin/graph.js +717 -717
- package/bin/habit.js +1538 -0
- package/bin/mockrun-catalog.js +284 -276
- package/bin/onboarding-content.js +2 -1
- package/bin/pricing.json +28 -21
- package/bin/run-undo.js +398 -0
- package/bin/trace-write.js +869 -0
- package/bin/verify-contracts.js +627 -100
- package/bin/verify-package.js +68 -10
- package/bin/webui/api.js +151 -6
- package/bin/webui/app.html +239 -232
- package/bin/webui/css/00-tokens.css +110 -92
- package/bin/webui/css/04-motion.css +87 -0
- package/bin/webui/css/06-responsive.css +203 -178
- package/bin/webui/css/panels/behaviour.css +205 -0
- package/bin/webui/css/panels/hookui.css +79 -0
- package/bin/webui/fixtures/behaviour.js +562 -0
- package/bin/webui/fixtures/extra.js +9 -9
- package/bin/webui/fixtures/flow.js +81 -81
- package/bin/webui/fixtures/hookui.js +506 -431
- package/bin/webui/fixtures/index.js +66 -3
- package/bin/webui/fixtures/knowledge.js +9 -3
- package/bin/webui/fixtures/maintenance.js +123 -42
- package/bin/webui/fixtures/rules.js +1007 -1002
- package/bin/webui/fixtures/settings.js +6 -7
- package/bin/webui/fixtures/stats.js +25 -6
- package/bin/webui/fixtures/wait.js +98 -97
- package/bin/webui/i18n/en/behaviour.json +156 -0
- package/bin/webui/i18n/en/hookui.json +290 -194
- package/bin/webui/i18n/en/maintenance.json +71 -52
- package/bin/webui/i18n/en/nav.json +25 -24
- package/bin/webui/i18n/en/settings.json +60 -60
- package/bin/webui/i18n/en/tour.json +37 -35
- package/bin/webui/i18n/id/behaviour.json +156 -0
- package/bin/webui/i18n/id/hookui.json +290 -194
- package/bin/webui/i18n/id/maintenance.json +71 -52
- package/bin/webui/i18n/id/nav.json +25 -24
- package/bin/webui/i18n/id/settings.json +60 -60
- package/bin/webui/i18n/id/tour.json +37 -35
- package/bin/webui/js/01-i18n.js +155 -154
- package/bin/webui/js/05-banners.js +181 -172
- package/bin/webui/js/06-edit.js +193 -183
- package/bin/webui/js/90-tour.js +498 -494
- package/bin/webui/js/91-shortcuts.js +126 -126
- package/bin/webui/js/99-boot.js +121 -118
- package/bin/webui/js/panels/behaviour.js +1087 -0
- package/bin/webui/js/panels/hookui.js +2196 -1691
- package/bin/webui/js/panels/maintenance.js +336 -235
- package/bin/webui/js/panels/settings.js +726 -719
- package/mock-run/INDEX.md +110 -107
- package/mock-run/extra-slots.md +1 -1
- package/mock-run/gotcha-import.md +118 -0
- package/mock-run/habits.md +129 -0
- package/mock-run/orc-aftermath.md +392 -392
- package/mock-run/orc-budget.md +29 -33
- package/mock-run/orc-cli.md +200 -200
- package/mock-run/orc-explain.md +86 -86
- package/mock-run/orc-extra.md +389 -392
- package/mock-run/orc-fix.md +87 -0
- package/mock-run/orc-pattern.md +112 -112
- package/mock-run/orc-quick.md +6 -1
- package/mock-run/orc.md +157 -157
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +37 -34
- package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
- package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -5
- package/templates/agents/{orc-claude-writer-opus-4-8-high.md → orc-claude-writer-opus-5-low.md} +48 -53
- package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
- package/templates/agents/orc-executor-haiku-4-5.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
- package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-low.md +14 -6
- package/templates/agents/orc-executor-opus-5-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-5-high.md +15 -7
- package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
- package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
- package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
- package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
- package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
- package/templates/agents/orc-planner-opus-5-med.md +1 -4
- package/templates/agents/orc-recon-opus-5-low.md +1 -8
- package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
- package/templates/agents/orc-retro-opus-5-med.md +6 -8
- package/templates/agents/orc-retro-sonnet-5-high.md +7 -8
- package/templates/agents/orc-reviewer-opus-5-low.md +96 -0
- package/templates/agents/orc-scout-opus-5-low.md +1 -6
- package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
- package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
- package/templates/agents/orc-test-author-opus-5-med.md +4 -5
- package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
- package/templates/agents/orc-verifier-opus-5-med.md +16 -8
- package/templates/agents/{orc-wiki-scanner-opus-4-8-high.md → orc-wiki-scanner-opus-5-low.md} +74 -79
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
- package/templates/commands/orc-analyze.md +13 -21
- package/templates/commands/orc-fast.md +10 -15
- package/templates/commands/orc-fix.md +18 -0
- package/templates/commands/orc-poly.md +12 -21
- package/templates/commands/orc-pr-driver.md +11 -30
- package/templates/commands/orc-pr-setup.md +10 -31
- package/templates/commands/orc-route.md +11 -41
- package/templates/commands/orc-test.md +5 -60
- package/templates/commands/orc-wiki.md +64 -64
- package/templates/hooks/README.md +109 -7
- package/templates/hooks/orc-session-hook.js +339 -0
- package/templates/hooks/orc-statusline-render.js +317 -23
- package/templates/hooks/orc-statusline.js +165 -50
- package/templates/hooks/orc-subagent-line.js +23 -5
- package/templates/hooks/orc-weather-fetch.js +123 -0
- package/templates/skills/_shared/README.md +9 -0
- package/templates/skills/_shared/code-graph.md +47 -55
- package/templates/skills/_shared/config-precedence.md +3 -1
- package/templates/skills/_shared/extra-dispatch.md +78 -93
- package/templates/skills/_shared/gotchas.md +248 -177
- package/templates/skills/_shared/habits.md +101 -0
- package/templates/skills/_shared/lane-contract.md +84 -0
- package/templates/skills/_shared/opus5-only.md +14 -14
- package/templates/skills/_shared/phases/README.md +142 -83
- package/templates/skills/_shared/phases/analyst-gates.md +10 -21
- package/templates/skills/_shared/phases/execution.md +8 -14
- package/templates/skills/_shared/phases/house-rules.md +27 -32
- package/templates/skills/_shared/phases/intake.md +127 -133
- package/templates/skills/_shared/phases/mock-example.md +46 -56
- package/templates/skills/_shared/phases/plan-handoff.md +91 -97
- package/templates/skills/_shared/phases/planning.md +7 -17
- package/templates/skills/_shared/phases/preflight.md +19 -42
- package/templates/skills/_shared/phases/review.md +24 -28
- package/templates/skills/_shared/phases/rules.md +18 -42
- package/templates/skills/_shared/phases/scoring.md +55 -65
- package/templates/skills/_shared/phases/security-checklist.md +46 -50
- package/templates/skills/_shared/phases/security.md +45 -55
- package/templates/skills/_shared/phases/ship.md +6 -15
- package/templates/skills/_shared/phases/stop-resume.md +2 -5
- package/templates/skills/_shared/phases/summary.md +73 -48
- package/templates/skills/_shared/phases/testgen.md +41 -51
- package/templates/skills/_shared/phases/trace-verbs.md +447 -0
- package/templates/skills/_shared/phases/trace.md +66 -297
- package/templates/skills/_shared/phases/verify.md +62 -70
- package/templates/skills/_shared/phases/wave-grouping.md +128 -133
- package/templates/skills/_shared/phases/wiki-consult.md +10 -6
- package/templates/skills/_shared/read-ladder.md +2 -55
- package/templates/skills/_shared/return-validation.md +17 -70
- package/templates/skills/_shared/review-slice.md +106 -0
- package/templates/skills/_shared/smoke-gate.md +46 -28
- package/templates/skills/_shared/wait.md +1 -0
- package/templates/skills/context-combiner/SKILL.md +15 -44
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +35 -63
- package/templates/skills/orc/config.md +25 -27
- package/templates/skills/orc/examples/full-run-mock.md +2 -1
- package/templates/skills/orc/references/effort-and-mode.md +17 -17
- package/templates/skills/orc/references/pattern-gate.md +89 -89
- package/templates/skills/orc/references/phases/intake.md +41 -47
- package/templates/skills/orc/references/phases/integration.md +13 -19
- package/templates/skills/orc/references/preflight-report.md +11 -12
- package/templates/skills/orc/references/ultra-mode.md +9 -7
- package/templates/skills/orc/schemas/checkpoint.md +122 -122
- package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
- package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
- package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +12 -53
- package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
- package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
- package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
- package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
- package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
- package/templates/skills/orc-advisor/SKILL.md +56 -60
- package/templates/skills/orc-analyze/SKILL.md +33 -67
- package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
- package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
- package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
- package/templates/skills/orc-diy/README.md +31 -0
- package/templates/skills/orc-diy/SKILL.md +27 -78
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
- package/templates/skills/orc-fast/SKILL.md +49 -75
- package/templates/skills/orc-fix/SKILL.md +110 -0
- package/templates/skills/orc-judge/SKILL.md +77 -82
- package/templates/skills/orc-mini/SKILL.md +64 -112
- package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
- package/templates/skills/orc-pattern/SKILL.md +27 -48
- package/templates/skills/orc-poly/SKILL.md +32 -61
- package/templates/skills/orc-pr-driver/SKILL.md +25 -51
- package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
- package/templates/skills/orc-pr-setup/SKILL.md +20 -45
- package/templates/skills/orc-quick/README.md +44 -3
- package/templates/skills/orc-quick/SKILL.md +77 -108
- package/templates/skills/orc-quick/references/dispatch-gate.md +18 -6
- package/templates/skills/orc-quick/references/gh-mode.md +50 -1
- package/templates/skills/orc-quick/references/look.md +3 -1
- package/templates/skills/orc-retro/SKILL.md +20 -19
- package/templates/skills/orc-retro/examples/retro-mock.md +17 -17
- package/templates/skills/orc-route/SKILL.md +25 -45
- package/templates/skills/orc-test/SKILL.md +16 -37
- package/templates/skills/orc-verify/SKILL.md +14 -32
- package/templates/skills/orc-wait/SKILL.md +156 -163
- package/templates/skills/orc-wiki/README.md +325 -325
- package/templates/skills/orc-wiki/SKILL.md +195 -195
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
- package/templates/skills/orc-wiki/references/extra.md +2 -2
- package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
- package/templates/skills/orc-wiki/references/phases/phase-0.md +2 -7
- package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-2.md +4 -9
- package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +4 -8
- package/templates/agents/orc-claude-writer-opus-5-med.md +0 -55
- package/templates/agents/orc-reviewer-opus-5-med.md +0 -60
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +0 -81
|
@@ -1,133 +1,127 @@
|
|
|
1
|
-
# Phase — Intake (id: `intake`)
|
|
2
|
-
|
|
3
|
-
> **Library file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
**Add for
|
|
57
|
-
|
|
58
|
-
(→
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- **
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
When resuming a run in a fresh session, show a ONE-LINE reconfirm of the
|
|
130
|
-
intent-spec's scope ("Resuming: <one-line scope>. Still correct?") before
|
|
131
|
-
continuing. Catches requirements that changed between sessions, costs one line.
|
|
132
|
-
|
|
133
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Intake (id: `intake`)
|
|
2
|
+
|
|
3
|
+
> **Library file** (`orc`, `orc-mini`, `orc-diy`, `orc-challenge`). `core` = the intake every lane runs; `full` = /orc's Phase 0 (adds the analyst branch, the poly-spec split-and-STOP and the run-folder open).
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer core -->
|
|
6
|
+
## Reference — Phase 0 Intake
|
|
7
|
+
|
|
8
|
+
Goal: extract just enough that the intent-spec can't be misread, then get out of
|
|
9
|
+
the way. A wrong understanding parallelized is worse than a wrong understanding
|
|
10
|
+
done serially. Never interrogate; never ask what the repo can tell you.
|
|
11
|
+
|
|
12
|
+
**Before anything — plan-input trigger (see `plan-handoff.md`):** if the run
|
|
13
|
+
input IS a plan (pasted planning-output, a `plan-{name}.md` path, or an
|
|
14
|
+
`orc/planner/{name}/` checkpoint), do NOT run intake — switch to the plan-handoff
|
|
15
|
+
entry contract (`plan-handoff.md`): bootstrap the trace, schema-
|
|
16
|
+
validate, apply the `plan_head` staleness valve, re-run the full Phase 1 exit
|
|
17
|
+
gate in this session, relay `open_questions[]`, then continue at Phase 2. A plain
|
|
18
|
+
prose request is not a plan — run intake normally.
|
|
19
|
+
|
|
20
|
+
**Before intake questions — analyst auto-trigger (see SKILL.md Phase 0):** if the
|
|
21
|
+
input includes a document OR the requirement is ambiguous/underspecified, dispatch
|
|
22
|
+
the System Analyst FIRST (doc-optional; standard/deep gate; scouts in deep mode).
|
|
23
|
+
It resolves scope + accuracy with evidence-or-mark and recommended-option
|
|
24
|
+
questions before any intent-spec is drafted. When it hands back "take into build",
|
|
25
|
+
its confirmed spec feeds Phase 1 planning.
|
|
26
|
+
|
|
27
|
+
## Step 0 — Create the run folder FIRST
|
|
28
|
+
|
|
29
|
+
Before anything else, derive a `{run-slug}` from the user's request (short,
|
|
30
|
+
lowercased, hyphenated intent name, e.g. "merchant-notifications") and create
|
|
31
|
+
`.claude/orc/run/{run-slug}/` (config `run_dir`). ALL run artifacts
|
|
32
|
+
(intent-spec, checkpoint, state-of-play, decision log) live here — never in the
|
|
33
|
+
project root, never loose in run/. If a folder with that slug exists, append a
|
|
34
|
+
short timestamp.
|
|
35
|
+
|
|
36
|
+
## Step 1 — Rough-size (picks the question tier)
|
|
37
|
+
|
|
38
|
+
Fast read: how many distinct feature areas does the request imply? Use the
|
|
39
|
+
request text + a quick repo glance. If genuinely unclear, ask ONE sizing
|
|
40
|
+
question ("roughly how big — a small change, a feature, or multiple features?").
|
|
41
|
+
This is a rough size for tier selection only; the REAL effort estimate happens
|
|
42
|
+
in Phase 2 with the intent-spec in hand.
|
|
43
|
+
|
|
44
|
+
## Step 2 — Tiered questions (ask in ONE batched round)
|
|
45
|
+
|
|
46
|
+
**Always (even small tasks):**
|
|
47
|
+
1. In one or two sentences, what should exist when this is done that doesn't now?
|
|
48
|
+
2. What's explicitly *out* of scope?
|
|
49
|
+
|
|
50
|
+
**Add for medium+:**
|
|
51
|
+
3. How will we know it's done — what should work/pass?
|
|
52
|
+
(→ becomes Phase 6 verify's acceptance criteria)
|
|
53
|
+
4. Anything the code must respect or avoid — patterns to follow, libraries not
|
|
54
|
+
to add, files not to touch? (→ hard rules in every worker slice)
|
|
55
|
+
|
|
56
|
+
**Add for high / multi-feature:**
|
|
57
|
+
5. What existing parts of the system does this touch that it must not break?
|
|
58
|
+
(→ feeds the conflict graph / integration surface)
|
|
59
|
+
6. Anything you're unsure about or expect to change mid-build?
|
|
60
|
+
(→ pre-empts mid-run escalations)
|
|
61
|
+
|
|
62
|
+
Infer stack, test framework, file layout, existing patterns from the repo.
|
|
63
|
+
Only intent, scope, and priorities are askable.
|
|
64
|
+
|
|
65
|
+
## Step 3 — Draft the intent-spec
|
|
66
|
+
|
|
67
|
+
Write `run/{run-slug}/intent-spec.md` per `schemas/intent-spec.md`. Restate the
|
|
68
|
+
user's intent in YOUR words — restating is what surfaces misreadings.
|
|
69
|
+
|
|
70
|
+
## Step 3.5 — Repo cross-check of the draft (evidence-or-mark, proportional)
|
|
71
|
+
|
|
72
|
+
Before showing the spec, cross-check its claims against the repo — the direct
|
|
73
|
+
path (no analyst) is the only lane where a spec can reach planning ungrounded.
|
|
74
|
+
Same vocabulary as the analyst: confirm or tag `UNVERIFIED`, never silently
|
|
75
|
+
assume.
|
|
76
|
+
|
|
77
|
+
- **What to check:** every file, module, command, or existing behavior the
|
|
78
|
+
draft NAMES — in Definition of done, Constraints, and Integration surface.
|
|
79
|
+
A quick Glob/Grep per item; you are confirming the noun exists as described,
|
|
80
|
+
not analyzing it.
|
|
81
|
+
- **Proportional to the tier:** 2-question tier → check named files/modules
|
|
82
|
+
only. 4/6-question tiers → full pass over the three sections above.
|
|
83
|
+
- **Anything unconfirmable gets an `UNVERIFIED` tag in the spec** and the tags
|
|
84
|
+
become ONE batched question in the sign-off round ("These I could not confirm
|
|
85
|
+
in the repo: … — confirm, correct, or drop?"). Never more than one round.
|
|
86
|
+
- **Escalation valve:** more than 3 tags means the request is under-grounded
|
|
87
|
+
for a direct intake — stretching intake into a second analyst is the one thing
|
|
88
|
+
not to do. Two exits, and they answer DIFFERENT questions. Offer them in this
|
|
89
|
+
order; the user chooses:
|
|
90
|
+
1. **`/orc-grill`** — when the **intent** is unclear ("I want notifications",
|
|
91
|
+
"something is wrong with refunds"). A conversation: minutes, no scan, no
|
|
92
|
+
scout tokens. It comes back with a scoped idea, and its exit 2 feeds
|
|
93
|
+
`orc-analyze` directly.
|
|
94
|
+
2. **`/orc-analyze`** (requirement mode) — when the intent is clear but its
|
|
95
|
+
**grounding in the code** is not. A scan: tokens, evidence, `file:line`.
|
|
96
|
+
|
|
97
|
+
Naming them in that order matters: a scan cannot fix a vague intent, it can
|
|
98
|
+
only re-ask it at scan prices.
|
|
99
|
+
(The standalone planner has the same valve: a request below its plannable
|
|
100
|
+
floor routes to the analyst instead of being planned thin — no side door.)
|
|
101
|
+
|
|
102
|
+
## Question rounds that run long — borrow the interview format
|
|
103
|
+
|
|
104
|
+
The tiers above are a fixed questionnaire, which is right for a request that
|
|
105
|
+
arrives well-formed. When a tier's round runs long or the answers keep opening
|
|
106
|
+
new questions, switch that round to the frontier format in
|
|
107
|
+
`../../_shared/interview.md`: ask every question whose prerequisites are settled
|
|
108
|
+
in ONE round (never two questions where one depends on the other), each in the
|
|
109
|
+
shape `❓ **Q1** — **<title>**: <body>` with the recommendation alone on a `➡️`
|
|
110
|
+
line. Two rules from that contract still bind here — resolve FACTS yourself
|
|
111
|
+
before asking (wiki → pattern → gotchas), and never adopt a DECISION by default.
|
|
112
|
+
Same primitive, a different front door; do not fork a second version of it.
|
|
113
|
+
|
|
114
|
+
## Step 4 — Sign-off
|
|
115
|
+
|
|
116
|
+
Ask: hard gate (nothing proceeds until explicit approval) or soft (proceed
|
|
117
|
+
unless objection)? **Default when unspecified: GATE.**
|
|
118
|
+
Show the spec. Gate mode: wait for approval or edits. Soft: proceed after
|
|
119
|
+
showing unless the user objects.
|
|
120
|
+
|
|
121
|
+
## Fresh-session reconfirm
|
|
122
|
+
|
|
123
|
+
When resuming a run in a fresh session, show a ONE-LINE reconfirm of the
|
|
124
|
+
intent-spec's scope ("Resuming: <one-line scope>. Still correct?") before
|
|
125
|
+
continuing. Catches requirements that changed between sessions, costs one line.
|
|
126
|
+
|
|
127
|
+
<!-- /orc:layer -->
|
|
@@ -1,56 +1,46 @@
|
|
|
1
|
-
# Phase — Mock example + drift recovery (id: `mock-example`)
|
|
2
|
-
|
|
3
|
-
> **Shared phase file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<!--
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<!-- /
|
|
47
|
-
<!-- diy:when mock_example=on -->
|
|
48
|
-
After the verify/smoke gate is GREEN and BEFORE any ship action, build the
|
|
49
|
-
mocked example without asking, per
|
|
50
|
-
`.claude/skills/_shared/drift-recovery.md`: `mock-examples/<change-slug>/`
|
|
51
|
-
(EXAMPLE.md + one minimal runnable mocked artifact; mocked inputs only). Then
|
|
52
|
-
ask the one drift question; on drift run the `DRIFT-FROM` recovery loop (hard
|
|
53
|
-
cap 2). `mock-examples/` is NEVER staged by the ship phase.
|
|
54
|
-
<!-- /diy:when -->
|
|
55
|
-
|
|
56
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Mock example + drift recovery (id: `mock-example`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file** — read when the phase fires. A lane reads ONE layer: `full` (`/orc`) or `composed` (the `<!-- diy:when -->` variants `orc diy compile` stitches). `orc lane phases <lane> --json` names it.
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer full -->
|
|
6
|
+
|
|
7
|
+
## Mock example + drift recovery (config `mock_example`)
|
|
8
|
+
|
|
9
|
+
Load `../drift-recovery.md` (canonical). Only after a GREEN Phase 6,
|
|
10
|
+
before ship: `ask` (default) → the offer (H `orc.phase-6-7.mock`) is MANDATORY (never silently skipped,
|
|
11
|
+
never silently run); `on` → build; `off` → skip. Deliverable:
|
|
12
|
+
`mock-examples/<change-slug>/` at the project root (`EXAMPLE.md` + one minimal
|
|
13
|
+
runnable artifact; mocked inputs only) — **NEVER committed**. After the user
|
|
14
|
+
runs it, ONE question: matches expectation? [yes / drift: <describe>]. On
|
|
15
|
+
drift → `DRIFT-FROM` handoff → analyze-mini gap analysis → mini planner patch
|
|
16
|
+
plan → scored dispatch → re-verify → re-offer; **hard cap 2 loops**, then an
|
|
17
|
+
honest unresolved report. Emit `DRIFT loop=<n>` per loop; end-of-phase packet.
|
|
18
|
+
|
|
19
|
+
<!-- /orc:layer -->
|
|
20
|
+
|
|
21
|
+
<!-- orc:layer composed -->
|
|
22
|
+
|
|
23
|
+
## Phase: Mock example (after a green verify, before ship)
|
|
24
|
+
|
|
25
|
+
<!-- diy:when mock_example=off -->
|
|
26
|
+
The mock-example phase is DISABLED in this flow. Skip silently.
|
|
27
|
+
<!-- /diy:when -->
|
|
28
|
+
<!-- diy:when mock_example=ask -->
|
|
29
|
+
After the verify/smoke gate is GREEN and BEFORE any ship action, the offer is
|
|
30
|
+
MANDATORY (never silently skipped, never silently run): follow
|
|
31
|
+
`.claude/skills/_shared/drift-recovery.md` — build
|
|
32
|
+
`mock-examples/<change-slug>/` (EXAMPLE.md + one minimal runnable mocked
|
|
33
|
+
artifact) only on a yes. After the user runs it, ask the one drift question;
|
|
34
|
+
on drift run the `DRIFT-FROM` recovery loop (hard cap 2, then an honest
|
|
35
|
+
unresolved report). `mock-examples/` is NEVER staged by the ship phase.
|
|
36
|
+
<!-- /diy:when -->
|
|
37
|
+
<!-- diy:when mock_example=on -->
|
|
38
|
+
After the verify/smoke gate is GREEN and BEFORE any ship action, build the
|
|
39
|
+
mocked example without asking, per
|
|
40
|
+
`.claude/skills/_shared/drift-recovery.md`: `mock-examples/<change-slug>/`
|
|
41
|
+
(EXAMPLE.md + one minimal runnable mocked artifact; mocked inputs only). Then
|
|
42
|
+
ask the one drift question; on drift run the `DRIFT-FROM` recovery loop (hard
|
|
43
|
+
cap 2). `mock-examples/` is NEVER staged by the ship phase.
|
|
44
|
+
<!-- /diy:when -->
|
|
45
|
+
|
|
46
|
+
<!-- /orc:layer -->
|
|
@@ -1,97 +1,91 @@
|
|
|
1
|
-
# Phase — Plan handoff (id: `plan-handoff`)
|
|
2
|
-
|
|
3
|
-
> **Library file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
A
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
upstream spec) was produced. The gate checks structural integrity, not intent.
|
|
93
|
-
- **Not** a poly-spec path. A poly-spec (`orc-poly:spec`) is split-and-STOP at
|
|
94
|
-
Phase 1 (see SKILL.md) — that is a different input than a per-repo
|
|
95
|
-
planning-output handed here to build.
|
|
96
|
-
|
|
97
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Plan handoff (id: `plan-handoff`)
|
|
2
|
+
|
|
3
|
+
> **Library file** (`orc`, `orc-route`), `core` only: executing another session's plan is one procedure, and /orc-route reads this file to DEFINE a plan — a second definition is drift.
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer core -->
|
|
6
|
+
## Reference — Plan Handoff (executing a plan from another session)
|
|
7
|
+
|
|
8
|
+
The entry contract for the case ORC had no defined path for: **the run input
|
|
9
|
+
IS a plan**, not a request. A plan was produced in one session (or saved to a
|
|
10
|
+
file) and handed to a fresh session to build. Load `plan-handoff.md`
|
|
11
|
+
at Phase 0 the moment you recognise a plan input; it turns a pasted plan into a
|
|
12
|
+
real ORC run instead of an ad-hoc task-by-task improvisation.
|
|
13
|
+
|
|
14
|
+
## Trigger — the input IS a plan
|
|
15
|
+
|
|
16
|
+
Recognise a plan input when the run starts from any of:
|
|
17
|
+
|
|
18
|
+
- **pasted planning-output** — a YAML/markdown block matching
|
|
19
|
+
`schemas/planning-output.md` (has a `tasks:` list with `declared_files`,
|
|
20
|
+
`depends_on`, `grounding[]`);
|
|
21
|
+
- **a `plan-{name}.md` path** the user points at;
|
|
22
|
+
- **an `orc/planner/{name}/` checkpoint** (the planner's "Save & stop" artifact).
|
|
23
|
+
|
|
24
|
+
A plain-language feature request is NOT a plan input — that is ordinary Phase 0
|
|
25
|
+
intake. When in doubt (a prose paragraph with no task structure), treat it as a
|
|
26
|
+
request and run intake normally.
|
|
27
|
+
|
|
28
|
+
## Why this exists (the failure it prevents)
|
|
29
|
+
|
|
30
|
+
A plan built in session A and executed in session B used to improvise: no spine
|
|
31
|
+
load, no trace protocol (the hook bootstrapped a generic `run-*.txt`), no Phase
|
|
32
|
+
1 exit gate re-run, no Phase 2 scoring or pause schedule, no Phase 3 wave
|
|
33
|
+
grouping. The result was a bare SPAWN/RETURN trace, per-task ad-hoc pauses, and
|
|
34
|
+
**phantom-file drift** — the plan declared a file that never (or no longer)
|
|
35
|
+
existed, invisible because the plan's grounding Glob ran at *planning* time in
|
|
36
|
+
the other session and nothing re-ran it here.
|
|
37
|
+
|
|
38
|
+
## Mandatory sequence (never execute a plan task-by-task ad hoc)
|
|
39
|
+
|
|
40
|
+
Do these IN ORDER before any dispatch. Skipping any step is a protocol
|
|
41
|
+
violation.
|
|
42
|
+
|
|
43
|
+
1. **This IS a run — bootstrap it.** Load the spine (`orc/SKILL.md`) and
|
|
44
|
+
`../../_shared/phases/trace.md`; create `log_dir`, write `log_dir/.current` =
|
|
45
|
+
`run-orc-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
46
|
+
in the SAME step (both, or neither — a pointer naming a file that does not
|
|
47
|
+
exist is what splits a run across two files), store `trace_path` in the
|
|
48
|
+
checkpoint. Record `PHASE intake start` into this phase's packet.
|
|
49
|
+
2. **Schema-validate against `schemas/planning-output.md`.** Every task needs
|
|
50
|
+
`declared_files`, `grounding[]`, `depends_on`, `requirements[]`,
|
|
51
|
+
`acceptance[]`, `owns_area`, `spec_ref`, and the `facets` block (Part D). A
|
|
52
|
+
malformed plan → show exactly what field is missing and offer a re-plan via
|
|
53
|
+
`orc-planner` (dispatch it with the miss list). **Never improvise a missing
|
|
54
|
+
field** — a guessed `declared_files` or an invented `facets` vector defeats
|
|
55
|
+
the point of consuming a plan.
|
|
56
|
+
3. **Staleness valve (`plan_head`).** The plan carries `plan_head` — HEAD at
|
|
57
|
+
plan time (the mirror of a requirement-spec's `git_head`). If `plan_head` ≠
|
|
58
|
+
current HEAD, OR the field is absent (a pre-v0.31.0 plan), the grounding
|
|
59
|
+
spot-check in step 4 is **compulsory** and its misses are surfaced, not
|
|
60
|
+
waved through. Matching heads still run the gate — they only lower the
|
|
61
|
+
suspicion.
|
|
62
|
+
4. **Re-run the FULL Phase 1 exit gate in THIS session** (deterministic — the
|
|
63
|
+
checks live in `analyst-gates.md`; emit `GATE` lines): Glob every
|
|
64
|
+
`disposition: exists` path, recompute coverage (no `orphan` requirements),
|
|
65
|
+
cycle detection over `depends_on`, same-file collision over `declared_files`.
|
|
66
|
+
This is the deterministic catch for phantom-file drift — a declared path that
|
|
67
|
+
no longer (or never) existed bounces **before** any dispatch. On a miss,
|
|
68
|
+
offer a targeted re-ground (one `orc-planner` re-dispatch with the miss list)
|
|
69
|
+
or a user correction; never dispatch past an unresolved miss.
|
|
70
|
+
5. **Relay unresolved `open_questions[]`** (Part E) in ONE batch before
|
|
71
|
+
proceeding: blocking questions must be answered; non-blocking show their
|
|
72
|
+
`proposed_default` for tacit approval. A `plan_confidence: low` plan →
|
|
73
|
+
recommend stepping back to `orc-analyze` (the user may override).
|
|
74
|
+
6. **Then the NORMAL pipeline.** Emit `PHASE planning end`, then run Phase 2
|
|
75
|
+
(facet scoring + dispatch-style recommendation + the batch-pause schedule
|
|
76
|
+
question) → Phase 3 (wave grouping — waves are computed regardless of
|
|
77
|
+
dispatch style, see `wave-grouping.md`) → review → verify → ship. **A plan
|
|
78
|
+
input never skips Phase 2/3.** The plan supplied the tasks; the orchestrator
|
|
79
|
+
still owns scoring, waves, and pauses.
|
|
80
|
+
|
|
81
|
+
## Not this
|
|
82
|
+
|
|
83
|
+
- **Not** a re-plan. If the plan validates and grounds clean, DO NOT re-run the
|
|
84
|
+
planner — the plan is authoritative; you are scoring and scheduling it.
|
|
85
|
+
- **Not** a scope re-litigation. Scope was settled where the plan (or its
|
|
86
|
+
upstream spec) was produced. The gate checks structural integrity, not intent.
|
|
87
|
+
- **Not** a poly-spec path. A poly-spec (`orc-poly:spec`) is split-and-STOP at
|
|
88
|
+
Phase 1 (see SKILL.md) — that is a different input than a per-repo
|
|
89
|
+
planning-output handed here to build.
|
|
90
|
+
|
|
91
|
+
<!-- /orc:layer -->
|