@punks/cli 3.3.3 → 3.3.5

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.
Files changed (83) hide show
  1. package/AGENTS.md +2 -1
  2. package/dist/BASELINE_CHANGELOG.md +10 -3
  3. package/dist/CHANGELOG.md +13 -1
  4. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  5. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +0 -5
  6. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +2 -1
  7. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +16 -0
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/AUTHORING-HANDOFF.md +12 -0
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/SKILL.md +84 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/agents/openai.yaml +4 -0
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/audit.md +33 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/define-authority.md +26 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/define-handoffs.md +34 -0
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/model-state.md +30 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/qualify.md +27 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/router.md +36 -0
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/test-routes.md +33 -0
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/verify-disclosure.md +28 -0
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/write-phases.md +33 -0
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/write-router.md +30 -0
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/references/authoring-contract.md +226 -0
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/generic/handback/SKILL.md +27 -0
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +9 -4
  26. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
  27. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
  28. package/dist/baseline/scaffold-baseline/skills/phases/debugging-phase/SKILL.md +6 -5
  29. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +5 -1
  30. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/debug.md +2 -2
  31. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/handback.md +23 -0
  32. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +2 -0
  33. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +6 -4
  34. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +25 -19
  35. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +6 -2
  36. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +14 -9
  37. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/router.md +15 -13
  38. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +3 -2
  39. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +15 -12
  40. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/runtime-handoff.md +2 -2
  41. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +5 -1
  42. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +15 -4
  43. package/dist/baseline/scaffold-baseline.json +5 -5
  44. package/dist/baseline/scaffold-baseline.tgz +0 -0
  45. package/dist/data/AGENTS.md +1 -0
  46. package/dist/data/shared-agents.md +113 -0
  47. package/dist/index.js +76 -68
  48. package/dist/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
  49. package/dist/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
  50. package/dist/skills/agnostic/docs/write-graph-based-skills/AUTHORING-HANDOFF.md +12 -0
  51. package/dist/skills/agnostic/docs/write-graph-based-skills/SKILL.md +84 -0
  52. package/dist/skills/agnostic/docs/write-graph-based-skills/agents/openai.yaml +4 -0
  53. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/audit.md +33 -0
  54. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/define-authority.md +26 -0
  55. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/define-handoffs.md +34 -0
  56. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/model-state.md +30 -0
  57. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/qualify.md +27 -0
  58. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/router.md +36 -0
  59. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/test-routes.md +33 -0
  60. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/verify-disclosure.md +28 -0
  61. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/write-phases.md +33 -0
  62. package/dist/skills/agnostic/docs/write-graph-based-skills/phases/write-router.md +30 -0
  63. package/dist/skills/agnostic/docs/write-graph-based-skills/references/authoring-contract.md +211 -0
  64. package/dist/skills/agnostic/generic/handback/SKILL.md +27 -0
  65. package/dist/skills/agnostic/quality/autoreview/SKILL.md +9 -4
  66. package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
  67. package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
  68. package/dist/skills/phases/debugging-phase/SKILL.md +6 -5
  69. package/dist/skills/phases/delivery-phase/SKILL.md +5 -1
  70. package/dist/skills/phases/delivery-phase/phases/debug.md +2 -2
  71. package/dist/skills/phases/delivery-phase/phases/handback.md +23 -0
  72. package/dist/skills/phases/delivery-phase/phases/implement.md +2 -0
  73. package/dist/skills/phases/delivery-phase/phases/review.md +6 -4
  74. package/dist/skills/phases/delivery-phase/phases/router.md +23 -17
  75. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +6 -2
  76. package/dist/skills/phases/review-phase/phases/return-route.md +14 -9
  77. package/dist/skills/phases/review-phase/phases/router.md +15 -13
  78. package/dist/skills/phases/review-phase/phases/run-review.md +3 -2
  79. package/dist/skills/phases/review-phase/references/durable-report.md +10 -8
  80. package/dist/skills/phases/review-phase/references/runtime-handoff.md +2 -2
  81. package/dist/skills/phases/review-phase/references/state-graph.md +5 -1
  82. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +2 -0
  83. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -1,10 +1,11 @@
1
1
  ## CLI App Guidance
2
2
 
3
- Immutable first-parent release recovery requires `RELEASE_RECOVERY.json` entries whose exact failure, target commit, note hash, order, and current Candidate Evidence validate. Recovery preserves historical artifact and Candidate Evidence.
3
+ Recovery keeps changed changelog paths as the sole product selector. Normal first-parent recovery preserves historical artifact and Candidate Evidence. Only an exact already-published provider-readback recovery may omit historical Candidate Evidence; `RELEASE_RECOVERY.json` must bind its failure, target commit/tree, note hash, order, and provider identities under current Candidate Evidence. It creates no artifacts, mutates no product, and advances authority only after complete readback. Current and new releases still require exact-tree Candidate Evidence.
4
4
 
