@hassangameryt/freeflow 0.7.1 → 0.7.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +28 -23
- package/capabilities/cognitive-routing/SKILL.md +94 -311
- package/command-surface.json +7 -1
- package/gemini-extension.json +1 -1
- package/package.json +4 -4
- package/pi-extension/dist/cognitive-routing-v2/budget.js +42 -0
- package/pi-extension/dist/cognitive-routing-v2/config.js +120 -0
- package/pi-extension/dist/cognitive-routing-v2/projection.js +321 -0
- package/pi-extension/dist/cognitive-routing-v2/render.js +231 -0
- package/pi-extension/dist/cognitive-routing-v2/runtime.js +1585 -0
- package/pi-extension/dist/cognitive-routing-v2/schemas.js +107 -0
- package/pi-extension/dist/cognitive-routing-v2/state.js +612 -0
- package/pi-extension/dist/cognitive-routing-v2/tools.js +91 -0
- package/pi-extension/dist/cognitive-routing-v2/types.js +44 -0
- package/pi-extension/dist/freeflow-context/tool.js +5 -0
- package/pi-extension/dist/index.js +279 -624
- package/pi-extension/dist/runtime/runtime-context.js +63 -13
- package/pi-extension/dist/session-sources/events.js +195 -0
- package/pi-extension/dist/session-sources/read-only-session.js +148 -0
- package/pi-extension/dist/session-sources/sources.js +233 -0
- package/pi-extension/dist/settings/settings-ui.js +44 -117
- package/pi-extension/src/cognitive-routing-v2/budget.ts +42 -0
- package/pi-extension/src/cognitive-routing-v2/config.ts +143 -0
- package/pi-extension/src/cognitive-routing-v2/projection.ts +365 -0
- package/pi-extension/src/cognitive-routing-v2/render.ts +256 -0
- package/pi-extension/src/cognitive-routing-v2/runtime.ts +1634 -0
- package/pi-extension/src/cognitive-routing-v2/schemas.ts +109 -0
- package/pi-extension/src/cognitive-routing-v2/state.ts +622 -0
- package/pi-extension/src/cognitive-routing-v2/tools.ts +93 -0
- package/pi-extension/src/cognitive-routing-v2/types.ts +222 -0
- package/pi-extension/src/freeflow-context/tool.ts +5 -0
- package/pi-extension/src/index.ts +285 -674
- package/pi-extension/src/runtime/runtime-context.ts +75 -14
- package/pi-extension/src/session-sources/events.ts +208 -0
- package/pi-extension/src/session-sources/read-only-session.ts +170 -0
- package/pi-extension/src/session-sources/sources.ts +263 -0
- package/pi-extension/src/settings/settings-ui.ts +54 -131
- package/pi-extension/tests/cognitive-routing-v2/communication.test.js +484 -0
- package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +183 -0
- package/pi-extension/tests/cognitive-routing-v2/native.test.js +441 -0
- package/pi-extension/tests/cognitive-routing-v2/performance.test.js +87 -0
- package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +245 -0
- package/pi-extension/tests/cognitive-routing-v2/projection.test.js +241 -0
- package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +236 -0
- package/pi-extension/tests/cognitive-routing-v2/render.test.js +230 -0
- package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +153 -0
- package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +521 -0
- package/pi-extension/tests/cognitive-routing-v2/state.test.js +275 -0
- package/pi-extension/tests/context-virtualization/extension.test.js +16 -0
- package/pi-extension/tests/fixtures/routing-native.js +188 -0
- package/pi-extension/tests/integration/mode-free-core.test.js +3 -2
- package/pi-extension/tests/integration/pi-extension.test.js +154 -37
- package/pi-extension/tests/integration/prompt-architecture.test.js +87 -6
- package/pi-extension/tests/integration/unaffected-regressions.test.js +77 -10
- package/plugin.json +1 -1
- package/runtime/prompts/cognitive-routing.md +4 -5
- package/runtime/prompts/core.md +51 -45
- package/runtime/prompts/interaction-contract.md +5 -5
- package/skills/action-selection/SKILL.md +57 -97
- package/skills/design-for-depth/SKILL.md +58 -193
- package/skills/design-for-depth/references/implementation-decisions.md +76 -0
- package/skills/diagnose-failure/SKILL.md +64 -196
- package/skills/discuss/SKILL.md +64 -123
- package/skills/discuss/references/discussion-continuity.md +7 -3
- package/skills/execute-work/SKILL.md +69 -88
- package/skills/execute-work/references/execute-work-edges.md +9 -3
- package/skills/handoff/SKILL.md +44 -54
- package/skills/handoff/references/handoff-templates.md +15 -6
- package/skills/review-artifact/SKILL.md +80 -127
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +1 -1
- package/skills/review-work/SKILL.md +65 -115
- package/skills/review-work/references/independent-work-reviewer-contract.md +1 -1
- package/skills/simplify-code/SKILL.md +47 -100
- package/skills/track-work/SKILL.md +128 -119
- package/skills/track-work/references/working-record-format.md +14 -2
- package/skills/verify-work/SKILL.md +58 -62
- package/skills/verify-work/references/integration-evidence.md +4 -2
- package/skills/verify-work/references/test-design.md +89 -0
- package/skills/workflow/SKILL.md +73 -119
- package/skills/write-plan/SKILL.md +46 -77
- package/skills/write-plan/references/plan-shapes.md +5 -5
- package/skills/write-spec/SKILL.md +51 -63
- package/skills/write-spec/references/artifact-standards.md +2 -2
- package/skills/write-spec/references/decision-records.md +3 -2
- package/skills/write-spec/references/spec-shapes.md +15 -0
- package/pi-extension/dist/cognitive-routing/commands.js +0 -96
- package/pi-extension/dist/cognitive-routing/config.js +0 -232
- package/pi-extension/dist/cognitive-routing/controller.js +0 -1292
- package/pi-extension/dist/cognitive-routing/history.js +0 -451
- package/pi-extension/dist/cognitive-routing/host.js +0 -188
- package/pi-extension/dist/cognitive-routing/pi-routing-session.js +0 -414
- package/pi-extension/dist/cognitive-routing/pi-session-control.js +0 -320
- package/pi-extension/dist/cognitive-routing/runtime.js +0 -43
- package/pi-extension/dist/cognitive-routing/tool.js +0 -212
- package/pi-extension/dist/cognitive-routing/types.js +0 -6
- package/pi-extension/src/cognitive-routing/commands.ts +0 -129
- package/pi-extension/src/cognitive-routing/config.ts +0 -303
- package/pi-extension/src/cognitive-routing/controller.ts +0 -1628
- package/pi-extension/src/cognitive-routing/history.ts +0 -650
- package/pi-extension/src/cognitive-routing/host.ts +0 -266
- package/pi-extension/src/cognitive-routing/pi-routing-session.ts +0 -538
- package/pi-extension/src/cognitive-routing/pi-session-control.ts +0 -444
- package/pi-extension/src/cognitive-routing/runtime.ts +0 -57
- package/pi-extension/src/cognitive-routing/tool.ts +0 -273
- package/pi-extension/src/cognitive-routing/types.ts +0 -89
- package/pi-extension/tests/cognitive-routing/commands.test.js +0 -134
- package/pi-extension/tests/cognitive-routing/controller.test.js +0 -1128
- package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +0 -1142
- package/pi-extension/tests/cognitive-routing/history.test.js +0 -274
- package/pi-extension/tests/cognitive-routing/host-identity.test.js +0 -63
- package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +0 -434
- package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +0 -174
- package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +0 -91
- package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +0 -279
- package/pi-extension/tests/cognitive-routing/tool.test.js +0 -230
- package/skills/tdd/SKILL.md +0 -143
- package/skills/tdd/references/test-design.md +0 -96
- /package/pi-extension/tests/{cognitive-routing/host-fixture.js → fixtures/pi-host.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Read this before preserving discussion across context loss, creating or updating durable task memory from discussion, or carrying a proposed or selected checkpoint beyond the current conversational context.
|
|
4
4
|
|
|
5
|
-
Discussion state is not automatically a Working Record, Spec, Plan, checkpoint, or authority.
|
|
5
|
+
Discussion state is not automatically a Working Record, Spec, Plan, checkpoint, or authority. Preserve the required outcome separately from the current approach, and distinguish the user's execution agreement from proposals that have not been selected.
|
|
6
6
|
|
|
7
7
|
## Keep It In Conversation When Possible
|
|
8
8
|
|
|
@@ -23,7 +23,7 @@ Authority or decision still needed:
|
|
|
23
23
|
|
|
24
24
|
Prefer natural prose. Use structured fields only when they prevent ambiguity or support a transition. Never emit empty or irrelevant fields.
|
|
25
25
|
|
|
26
|
-
Do not preserve a transcript, repeated rationale, rejected alternatives that no longer matter, or every discussion turn.
|
|
26
|
+
Do not preserve a transcript, repeated rationale, rejected alternatives that no longer matter, or every discussion turn. Retain a rejected approach when losing its reason would cause the next context to repeat it.
|
|
27
27
|
|
|
28
28
|
## Choose Durable Memory By Purpose
|
|
29
29
|
|
|
@@ -62,6 +62,10 @@ Preserve only supported state that could affect later interpretation or action.
|
|
|
62
62
|
|
|
63
63
|
When the initial record need arises from discussion, preserve the state that justified the record in the first authorized atomic update. Do not create an empty shell and lose the decisions, proposals, or uncertainty that made continuity necessary.
|
|
64
64
|
|
|
65
|
+
When a rough route is useful, preserve provisional Slices and their actual dependencies without pretending the later implementation is settled. Keep the current unit concrete and later work directional. Use the existing Current Context, Current Work, Future Work, and History fields; do not add a second phase or context-cycle ledger.
|
|
66
|
+
|
|
67
|
+
Preserve the agreed outcome, scope, and user-facing return condition when losing them could interrupt covered work or permit drift. Authorization to investigate or propose a design is not acceptance of its production consequences. When learning changes the approach, retain the question, strongest evidence and limits, remaining uncertainty, artifact disposition, and affected later work—not the prototype's construction history.
|
|
68
|
+
|
|
65
69
|
After preservation, return to Discuss unless Workflow established another route. Record mutation does not transfer ownership or authorize execution.
|
|
66
70
|
|
|
67
71
|
## Carry Proposed And Selected Checkpoints
|
|
@@ -107,7 +111,7 @@ Authority or user decision needed:
|
|
|
107
111
|
|
|
108
112
|
Do not restart from zero, rewrite unaffected decisions, or narrate completed work.
|
|
109
113
|
|
|
110
|
-
After context loss, recover through Track Work
|
|
114
|
+
After context loss, recover the complete record through Track Work's `full` view before relying on it. Compare current sections and relevant History with current user direction, accepted artifacts, and live evidence. Reconcile affected meaning and dependent future work; do not repeat a disproved approach or preserve a stale plan merely because the record contains it. With intact context, use `resume` or targeted reads only when needed.
|
|
111
115
|
|
|
112
116
|
## Stop
|
|
113
117
|
|
|
@@ -1,141 +1,122 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execute-work
|
|
3
|
-
description: Use when carrying out
|
|
3
|
+
description: "Use when preparing and carrying out requested or approved concrete work, including implementation, fixes, prototypes, documentation, configuration, and repository maintenance."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Execute Work
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Produce the agreed concrete result through supported preparation, bounded execution, verification, and correction. Do not make the user supply an implementation plan when the request authorizes you to figure it out.
|
|
9
9
|
|
|
10
|
-
Workflow establishes the
|
|
10
|
+
Workflow establishes the work agreement and coordinates authority, ownership, and the user-facing return boundary. Execute Work owns implementation preparation and continuation within it. Task memory belongs to Track Work; governing choices remain with the user.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Establish The Execution Basis
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Consume the current request, accepted discussion, governing artifacts, and relevant live state. Establish which assignment and stopping condition currently apply; do not combine older directions with a superseding contract. Resolve material ambiguity before dependent effects. Do not restart discovery because execution was selected.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Before production changes, establish:
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
- **Outcome:** the required result, constraints, non-goals, and acceptance boundary.
|
|
19
|
+
- **Approach:** the supported mechanism, affected code or artifacts, dependencies, and necessary ordering.
|
|
20
|
+
- **Evidence:** a check or observation capable of disagreeing with the result.
|
|
21
|
+
- **Agreement:** covered effects, extent of work, and when to return to the user.
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
[Accepted concrete result]
|
|
22
|
-
-> [Consume the current Slice and relevant live state]
|
|
23
|
-
-> [Choose one bounded action and a check that can disagree]
|
|
24
|
-
-> [Choose one primary execution route]
|
|
25
|
-
-> [Execute and observe]
|
|
26
|
-
-> [Determine what the evidence supports]
|
|
27
|
-
-> unsupported cause or repeated failure -> Diagnose Failure
|
|
28
|
-
-> user-owned choice or source conflict -> Decision Gate
|
|
29
|
-
-> supported -> Verify at the required boundary
|
|
30
|
-
-> self-review
|
|
31
|
-
-> accept or correct once
|
|
32
|
-
-> [Continue inside the Slice or return the changed boundary to Workflow]
|
|
33
|
-
```
|
|
23
|
+
Before effects, check whether a selected checkpoint or separately controlled boundary is already due. Do not cross it while unresolved.
|
|
34
24
|
|
|
35
|
-
|
|
25
|
+
If the agreement is materially unclear, return to [Workflow](../workflow/SKILL.md) before the unsettled execution. A clear request may already establish it; do not ask again merely to perform a ritual.
|
|
36
26
|
|
|
37
|
-
|
|
27
|
+
An agreement to fix a bug can cover investigation before the remedy is known. An agreement to return a plan does not cover production edits. Distinguish evidence gathering from implementation even when both are authorized.
|
|
38
28
|
|
|
39
|
-
|
|
29
|
+
Use [Discuss](../discuss/SKILL.md) when outcome or material approach alternatives need reconsideration, [Decision Gate](../decision-gate/SKILL.md) for one blocking user-owned choice or source conflict, and [Diagnose Failure](../diagnose-failure/SKILL.md) when the cause is unsupported.
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
## Gather Enough Context For This Unit
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
- inspect the smallest live source set needed to avoid relying on stale context;
|
|
45
|
-
- identify one bounded action;
|
|
46
|
-
- name the claim its result must support;
|
|
47
|
-
- identify a direct check or observation that can disagree;
|
|
48
|
-
- confirm no selected checkpoint or separately controlled boundary is already due.
|
|
33
|
+
Choose the next coherent result, then identify what is missing to implement and check it. Reuse current supported sources; inspect only the live boundaries whose freshness matters.
|
|
49
34
|
|
|
50
|
-
|
|
35
|
+
Find the relevant mechanism, callers, contracts, and observing seam before changing them. Do not begin substantial implementation from a guessed API, ownership boundary, or failure cause. Do not read every file or settle every later Slice merely to avoid all uncertainty.
|
|
51
36
|
|
|
52
|
-
|
|
37
|
+
Readiness means you can explain what will change, why it should produce the accepted result, and how the result will be checked. It does not require knowing every line or helper in advance. If an unfamiliar fixture or observing stage could invalidate substantial dependent work, establish that observer first through a bounded investigation. Reuse adequate fixtures; do not make a separate prototype mandatory.
|
|
53
38
|
|
|
54
|
-
|
|
39
|
+
Before substantial implementation, read [Design for Depth](../design-for-depth/SKILL.md) and use its Implementation Decisions method when unresolved representation, identity, ownership, algorithm, or failure choices could invalidate significant dependent work. Reuse applicable design decisions already supplied; distinguish required constraints, suggested mechanisms, and local freedom. A reference to a design is not enough when its relevant content is unavailable. Resolve the consequential unknown, not every future coding detail.
|
|
55
40
|
|
|
56
|
-
|
|
41
|
+
Use [Action Selection](../action-selection/SKILL.md) when choosing the next source, observer, or effect is uncertain, broad, or repetitive. Stop gathering when the current unit is sufficiently supported. A mechanical read of a known caller or signature can remain inside execution; discovering an invalidated mechanism requires re-entry before dependent edits.
|
|
57
42
|
|
|
58
|
-
|
|
43
|
+
When specialized guidance is needed, read [Domain Skill Composition](../workflow/references/domain-skill-composition.md). Before writing or changing code, read [Code Practices](references/code-practices.md). Before designing or materially changing a behavior check, read [Test Design](../verify-work/references/test-design.md); choose its oracle from accepted behavior rather than the implementation.
|
|
59
44
|
|
|
60
|
-
|
|
61
|
-
- one behavior-preserving simplification with before-and-after evidence;
|
|
62
|
-
- one coherent documentation, configuration, or repository change;
|
|
63
|
-
- one reversible learning result with a discard, revise, or promotion condition;
|
|
64
|
-
- one direct mechanical result whose complete effect is already clear.
|
|
45
|
+
## Keep The Unit Coherent
|
|
65
46
|
|
|
66
|
-
|
|
47
|
+
A bounded action produces one useful execution or learning result with a checkable claim. It may contain several files, tools, edits, and checks. Do not fragment it by command, file, test, or method change.
|
|
67
48
|
|
|
68
|
-
|
|
49
|
+
Choose work that can be understood, executed, checked, and corrected with a manageable working set. Split when dependencies, uncertainty, or distinct outcomes make one attempt unreliable; retain enough understanding of later constraints to avoid an obvious dead end.
|
|
69
50
|
|
|
70
|
-
|
|
51
|
+
When a Working Record exists, use [Track Work](../track-work/SKILL.md) for recovery and write-ahead Current Slice state before Slice execution. Preserve useful provisional remaining work and dependencies through its existing fields. Do not create memory for a short direct result merely because execution began.
|
|
71
52
|
|
|
72
|
-
|
|
53
|
+
Read [Execute Work Edges](references/execute-work-edges.md) when resuming uncertain prior work, changing a Slice boundary, reaching a selected checkpoint, or exposing separately controlled follow-on work.
|
|
73
54
|
|
|
74
|
-
|
|
75
|
-
- use [TDD](../tdd/SKILL.md) when accepted behavior should be guided by an observed failing check;
|
|
76
|
-
- use [Simplify Code](../simplify-code/SKILL.md) when working behavior should become easier to understand or change without altering its contract;
|
|
77
|
-
- use the required domain guidance when technology, risk, or repository conventions need a specialized method;
|
|
78
|
-
- use [Diagnose Failure](../diagnose-failure/SKILL.md) before correction when the cause is unsupported or repeated attempts have failed.
|
|
55
|
+
## Execute Through One Suitable Method
|
|
79
56
|
|
|
80
|
-
|
|
57
|
+
Implement the supported approach directly when the outcome and mechanism are understood. Unfamiliar work may need preparation first; it does not automatically require a separate prototype or a test-first implementation sequence.
|
|
81
58
|
|
|
82
|
-
|
|
59
|
+
Use one primary method at a time:
|
|
83
60
|
|
|
84
|
-
|
|
61
|
+
- direct implementation for a supported change;
|
|
62
|
+
- [Simplify Code](../simplify-code/SKILL.md) when behavior-preserving complexity reduction is the accepted outcome;
|
|
63
|
+
- specialized domain guidance when the environment or risk needs it;
|
|
64
|
+
- a bounded learning action when an empirical uncertainty must be resolved before production work.
|
|
85
65
|
|
|
86
|
-
|
|
66
|
+
Preserve accepted behavior, failure semantics, repository conventions, and source truth. Do not rewrite tests, Specs, Plans, policies, or acceptance merely to make implementation pass.
|
|
87
67
|
|
|
88
|
-
|
|
68
|
+
Allow local choices of helpers, editing order, and focused checks while the agreed result and effects remain unchanged. Handle edge cases required by accepted behavior, direct evidence, or material safety; return undefined consequential behavior rather than encode a guess.
|
|
89
69
|
|
|
90
|
-
|
|
70
|
+
For an unfamiliar design boundary that could invalidate later work, establish its first coherent implementation and distinguishing observation before dependent expansion. Compare the actual ownership, identity, ordering, and failure behavior with the selected design—not merely its proposed filenames. Preserve accepted predicates when a sketch proves wrong; stop dependent effects and resolve the affected mechanism through the current owner. Supported local improvements need no automatic handback or separate review.
|
|
91
71
|
|
|
92
|
-
|
|
72
|
+
## Execute A Bounded Learning Action
|
|
93
73
|
|
|
94
|
-
|
|
74
|
+
Consume the declared question, observer, permitted effects, expected evidence, and return condition. If they are insufficient for safe execution, establish the missing basis through the requesting owner before acting. Do not assume Discuss was previously used or repeat framing that is already adequate.
|
|
95
75
|
|
|
96
|
-
|
|
76
|
+
Build and run only what the observation needs. Correct an understood local observer defect within scope. Before adding scaffolding or a dependency, check whether it serves the current observation or implements a future product. Return before materially expanding effects or pursuing a different question.
|
|
97
77
|
|
|
98
|
-
|
|
78
|
+
Stop when the question is answered or the observing limit is reached. Report support, contradiction, inconclusive evidence, or unavailable evidence honestly; do not keep polishing the prototype to manufacture a favorable result.
|
|
99
79
|
|
|
100
|
-
|
|
80
|
+
Return evidence, limits, exploratory artifacts, and residual effects to the owner that asked the question, following the agreed artifact disposition. Do not silently promote exploratory code into production, invent acceptance, or claim unobserved integration. The receiving owner assesses what the finding changes and which next action is supported and authorized.
|
|
101
81
|
|
|
102
|
-
|
|
82
|
+
## Re-enter When The Basis Changes
|
|
103
83
|
|
|
104
|
-
|
|
105
|
-
2. Use [Verify Work](../verify-work/SKILL.md) when the claim or observing boundary needs explicit factual classification.
|
|
106
|
-
3. Once fresh evidence supports the claim, use [Review Work](../review-work/SKILL.md) for silent self-review.
|
|
107
|
-
4. Return one clear local defect to the producing route when existing authority covers correction.
|
|
108
|
-
5. Re-run the affected evidence and repeat only the affected review lenses once.
|
|
109
|
-
6. Use Diagnose Failure when the cause is unclear or correction repeats.
|
|
110
|
-
7. Use Decision Gate when evidence exposes unsettled behavior or a user-owned choice.
|
|
84
|
+
Do not continue merely because implementation has begun.
|
|
111
85
|
|
|
112
|
-
|
|
86
|
+
- Clear local defect and supported remedy -> correct within the same action.
|
|
87
|
+
- Required outcome clear but mechanism invalidated -> stop dependent edits and re-establish the approach.
|
|
88
|
+
- Failure cause unclear or correction repeats -> Diagnose Failure before another patch.
|
|
89
|
+
- Expected behavior or acceptance unsettled -> Discuss or Decision Gate.
|
|
90
|
+
- New requirement, scope, compatibility, persistence, evidence, or user-facing return boundary -> Workflow before adopting it.
|
|
113
91
|
|
|
114
|
-
|
|
92
|
+
Before pursuing a prerequisite, distinguish what the accepted outcome requires from what the current approach happens to need. Choose the smallest supported remedy preserving acceptance. A failed approach does not prove that a host change or stronger guarantee is necessary.
|
|
115
93
|
|
|
116
|
-
|
|
94
|
+
When corrections keep adding caller coordination, public states, flags, retries, test-only seams, or recovery rules, stop the patch stream. Diagnose the cause; use [Design for Depth](../design-for-depth/SKILL.md) when direct evidence establishes structural pressure. Do not use that lens to broaden ordinary local work.
|
|
95
|
+
|
|
96
|
+
Preserve unaffected changes and contradictory evidence. An optional improvement is not unfinished work.
|
|
97
|
+
|
|
98
|
+
## Verify And Self-Review The Result
|
|
117
99
|
|
|
118
|
-
|
|
100
|
+
Check at the boundary where a result will be accepted or used—not after every edit or command.
|
|
119
101
|
|
|
120
|
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
102
|
+
1. Run the covered focused checks through the actual behavior or artifact boundary.
|
|
103
|
+
2. Use [Verify Work](../verify-work/SKILL.md) to classify what the observations support and what remains unverified.
|
|
104
|
+
3. Once evidence initially supports the result, use [Review Work](../review-work/SKILL.md) for silent self-review of concrete work. Guiding artifacts use their owning artifact-review route.
|
|
105
|
+
4. Correct a supported local defect within authority, then rerun affected evidence and affected review lenses once.
|
|
106
|
+
5. Route unresolved or repeated failure rather than iterating blindly. Distinguish a code defect from an invalid observer, stale evidence, or a misunderstood assignment before selecting another correction.
|
|
124
107
|
|
|
125
|
-
A
|
|
108
|
+
A green check proves only its exercised assertions; a source read does not prove runtime behavior. Tests may be written before or after implementation as appropriate, without a formal test-first loop or invented earlier failure. Review judges suitability without replacing evidence. Evidence gaps in required behavior remain visible; optional stronger claims may be qualified instead of becoming extra work.
|
|
126
109
|
|
|
127
|
-
|
|
110
|
+
Independent review is separately selected. A self-review finding does not require a reviewer, and a reviewer suggestion does not authorize another change.
|
|
111
|
+
|
|
112
|
+
## Continue Or Return
|
|
128
113
|
|
|
129
|
-
|
|
114
|
+
Continue within the Slice while the next action serves the same outcome, remains covered, and can still be checked coherently. A method change, correction, or verification run does not create or close a Slice.
|
|
130
115
|
|
|
131
|
-
|
|
116
|
+
When durable memory exists, preserve only material changes to understanding, dependencies, scope, evidence, blockers, and the next useful action. Before context loss, record truthful partial state rather than rushing to completion. Resume only after required reconstruction and relevant live-state reconciliation.
|
|
132
117
|
|
|
133
|
-
|
|
118
|
+
Return to Workflow when a distinct Slice is ready, a selected checkpoint is due, the agreement changes, or no useful covered continuation remains. Workflow can select another already-authorized Slice without asking the user again. Internal method returns and delegation handbacks are not the user-facing endpoint.
|
|
134
119
|
|
|
135
|
-
|
|
136
|
-
- the strongest fresh evidence and what it does not prove;
|
|
137
|
-
- material corrections or route changes;
|
|
138
|
-
- the Current Slice or checkpoint state when relevant;
|
|
139
|
-
- unresolved, deferred, or unverified work.
|
|
120
|
+
Stop at the agreed return condition or an uncovered consequential boundary. Do not add cleanup, documentation, migration, deprecation, commit, push, integration, release, or launch merely because it would be useful.
|
|
140
121
|
|
|
141
|
-
|
|
122
|
+
Construct the report from inspected resulting files, assertions, and outputs—not requested changes phrased as accomplishments. Distinguish implemented, checked, and still unsupported properties. Account for relevant edits after the checks; do not pair a fresh pass with superseded code or test captures. Reuse applicable evidence and report missing bodies or cases explicitly. A completed action is not automatically a completed Slice, task, or delivery.
|
|
@@ -12,6 +12,8 @@ When durable memory exists, enter [Track Work](../../track-work/SKILL.md) and us
|
|
|
12
12
|
|
|
13
13
|
Resume the same Slice only while its intended result, authority, evidence boundary, and stop condition remain coherent. Otherwise preserve supported work and return the changed boundary to [Workflow](../../workflow/SKILL.md).
|
|
14
14
|
|
|
15
|
+
Recover the user-facing return condition separately from the next internal action. A supported record may preserve approval for the remaining task, but a proposed next action is not that approval. After reconstruction, continue covered work rather than returning solely because a context boundary occurred.
|
|
16
|
+
|
|
15
17
|
Do not restart discovery, repeat supported work, or infer progress from summaries, Plans, records, handoffs, staged files, or partial artifacts.
|
|
16
18
|
|
|
17
19
|
## Distinguish Adaptation From Boundary Change
|
|
@@ -24,11 +26,15 @@ Routine changes to local mechanics, implementation order, tools, and focused che
|
|
|
24
26
|
- the required observing boundary;
|
|
25
27
|
- the stop condition.
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
A mechanical read of a known caller or a local correction may remain inside execution. If new evidence invalidates the implementation premise, stop dependent edits and re-establish the approach; do not hide renewed investigation inside a patch stream.
|
|
30
|
+
|
|
31
|
+
Before following a new prerequisite, identify whether it blocks the required outcome, the chosen approach, or only the current observer. Preserve acceptance, compare supported in-scope remedies, and return to Workflow when the remedy changes behavior, scope, persistence, compatibility, public interfaces, risk, evidence quality, or another user-owned outcome.
|
|
28
32
|
|
|
29
33
|
Keep an accepted extension in the current Slice only when its result remains coherent, explicit authority covers the added effects, and the combined boundary can still be verified as one unit. When a Working Record exists, Track Work records the extension before execution.
|
|
30
34
|
|
|
31
|
-
Use another Slice when the work has a distinct result, authority source, evidence boundary, independently useful outcome, or explicit abandonment of the original result.
|
|
35
|
+
Use another Slice when the work has a distinct result, authority source, evidence boundary, independently useful outcome, or explicit abandonment of the original result. Context pressure may require an earlier safe continuation boundary without inventing a completed result or new Slice.
|
|
36
|
+
|
|
37
|
+
A whole-task agreement may already cover later Slices. Return their selection and lifecycle to Workflow and Track Work without requesting redundant user permission. A selected checkpoint or the agreed user-facing endpoint still stops dependent work.
|
|
32
38
|
|
|
33
39
|
## Route A Selected Checkpoint
|
|
34
40
|
|
|
@@ -44,7 +50,7 @@ Stop before dependent work, use the checkpoint’s owner, and return its result
|
|
|
44
50
|
|
|
45
51
|
When durable memory exists, Track Work preserves the checkpoint’s selection, condition, result, and task effect.
|
|
46
52
|
|
|
47
|
-
Do not create a checkpoint merely because an action or Slice ended. Do not force a stale checkpoint when its condition, evidence, or protected boundary no longer holds.
|
|
53
|
+
Do not create a checkpoint merely because an action or Slice ended. Do not force a stale checkpoint when its condition, evidence, or protected boundary no longer holds; return the discrepancy for a supported cancellation, replacement, deferral, or revision before dependent work.
|
|
48
54
|
|
|
49
55
|
## Separate Follow-On Work
|
|
50
56
|
|
package/skills/handoff/SKILL.md
CHANGED
|
@@ -1,92 +1,82 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff
|
|
3
|
-
description: Use when work must continue safely after a pause, context change, or ownership transfer.
|
|
3
|
+
description: "Use when work must continue safely after a pause, context change, or ownership transfer."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Handoff
|
|
7
7
|
|
|
8
|
-
Preserve the
|
|
8
|
+
Preserve the point-in-time information another context needs to continue the agreed work without restarting discovery or changing its goal.
|
|
9
9
|
|
|
10
|
-
A
|
|
10
|
+
A [Working Record](../track-work/SKILL.md) maintains living task state. A handoff identifies that record, the relevant sources, and transfer-specific facts the recipient would otherwise miss. Neither is authority, proof of completion, or a replacement for current user direction and live evidence.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Choose The Transfer Boundary
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Identify the recipient, purpose, and available transfer mechanism before writing.
|
|
15
15
|
|
|
16
|
-
- **Ephemeral handoff:** use the
|
|
17
|
-
- **Repo-memory handoff:** use the repository's established
|
|
16
|
+
- **Ephemeral handoff:** use the response or host continuation mechanism for immediate transfer, including compaction. Use a temporary file only when the transfer needs it.
|
|
17
|
+
- **Repo-memory handoff:** use the repository's established destination when durable continuation documentation is requested or approved.
|
|
18
18
|
- **User-provided destination:** follow the requested safe location and format.
|
|
19
19
|
|
|
20
|
-
Do not
|
|
20
|
+
Do not turn an ephemeral transfer into repository memory. If the destination materially changes durability, privacy, repository state, audience, or authority and the user has not chosen it, ask one question and wait.
|
|
21
21
|
|
|
22
|
-
Read [Handoff Templates](references/handoff-templates.md) after the
|
|
22
|
+
Read [Handoff Templates](references/handoff-templates.md) after the shape, recipient, and purpose are clear. Use only fields that change safe continuation; the template is not a requirement to create another document.
|
|
23
23
|
|
|
24
|
-
## Prepare From
|
|
24
|
+
## Prepare From The Actual State
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Inspect only the relevant worktree, artifacts, processes, and evidence needed to describe what the recipient will encounter. Reconcile an existing Working Record through Track Work when its understanding, current work, dependencies, evidence, or next action changed.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
2. Reconcile an existing Working Record when its current state, slice, decisions, checkpoints, or next action changed.
|
|
30
|
-
3. Identify the recipient, purpose, and boundary being crossed.
|
|
31
|
-
4. Separate the next accepted action and its authority source from an unapproved recommendation.
|
|
28
|
+
Preserve the execution agreement separately from the immediate assignment: what outcome remains authorized, what this unit covers, what is excluded, and when the user expects a return. Identify the assignment's source and any superseded instruction whose reuse would misdirect continuation. A recommendation to continue is not the same as approval to finish the remaining task.
|
|
32
29
|
|
|
33
|
-
Do not create a
|
|
30
|
+
Do not create a record merely because a handoff exists or change task/Slice state merely because context will be transferred. Use the host's safe boundary for ongoing operations; do not infer an unobserved result or interrupt a mutation to make a cleaner handoff.
|
|
34
31
|
|
|
35
|
-
|
|
32
|
+
Partial work is a valid transfer state. Preserve unverified edits, failing checks, unresolved causes, and residual effects honestly. Do not rush to completion because compaction is near.
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
## Capture The Next Useful Continuation
|
|
38
35
|
|
|
39
|
-
|
|
40
|
-
- current state and Workflow route, when one exists;
|
|
41
|
-
- completed work and what fresh evidence supports or does not support;
|
|
42
|
-
- relevant worktree, process, environment, or artifact identity needed to prevent loss or false claims;
|
|
43
|
-
- active decisions and the source that established them;
|
|
44
|
-
- invalidated assumptions, deviations, and affected Spec or Plan sections;
|
|
45
|
-
- unresolved owner decisions, missing evidence, blockers, and stop conditions;
|
|
46
|
-
- next accepted action with its authority source, or the recommended next route when not yet approved;
|
|
47
|
-
- exact pointers the recipient must reopen.
|
|
36
|
+
Include only material information:
|
|
48
37
|
|
|
49
|
-
|
|
38
|
+
- the intended outcome, agreed scope, user-facing return condition, and defining sources;
|
|
39
|
+
- current task/Slice and Workflow route when present;
|
|
40
|
+
- completed and partial work, supporting evidence, and what remains unverified;
|
|
41
|
+
- relevant repository, worktree, artifact, configuration, or process identity;
|
|
42
|
+
- accepted decisions and their sources, later amendments, and remaining hypotheses;
|
|
43
|
+
- changed assumptions, consequential rejected approaches, and affected Spec or Plan sections;
|
|
44
|
+
- dependencies for remaining work and which are established versus unresolved;
|
|
45
|
+
- the next accepted action and the minimum sources needed for it, or a recommendation awaiting authority;
|
|
46
|
+
- blockers, selected checkpoints, and conditions requiring return rather than continuation.
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
Point to the current Working Record and accepted artifacts instead of duplicating their full contents. A Plan preserves strategy; the record preserves actual work and deviations. The handoff preserves transfer-specific context, not a second mutable task narrative.
|
|
52
49
|
|
|
53
|
-
For
|
|
50
|
+
For learning, preserve the question, evidence and limits, the discard/revise/promote/inconclusive result, exploratory-artifact disposition, and consequence for dependent work. A recorded promotion does not grant production authority.
|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
For selected independent review, preserve review number, reviewed state, reviewer and adjudicated judgments, material Accepted or Open findings, changed areas, and whether follow-up remains selected. A new context or reviewer does not reset the budget.
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
## Preserve Scope And Evidence
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
A newer summary is not necessarily a newer accepted decision. Distinguish source-backed changes from proposals; do not let "next" turn an optional follow-up into an obligation or carry a stronger claim than the evidence supports.
|
|
60
57
|
|
|
61
|
-
-
|
|
62
|
-
- volatile inventories or background that does not change continuation;
|
|
63
|
-
- secrets, credentials, tokens, unrestricted personal data, or unnecessary private payloads;
|
|
64
|
-
- instructions to trust the handoff without reinspection;
|
|
65
|
-
- unapproved work presented as the next executable action.
|
|
58
|
+
Include narrow dirty-state or process details when omission could cause loss, overwrite, duplicate execution, or false completion. Keep check outputs linked to the code/artifact and observer state they examined using available identities or source pointers. Distinguish an actual prior observation from whether it still applies after later changes. A missing output is unavailable evidence, not a reason to invent or automatically repeat the run. Do not copy full diffs, logs, transcripts, or reviewer reports when exact recoverable pointers suffice.
|
|
66
59
|
|
|
67
|
-
|
|
60
|
+
Exclude secrets, credentials, unrestricted personal data, and private payloads unnecessary for continuation. Do not promise access to unavailable sources or reconstruct their exact content from memory.
|
|
68
61
|
|
|
69
|
-
|
|
62
|
+
If safe transfer would require inventing intent, approval, evidence, status, or destination, state the missing information. Use [Decision Gate](../decision-gate/SKILL.md) when resolving it needs one user-owned choice.
|
|
70
63
|
|
|
71
|
-
|
|
72
|
-
- Compaction is immediate and the host can carry context → return an ephemeral handoff; do not create repository documentation.
|
|
73
|
-
- Durable repo continuation is approved → use the established handoff location and stable source pointers.
|
|
74
|
-
- The handoff conflicts with live code or evidence → live evidence wins; return the conflict to Workflow.
|
|
64
|
+
## Reconstruct Before Resuming
|
|
75
65
|
|
|
76
|
-
|
|
66
|
+
Follow current core and capability recovery guidance before task action. A handoff's earlier route or profile description is not current runtime state.
|
|
77
67
|
|
|
78
|
-
|
|
68
|
+
1. Read the complete Working Record through `view full` when resuming after context loss or into another context. Do not substitute its `resume` view or the handoff's summary. With intact context, follow Track Work's bounded in-session read guidance.
|
|
69
|
+
2. Reconcile the record and handoff with current user direction, defining sources, and the relevant live environment. Follow supersession and corrections without silently reviving historical decisions.
|
|
70
|
+
3. Check important completion, verification, review, commit, and artifact-identity claims against their evidence before repeating them. Reuse adequate current evidence; a transfer alone does not require rerunning every check.
|
|
71
|
+
4. Establish the actual partial state, remaining dependencies, accepted work agreement, current assignment, and next useful action. Resolve contradictory old/new instructions from their sources before acting; do not resume editing when the current unit permits inspection only. Reopen only additional sources whose exact content or freshness changes that action.
|
|
72
|
+
5. Return the recovered state to [Workflow](../workflow/SKILL.md) for the supported route and authority check. Continue covered work through its owner; stop for a genuine blocker or uncovered choice.
|
|
79
73
|
|
|
80
|
-
|
|
81
|
-
2. Retrieve exact Working Record entities only when needed, then verify important completion, evidence, review, commit, and artifact-identity claims before repeating them.
|
|
82
|
-
3. Compare the recorded route, decisions, and assumptions with live evidence.
|
|
83
|
-
4. Preserve what still holds and identify only the invalidated layer.
|
|
84
|
-
5. Return the live state and supported next action to [Workflow](../workflow/SKILL.md).
|
|
74
|
+
Without a Working Record, use the available transfer and exact sources to reconstruct enough state; report any missing boundary rather than inventing it. If a required full-record read is incomplete or unavailable, follow Track Work's stop condition instead of claiming recovery succeeded.
|
|
85
75
|
|
|
86
|
-
Do not edit merely because
|
|
76
|
+
Do not edit merely because a handoff names a next action. Do not restart the whole task or ask for another "continue" solely because an already-authorized task crossed a context boundary. Slice selection and lifecycle remain with Workflow and Track Work, not the handoff.
|
|
87
77
|
|
|
88
78
|
## Report And Stop
|
|
89
79
|
|
|
90
|
-
|
|
80
|
+
Report the transfer shape and destination, sources preserved, actual state and evidence limits, next accepted action or pending recommendation, and material missing or intentionally omitted sensitive information.
|
|
91
81
|
|
|
92
|
-
At
|
|
82
|
+
At the selected pause or transfer boundary, stop after delivering the handoff. It does not complete, block, abandon, or supersede the task or Slice. On recovery, end Handoff once the next owner can continue with coherent scope, authority, and evidence.
|
|
@@ -15,6 +15,8 @@ Generated: <optional reliable date or time>
|
|
|
15
15
|
Recipient / purpose:
|
|
16
16
|
|
|
17
17
|
## Goal And Owning Sources
|
|
18
|
+
- Agreed outcome and scope:
|
|
19
|
+
- User-facing return condition:
|
|
18
20
|
|
|
19
21
|
## Current State
|
|
20
22
|
- Workflow route:
|
|
@@ -43,6 +45,8 @@ Recipient / purpose:
|
|
|
43
45
|
## Next Action
|
|
44
46
|
- Accepted action:
|
|
45
47
|
- Authority source:
|
|
48
|
+
- Required dependencies and whether they hold:
|
|
49
|
+
- Sources needed for this action:
|
|
46
50
|
|
|
47
51
|
Or, when not approved:
|
|
48
52
|
- Recommended route:
|
|
@@ -51,7 +55,7 @@ Or, when not approved:
|
|
|
51
55
|
## Stop Conditions
|
|
52
56
|
```
|
|
53
57
|
|
|
54
|
-
Keep dirty-state details narrow. Include only paths, processes, environments, or artifacts whose omission risks loss, overwrite, duplicate work, or a false claim.
|
|
58
|
+
Keep dirty-state details narrow. Include only paths, processes, environments, or artifacts whose omission risks loss, overwrite, duplicate work, or a false claim. In Current State, preserve the current assignment and source when older instructions could compete. In Completed Work And Evidence, distinguish the state actually checked from later changes whose verification remains unresolved.
|
|
55
59
|
|
|
56
60
|
## Repo-Memory Handoff
|
|
57
61
|
|
|
@@ -64,6 +68,8 @@ Generated: <optional reliable date or time>
|
|
|
64
68
|
Recipient / purpose:
|
|
65
69
|
|
|
66
70
|
## Goal And Accepted Outcome
|
|
71
|
+
- Agreed scope and exclusions:
|
|
72
|
+
- User-facing return condition:
|
|
67
73
|
|
|
68
74
|
## Owning Sources
|
|
69
75
|
|
|
@@ -84,6 +90,8 @@ Recipient / purpose:
|
|
|
84
90
|
## Next Accepted Action
|
|
85
91
|
- Action:
|
|
86
92
|
- Authority source:
|
|
93
|
+
- Required dependencies and whether they hold:
|
|
94
|
+
- Sources needed for this action:
|
|
87
95
|
|
|
88
96
|
Or:
|
|
89
97
|
|
|
@@ -132,10 +140,11 @@ Do not copy full reviewer output when a stable pointer exists. A new context or
|
|
|
132
140
|
|
|
133
141
|
## Resume Checklist
|
|
134
142
|
|
|
135
|
-
-
|
|
143
|
+
- After context loss or transfer into another context, read the complete Working Record through `view full` when one exists. A summary or `resume` projection is not a substitute. Use Track Work's bounded reads for intact-session continuation.
|
|
144
|
+
- Reconcile the record and handoff with current user direction and relevant live state; reopen named source truth where exact meaning or freshness matters.
|
|
136
145
|
- Confirm artifact, environment, commit, and configuration identity where claims depend on them.
|
|
137
|
-
-
|
|
138
|
-
- Compare
|
|
139
|
-
- Preserve valid
|
|
140
|
-
- Return the supported route and authority state to Workflow before editing.
|
|
146
|
+
- Check important completion and evidence claims before repeating them; distinguish that a run occurred from whether it applies to the current candidate. Reuse adequate evidence rather than rerun every check merely because a transfer occurred.
|
|
147
|
+
- Compare the execution agreement, current assignment and its source, return condition, decisions, dependencies, and review state with the next proposed action. Resolve superseded or conflicting directions before acting.
|
|
148
|
+
- Preserve valid and partial work; identify only the invalidated layer. Missing or incomplete recovery remains a reported limit.
|
|
149
|
+
- Return the supported route and authority state to Workflow before editing; do not require another user turn merely to continue an already-covered task.
|
|
141
150
|
- Use Decision Gate for user-owned choices or source conflicts.
|