@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.
- package/AGENTS.md +2 -1
- package/dist/BASELINE_CHANGELOG.md +10 -3
- package/dist/CHANGELOG.md +13 -1
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +0 -5
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +2 -1
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +16 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/AUTHORING-HANDOFF.md +12 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/SKILL.md +84 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/agents/openai.yaml +4 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/audit.md +33 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/define-authority.md +26 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/define-handoffs.md +34 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/model-state.md +30 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/qualify.md +27 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/router.md +36 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/test-routes.md +33 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/verify-disclosure.md +28 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/write-phases.md +33 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/phases/write-router.md +30 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/docs/write-graph-based-skills/references/authoring-contract.md +226 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/generic/handback/SKILL.md +27 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +9 -4
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
- package/dist/baseline/scaffold-baseline/skills/phases/debugging-phase/SKILL.md +6 -5
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/debug.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/handback.md +23 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +2 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +6 -4
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +25 -19
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +6 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +14 -9
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/router.md +15 -13
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +3 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +15 -12
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/runtime-handoff.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +15 -4
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/AGENTS.md +1 -0
- package/dist/data/shared-agents.md +113 -0
- package/dist/index.js +76 -68
- package/dist/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
- package/dist/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
- package/dist/skills/agnostic/docs/write-graph-based-skills/AUTHORING-HANDOFF.md +12 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/SKILL.md +84 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/audit.md +33 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/define-authority.md +26 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/define-handoffs.md +34 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/model-state.md +30 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/qualify.md +27 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/router.md +36 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/test-routes.md +33 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/verify-disclosure.md +28 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/write-phases.md +33 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/phases/write-router.md +30 -0
- package/dist/skills/agnostic/docs/write-graph-based-skills/references/authoring-contract.md +211 -0
- package/dist/skills/agnostic/generic/handback/SKILL.md +27 -0
- package/dist/skills/agnostic/quality/autoreview/SKILL.md +9 -4
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
- package/dist/skills/phases/debugging-phase/SKILL.md +6 -5
- package/dist/skills/phases/delivery-phase/SKILL.md +5 -1
- package/dist/skills/phases/delivery-phase/phases/debug.md +2 -2
- package/dist/skills/phases/delivery-phase/phases/handback.md +23 -0
- package/dist/skills/phases/delivery-phase/phases/implement.md +2 -0
- package/dist/skills/phases/delivery-phase/phases/review.md +6 -4
- package/dist/skills/phases/delivery-phase/phases/router.md +23 -17
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +6 -2
- package/dist/skills/phases/review-phase/phases/return-route.md +14 -9
- package/dist/skills/phases/review-phase/phases/router.md +15 -13
- package/dist/skills/phases/review-phase/phases/run-review.md +3 -2
- package/dist/skills/phases/review-phase/references/durable-report.md +10 -8
- package/dist/skills/phases/review-phase/references/runtime-handoff.md +2 -2
- package/dist/skills/phases/review-phase/references/state-graph.md +5 -1
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +2 -0
- package/package.json +1 -1
|
@@ -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
|
-
- `
|
|
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.
|