5
5
  Primary skills here: `autoreview`, `codebase-design`, `effect`, `effect-backend-structure`, `effect-recoverable-actions`, `effect-service-design`, `improve-codebase-architecture`, `parallel-research`, `prototype`, `quality-types`, `review`, `simplify`, `swarm-planner`, `tdd`, `turborepo`.
6
6
 
7
7
  This app owns the `hi`/`hint` executable, repo detection flow, local scaffold application, bundled baseline fallback, update/diff ergonomics, and release/baseline publishing scripts. Preserve current CLI behavior during monorepo work.
8
+ Autonomy ends at accepted goal bounds. If progress requires changed requirements, a weaker gate, or substantial implementation redesign, invoke `$handback` before expanding work.
8
9
 
9
10
  Reusable skill changes in distributed assets are complete only after the root source-first flow: before editing, verify `git -C /Users/stefan/Desktop/repos/wearedevpunks-skills branch --show-current` returns exactly `main`; stop otherwise. Edit and commit the canonical source only on that checked-out `main` branch; alternate branches or worktrees are out of scope for this flow. Then push, run `bun run sync:skills`, verify the exact receipt SHA, and publish the baseline when requested.
10
11
 
@@ -2,17 +2,24 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- Compatibility: `>=3.3.3 <3.4.0`
5
+ Compatibility: `>=3.3.4 <3.4.0`
6
6
 
7
7
  ### Added
8
8
 
9
- - Add the Effect pack's type-aware `@effect/tsgo` recommended Oxlint preset.
9
+ - Sync canonical `wearedevpunks/skills@caa755e3c080f8bc77773bd0ccbea3be935aa5c4`; distribute `handback` and `write-graph-based-skills` in default packs.
10
10
 
11
11
  ### Changed
12
12
 
13
- - Pin the supported patch tuple to `@effect/tsgo@0.36.5`, `oxlint@1.78.0`, and `oxlint-tsgolint@7.0.2001`; preserve exact package.json catalog references during updates, fail closed without mutation for incompatible project-owned or pnpm-owned catalogs, and receipt-manage one patch command in simple existing `prepare` `&&` chains, including quoted `&&`, while rejecting ambiguous complex shell syntax.
13
+ - Clarify recursive backend composition ownership and Effect Layer placement for issue #164.
14
+ - End autonomy at accepted goal bounds through one compact scaffold prompt pointer; route delivery, debugging, review, and direct autoreview expansion through durable human steering.
14
15
  - Select baseline publication only from non-empty `BASELINE_CHANGELOG.md` notes and CLI publication only from matching non-empty `CHANGELOG.md` version notes; publish both when both changelogs qualify, while retaining strict candidate proof and artifact readback.
15
16
 
17
+ ## Recovery 560d7917dfa5c3b0a2eace307013c1c07c57d1a3
18
+
19
+ ### Fixed
20
+
21
+ - Converge the already-published 560d7917 mixed release through exact provider readback.
22
+
16
23
  ## Recovery 3227643587855a7e239dda2d85adba7391488497
17
24
 
18
25
  ### Added
package/dist/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 3.3.5 - 2026-08-25
4
+
5
+ ### Changed
6
+
7
+ - Let Effect lint scaffolds install the latest `@effect/tsgo` and `oxlint-tsgolint` when missing, while preserving project-owned Oxlint and Effect tooling versions instead of enforcing the former exact compatibility tuple.
8
+
9
+ ## 3.3.4 - 2026-08-24
10
+
11
+ ### Added
12
+
13
+ - Scaffold `$handback` and graph-based skill authoring in default skill packs.
4
14
 
5
15
  ### Fixed
6
16
 
@@ -8,6 +18,8 @@
8
18
 
9
19
  ### Changed
10
20
 
21
+ - Generate one centralized autonomy pointer across shared, root, and scoped agent guidance and preserve it through scaffold handoffs.
22
+ - Bound direct autoreview and delivery/review/debugging expansion behind durable human steering.
11
23
  - Prepare `baseline/stable/2026.08.18-requirements-grill-technical-grounding` for CLI `>=3.2.2 <4` from canonical `wearedevpunks/skills@eb1026c0355759c8addfb91856beb6bd5eae94f9`, requiring code grounding before the first technical frontier, evidence/constraint/code-consequence questions, and closure only after applicable technical dimensions are resolved.
12
24
  - Prepare `baseline/stable/2026.08.18-write-backlog-milestone-membership` for CLI `>=3.2.2 <4` from canonical `wearedevpunks/skills@713367ca0846785fa347adcd3e3224b7455e36df`, allowing stories to share their containing overview milestone without using milestones to order story relations.
13
25
  - Prepare `baseline/stable/2026.08.17-requirements-grill-live-show-me` for CLI `>=3.2.2 <4` from canonical `wearedevpunks/skills@6a633da2b18537a53e51172e37c2c7fc2a3b8c5b`, using `$show-me` throughout active requirements grilling and interleaving code-grounded technical questions wherever a branch benefits.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "channel": "stable",
