@azure-id/orc 0.56.1 → 1.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 +219 -0
- package/README-id.md +49 -107
- package/README.md +694 -719
- package/bin/build-agents.js +18 -11
- package/bin/cli.js +33699 -29855
- package/bin/onboarding-content.js +0 -3
- package/bin/test-run.js +491 -0
- package/bin/verify-contracts.js +4330 -3277
- package/bin/verify-package.js +76 -6
- package/bin/webui/api.js +1201 -1163
- package/bin/webui/app.html +210 -198
- package/bin/webui/css/06-responsive.css +120 -108
- package/bin/webui/css/panels/extra.css +29 -0
- package/bin/webui/css/panels/lanes.css +134 -0
- package/bin/webui/css/panels/settings.css +79 -3
- package/bin/webui/css/panels/wait.css +123 -0
- package/bin/webui/fixtures/extra.js +2036 -1934
- package/bin/webui/fixtures/flow.js +2 -2
- package/bin/webui/fixtures/index.js +510 -486
- package/bin/webui/fixtures/lanes.js +218 -0
- package/bin/webui/fixtures/settings.js +261 -34
- package/bin/webui/fixtures/stats.js +3 -3
- package/bin/webui/fixtures/wait.js +97 -0
- package/bin/webui/i18n/TERMS.md +135 -134
- package/bin/webui/i18n/en/extra.json +345 -313
- package/bin/webui/i18n/en/lanes.json +29 -0
- package/bin/webui/i18n/en/nav.json +21 -19
- package/bin/webui/i18n/en/overview.json +2 -0
- package/bin/webui/i18n/en/settings.json +16 -5
- package/bin/webui/i18n/en/wait.json +41 -0
- package/bin/webui/i18n/id/extra.json +345 -313
- package/bin/webui/i18n/id/lanes.json +29 -0
- package/bin/webui/i18n/id/nav.json +21 -19
- package/bin/webui/i18n/id/overview.json +2 -0
- package/bin/webui/i18n/id/settings.json +15 -4
- package/bin/webui/i18n/id/wait.json +41 -0
- package/bin/webui/js/01-i18n.js +151 -149
- package/bin/webui/js/panels/extra.js +3199 -3011
- package/bin/webui/js/panels/lanes.js +259 -0
- package/bin/webui/js/panels/overview.js +10 -0
- package/bin/webui/js/panels/settings.js +149 -3
- package/bin/webui/js/panels/wait.js +253 -0
- package/package.json +39 -39
- package/templates/agents/MODEL-MAPPING.md +23 -35
- package/templates/agents/orc-executor-opus-4-7-high.md +1 -1
- package/templates/agents/orc-executor-opus-4-7-med.md +1 -1
- package/templates/agents/orc-executor-opus-4-8-high.md +1 -1
- package/templates/agents/orc-executor-opus-5-high.md +1 -1
- package/templates/agents/orc-executor-opus-5-low.md +1 -1
- package/templates/agents/orc-executor-opus-5-med.md +1 -1
- package/templates/agents/orc-retro-opus-5-med.md +73 -73
- package/templates/agents/orc-retro-sonnet-5-high.md +72 -72
- package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -107
- package/templates/commands/orc-route.md +1 -1
- package/templates/commands/orc-wait.md +19 -0
- package/templates/commands/orc.md +1 -1
- package/templates/hooks/orc-statusline.js +39 -0
- package/templates/skills/_shared/README.md +7 -3
- package/templates/skills/_shared/config-precedence.md +198 -0
- package/templates/skills/_shared/drift-recovery.md +1 -1
- package/templates/skills/_shared/extra-dispatch.md +159 -7
- package/templates/skills/_shared/interview.md +1 -1
- package/templates/skills/_shared/opus5-only.md +9 -7
- package/templates/skills/_shared/phases/README.md +82 -0
- package/templates/skills/{orc/references → _shared/phases}/analyst-gates.md +15 -3
- package/templates/skills/_shared/phases/execution.md +143 -0
- package/templates/skills/{orc/references → _shared/phases}/house-rules.md +13 -1
- package/templates/skills/{orc/references → _shared/phases}/intake.md +15 -2
- package/templates/skills/_shared/phases/mock-example.md +56 -0
- package/templates/skills/{orc/references → _shared/phases}/plan-handoff.md +16 -3
- package/templates/skills/_shared/phases/planning.md +135 -0
- package/templates/skills/_shared/phases/preflight.md +98 -0
- package/templates/skills/_shared/phases/review.md +53 -0
- package/templates/skills/_shared/phases/scoring.md +65 -0
- package/templates/skills/{orc/references → _shared/phases}/security-checklist.md +12 -1
- package/templates/skills/_shared/phases/security.md +55 -0
- package/templates/skills/_shared/phases/ship.md +88 -0
- package/templates/skills/{orc/references/stop-and-resume.md → _shared/phases/stop-resume.md} +169 -160
- package/templates/skills/_shared/phases/summary.md +48 -0
- package/templates/skills/_shared/phases/testgen.md +51 -0
- package/templates/skills/{orc/references/trace-protocol.md → _shared/phases/trace.md} +49 -6
- package/templates/skills/_shared/phases/verify.md +70 -0
- package/templates/skills/{orc/references → _shared/phases}/wave-grouping.md +14 -2
- package/templates/skills/{orc/references → _shared/phases}/wiki-consult.md +13 -1
- package/templates/skills/_shared/read-ladder.md +48 -0
- package/templates/skills/_shared/wait.md +240 -0
- package/templates/skills/context-combiner/SKILL.md +214 -187
- package/templates/skills/orc/README.md +148 -150
- package/templates/skills/orc/SKILL.md +75 -358
- package/templates/skills/orc/config.md +137 -389
- package/templates/skills/orc/examples/full-run-mock.md +1 -1
- package/templates/skills/orc/references/effort-and-mode.md +16 -18
- package/templates/skills/orc/references/phases/intake.md +47 -0
- package/templates/skills/orc/references/phases/integration.md +19 -0
- package/templates/skills/orc/references/preflight-report.md +4 -4
- package/templates/skills/orc/references/ultra-mode.md +117 -123
- package/templates/skills/orc/schemas/planning-output.md +279 -279
- package/templates/skills/orc/subskills/orc-planner/SKILL.md +260 -264
- package/templates/skills/orc/subskills/orc-pr/stack-gate.md +4 -1
- package/templates/skills/orc-aftermath/SKILL.md +158 -136
- package/templates/skills/orc-analyze/SKILL.md +252 -220
- package/templates/skills/orc-analyze/references/branching.md +51 -51
- package/templates/skills/orc-analyze/references/thin-input.md +1 -1
- package/templates/skills/orc-analyze-mini/SKILL.md +128 -112
- package/templates/skills/orc-boundary/SKILL.md +249 -208
- package/templates/skills/orc-brainstorm/SKILL.md +377 -339
- package/templates/skills/orc-budget/SKILL.md +248 -225
- package/templates/skills/orc-challenge/README.md +1 -1
- package/templates/skills/orc-challenge/SKILL.md +298 -255
- package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
- package/templates/skills/orc-claude/SKILL.md +221 -199
- package/templates/skills/orc-diy/README.md +2 -1
- package/templates/skills/orc-diy/SKILL.md +132 -68
- package/templates/skills/orc-diy/references/blocks/analyze.md +1 -1
- package/templates/skills/orc-diy/references/compile.md +21 -7
- package/templates/skills/orc-diy/references/flow-schema.md +2 -2
- package/templates/skills/orc-doc/SKILL.md +49 -7
- package/templates/skills/orc-explain/SKILL.md +24 -0
- package/templates/skills/orc-export/SKILL.md +31 -5
- package/templates/skills/orc-fast/SKILL.md +218 -185
- package/templates/skills/orc-grill/SKILL.md +238 -207
- package/templates/skills/orc-handoff/SKILL.md +223 -204
- package/templates/skills/orc-learn/SKILL.md +181 -156
- package/templates/skills/orc-mini/SKILL.md +47 -24
- package/templates/skills/orc-pact/SKILL.md +255 -218
- package/templates/skills/orc-pattern/SKILL.md +154 -124
- package/templates/skills/orc-poly/SKILL.md +242 -216
- package/templates/skills/orc-poly/references/gather.md +1 -1
- package/templates/skills/orc-pr-driver/SKILL.md +196 -167
- package/templates/skills/orc-pr-driver/references/orc-run-split.md +1 -1
- package/templates/skills/orc-pr-setup/SKILL.md +212 -184
- package/templates/skills/orc-quick/README.md +2 -2
- package/templates/skills/orc-quick/SKILL.md +51 -13
- package/templates/skills/orc-quick/references/dispatch-gate.md +2 -3
- package/templates/skills/orc-retro/SKILL.md +249 -222
- package/templates/skills/orc-retro/examples/retro-mock.md +171 -171
- package/templates/skills/orc-route/SKILL.md +188 -165
- package/templates/skills/orc-verify/SKILL.md +103 -84
- package/templates/skills/orc-wait/SKILL.md +163 -0
- package/templates/skills/orc-wiki/SKILL.md +60 -206
- package/templates/skills/orc-wiki/references/phases/phase-0.md +71 -0
- package/templates/skills/orc-wiki/references/phases/phase-1.md +35 -0
- package/templates/skills/orc-wiki/references/phases/phase-2.md +52 -0
- package/templates/skills/orc-wiki/references/phases/phase-3.md +57 -0
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +36 -0
- package/templates/agents/orc-advisor-fable-5.md +0 -50
- package/templates/agents/orc-analyst-fable-5.md +0 -115
- package/templates/agents/orc-judge-fable-5.md +0 -79
- package/templates/agents/orc-planner-fable-5.md +0 -152
- package/templates/agents/orc-reviewer-fable-5.md +0 -57
- package/templates/skills/_shared/fable5-override.md +0 -56
- package/templates/skills/orc-diy/references/blocks/execution.md +0 -42
- package/templates/skills/orc-diy/references/blocks/mock-example.md +0 -22
- package/templates/skills/orc-diy/references/blocks/planning.md +0 -34
- package/templates/skills/orc-diy/references/blocks/review.md +0 -18
- package/templates/skills/orc-diy/references/blocks/scoring.md +0 -16
- package/templates/skills/orc-diy/references/blocks/security.md +0 -25
- package/templates/skills/orc-diy/references/blocks/ship.md +0 -25
- package/templates/skills/orc-diy/references/blocks/summary.md +0 -18
- package/templates/skills/orc-diy/references/blocks/testgen.md +0 -17
- package/templates/skills/orc-diy/references/blocks/trace.md +0 -28
- package/templates/skills/orc-diy/references/blocks/verify.md +0 -25
|
@@ -1,124 +1,154 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orc-pattern
|
|
3
|
-
description: >
|
|
4
|
-
Learn and cache a project's real code conventions per language so ORC executors
|
|
5
|
-
write code that MATCHES the existing codebase instead of a generic template.
|
|
6
|
-
Use for "/orc-pattern", "learn my code pattern", "codify conventions", or when
|
|
7
|
-
ORC detects frontend/backend work with no cached pattern. Reconciles a generic
|
|
8
|
-
best-practice playbook against the project's actual most-recently-modified files:
|
|
9
|
-
the project's CONVENTIONS win, security/correctness INVARIANTS are always kept,
|
|
10
|
-
conflicts are flagged. Writes .claude/orc/patterns/<lang>-pattern.md, reused by
|
|
11
|
-
every future run. EXPENSIVE scan → consent-gated inside /orc (config
|
|
12
|
-
pattern_findings), always allowed on explicit /orc-pattern. The orchestrator
|
|
13
|
-
dispatches the codifier subagent — it never codifies itself.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# ORC-PATTERN (code-pattern codifier)
|
|
17
|
-
|
|
18
|
-
Turns a generic per-language playbook + the project's real files into a
|
|
19
|
-
**reconciled project pattern** that executors follow. This prevents the generic
|
|
20
|
-
playbook from fighting an established (often better) house style and producing
|
|
21
|
-
inconsistent, un-mergeable code.
|
|
22
|
-
|
|
23
|
-
This is a THIN SPINE. Load a playbook (`references/<domain>-<lang>.md`) and the
|
|
24
|
-
codifier ONLY for the languages actually in play — never preload all of them.
|
|
25
|
-
|
|
26
|
-
## The two rule classes (the whole point)
|
|
27
|
-
|
|
28
|
-
Every playbook splits into two kinds of rules, reconciled differently:
|
|
29
|
-
|
|
30
|
-
| Class | Examples | On conflict with the project |
|
|
31
|
-
|-------|----------|------------------------------|
|
|
32
|
-
| **Conventions** (style/shape) | folder layout, naming, DI style, RSC-by-default, delivery order | **PROJECT WINS** — match the codebase, even if the playbook disagrees |
|
|
33
|
-
| **Invariants** (correctness/security) | no plain-text passwords, no SQL string-interpolation, no secrets/stack-traces in responses, effect cleanup, no index-as-key | **ALWAYS APPLIED** — a project violating these is buggy, not stylistically different |
|
|
34
|
-
|
|
35
|
-
Reconciliation is therefore cheap: you only ever override the *soft* half.
|
|
36
|
-
|
|
37
|
-
## Hard rules
|
|
38
|
-
|
|
39
|
-
1. **You never codify yourself — you spawn.** Dispatch
|
|
40
|
-
`orc-pattern-codifier-sonnet-5-high` (Opus for large/messy repos), or
|
|
41
|
-
`orc-pattern-codifier-opus-5-med` when `opus5_only: true` — that mode FORCES
|
|
42
|
-
it, see `../_shared/opus5-only.md`. The codifier
|
|
43
|
-
reads and returns the reconciled pattern; YOU write it to the cache.
|
|
44
|
-
2. **Cache lives at `.claude/orc/patterns/<lang>-pattern.md`** (project `.claude/`,
|
|
45
|
-
OUTSIDE `templates/` — `orc update` never clobbers it). One file per language.
|
|
46
|
-
Consumers detect it with the deterministic probe `orc pattern status <lang>`
|
|
47
|
-
(exit 0 = cached), never an ad-hoc `find` — the hidden `.claude/` dir
|
|
48
|
-
false-negatives a raw search.
|
|
49
|
-
3. **Canonical pattern on inconsistency = most-recently-modified files win.** They
|
|
50
|
-
show where the codebase is heading (correct for future refactor use). Flag any
|
|
51
|
-
real ambiguity to the user ONCE, don't guess silently.
|
|
52
|
-
4. **Greenfield (no existing code for that language) → no reconcile.** Emit the
|
|
53
|
-
pure generic playbook as the pattern, marked `source: generic`.
|
|
54
|
-
5. **Invariants are never dropped**, even when a conflicting convention is kept.
|
|
55
|
-
|
|
56
|
-
## Three entry points, one cache
|
|
57
|
-
|
|
58
|
-
1. **Lazy** — the `/orc` dispatch step, on a cache miss (governed by config
|
|
59
|
-
`pattern_findings: ask | on | off`, default `ask`; see `../orc/config.md`).
|
|
60
|
-
2. **Eager** — invoked by `orc-wiki` when `orc_wiki_pattern_findings: on`: codify
|
|
61
|
-
ALL detected languages as a byproduct of the wiki's full scan (rides under the
|
|
62
|
-
wiki's existing scan-consent — no separate ask).
|
|
63
|
-
3. **Manual** — `/orc-pattern` (all detected langs, or a named one),
|
|
64
|
-
`/orc-pattern --refresh` to force-regenerate.
|
|
65
|
-
|
|
66
|
-
## Behavior trace (
|
|
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
|
-
- **Cache
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: orc-pattern
|
|
3
|
+
description: >
|
|
4
|
+
Learn and cache a project's real code conventions per language so ORC executors
|
|
5
|
+
write code that MATCHES the existing codebase instead of a generic template.
|
|
6
|
+
Use for "/orc-pattern", "learn my code pattern", "codify conventions", or when
|
|
7
|
+
ORC detects frontend/backend work with no cached pattern. Reconciles a generic
|
|
8
|
+
best-practice playbook against the project's actual most-recently-modified files:
|
|
9
|
+
the project's CONVENTIONS win, security/correctness INVARIANTS are always kept,
|
|
10
|
+
conflicts are flagged. Writes .claude/orc/patterns/<lang>-pattern.md, reused by
|
|
11
|
+
every future run. EXPENSIVE scan → consent-gated inside /orc (config
|
|
12
|
+
pattern_findings), always allowed on explicit /orc-pattern. The orchestrator
|
|
13
|
+
dispatches the codifier subagent — it never codifies itself.
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# ORC-PATTERN (code-pattern codifier)
|
|
17
|
+
|
|
18
|
+
Turns a generic per-language playbook + the project's real files into a
|
|
19
|
+
**reconciled project pattern** that executors follow. This prevents the generic
|
|
20
|
+
playbook from fighting an established (often better) house style and producing
|
|
21
|
+
inconsistent, un-mergeable code.
|
|
22
|
+
|
|
23
|
+
This is a THIN SPINE. Load a playbook (`references/<domain>-<lang>.md`) and the
|
|
24
|
+
codifier ONLY for the languages actually in play — never preload all of them.
|
|
25
|
+
|
|
26
|
+
## The two rule classes (the whole point)
|
|
27
|
+
|
|
28
|
+
Every playbook splits into two kinds of rules, reconciled differently:
|
|
29
|
+
|
|
30
|
+
| Class | Examples | On conflict with the project |
|
|
31
|
+
|-------|----------|------------------------------|
|
|
32
|
+
| **Conventions** (style/shape) | folder layout, naming, DI style, RSC-by-default, delivery order | **PROJECT WINS** — match the codebase, even if the playbook disagrees |
|
|
33
|
+
| **Invariants** (correctness/security) | no plain-text passwords, no SQL string-interpolation, no secrets/stack-traces in responses, effect cleanup, no index-as-key | **ALWAYS APPLIED** — a project violating these is buggy, not stylistically different |
|
|
34
|
+
|
|
35
|
+
Reconciliation is therefore cheap: you only ever override the *soft* half.
|
|
36
|
+
|
|
37
|
+
## Hard rules
|
|
38
|
+
|
|
39
|
+
1. **You never codify yourself — you spawn.** Dispatch
|
|
40
|
+
`orc-pattern-codifier-sonnet-5-high` (Opus for large/messy repos), or
|
|
41
|
+
`orc-pattern-codifier-opus-5-med` when `opus5_only: true` — that mode FORCES
|
|
42
|
+
it, see `../_shared/opus5-only.md`. The codifier
|
|
43
|
+
reads and returns the reconciled pattern; YOU write it to the cache.
|
|
44
|
+
2. **Cache lives at `.claude/orc/patterns/<lang>-pattern.md`** (project `.claude/`,
|
|
45
|
+
OUTSIDE `templates/` — `orc update` never clobbers it). One file per language.
|
|
46
|
+
Consumers detect it with the deterministic probe `orc pattern status <lang>`
|
|
47
|
+
(exit 0 = cached), never an ad-hoc `find` — the hidden `.claude/` dir
|
|
48
|
+
false-negatives a raw search.
|
|
49
|
+
3. **Canonical pattern on inconsistency = most-recently-modified files win.** They
|
|
50
|
+
show where the codebase is heading (correct for future refactor use). Flag any
|
|
51
|
+
real ambiguity to the user ONCE, don't guess silently.
|
|
52
|
+
4. **Greenfield (no existing code for that language) → no reconcile.** Emit the
|
|
53
|
+
pure generic playbook as the pattern, marked `source: generic`.
|
|
54
|
+
5. **Invariants are never dropped**, even when a conflicting convention is kept.
|
|
55
|
+
|
|
56
|
+
## Three entry points, one cache
|
|
57
|
+
|
|
58
|
+
1. **Lazy** — the `/orc` dispatch step, on a cache miss (governed by config
|
|
59
|
+
`pattern_findings: ask | on | off`, default `ask`; see `../orc/config.md`).
|
|
60
|
+
2. **Eager** — invoked by `orc-wiki` when `orc_wiki_pattern_findings: on`: codify
|
|
61
|
+
ALL detected languages as a byproduct of the wiki's full scan (rides under the
|
|
62
|
+
wiki's existing scan-consent — no separate ask).
|
|
63
|
+
3. **Manual** — `/orc-pattern` (all detected langs, or a named one),
|
|
64
|
+
`/orc-pattern --refresh` to force-regenerate.
|
|
65
|
+
|
|
66
|
+
## Behavior trace (always on)
|
|
67
|
+
|
|
68
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
|
|
69
|
+
the file and the layers). Lane token `pattern`, tier **Single-dispatch** —
|
|
70
|
+
exactly ONE end-of-run packet, dispatched solo before `.current` is deleted.
|
|
71
|
+
At run start write `log_dir/.current` = `run-pattern-<slug>-<DDMMYY>-<HHMMSS>.txt` AND
|
|
72
|
+
`touch the trace file` of that name in the SAME step.
|
|
73
|
+
Nothing else about the protocol is restated here; a phase that ends with
|
|
74
|
+
`zero new trace lines is a protocol violation`.
|
|
75
|
+
|
|
76
|
+
## Phases
|
|
77
|
+
|
|
78
|
+
`orc lane phases orc-pattern --json` is this lane's pipeline: the ordered list, where
|
|
79
|
+
each phase lives, and how much of it to read. **The CLI owns the order** — never
|
|
80
|
+
derive it from the headings below, and never renumber or rename one without the
|
|
81
|
+
manifest, because a `read: section` pointer names a HEADING and a renamed heading
|
|
82
|
+
is a pointer into nothing.
|
|
83
|
+
|
|
84
|
+
## Phase 0 — Entry & auto-branch (on /orc-pattern)
|
|
85
|
+
|
|
86
|
+
Detect the project's frontend/backend languages from deps + file extensions
|
|
87
|
+
(`references/INDEX.md` has the detection map). `postgres` is a **cross-cutting**
|
|
88
|
+
key: detected from a Postgres driver/ORM in deps, it co-applies with the
|
|
89
|
+
framework lang (its own `postgres-pattern.md` cache) rather than replacing it —
|
|
90
|
+
codify it like any other detected key. Then branch **per language**:
|
|
91
|
+
- **Cache miss** (no `patterns/<lang>-pattern.md`) → codify (Phase 1).
|
|
92
|
+
- **Cache hit, no drift** → report "already learned (pattern_version …)"; skip
|
|
93
|
+
unless `--refresh`.
|
|
94
|
+
- **Cache hit, DRIFT** (current files diverge from the doc's recorded fingerprint)
|
|
95
|
+
→ auto-refresh: re-codify. Drift detection is a cheap structural fingerprint of
|
|
96
|
+
a few representative files, NOT a full re-scan.
|
|
97
|
+
|
|
98
|
+
## Phase 1 — Codify (spawned subagent, per language)
|
|
99
|
+
|
|
100
|
+
For each language needing codification, dispatch the codifier with the slice:
|
|
101
|
+
- `lang`, `domain` (FE|BE), the generic playbook path
|
|
102
|
+
(`references/<domain>-<lang>.md`), and the sample set = the most-recently-modified
|
|
103
|
+
real files for that language (use `git log`/mtime; cap ~8 files).
|
|
104
|
+
|
|
105
|
+
The codifier returns the reconciled pattern per `schemas/pattern-doc.md`
|
|
106
|
+
(Conventions [project-won] + Invariants [always] + Conflicts flagged + an
|
|
107
|
+
optional `validation_gate[]` [when the playbook defines one] + a
|
|
108
|
+
`fingerprint` + a `pattern_version` = `<date>-<letter>`). Validate the return, then
|
|
109
|
+
YOU write `.claude/orc/patterns/<lang>-pattern.md` — include the Validation-gate
|
|
110
|
+
section when the return carries one. The gate flows downstream as part of the
|
|
111
|
+
injected `pattern` (executors satisfy it; the verifier folds its enforceable
|
|
112
|
+
lines into the acceptance criteria). Enforceable-vs-advisory is decided at
|
|
113
|
+
reconciliation per the schema's measurability rule — never downstream.
|
|
114
|
+
|
|
115
|
+
## Phase 2 — Report
|
|
116
|
+
|
|
117
|
+
Per language: written / skipped / refreshed, `pattern_version`, and any flagged
|
|
118
|
+
conflicts or ambiguity the user should resolve. Never run tests; never change
|
|
119
|
+
project code — this skill only writes the pattern cache.
|
|
120
|
+
|
|
121
|
+
## Agnostic fallback (when NO pattern is generated)
|
|
122
|
+
|
|
123
|
+
If the user declines codification (config `pattern_findings: off`, or "no" at the
|
|
124
|
+
`/orc` ask), executors use the **language-agnostic** path: no codifier, no scan —
|
|
125
|
+
the executor applies the playbook **invariants** (still blocking) and imitates the
|
|
126
|
+
1–2 neighboring files it already reads for its slice. Cheap by construction,
|
|
127
|
+
persists nothing. See `../orc/config.md`.
|
|
128
|
+
|
|
129
|
+
## Config
|
|
130
|
+
|
|
131
|
+
**ONE resolver, and it is not you:** `orc lane config orc-pattern --json`. Obey
|
|
132
|
+
`effective`, print every line in `announce[]` VERBATIM at preflight, and honour
|
|
133
|
+
`stops[]` before wave 1. Never re-derive a value, a precedence or an inertness
|
|
134
|
+
from `.claude/orc.config.yaml` — a key this lane does not read is not in the
|
|
135
|
+
answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
|
|
136
|
+
the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
|
|
137
|
+
documented defaults, out loud. Priorities and families:
|
|
138
|
+
`../_shared/config-precedence.md`.
|
|
139
|
+
|
|
140
|
+
## Calls
|
|
141
|
+
|
|
142
|
+
**ONE catalogue, and it is not you:** `orc lane calls orc-pattern --json` names every
|
|
143
|
+
CLI call this lane makes, each with its exit-code contract, its cost, when to run
|
|
144
|
+
it, and what an EMPTY answer means. Never invent a spelling, never re-word an
|
|
145
|
+
exit code, and never re-derive a state word — the CLI's state words are the only
|
|
146
|
+
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
147
|
+
a failure**. A call the answer does not name is a call this lane does not make.
|
|
148
|
+
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
149
|
+
command you are about to run, out loud, before running it.
|
|
150
|
+
|
|
151
|
+
## Waiting mid-run (`/orc-wait`)
|
|
152
|
+
|
|
153
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
154
|
+
Checkpoint **none** · safe point **single dispatch**. Nothing here to checkpoint, so all three modes behave identically — say so rather than asking. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|