@azure-id/orc 1.9.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +390 -0
- package/README-id.md +20 -36
- package/README.md +24 -34
- package/bin/build-agents.js +206 -109
- package/bin/cli.js +760 -62
- package/bin/gotcha-import.js +1081 -0
- package/bin/gotcha.js +1286 -0
- package/bin/graph-query.js +1 -1
- package/bin/graph.js +717 -717
- package/bin/habit.js +1453 -0
- package/bin/mockrun-catalog.js +281 -276
- package/bin/onboarding-content.js +4 -4
- package/bin/pricing.json +207 -200
- package/bin/run-undo.js +398 -0
- package/bin/trace-write.js +657 -0
- package/bin/verify-contracts.js +527 -81
- package/bin/verify-package.js +58 -11
- package/bin/webui/api.js +26 -0
- package/bin/webui/app.html +239 -232
- package/bin/webui/css/00-tokens.css +110 -92
- package/bin/webui/css/04-motion.css +249 -152
- package/bin/webui/css/06-responsive.css +203 -178
- package/bin/webui/css/panels/behaviour.css +205 -0
- package/bin/webui/css/panels/knowledge.css +563 -116
- package/bin/webui/fixtures/behaviour.js +532 -0
- package/bin/webui/fixtures/extra.js +2036 -2036
- package/bin/webui/fixtures/hookui.js +5 -5
- package/bin/webui/fixtures/index.js +34 -0
- package/bin/webui/fixtures/knowledge.js +7 -1
- package/bin/webui/fixtures/settings.js +305 -305
- package/bin/webui/fixtures/stats.js +16 -0
- package/bin/webui/i18n/en/behaviour.json +143 -0
- package/bin/webui/i18n/en/knowledge.json +117 -2
- package/bin/webui/i18n/en/nav.json +25 -24
- package/bin/webui/i18n/en/tour.json +37 -35
- package/bin/webui/i18n/id/behaviour.json +143 -0
- package/bin/webui/i18n/id/knowledge.json +117 -2
- package/bin/webui/i18n/id/nav.json +25 -24
- package/bin/webui/i18n/id/tour.json +37 -35
- package/bin/webui/js/01-i18n.js +155 -154
- 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 +1022 -0
- package/bin/webui/js/panels/knowledge.js +552 -7
- package/bin/webui/js/panels/overview.js +13 -4
- package/mock-run/INDEX.md +109 -107
- package/mock-run/context-combiner.md +100 -100
- package/mock-run/gotcha-import.md +118 -0
- package/mock-run/habits.md +129 -0
- package/mock-run/orc-budget.md +534 -534
- package/mock-run/orc-challenge-council.md +262 -262
- package/mock-run/orc-quick.md +6 -1
- package/mock-run/orc-ultra.md +103 -103
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +49 -49
- package/templates/agents/orc-advisor-opus-5-xhigh.md +50 -56
- package/templates/agents/orc-analyze-mini-opus-5-med.md +55 -60
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +55 -58
- package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -75
- package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -110
- package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -114
- package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -112
- package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -132
- package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -109
- package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -109
- package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -90
- package/templates/agents/orc-claude-writer-opus-4-8-high.md +48 -53
- package/templates/agents/orc-claude-writer-opus-5-med.md +48 -55
- package/templates/agents/orc-context-combiner-opus-5-high.md +78 -88
- package/templates/agents/orc-doc-checker-opus-5-low.md +108 -108
- package/templates/agents/orc-doc-writer-opus-5-med.md +134 -134
- 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 +15 -7
- package/templates/agents/orc-executor-opus-5-low.md +15 -7
- package/templates/agents/orc-executor-opus-5-med.md +15 -7
- 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 +14 -6
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
- package/templates/agents/orc-judge-opus-5-xhigh.md +81 -85
- package/templates/agents/orc-learn-writer-opus-5-low.md +67 -73
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +58 -65
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
- package/templates/agents/orc-planner-mini-opus-5-med.md +4 -7
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
- package/templates/agents/orc-planner-opus-5-med.md +157 -160
- package/templates/agents/orc-recon-opus-5-low.md +3 -10
- package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
- package/templates/agents/orc-retro-opus-5-med.md +8 -10
- package/templates/agents/orc-retro-sonnet-5-high.md +6 -7
- package/templates/agents/orc-reviewer-opus-5-med.md +96 -60
- package/templates/agents/orc-scout-opus-5-low.md +35 -40
- package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
- package/templates/agents/orc-system-analyst-opus-5-high.md +115 -120
- package/templates/agents/orc-test-author-opus-5-med.md +70 -71
- package/templates/agents/orc-test-designer-opus-5-high.md +158 -158
- package/templates/agents/orc-test-interpreter-opus-5-low.md +130 -130
- package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
- package/templates/agents/orc-verifier-opus-5-med.md +77 -69
- package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +74 -79
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +74 -81
- 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-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-ultra.md +17 -17
- package/templates/commands/orc-verify.md +11 -11
- package/templates/hooks/README.md +36 -2
- package/templates/hooks/orc-effort-guard.js +178 -178
- package/templates/hooks/orc-session-hook.js +264 -0
- package/templates/hooks/orc-statusline.js +9 -7
- package/templates/skills/_shared/README.md +9 -0
- package/templates/skills/_shared/code-graph.md +48 -56
- package/templates/skills/_shared/config-precedence.md +200 -198
- package/templates/skills/_shared/extra-dispatch.md +1331 -1346
- package/templates/skills/_shared/gotchas.md +228 -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 +8 -8
- package/templates/skills/_shared/phases/README.md +142 -83
- package/templates/skills/_shared/phases/analyst-gates.md +125 -136
- 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 +23 -27
- 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 +433 -0
- package/templates/skills/_shared/phases/trace.md +136 -367
- 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 +79 -0
- package/templates/skills/_shared/smoke-gate.md +46 -28
- package/templates/skills/context-combiner/SKILL.md +16 -45
- package/templates/skills/context-combiner/schemas/combined-report.md +78 -78
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +41 -69
- package/templates/skills/orc/config.md +9 -9
- package/templates/skills/orc/examples/full-run-mock.md +73 -73
- package/templates/skills/orc/references/effort-and-mode.md +222 -222
- 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 +10 -11
- package/templates/skills/orc/references/ultra-mode.md +11 -9
- 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-planner/SKILL.md +2 -2
- package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -121
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +35 -76
- 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 +34 -45
- 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 +32 -68
- package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -42
- package/templates/skills/orc-analyze/schemas/report-audit.md +84 -83
- package/templates/skills/orc-analyze/schemas/report-prose.md +64 -63
- package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -78
- package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
- package/templates/skills/orc-challenge/README.md +142 -142
- package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -273
- package/templates/skills/orc-challenge/references/council.md +315 -315
- package/templates/skills/orc-challenge/references/intake.md +171 -171
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-diy/README.md +174 -143
- package/templates/skills/orc-diy/SKILL.md +23 -74
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
- package/templates/skills/orc-diy/references/flow-schema.md +1 -1
- package/templates/skills/orc-doc/README.md +229 -229
- package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -325
- package/templates/skills/orc-doc/references/chunking.md +527 -527
- package/templates/skills/orc-fast/SKILL.md +45 -73
- package/templates/skills/orc-judge/SKILL.md +77 -82
- package/templates/skills/orc-learn/SKILL.md +14 -14
- package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -61
- package/templates/skills/orc-mini/SKILL.md +65 -113
- 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 +43 -2
- package/templates/skills/orc-quick/SKILL.md +76 -107
- package/templates/skills/orc-quick/references/dispatch-gate.md +16 -5
- package/templates/skills/orc-quick/references/gh-mode.md +48 -1
- package/templates/skills/orc-quick/references/look.md +3 -1
- package/templates/skills/orc-retro/SKILL.md +19 -18
- package/templates/skills/orc-retro/examples/retro-mock.md +1 -1
- 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 +21 -39
- package/templates/skills/orc-verify/examples/verify-mock.md +33 -33
- package/templates/skills/orc-wait/SKILL.md +156 -163
- package/templates/skills/orc-wiki/references/extra.md +1 -1
- package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-2.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +1 -6
|
@@ -1,65 +1,55 @@
|
|
|
1
|
-
# Phase — Effort & scoring (id: `scoring`)
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{{score_table}}
|
|
57
|
-
<!-- /diy:when -->
|
|
58
|
-
<!-- diy:when scoring=off -->
|
|
59
|
-
Scoring is DISABLED in this flow. Skip the rubric entirely: EVERY execution
|
|
60
|
-
task dispatches to **{{fixed_executor}}**. Wave grouping, declared-files
|
|
61
|
-
conflict rules, and slice construction are unchanged — scoring off changes
|
|
62
|
-
model selection only, never scheduling.
|
|
63
|
-
<!-- /diy:when -->
|
|
64
|
-
|
|
65
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Effort & scoring (id: `scoring`)
|
|
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
|
+
## Effort, dispatch style, scoring (load ../../orc/references/effort-and-mode.md)
|
|
8
|
+
|
|
9
|
+
Emit `PHASE scoring start`. Refine effort; recommend **sequential** vs
|
|
10
|
+
**parallel** dispatch (worktrees for high-effort independent features) — user
|
|
11
|
+
confirms (H `orc.phase-2.execution`). Dispatch style is **intra-wave concurrency only**: waves are computed
|
|
12
|
+
regardless of style (sequential runs have waves too, see wave-grouping.md), so
|
|
13
|
+
the batch pause always binds to wave numbers. **Batch-pause schedule (deterministic, not a cadence hint):** the plan
|
|
14
|
+
has K waves — ask (H `orc.phase-2.pause`) "pause after every wave / every 2nd / run straight through?"
|
|
15
|
+
and SHOW the resulting stop list ("will pause after waves [list]"); a 2-wave
|
|
16
|
+
plan plainly offers "pause after wave 1". Store it as `pause_schedule`, recompute
|
|
17
|
+
each wave's `is_batch_pause` (last wave never pauses). **Facet-validation gate
|
|
18
|
+
(deterministic):** recompute `breadth` + `fan_in`/`fan_out` from the plan; a
|
|
19
|
+
mismatch or an uncited `risk` entry bounces the plan (grounding mechanics).
|
|
20
|
+
**Score every task** from its `facets` via the fixed formula, map to the model
|
|
21
|
+
ladder, show the facet vector + arithmetic table, and emit `SCORE task=<id>
|
|
22
|
+
score=<n> band=<band> model=<m> facets=<vector> :: <reason>` per task; a score
|
|
23
|
+
override needs a written reason (logged). **With `extra_enabled`** the table gains
|
|
24
|
+
a `via` column and its head can name TWO tables (effort-and-mode.md); a foreign
|
|
25
|
+
task's `SCORE` appends `via=extra:<profile>` and `model=` is the FOREIGN model id.
|
|
26
|
+
**Cited-risk hold-back (deterministic, beside the facet gate):** a foreign-routed
|
|
27
|
+
task with a non-empty `risk[]` is HELD BACK to its Claude band (`extra_risk_tasks`
|
|
28
|
+
defaults to `off`) and every one is LISTED with its cited risk — a silently
|
|
29
|
+
held-back task is indistinguishable from a forgotten one. Use the wiki's "Notes for planning" to sharpen
|
|
30
|
+
core/isolated + risk factors. **Tag each task's pattern domain+language**
|
|
31
|
+
(+ secondary `db: postgres`) per `../../orc/references/pattern-gate.md`. Ask: "Any
|
|
32
|
+
anticipated escalations, or run straight through?" Emit `PHASE scoring end`.
|
|
33
|
+
|
|
34
|
+
<!-- /orc:layer -->
|
|
35
|
+
|
|
36
|
+
<!-- orc:layer composed -->
|
|
37
|
+
|
|
38
|
+
## Phase: Task scoring → executor selection
|
|
39
|
+
|
|
40
|
+
<!-- diy:when scoring=on -->
|
|
41
|
+
Score each task 0–100 with the full lane's rubric (see the scoring section of
|
|
42
|
+
`.claude/skills/orc/SKILL.md`), then dispatch the executor agent from THIS
|
|
43
|
+
compiled table — it is already clipped to this flow's session tier; never
|
|
44
|
+
substitute a preset from `config.md`:
|
|
45
|
+
|
|
46
|
+
{{score_table}}
|
|
47
|
+
<!-- /diy:when -->
|
|
48
|
+
<!-- diy:when scoring=off -->
|
|
49
|
+
Scoring is DISABLED in this flow. Skip the rubric entirely: EVERY execution
|
|
50
|
+
task dispatches to **{{fixed_executor}}**. Wave grouping, declared-files
|
|
51
|
+
conflict rules, and slice construction are unchanged — scoring off changes
|
|
52
|
+
model selection only, never scheduling.
|
|
53
|
+
<!-- /diy:when -->
|
|
54
|
+
|
|
55
|
+
<!-- /orc:layer -->
|
|
@@ -1,50 +1,46 @@
|
|
|
1
|
-
# Phase — Security pass (id: `security-checklist`)
|
|
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
|
-
12. **Crypto misuse** — home-rolled hashing/encryption, weak algorithms (MD5,
|
|
48
|
-
SHA1 for passwords), missing salts, static IVs in the diff.
|
|
49
|
-
|
|
50
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Security pass (id: `security-checklist`)
|
|
2
|
+
|
|
3
|
+
> **Library file** (`orc`, `orc-diy`), `core` only: an opt-in pass runs its checklist or does not run.
|
|
4
|
+
|
|
5
|
+
<!-- orc:layer core -->
|
|
6
|
+
## Reference — Security-Pass Checklist (Phase 5.5, opt-in)
|
|
7
|
+
|
|
8
|
+
Loaded ONLY when the Phase 5.5 security pass fires (config `security_review`
|
|
9
|
+
`on`/`ask` + a task scored ≥ 70 in the run). Passed to the reviewer as
|
|
10
|
+
`security_checklist[]` — the worker sweeps ONLY the run's changed files against
|
|
11
|
+
these items, wrapping Semgrep if it is already installed (never installing it).
|
|
12
|
+
|
|
13
|
+
Severity mapping (same P0–P3 ladder): an item the DIFF makes exploitable = P0 ·
|
|
14
|
+
a hardening gap on a touched path = P1 · defense-in-depth suggestions = P2/P3.
|
|
15
|
+
|
|
16
|
+
## Checklist (OWASP/STRIDE-derived, impact-ordered — the closed set; never extend ad hoc)
|
|
17
|
+
|
|
18
|
+
1. **Injection** — SQL/NoSQL/command/LDAP built from user input without
|
|
19
|
+
parameterization or a safe builder anywhere in the diff.
|
|
20
|
+
2. **Broken auth on new surface** — any new endpoint/route/handler reachable
|
|
21
|
+
without the auth check its siblings carry (spoofing).
|
|
22
|
+
3. **Broken authorization** — object/record access without an ownership or role
|
|
23
|
+
check (IDOR); privilege boundaries crossed by the new code (elevation).
|
|
24
|
+
4. **Secrets in code** — credentials, tokens, keys, or connection strings
|
|
25
|
+
hardcoded or logged; secrets reaching client bundles or responses
|
|
26
|
+
(information disclosure).
|
|
27
|
+
5. **Unvalidated input** — request bodies/params/headers/files used before
|
|
28
|
+
schema validation; mass-assignment of writable model fields (tampering).
|
|
29
|
+
6. **Injection into output** — XSS via unescaped user data in HTML/JS contexts;
|
|
30
|
+
unsafe redirects/headers from user input.
|
|
31
|
+
7. **Insecure data handling** — sensitive data stored/transmitted unencrypted,
|
|
32
|
+
PII in logs, cache keys/values leaking secrets.
|
|
33
|
+
8. **CSRF/replay on state changes** — new state-changing browser endpoints
|
|
34
|
+
without CSRF protection; missing idempotency where retries can double-apply
|
|
35
|
+
(repudiation/tampering).
|
|
36
|
+
9. **Resource exhaustion** — new unbounded loops/queries/uploads/allocations an
|
|
37
|
+
attacker controls (denial of service): missing pagination, no timeout, no
|
|
38
|
+
size cap.
|
|
39
|
+
10. **Dependency risk** — a newly added dependency that is unmaintained,
|
|
40
|
+
typosquat-suspicious, or pulled for something the stdlib/project already does.
|
|
41
|
+
11. **Error-path leaks** — stack traces, internal paths, or raw driver errors
|
|
42
|
+
surfaced to callers by the new error handling.
|
|
43
|
+
12. **Crypto misuse** — home-rolled hashing/encryption, weak algorithms (MD5,
|
|
44
|
+
SHA1 for passwords), missing salts, static IVs in the diff.
|
|
45
|
+
|
|
46
|
+
<!-- /orc:layer -->
|
|
@@ -1,55 +1,45 @@
|
|
|
1
|
-
# Phase — Security pass (opt-in) (id: `security`)
|
|
2
|
-
|
|
3
|
-
> **Shared phase file
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<!-- orc:layer
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<!-- diy:when security=
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<!-- /diy:when -->
|
|
47
|
-
<!-- diy:when security=always -->
|
|
48
|
-
Dispatch the security pass on EVERY run of this flow, regardless of task
|
|
49
|
-
scores — the full lane's Phase 5.5 with the checklist from
|
|
50
|
-
`.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
|
|
51
|
-
run's changed files. (This flow removes the risk-floor trigger, not the
|
|
52
|
-
pass's mechanics.)
|
|
53
|
-
<!-- /diy:when -->
|
|
54
|
-
|
|
55
|
-
<!-- /orc:layer -->
|
|
1
|
+
# Phase — Security pass (opt-in) (id: `security`)
|
|
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
|
+
## Security pass (opt-in)
|
|
8
|
+
|
|
9
|
+
Only when config `security_review` is `on`/`ask` (default `off`) AND a task
|
|
10
|
+
scored **≥ 70** (reuses the risk floor). `ask` → one P0 prompt (H `orc.phase-5-5.security`); `on` →
|
|
11
|
+
silent. Dispatch the reviewer with `phase=security` + changed files +
|
|
12
|
+
`security-checklist.md` (load only now). Same ladder, same
|
|
13
|
+
hard-rule-5 handling; report-only.
|
|
14
|
+
|
|
15
|
+
<!-- /orc:layer -->
|
|
16
|
+
|
|
17
|
+
<!-- orc:layer composed -->
|
|
18
|
+
|
|
19
|
+
## Phase: Security pass
|
|
20
|
+
|
|
21
|
+
<!-- diy:when security=off -->
|
|
22
|
+
The security pass is OFF in this flow — skip silently.
|
|
23
|
+
<!-- /diy:when -->
|
|
24
|
+
<!-- diy:when security=ask -->
|
|
25
|
+
When at least one task scored at or above the risk floor (70), ask the user
|
|
26
|
+
once after review (H `orc.phase-5-5.security`) whether to run the security pass; on yes, run it exactly as
|
|
27
|
+
the full lane's Phase 5.5 (reviewer re-dispatched with the checklist from
|
|
28
|
+
`.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
|
|
29
|
+
run's changed files).
|
|
30
|
+
<!-- /diy:when -->
|
|
31
|
+
<!-- diy:when security=on -->
|
|
32
|
+
When at least one task scored at or above the risk floor (70), dispatch the
|
|
33
|
+
security pass without asking — the full lane's Phase 5.5 with the checklist
|
|
34
|
+
from `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
|
|
35
|
+
run's changed files.
|
|
36
|
+
<!-- /diy:when -->
|
|
37
|
+
<!-- diy:when security=always -->
|
|
38
|
+
Dispatch the security pass on EVERY run of this flow, regardless of task
|
|
39
|
+
scores — the full lane's Phase 5.5 with the checklist from
|
|
40
|
+
`.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
|
|
41
|
+
run's changed files. (This flow removes the risk-floor trigger, not the
|
|
42
|
+
pass's mechanics.)
|
|
43
|
+
<!-- /diy:when -->
|
|
44
|
+
|
|
45
|
+
<!-- /orc:layer -->
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
# Phase — Ship (id: `ship`)
|
|
2
2
|
|
|
3
|
-
> **Shared phase file
|
|
4
|
-
> this library at W13 when `orc-diy` became its second reader. A spine is loaded
|
|
5
|
-
> IN FULL when its skill activates; this is loaded when the phase fires, and most
|
|
6
|
-
> runs skip most phases.
|
|
7
|
-
>
|
|
8
|
-
> **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
|
|
9
|
-
> `composed` is what `orc diy compile` stitches — the same phase expressed as
|
|
10
|
-
> `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
|
|
11
|
-
> procedure. Reading the wrong one is the failure `README.md` names: a lane
|
|
12
|
-
> doing a phase its product promise says it does differently.
|
|
13
|
-
> `orc lane phases <lane> --json` names the layer for each lane.
|
|
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.
|
|
14
4
|
|
|
15
5
|
<!-- orc:layer full -->
|
|
16
6
|
|
|
@@ -23,7 +13,7 @@ Emit `PHASE ship start`. Show current branch.
|
|
|
23
13
|
(`git diff --numstat`, exclusions applied) vs config `stacked_pr_loc`/
|
|
24
14
|
`stacked_pr_files`. Under threshold or `stacked_pr: off` → silent, ship normally
|
|
25
15
|
(`GATE stack-gate pass :: under-threshold`). Tripped → surface report + ONE P0
|
|
26
|
-
question (stack into layers? or one regular PR?) in the SAME round as its two
|
|
16
|
+
question (H `orc.phase-8.stack`: stack into layers? or one regular PR?) in the SAME round as its two
|
|
27
17
|
prerequisites — **a ticket** and a resolved PR template
|
|
28
18
|
(`_shared/pr-templates.md`; none found → recommend three options). No ticket, no
|
|
29
19
|
template, or "no" → **one regular PR, never re-asked**. "Yes" → commit on the
|
|
@@ -36,7 +26,7 @@ GREEN surface in `orc handoff surfaces --json`, say so —
|
|
|
36
26
|
*"2 of these were changes a PM could have made alone — `/orc-handoff` next time."*
|
|
37
27
|
That sentence is how anyone finds out that lane exists.
|
|
38
28
|
|
|
39
|
-
Then ask together: **commit? push? create PR?** (PR: ticket +
|
|
29
|
+
Then ask together (H `orc.phase-8.ship`): **commit? push? create PR?** (PR: ticket +
|
|
40
30
|
title + target branch; generate from `../../orc/subskills/orc-pr/pr.md`). If Phase 6.5 ran,
|
|
41
31
|
commit `test-generator/<change-slug>/` too (a user deliverable, never gitignored).
|
|
42
32
|
**`mock-examples/` is NEVER staged** (drift-recovery.md; no `.gitignore` edit —
|
|
@@ -46,10 +36,11 @@ On success: delete the ephemeral decision log; KEEP checkpoint + dispatch log.
|
|
|
46
36
|
run changed; point at `/orc-wiki`. **Post-ship refresh ask** (BIG runs, /orc +
|
|
47
37
|
/orc-ultra — the `wiki_refresh_ask_tasks`/`_files` triggers and full rules in
|
|
48
38
|
`../../orc-wiki/references/staleness.md`): upgrade the passive note to **"Refresh
|
|
49
|
-
wiki now?"
|
|
39
|
+
wiki now?"** (H `orc.phase-8.wiki-refresh`); on "later" print the prominent stale warning and stamp
|
|
50
40
|
`wiki_refresh_declined` in the checkpoint. Then ALWAYS show the completion
|
|
51
41
|
usage report — /usage limits + the full dispatch log (model/effort/score per
|
|
52
|
-
subagent). The user must always know what the run cost.
|
|
42
|
+
subagent). The user must always know what the run cost. A `proposal` in
|
|
43
|
+
`habits{}` → its ONE line joins that report (`../habits.md` §3). **Code graph
|
|
53
44
|
(`../code-graph.md` §5–§6):** run `orc graph update --if-enabled` once more —
|
|
54
45
|
fix rounds move code — and emit `GRAPH-UPDATE`; then run `orc graph notes pending
|
|
55
46
|
--files <every path the run changed> --at end --if-enabled` — exit 0 → one noter
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Phase — Stop, usage report, resume (id: `stop-resume`)
|
|
2
2
|
|
|
3
|
-
> **Library file
|
|
4
|
-
> the `orc` skill's own `stop-and-resume` reference. Layers declared: `core` only — the stop
|
|
5
|
-
> sequence is identical in every lane that stops, and the lane-specific half
|
|
6
|
-
> (which moments are MANDATORY stops) is already a per-lane rule in the spine.
|
|
3
|
+
> **Library file**, `core` only: the stop sequence is identical in every lane that stops; which moments are MANDATORY stops is a per-lane rule in the spine.
|
|
7
4
|
|
|
8
5
|
<!-- orc:layer core -->
|
|
9
6
|
|
|
@@ -41,7 +38,7 @@ boundary is not.
|
|
|
41
38
|
4. **Usage report** (see below).
|
|
42
39
|
5. **Generate the resume block** (see below) — regenerate FRESH at every stop,
|
|
43
40
|
never reuse an old one. It is printed inline AND is the body of `RESUME.md`.
|
|
44
|
-
6. Tell the user: what's done / remaining, then BOTH continue paths:
|
|
41
|
+
6. Tell the user: what's done / remaining, then BOTH continue paths (H `any.stop.where`):
|
|
45
42
|
"Reply **continue** here, or paste the block below in a **fresh session**
|
|
46
43
|
(recommended if this conversation is long — cheaper and cleaner than
|
|
47
44
|
dragging this context forward)."
|
|
@@ -1,48 +1,73 @@
|
|
|
1
|
-
# Phase — Summary (id: `summary`)
|
|
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
|
-
<!-- /diy:when -->
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
phases
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
# Phase — Summary (id: `summary`)
|
|
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
|
+
## Summary
|
|
8
|
+
|
|
9
|
+
Emit `PHASE summary start`. Report: tasks/waves/dispatches (scores + overrides), escalations,
|
|
10
|
+
needs_context events, findings by severity (P0/P1 resolved; P2 itemized by
|
|
11
|
+
`group`; P3 counted; `pre_existing` in its own non-gating bucket; the
|
|
12
|
+
after-filter's `removed[]`, each with the id that removed it), verify result,
|
|
13
|
+
authored tests when 6.5 ran, repo state + branch,
|
|
14
|
+
stale_review flags. Then ONE question: **"Apply the P2 fix-batch? The P3
|
|
15
|
+
cosmetics too?"** (H `orc.phase-7.p2-batch` · `orc.phase-7.p3-batch`) — never fix unasked.
|
|
16
|
+
A yes dispatches ONE fix per `group` (R7), never one per finding. Then record
|
|
17
|
+
each Phase 5 finding's outcome and emit `FINDING-OUTCOME` (`../gotchas.md` §10
|
|
18
|
+
"Review close"). Print the card (§End-of-run card), then emit `PHASE summary end`.
|
|
19
|
+
|
|
20
|
+
<!-- /orc:layer -->
|
|
21
|
+
|
|
22
|
+
<!-- orc:layer composed -->
|
|
23
|
+
|
|
24
|
+
## Phase: Summary
|
|
25
|
+
|
|
26
|
+
<!-- diy:when summary=off -->
|
|
27
|
+
No summary phase: end after ship with a single line (tasks done / gate color
|
|
28
|
+
/ ship action taken) plus usage, and note which phases this flow skipped.
|
|
29
|
+
<!-- /diy:when -->
|
|
30
|
+
<!-- diy:when summary=short -->
|
|
31
|
+
Short summary: one paragraph — what was built, gate results, ship action,
|
|
32
|
+
skipped phases, and usage. No per-task breakdown.
|
|
33
|
+
<!-- /diy:when -->
|
|
34
|
+
<!-- diy:when summary=full -->
|
|
35
|
+
Full summary exactly as the full lane's final phase: per-task outcomes with
|
|
36
|
+
models used, findings outcomes, verify results, ship action, skipped
|
|
37
|
+
phases, and usage.
|
|
38
|
+
<!-- /diy:when -->
|
|
39
|
+
|
|
40
|
+
Always name the phases this flow skipped by config — the user must never
|
|
41
|
+
mistake a DIY run for a full-lane run. The run ends with the card
|
|
42
|
+
(`.claude/skills/_shared/phases/summary.md` §End-of-run card).
|
|
43
|
+
|
|
44
|
+
<!-- /orc:layer -->
|
|
45
|
+
|
|
46
|
+
## End-of-run card
|
|
47
|
+
|
|
48
|
+
**ONE template, the same shape in every coding lane.** `/orc` and `/orc-diy`
|
|
49
|
+
print it at the end of the summary; `/orc-mini`, `/orc-fast` and `/orc-quick`
|
|
50
|
+
point here and print it at their end — a green ship, a red STOP, or a quick
|
|
51
|
+
entry that wrote code. Every detail goes BELOW the card, never above it.
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
✅ Fixed the null charge on guest checkout — 3 files, tests 14 passed (2 affected first)
|
|
55
|
+
review 2 findings · 1 fixed · 1 disputed (recorded) gotchas 1 recorded (G-044)
|
|
56
|
+
risk low — callers 3 in 2 files, tests reach 2 habits 1 proposal below
|
|
57
|
+
flaky 1 test passed on the re-run (no repair round) graph <gain line>
|
|
58
|
+
undo orc undo --run <run-slug> next commit? (your usual: review → commit)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- **Line 1 is the outcome.** Start with ✅ (done), ⚠ (partial) or ⛔ (red). Then
|
|
62
|
+
say what happened, the files and the tests. The first sentence answers "what
|
|
63
|
+
happened?".
|
|
64
|
+
- **A row shows only when it has something.** Never print an empty row.
|
|
65
|
+
- **The `undo` row always shows on a run that wrote code:**
|
|
66
|
+
`orc undo --run <run-slug>` — never `git checkout -- .`, which also discards
|
|
67
|
+
the user's own edits. No `checkpoint.json` with `actual_files` → add
|
|
68
|
+
`--files <actual_files>`. No snapshot (not a git repository) → say
|
|
69
|
+
`undo none — no snapshot`. The command only PRINTS the undo; `--apply` runs
|
|
70
|
+
it. The lane never runs it itself.
|
|
71
|
+
- **Copy the CLI's words.** `risk` is the `blast_line` with its `why`;
|
|
72
|
+
`graph` is the `orc graph gain` `line`, VERBATIM — an estimate with a range,
|
|
73
|
+
never restated as a saving. `flaky` is the `GATE flaky` tests.
|