4
- "version": "2026.08.24-b8097c3a",
5
- "tag": "baseline/stable/2026.08.24-b8097c3a",
6
- "commit": "b8097c3adc4672ab1b5968f828609792147d0f7e",
4
+ "version": "2026.08.25-fea65688",
5
+ "tag": "baseline/stable/2026.08.25-fea65688",
6
+ "commit": "fea65688008074eb5051c2ed5d9155ea2aea7657",
7
7
  "sha256": null,
8
8
  "compatibility": {
9
- "cliVersionRange": ">=3.3.3 <3.4.0"
9
+ "cliVersionRange": ">=3.3.5 <3.4.0"
10
10
  },
11
- "generatedAt": "2026-08-24T16:29:21.000Z"
11
+ "generatedAt": "2026-08-25T13:15:20.000Z"
12
12
  }
@@ -261,11 +261,6 @@
261
261
  "plugins": [],
262
262
  "prepareCommands": ["effect-tsgo patch --no-typescript --oxlint"],
263
263
  "requiredDevDependencies": ["@effect/tsgo", "oxlint-tsgolint"],
264
- "requiredDevDependencyVersions": {
265
- "@effect/tsgo": "0.36.5",
266
- "oxlint": "1.78.0",
267
- "oxlint-tsgolint": "7.0.2001"
268
- },
269
264
  "rules": {},
270
265
  "settings": {}
271
266
  },
@@ -54,6 +54,7 @@
54
54
  "writing-beats",
55
55
  "writing-shape",
56
56
  "writing-for-agents",
57
+ "write-graph-based-skills",
57
58
  "rule-authoring"
58
59
  ],
59
60
  "triggerPackages": []
@@ -66,7 +67,7 @@
66
67
  "lintAssets": [],
67
68
  "promptDetails": ["shared agent interaction helpers"],
68
69
  "promptSurfaces": ["shared-agents"],
69
- "skills": ["show-me", "wait-what"],
70
+ "skills": ["handback", "show-me", "wait-what"],
70
71
  "triggerPackages": []
71
72
  },
72
73
  {
@@ -519,6 +519,14 @@
519
519
  "sourceDirectory": "skills/agnostic/generic/handoff",
520
520
  "tier": "agnostic"
521
521
  },
522
+ {
523
+ "framework": null,
524
+ "id": "handback",
525
+ "language": null,
526
+ "requiresTools": [],
527
+ "sourceDirectory": "skills/agnostic/generic/handback",
528
+ "tier": "agnostic"
529
+ },
522
530
  {
523
531
  "framework": null,
524
532
  "id": "improve-codebase-architecture",
@@ -791,6 +799,14 @@
791
799
  "sourceDirectory": "skills/agnostic/docs/writing-for-agents",
792
800
  "tier": "agnostic"
793
801
  },
802
+ {
803
+ "framework": null,
804
+ "id": "write-graph-based-skills",
805
+ "language": null,
806
+ "requiresTools": [],
807
+ "sourceDirectory": "skills/agnostic/docs/write-graph-based-skills",
808
+ "tier": "agnostic"
809
+ },
794
810
  {
795
811
  "framework": "turborepo",
796
812
  "id": "turborepo",
@@ -16,7 +16,7 @@ routed `requirements-grill` status artifact. Preserve its canonical terms;
16
16
  route proposed terminology changes through `requirements-grill` instead of
17
17
  silently renaming them.
18
18
 
19
- Read `references/layout.md` before structure decisions or large refactors.
19
+ Read `references/layout.md` before structure decisions or large refactors. It owns the recursive composition classifier and placement rules.
20
20
 
21
21
  ## Quick Classifier
22
22
 
@@ -65,3 +65,5 @@ Default to explicit use-case actions.
65
65
  - Keep dependencies flowing: transport/composition -> features -> integrations/infrastructure -> external systems.
66
66
  - Keep tests near the feature or module that owns the behavior.
67
67
  - Validate module import direction, import cycles, stale symbols after moves, architecture tests when available, and focused compile/type checks.
68
+
69
+ **Complete when:** every file and composition boundary has one owner under the layout classifier and all applicable validation passes or each failure is reported.
@@ -78,7 +78,7 @@ Common local folders:
78
78
  - `services/`
79
79
  - `tests/`
80
80
  - `errors.ts`
81
- - `layer.ts`, `container.ts`, `module.ts`, or equivalent composition file
81
+ - `container.ts`, `module.ts`, or the framework's equivalent composition file
82
82
  - `router.ts`, `controller.ts`, or equivalent transport adapter when the feature exposes endpoints
83
83
 
84
84
  Feature domains own use cases, policy, persistence contracts, and public behavior.
@@ -167,6 +167,19 @@ Composition roots own container wiring.
167
167
  - Treat lazy imports as a smell when they avoid a cycle instead of fixing import direction.
168
168
  - Keep test wiring in test support or feature composition helpers, not inside production domain logic.
169
169
 
170
+ ### Recursive composition ownership
171
+
172
+ A composition boundary belongs to the nearest honest parent that owns the coordination. Apply this rule recursively at every depth of a domain tree.
173
+
174
+ - A leaf feature or module assembles only the capability it owns.
175
+ - The nearest common parent feature composes its public child capabilities and owns product policy spanning them. Those children are siblings to one another.
176
+ - The process composition root closes the application graph and selects runtime or external adapters across otherwise independent public contracts.
177
+ - Parent composition imports public child entrypoints. Each child retains ownership of its internals.
178
+
179
+ Classify coordination by meaning. Ordering, authorization, state transitions, and choices that change product behavior are parent-feature policy. Selecting an adapter, constructing a runtime, or binding independent public contracts is pure technical binding at the process root.
180
+
181
+ **Complete when:** every boundary is classified exactly once as leaf/module capability assembly, nearest-common-parent business composition, or process-root technical binding.
182
+
170
183
  ## Public Boundaries
171
184
 
172
185
  Feature modules or package roots should expose deliberate public API.
@@ -0,0 +1,12 @@
1
+ # Authoring Handoff
2
+
3
+ Phase: audit
4
+ Status: complete
5
+ Scope: canonical Durable Workflow Graph authoring skill
6
+ Artifacts: SKILL.md; phases/; references/authoring-contract.md
7
+ Validation: contract tests verify structure, pointers, and human steering route
8
+ Domain state: graph authoring requires a durable human_steering_required terminal
9
+ UI Evidence: none
10
+ Next suggested route: none
11
+ Blockers: none
12
+ Resume identity: upstream import plus human steering repair
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: write-graph-based-skills
3
+ description: Write graph-based skills as Durable Workflow Graphs. Use when creating a graph-based skill, converting a linear multi-step skill, or repairing evidence routing, cold resume, or premature completion.
4
+ ---
5
+
6
+ # Write Graph-Based Skills
7
+
8
+ ## Model Primer
9
+
10
+ - State-machine: explicit states, transition guards, and deterministic resume behavior.
11
+ - Actor-like gate boundary: bounded ownership of work, internal delegation, validation, and the durable handoff returned to the router.
12
+ - Graph: explicit paths, branches, cycles, skips, and checkpoints.
13
+ - Router here names the workflow's internal transition contract.
14
+ - Durable handoff makes execution stateful by committing validated gate state before a stop or router return.
15
+ - Human steering is the terminal boundary defined in the [authoring contract](references/authoring-contract.md#human-steering-terminal).
16
+ - Written contracts and durable evidence define the skill-protocol boundary. Markdown cannot enforce exclusive writers, execution ordering, or atomic persistence; require an external runtime only when one of those guarantees is a correctness requirement.
17
+
18
+ ## Quick Start
19
+
20
+ 1. Load [`phases/router.md`](phases/router.md) first.
21
+ 2. Inspect the target skill's current artifacts, evidence, and latest authoring outcomes. Re-derive the route on every entry, including cold resume.
22
+ 3. Load exactly one phase selected by the authoring router. Keep sibling phase files out of context.
23
+ 4. Complete that phase's bounded work and checks.
24
+ 5. Write its durable phase outcome to the active authoring record.
25
+ 6. Stop on a blocker or checkpoint. Otherwise stop or re-enter this root router.
26
+
27
+ Use [`references/authoring-contract.md`](references/authoring-contract.md) as the single shared worksheet. Create the creator workflow's durable authoring record at `<target-skill>/AUTHORING-HANDOFF.md`; the authoring router discovers it at that exact path. This record tracks creation, conversion, or repair work. It is separate from the target skill's runtime handoff contract. Current target artifacts remain more authoritative than its route suggestion.
28
+
29
+ ## Entry Modes
30
+
31
+ Use a graph for every multi-step skill. Direct composition is the narrow qualification exception defined below.
32
+
33
+ - **Create:** start from a new target skill and unresolved workflow obligations.
34
+ - **Convert:** inspect an existing linear multi-step skill and preserve valid work while making states, routes, gates, and durable handoffs explicit.
35
+ - **Repair:** begin from stale, contradictory, unreachable, or incomplete routing evidence and change only the broken contracts.
36
+ - **Direct composition:** exit during qualification only for one atomic, discardable, cheap-to-restart action with no routing, repair, or resume obligation.
37
+
38
+ Keep the package's current invocation policy unless target requirements deliberately choose another one.
39
+
40
+ ## Phase Files
41
+
42
+ - [`phases/router.md`](phases/router.md): select exactly one next authoring phase from current evidence.
43
+ - [`phases/audit.md`](phases/audit.md): run the terminal completeness and validator audit.
44
+ - [`phases/define-authority.md`](phases/define-authority.md): define evidence authority and deterministic tie-breaks.
45
+ - [`phases/define-handoffs.md`](phases/define-handoffs.md): define workflow-owned durable handoffs.
46
+ - [`phases/model-state.md`](phases/model-state.md): define evidence states, topology, guards, and obligation reachability.
47
+ - [`phases/qualify.md`](phases/qualify.md): define obligations, survivor artifacts, and the direct-composition boundary.
48
+ - [`phases/test-routes.md`](phases/test-routes.md): predict, derive, and repair route scenarios.
49
+ - [`phases/verify-disclosure.md`](phases/verify-disclosure.md): verify context reachability and sibling isolation.
50
+ - [`phases/write-phases.md`](phases/write-phases.md): write every executable target gate file.
51
+ - [`phases/write-router.md`](phases/write-router.md): write the target bootstrap and target router.
52
+
53
+ ## Required Target Structure
54
+
55
+ Every produced graph-based skill must use this shape:
56
+
57
+ ```text
58
+ <target-skill>/
59
+ ├── SKILL.md
60
+ ├── AUTHORING-HANDOFF.md
61
+ └── phases/
62
+ ├── router.md
63
+ └── <gate>.md
64
+ ```
65
+
66
+ - `SKILL.md` contains bootstrap and invocation guidance. It does not contain executable gate bodies.
67
+ - `phases/` is flat. It contains `router.md` and one `<gate>.md` for every executable gate or step selected by the target router.
68
+ - Every target gate file defines: guard, inputs, bounded action or delegation, invariants, completion evidence, declared exits, and durable handoff.
69
+ - `AUTHORING-HANDOFF.md` is this creator workflow's durable authoring record. It is separate from the target skill's runtime handoffs.
70
+ - `references/` is optional. Add it only for shared or genuinely conditional material, and keep executable gate bodies out of it.
71
+ - Every operational reference is reachable from the root, router, or selected phase.
72
+ - The target handoff contract names its durable storage location and the rule used to discover the latest applicable handoff.
73
+
74
+ ## Router Rules
75
+
76
+ Use [`phases/router.md`](phases/router.md) as the single source of truth for authoring route order. Reuse fresh complete artifacts. Resolve overlapping guards through the declared authority and precedence rules. Select exactly one phase or declared stop outcome. A suggested phase is advisory and lowest authority. Audit completion is the only graph-authoring terminal.
77
+
78
+ ## Stop Conditions
79
+
80
+ - After a selected phase writes its outcome, stop or re-enter the root router. Never jump directly to a sibling phase.
81
+ - On blocked work, write the blocker and missing evidence, then stop.
82
+ - At a human checkpoint, write the decision required, then stop.
83
+ - Claim authoring completion only after `audit` verifies every obligation, route, pointer, durable handoff, and applicable validator.
84
+ - Keep claims at the skill-protocol boundary. Markdown cannot enforce exclusive writers, execution ordering, or atomic persistence; require an external runtime only when one of those guarantees is a correctness requirement.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Write Graph-Based Skills"
3
+ short_description: "Write resumable graph-based skills"
4
+ default_prompt: "Use $write-graph-based-skills to write a resumable graph-based skill with evidence-derived routing, actor-like gate boundaries, and durable handoffs."
@@ -0,0 +1,33 @@
1
+ # Audit the Graph-Based Skill
2
+
3
+ ## Selection Condition
4
+
5
+ Select when every earlier authoring phase has fresh completion evidence and terminal readiness remains unverified.
6
+
7
+ ## Bounded Work
8
+
9
+ - Apply the [Final Audit](../references/authoring-contract.md#final-audit).
10
+ - Verify every mandatory obligation is reachable and required by the terminal guard.
11
+ - Prove cold resume derives one route from current evidence and discoverable handoffs.
12
+ - Recheck overlapping guards, authority, and deterministic precedence.
13
+ - Keep each transition meaning in one source of truth.
14
+ - Verify every operational reference is reachable and every target router-selected phase exists.
15
+ - Verify the [human steering terminal](../references/authoring-contract.md#human-steering-terminal)
16
+ is reachable, durable, authority-gated, and distinct from planned human checkpoints.
17
+ - Run the no-op test: delete instructions whose removal does not change behavior relative to the model default.
18
+ - Run the available skill validator and record its result.
19
+
20
+ ## Checkable Completion State
21
+
22
+ - Obligations, terminal accounting, cold resume, routes, pointers, and durable handoffs pass.
23
+ - Transition meanings have one source of truth.
24
+ - The no-op test leaves only instructions that change behavior relative to the model default.
25
+ - The available validator passes.
26
+
27
+ ## Durable Phase Outcome
28
+
29
+ Update the `audit` entry in `<target-skill>/AUTHORING-HANDOFF.md` with audited artifacts, separate validation results, blockers, and the terminal decision.
30
+
31
+ ## Stop or Re-entry
32
+
33
+ Return the audit-complete terminal only when every check passes. On any failure, write the outcome and re-enter root so the earliest broken phase is selected.
@@ -0,0 +1,26 @@
1
+ # Define Evidence Authority
2
+
3
+ ## Selection Condition
4
+
5
+ Select when the state model exists and evidence authority, admissibility, overlapping-guard precedence, or deterministic tie-breaks remain incomplete.
6
+
7
+ ## Bounded Work
8
+
9
+ - Update [Transition Guards and Precedence](../references/authoring-contract.md#transition-guards-and-precedence).
10
+ - Apply this authority order: current direct evidence, fresh valid in-scope workflow-native artifacts, latest committed handoff, suggested route.
11
+ - Define freshness, scope, and validity checks for each transition.
12
+ - Audit overlapping guards and assign deterministic precedence until every legal conflict selects one route.
13
+
14
+ ## Checkable Completion State
15
+
16
+ - Every ambiguous eligibility set resolves to exactly one route.
17
+ - Stale, out-of-scope, and invalid evidence loses eligibility.
18
+ - Every overlap has an explicit precedence or tie-break rule.
19
+
20
+ ## Durable Phase Outcome
21
+
22
+ Update the `define-authority` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the authority artifact, separate conflict checks, blockers, and any unresolved overlap.
23
+
24
+ ## Stop or Re-entry
25
+
26
+ Stop after writing the outcome, or re-enter root. Do not load another phase directly.
@@ -0,0 +1,34 @@
1
+ # Define Durable Handoffs
2
+
3
+ ## Selection Condition
4
+
5
+ Select when target gates exist and their workflow-owned handoff schema, durable storage, discovery rule, or exit coverage is missing or inconsistent.
6
+
7
+ ## Bounded Work
8
+
9
+ - Update the [Gate Contract](../references/authoring-contract.md#gate-contract) and [Durable Handoff Questions](../references/authoring-contract.md#durable-handoff-questions).
10
+ - Define gate-scoped handoff vocabulary and schema for the target workflow.
11
+ - Preserve the canonical categories: phase, phase-scoped status, scope, artifacts, validation, workflow-specific domain state, optional UI evidence, next suggested route, and blockers.
12
+ - Use the workflow's own domain-state label; for example, a delivery workflow may use `Review/debug/docs state`.
13
+ - Name the durable storage location and the rule for discovering the latest applicable handoff.
14
+ - Preserve only state that current artifacts cannot safely reconstruct.
15
+ - Add run, revision, attempt, or dependency identity only when reliable resume requires it.
16
+ - Keep route suggestions optional, advisory, and lowest authority.
17
+ - Require every declared completion, blocker, skip or no-op, and human-checkpoint exit to write a durable handoff when applicable.
18
+ - Require the [human steering terminal](../references/authoring-contract.md#human-steering-terminal)
19
+ to preserve the `$handback` outcome and authority guard.
20
+
21
+ ## Checkable Completion State
22
+
23
+ - Every target gate exit writes a discoverable durable handoff.
24
+ - The schema keeps the canonical categories while allowing a workflow-specific domain-state label.
25
+ - Storage and discovery rules are explicit.
26
+ - Current evidence can override a stale or contradictory suggestion.
27
+
28
+ ## Durable Phase Outcome
29
+
30
+ Update the `define-handoffs` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the handoff contract artifact, separate exit-coverage checks, blockers, and unresolved irreducible state.
31
+
32
+ ## Stop or Re-entry
33
+
34
+ Stop after writing the outcome, or re-enter root. Do not load another phase directly.
@@ -0,0 +1,30 @@
1
+ # Model Evidence State
2
+
3
+ ## Selection Condition
4
+
5
+ Select when obligations are qualified and the evidence-defined state model, topology, guards, or obligation reachability is missing, stale, or contradictory.
6
+
7
+ ## Bounded Work
8
+
9
+ - Update [State and Topology](../references/authoring-contract.md#state-and-topology).
10
+ - Define states from durable evidence instead of conversational progress.
11
+ - Map every mandatory obligation to reachable states and transitions.
12
+ - Define applicable paths, branches, cycles, skips, and checkpoints. Mark other topology forms N/A.
13
+ - Add freshness, scope, and validity guards where evidence can change or conflict.
14
+ - Model the [human steering terminal](../references/authoring-contract.md#human-steering-terminal)
15
+ and make it reachable from every applicable gate.
16
+
17
+ ## Checkable Completion State
18
+
19
+ - Every state has scope, entry guard, exit guard, and reachable next states.
20
+ - Every mandatory obligation is reachable and evidence-backed.
21
+ - Each topology form is represented or marked N/A.
22
+ - `human_steering_required` is terminal until the `$handback` authority guard passes.
23
+
24
+ ## Durable Phase Outcome
25
+
26
+ Update the `model-state` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the state artifacts, separate reachability and topology checks, blockers, and unresolved obligations.
27
+
28
+ ## Stop or Re-entry
29
+
30
+ Stop after writing the outcome, or re-enter root. Do not load another phase directly.
@@ -0,0 +1,27 @@
1
+ # Qualify the Workflow
2
+
3
+ ## Selection Condition
4
+
5
+ Select when workflow bounds, mandatory obligations, or survivor artifacts are unresolved.
6
+
7
+ ## Bounded Work
8
+
9
+ - Update the [Obligation Map](../references/authoring-contract.md#obligation-map).
10
+ - Record every mandatory obligation, owner, evidence artifact, and audit criterion.
11
+ - Identify intermediate artifacts that must survive interruption or later audit.
12
+ - Default every multi-step skill to a graph.
13
+ - Choose direct composition only for one atomic, discardable, cheap-to-restart action with no routing, repair, or resume obligation.
14
+
15
+ ## Checkable Completion State
16
+
17
+ - Every mandatory obligation has an owner, evidence artifact, and audit criterion.
18
+ - Every survivor artifact is named.
19
+ - Graph authoring is selected for multi-step work, or the direct-composition decision proves the action is atomic, discardable, cheap to restart, and free of routing, repair, and resume obligations.
20
+
21
+ ## Durable Phase Outcome
22
+
23
+ Update the `qualify` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the obligation artifact, separate qualification checks, blockers, and the graph or direct-composition decision.
24
+
25
+ ## Stop or Re-entry
26
+
27
+ For direct composition, stop without claiming a graph-based skill was authored. Otherwise stop or re-enter root.
@@ -0,0 +1,36 @@
1
+ # Authoring Router
2
+
3
+ ## Selection Condition
4
+
5
+ Load this file on every invocation and re-entry before any authoring phase. Resume from current target artifacts and evidence without relying on transcript continuity.
6
+
7
+ ## Bounded Work
8
+
9
+ 1. Inspect the target `SKILL.md`, flat `phases/` directory, operational references, and `<target-skill>/AUTHORING-HANDOFF.md`.
10
+ 2. Treat current direct evidence and fresh valid target artifacts as authoritative. Treat recorded outcomes as supporting evidence and route suggestions as advisory.
11
+ 3. Reuse fresh, complete, consistent artifacts.
12
+ 4. Select the earliest missing, stale, or contradictory phase:
13
+ - unresolved bounds -> `qualify.md`
14
+ - incomplete state model -> `model-state.md`
15
+ - incomplete authority rules -> `define-authority.md`
16
+ - missing or invalid target bootstrap/router -> `write-router.md`
17
+ - missing or invalid target gate files -> `write-phases.md`
18
+ - incomplete handoff contract -> `define-handoffs.md`
19
+ - invalid disclosure or unreachable pointers -> `verify-disclosure.md`
20
+ - incomplete or mismatched route tests -> `test-routes.md`
21
+ - incomplete terminal audit -> `audit.md`
22
+ 5. When guards overlap, apply the declared evidence authority and deterministic precedence before selecting.
23
+
24
+ ## Checkable Completion State
25
+
26
+ - Exactly one phase filename, one blocked outcome, or the audit-complete terminal is selected.
27
+ - The selection cites current evidence and explains every resolved overlap.
28
+ - Every selected filename exists under this skill's `phases/` directory.
29
+
30
+ ## Durable Phase Outcome
31
+
32
+ Update the `router` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the inspected artifacts, separate validation evidence, blockers, unresolved obligations, and the selected phase or terminal. The selected phase remains advisory until root re-entry confirms it from current evidence.
33
+
34
+ ## Stop or Re-entry
35
+
36
+ Return the selection to root. Root loads exactly one selected phase. Stop on blocked or audit-complete outcomes.
@@ -0,0 +1,33 @@
1
+ # Test Target Routes
2
+
3
+ ## Selection Condition
4
+
5
+ Select when disclosure passes and route predictions, derivations, or mismatch repairs are incomplete or stale.
6
+
7
+ ## Bounded Work
8
+
9
+ - Update the [Route Matrix](../references/authoring-contract.md#route-matrix-ten-scenarios).
10
+ - Record each predicted route before applying the target contracts.
11
+ - Derive each route from current evidence, authority, guards, and precedence.
12
+ - Cover all ten scenarios: baseline path, branch path, repair cycle, planned
13
+ human checkpoint, failure handback terminal, cold resume, stale or
14
+ out-of-scope or invalid artifact, contradictory suggested route losing to
15
+ evidence, narrower executor substitution with a stable actor-like gate
16
+ boundary, and premature completion rejected by the terminal guard.
17
+ - Keep the planned checkpoint distinct from the
18
+ [human steering terminal](../references/authoring-contract.md#human-steering-terminal).
19
+ - Repair only mismatches, then repeat prediction and derivation for the repaired case.
20
+
21
+ ## Checkable Completion State
22
+
23
+ - All ten scenarios contain prediction, derived route, and match result.
24
+ - Stale, out-of-scope, and invalid artifacts each appear as a subcase.
25
+ - Mismatches contain repair evidence; matches contain no speculative repair.
26
+
27
+ ## Durable Phase Outcome
28
+
29
+ Update the `test-routes` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the route matrix artifact, separate scenario results, blockers, mismatches, and completed repairs.
30
+
31
+ ## Stop or Re-entry
32
+
33
+ Stop after writing the outcome, or re-enter root. Do not load another phase directly.
@@ -0,0 +1,28 @@
1
+ # Verify Progressive Disclosure
2
+
3
+ ## Selection Condition
4
+
5
+ Select when target root, router, gates, and handoffs exist while context loading, pointer reachability, sibling isolation, or reference placement is unverified or invalid.
6
+
7
+ ## Bounded Work
8
+
9
+ - Trace one target invocation from bootstrap to router to one selected gate.
10
+ - Verify the loaded context contains bootstrap, router, and exactly one selected gate.
11
+ - Resolve every operational pointer from target root, router, and selected phases.
12
+ - Keep sibling gate files outside the trace.
13
+ - Keep references shared, or split them only when a genuine conditional branch saves unrelated context.
14
+ - Move any executable gate body found in a reference into its flat target phase file.
15
+
16
+ ## Checkable Completion State
17
+
18
+ - The context trace contains target bootstrap, router, and exactly one selected gate.
19
+ - Every operational reference is reachable from root, router, or the selected phase.
20
+ - Every pointer resolves, sibling gates remain unloaded, and references contain no executable gate body.
21
+
22
+ ## Durable Phase Outcome
23
+
24
+ Update the `verify-disclosure` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the context trace, separate pointer and isolation checks, blockers, and unreachable material.
25
+
26
+ ## Stop or Re-entry
27
+
28
+ Stop after writing the outcome, or re-enter root. Do not load another phase directly.
@@ -0,0 +1,33 @@
1
+ # Write Every Target Gate
2
+
3
+ ## Selection Condition
4
+
5
+ Select when the target router exists and one or more executable target gates are missing, stale, embedded in root or references, or inconsistent with router selection.
6
+
7
+ ## Bounded Work
8
+
9
+ - Update the [Gate Contract](../references/authoring-contract.md#gate-contract).
10
+ - Create a flat target `phases/` directory.
11
+ - Create one `phases/<gate>.md` for every executable gate or step selected by the target router.
12
+ - Give every gate file these contracts: guard, inputs, bounded action or delegation, invariants, completion evidence, declared exits, durable handoff, and stop or router re-entry.
13
+ - When a gate uses a narrower executor, keep reconciliation, validation, and the durable handoff owned by the actor-like gate boundary.
14
+ - Move executable gate bodies out of target root and references.
15
+ - Apply the [human steering terminal](../references/authoring-contract.md#human-steering-terminal)
16
+ from each applicable gate.
17
+
18
+ ## Checkable Completion State
19
+
20
+ - Every router-selected gate filename exists.
21
+ - Every executable gate has exactly one flat phase file.
22
+ - Every gate defines the normalized contract and emits only declared exits.
23
+ - Target root and references contain no executable gate body.
24
+ - Every applicable gate invokes `$handback` and emits only the terminal's
25
+ durable outcome when its guard selects human steering.
26
+
27
+ ## Durable Phase Outcome
28
+
29
+ Update the `write-phases` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the gate-file artifacts, separate filename and contract checks, blockers, and any missing router-selected gate.
30
+
31
+ ## Stop or Re-entry
32
+
33
+ Stop after writing the outcome, or re-enter root. Do not load another phase directly.
@@ -0,0 +1,30 @@
1
+ # Write the Target Router
2
+
3
+ ## Selection Condition
4
+
5
+ Select when bounds, state, and authority are complete while the target root bootstrap or target `phases/router.md` is missing, stale, or invalid.
6
+
7
+ ## Bounded Work
8
+
9
+ - Update the [Router Contract](../references/authoring-contract.md#router-contract).
10
+ - Write or repair the target `SKILL.md` as bootstrap and invocation guidance.
11
+ - Write or repair the target `phases/router.md` so it derives the next route from current evidence, active obligations, current artifacts, and committed handoffs.
12
+ - Make cold resume independent of transcript continuity.
13
+ - Return exactly one selected gate, terminal, checkpoint, or blocked outcome for every legal state.
14
+ - Preserve the [human steering terminal](../references/authoring-contract.md#human-steering-terminal)
15
+ until the `$handback` authority guard passes.
16
+ - Preserve the target's intentional invocation policy.
17
+
18
+ ## Checkable Completion State
19
+
20
+ - The target root contains no executable gate body.
21
+ - The target router resolves every legal state and conflict to exactly one output.
22
+ - Every selected gate filename is a flat path under target `phases/`.
23
+
24
+ ## Durable Phase Outcome
25
+
26
+ Update the `write-router` entry in `<target-skill>/AUTHORING-HANDOFF.md` with the root and router artifacts, separate route checks, blockers, and unresolved legal states.
27
+
28
+ ## Stop or Re-entry
29
+
30
+ Stop after writing the outcome, or re-enter root. Do not load another phase directly.