@hassangameryt/freeflow 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.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/NOTICE +14 -0
- package/README.md +26 -31
- package/capabilities/cognitive-routing/SKILL.md +106 -161
- package/capabilities/cognitive-routing/references/both-mode.md +36 -0
- package/capabilities/cognitive-routing/references/executor-mode.md +48 -0
- package/capabilities/cognitive-routing/references/helper-mode.md +47 -0
- package/capabilities/compaction/SKILL.md +49 -0
- package/capabilities/compaction/references/summary-format.md +239 -0
- package/command-surface.json +4 -0
- package/gemini-extension.json +1 -1
- package/hooks/shared/runtime-context.mjs +28 -30
- package/licenses/Apache-2.0.txt +55 -0
- package/package.json +22 -9
- package/pi-extension/README.md +41 -0
- package/pi-extension/dist/cognitive-routing/assembler.js +393 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/config.js +5 -2
- package/pi-extension/dist/cognitive-routing/economics.js +45 -0
- package/pi-extension/dist/cognitive-routing/event-schema.js +388 -0
- package/pi-extension/dist/{session-sources/events.js → cognitive-routing/event-store.js} +103 -40
- package/pi-extension/dist/cognitive-routing/gate.js +241 -0
- package/pi-extension/dist/cognitive-routing/handlers.js +899 -0
- package/pi-extension/dist/cognitive-routing/handoffs.js +350 -0
- package/pi-extension/dist/cognitive-routing/model-control.js +467 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/projection.js +229 -56
- package/pi-extension/dist/cognitive-routing/provenance.js +81 -0
- package/pi-extension/dist/cognitive-routing/runtime.js +396 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/schemas.js +43 -7
- package/pi-extension/dist/cognitive-routing/session.js +221 -0
- package/pi-extension/dist/{session-sources → cognitive-routing}/sources.js +99 -85
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/state.js +37 -378
- package/pi-extension/dist/cognitive-routing/status.js +80 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/tools.js +12 -12
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/types.js +5 -11
- package/pi-extension/dist/compaction/carry.js +191 -0
- package/pi-extension/dist/compaction/config.js +22 -0
- package/pi-extension/dist/compaction/controller.js +471 -0
- package/pi-extension/dist/compaction/harness.js +77 -0
- package/pi-extension/dist/compaction/results.js +158 -0
- package/pi-extension/dist/compaction/thresholds.js +35 -0
- package/pi-extension/dist/compaction/tool.js +57 -0
- package/pi-extension/dist/host/branch.js +13 -0
- package/pi-extension/dist/host/canonical.js +12 -0
- package/pi-extension/dist/host/catalog.js +77 -0
- package/pi-extension/dist/host/config.js +374 -0
- package/pi-extension/dist/host/projection-tags.js +60 -0
- package/pi-extension/dist/host/prompts.js +82 -0
- package/pi-extension/dist/{session-sources → host}/read-only-session.js +112 -1
- package/pi-extension/dist/{runtime → host}/request-history.js +121 -39
- package/pi-extension/dist/host/runtime-state.js +189 -0
- package/pi-extension/dist/{settings/settings-ui.js → host/settings/freeflow-command.js} +620 -410
- package/pi-extension/dist/{settings/settings-tui.js → host/settings/settings-view.js} +186 -73
- package/pi-extension/dist/host/staging.js +28 -0
- package/pi-extension/dist/host/status.js +101 -0
- package/pi-extension/dist/index.js +423 -173
- package/pi-extension/dist/provider-support/cache/anchor.js +21 -0
- package/pi-extension/dist/provider-support/cache/anthropic.js +102 -0
- package/pi-extension/dist/provider-support/cache/health.js +73 -0
- package/pi-extension/dist/provider-support/cache/index.js +58 -0
- package/pi-extension/dist/provider-support/cache/keepalive.js +210 -0
- package/pi-extension/dist/provider-support/cache/monitor.js +17 -0
- package/pi-extension/dist/provider-support/cache/openai-responses.js +48 -0
- package/pi-extension/dist/provider-support/effort.js +13 -0
- package/pi-extension/dist/provider-support/index.js +44 -3
- package/pi-extension/dist/provider-support/{astra → openai}/adapter.js +46 -29
- package/pi-extension/dist/provider-support/{astra → openai}/history.js +10 -8
- package/pi-extension/dist/provider-support/{astra → openai}/index.js +8 -4
- package/pi-extension/dist/provider-support/{astra → openai}/session-state.js +29 -38
- package/pi-extension/dist/provider-support/routes.js +17 -0
- package/pi-extension/dist/tool-execution/apply-patch/grammar.js +23 -0
- package/pi-extension/dist/tool-execution/apply-patch/match.js +38 -0
- package/pi-extension/dist/tool-execution/apply-patch/parser.js +177 -0
- package/pi-extension/dist/tool-execution/apply-patch/plan.js +201 -0
- package/pi-extension/dist/tool-execution/apply-patch/tool.js +84 -0
- package/pi-extension/dist/tool-execution/background.js +238 -0
- package/pi-extension/dist/tool-execution/bash-guard.js +23 -0
- package/pi-extension/dist/tool-execution/config.js +22 -0
- package/pi-extension/dist/tool-execution/edit-messages.js +120 -0
- package/pi-extension/dist/tool-execution/file-state.js +138 -0
- package/pi-extension/dist/tool-execution/file-tracking.js +143 -0
- package/pi-extension/dist/tool-execution/prompt.js +54 -0
- package/pi-extension/dist/tool-execution/tools.js +16 -0
- package/pi-extension/freeflow/README.md +9 -0
- package/plugin.json +1 -1
- package/runtime/prompts/cognitive-routing.md +4 -4
- package/runtime/prompts/core.md +22 -75
- package/runtime/prompts/interaction-contract.md +15 -8
- package/runtime/prompts/tool-execution.md +38 -0
- package/runtime/prompts/working-method.md +108 -0
- package/skills/action-selection/SKILL.md +39 -47
- package/skills/action-selection/references/trajectory-stalls.md +2 -0
- package/skills/bypass/SKILL.md +2 -2
- package/skills/commit-work/SKILL.md +31 -83
- package/skills/commit-work/references/git-state-edges.md +1 -1
- package/skills/commit-work/references/simple-push.md +2 -0
- package/skills/commit-work/references/staging-decisions.md +1 -1
- package/skills/decision-gate/SKILL.md +31 -50
- package/skills/design-for-depth/SKILL.md +44 -53
- package/skills/design-for-depth/references/design-pressure-signals.md +46 -144
- package/skills/design-for-depth/references/implementation-decisions.md +1 -1
- package/skills/design-for-depth/references/interface-design-loop.md +5 -36
- package/skills/design-for-depth/references/module-and-dependency-design.md +2 -32
- package/skills/design-for-depth/references/state-and-failure-boundaries.md +2 -13
- package/skills/diagnose-failure/SKILL.md +39 -24
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +2 -0
- package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +2 -2
- package/skills/discuss/SKILL.md +35 -11
- package/skills/discuss/references/discussion-continuity.md +7 -27
- package/skills/evaluate-skill/SKILL.md +49 -80
- package/skills/evaluate-skill/references/evaluation-definition-schema.md +35 -5
- package/skills/evaluate-skill/references/evaluation-design.md +14 -14
- package/skills/evaluate-skill/references/execution-and-evidence.md +26 -5
- package/skills/evaluate-skill/references/review-and-revision.md +3 -1
- package/skills/evaluate-skill/scripts/lib/definitions.mjs +49 -8
- package/skills/evaluate-skill/scripts/lib/pi.mjs +14 -7
- package/skills/evaluate-skill/scripts/lib/review.mjs +196 -0
- package/skills/evaluate-skill/scripts/lib/runner.mjs +45 -8
- package/skills/evaluate-skill/scripts/lib/sandbox.mjs +2 -0
- package/skills/evaluate-skill/scripts/lib/trials.mjs +103 -0
- package/skills/evaluate-skill/scripts/lib/view.mjs +67 -1
- package/skills/evaluate-skill/scripts/pi-command-tool.mjs +144 -0
- package/skills/evaluate-skill/scripts/pi-guard.mjs +30 -13
- package/skills/evaluate-skill/scripts/skill-eval.mjs +114 -34
- package/skills/execute-work/SKILL.md +41 -9
- package/skills/execute-work/references/code-practices.md +2 -0
- package/skills/execute-work/references/execute-work-edges.md +11 -1
- package/skills/handoff/SKILL.md +1 -1
- package/skills/handoff/references/handoff-templates.md +1 -1
- package/skills/review-artifact/SKILL.md +42 -41
- package/skills/review-artifact/references/adjudicate-artifact-review.md +1 -1
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +1 -1
- package/skills/review-work/SKILL.md +38 -32
- package/skills/review-work/references/adjudicate-work-review.md +1 -1
- package/skills/review-work/references/independent-work-reviewer-contract.md +1 -1
- package/skills/review-work/references/security-risk-lens.md +2 -4
- package/skills/setup-freeflow/SKILL.md +3 -1
- package/skills/setup-freeflow/references/activation-contract.md +7 -13
- package/skills/setup-freeflow/references/host-setup.md +3 -3
- package/skills/track-work/SKILL.md +113 -161
- package/skills/track-work/references/working-record-format.md +189 -350
- package/skills/track-work/scripts/lib/document.mjs +62 -6
- package/skills/track-work/scripts/lib/format.mjs +16 -1
- package/skills/track-work/scripts/lib/store.mjs +9 -8
- package/skills/track-work/scripts/lib/transitions.mjs +79 -4
- package/skills/track-work/scripts/working-record.mjs +34 -12
- package/skills/verify-work/SKILL.md +29 -20
- package/skills/verify-work/references/browser-runtime-evidence.md +1 -5
- package/skills/verify-work/references/integration-evidence.md +2 -0
- package/skills/verify-work/references/performance-evidence.md +3 -1
- package/skills/verify-work/references/test-design.md +3 -1
- package/skills/workflow/SKILL.md +65 -21
- package/skills/workflow/references/domain-skill-composition.md +5 -3
- package/skills/write-docs/SKILL.md +83 -0
- package/skills/write-docs/references/documentation-shapes.md +119 -0
- package/skills/write-docs/scripts/docs-check.mjs +139 -0
- package/skills/write-plan/SKILL.md +40 -40
- package/skills/write-plan/references/plan-shapes.md +1 -1
- package/skills/write-skill/SKILL.md +107 -147
- package/skills/write-skill/references/activation-boundaries.md +2 -0
- package/skills/write-skill/references/agent-first-instructions.md +22 -10
- package/skills/write-skill/references/progressive-disclosure.md +4 -2
- package/skills/write-skill/references/skill-dependency-graphs.md +2 -0
- package/skills/write-skill/scripts/lib/similarity.mjs +56 -0
- package/skills/write-skill/scripts/skill-author.mjs +18 -2
- package/skills/write-spec/SKILL.md +34 -41
- package/skills/write-spec/references/artifact-standards.md +1 -1
- package/skills/write-spec/references/decision-records.md +2 -0
- package/skills/write-spec/references/spec-shapes.md +1 -1
- package/capabilities/context-virtualization/SKILL.md +0 -103
- package/capabilities/conversation-history/SKILL.md +0 -53
- package/hooks/tests/check-host-adapters.test.mjs +0 -82
- package/hooks/tests/check-runtime-context-hook.sh +0 -212
- package/pi-extension/dist/cognitive-routing-v2/runtime.js +0 -2181
- package/pi-extension/dist/context-virtualization/commands.js +0 -89
- package/pi-extension/dist/context-virtualization/projector.js +0 -42
- package/pi-extension/dist/context-virtualization/runtime.js +0 -378
- package/pi-extension/dist/context-virtualization/state.js +0 -57
- package/pi-extension/dist/context-virtualization/types.js +0 -10
- package/pi-extension/dist/conversation-history/passages.js +0 -66
- package/pi-extension/dist/conversation-history/ranking.js +0 -105
- package/pi-extension/dist/conversation-history/runtime.js +0 -226
- package/pi-extension/dist/conversation-history/search.js +0 -56
- package/pi-extension/dist/conversation-history/types.js +0 -1
- package/pi-extension/dist/freeflow-context/resolver.js +0 -120
- package/pi-extension/dist/freeflow-context/runtime.js +0 -80
- package/pi-extension/dist/freeflow-context/source-projector.js +0 -95
- package/pi-extension/dist/freeflow-context/tool.js +0 -314
- package/pi-extension/dist/freeflow-context/types.js +0 -12
- package/pi-extension/dist/freeflow-context/visibility.js +0 -28
- package/pi-extension/dist/integrations/mcp-config.js +0 -29
- package/pi-extension/dist/runtime/runtime-context.js +0 -754
- package/pi-extension/dist/runtime/runtime-identity.js +0 -5
- package/pi-extension/dist/session-sources/provenance.js +0 -32
- package/pi-extension/dist/ui/text-component.js +0 -57
- package/pi-extension/src/cognitive-routing-v2/budget.ts +0 -42
- package/pi-extension/src/cognitive-routing-v2/config.ts +0 -173
- package/pi-extension/src/cognitive-routing-v2/projection.ts +0 -375
- package/pi-extension/src/cognitive-routing-v2/render.ts +0 -277
- package/pi-extension/src/cognitive-routing-v2/runtime.ts +0 -2241
- package/pi-extension/src/cognitive-routing-v2/schemas.ts +0 -180
- package/pi-extension/src/cognitive-routing-v2/state.ts +0 -839
- package/pi-extension/src/cognitive-routing-v2/tools.ts +0 -62
- package/pi-extension/src/cognitive-routing-v2/types.ts +0 -254
- package/pi-extension/src/context-virtualization/commands.ts +0 -111
- package/pi-extension/src/context-virtualization/projector.ts +0 -62
- package/pi-extension/src/context-virtualization/runtime.ts +0 -428
- package/pi-extension/src/context-virtualization/state.ts +0 -79
- package/pi-extension/src/context-virtualization/types.ts +0 -92
- package/pi-extension/src/conversation-history/passages.ts +0 -81
- package/pi-extension/src/conversation-history/ranking.ts +0 -155
- package/pi-extension/src/conversation-history/runtime.ts +0 -250
- package/pi-extension/src/conversation-history/search.ts +0 -79
- package/pi-extension/src/conversation-history/types.ts +0 -31
- package/pi-extension/src/freeflow-context/resolver.ts +0 -139
- package/pi-extension/src/freeflow-context/runtime.ts +0 -100
- package/pi-extension/src/freeflow-context/source-projector.ts +0 -106
- package/pi-extension/src/freeflow-context/tool.ts +0 -366
- package/pi-extension/src/freeflow-context/types.ts +0 -70
- package/pi-extension/src/freeflow-context/visibility.ts +0 -53
- package/pi-extension/src/index.ts +0 -390
- package/pi-extension/src/integrations/mcp-config.ts +0 -32
- package/pi-extension/src/provider-support/astra/adapter.ts +0 -108
- package/pi-extension/src/provider-support/astra/history.ts +0 -145
- package/pi-extension/src/provider-support/astra/index.ts +0 -12
- package/pi-extension/src/provider-support/astra/session-state.ts +0 -113
- package/pi-extension/src/provider-support/index.ts +0 -5
- package/pi-extension/src/runtime/request-history.ts +0 -243
- package/pi-extension/src/runtime/runtime-context.ts +0 -860
- package/pi-extension/src/runtime/runtime-identity.ts +0 -8
- package/pi-extension/src/session-sources/events.ts +0 -230
- package/pi-extension/src/session-sources/provenance.ts +0 -39
- package/pi-extension/src/session-sources/read-only-session.ts +0 -170
- package/pi-extension/src/session-sources/sources.ts +0 -334
- package/pi-extension/src/settings/settings-tui.ts +0 -501
- package/pi-extension/src/settings/settings-ui.ts +0 -1652
- package/pi-extension/src/ui/text-component.ts +0 -66
- package/pi-extension/tests/cache-reuse/history.test.js +0 -117
- package/pi-extension/tests/cache-reuse/native.test.js +0 -91
- package/pi-extension/tests/cache-reuse/settings.test.js +0 -211
- package/pi-extension/tests/cognitive-routing-v2/communication.test.js +0 -577
- package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +0 -183
- package/pi-extension/tests/cognitive-routing-v2/delegation.test.js +0 -557
- package/pi-extension/tests/cognitive-routing-v2/native.test.js +0 -474
- package/pi-extension/tests/cognitive-routing-v2/performance.test.js +0 -87
- package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +0 -300
- package/pi-extension/tests/cognitive-routing-v2/projection.test.js +0 -241
- package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +0 -1034
- package/pi-extension/tests/cognitive-routing-v2/render.test.js +0 -244
- package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +0 -423
- package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +0 -521
- package/pi-extension/tests/cognitive-routing-v2/state.test.js +0 -586
- package/pi-extension/tests/context-virtualization/extension.test.js +0 -775
- package/pi-extension/tests/context-virtualization/projector.test.js +0 -110
- package/pi-extension/tests/context-virtualization/runtime.test.js +0 -230
- package/pi-extension/tests/conversation-history/runtime.test.js +0 -98
- package/pi-extension/tests/conversation-history/search.test.js +0 -97
- package/pi-extension/tests/fixtures/pi-host.js +0 -4
- package/pi-extension/tests/fixtures/routing-native.js +0 -191
- package/pi-extension/tests/integration/mode-free-core.test.js +0 -220
- package/pi-extension/tests/integration/pi-extension.test.js +0 -1447
- package/pi-extension/tests/integration/prompt-architecture.test.js +0 -447
- package/pi-extension/tests/integration/unaffected-regressions.test.js +0 -478
- package/pi-extension/tests/provider-support/astra-boundaries.test.js +0 -75
- package/pi-extension/tests/provider-support/astra.test.js +0 -306
- package/pi-extension/tests/provider-support/cli.test.js +0 -92
- package/pi-extension/tests/provider-support/native.test.js +0 -183
- package/pi-extension/tests/settings/settings-tui.test.js +0 -243
- package/pi-extension/tsconfig.json +0 -16
- package/runtime/prompts/context-virtualization.md +0 -3
- package/runtime/prompts/conversation-history.md +0 -3
- package/skills/design-for-depth/references/software-design-philosophy.md +0 -202
- /package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/budget.js +0 -0
- /package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/render.js +0 -0
|
@@ -1,230 +1,182 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: track-work
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when work needs durable task memory: starting, updating, recovering, or closing a Working Record, or preparing for compaction, a pause, or a handoff."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Track Work
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Keep one Working Record per task so a fresh context can pick up the work without the conversation that produced it. The record is memory for the agent doing the work: what is true now, what is in progress, what to read to resume, and the rough road ahead.
|
|
9
9
|
|
|
10
|
-
The record is
|
|
10
|
+
The record is not authority, a Spec, a Plan, or a transcript. It works for any kind of task: code, research, writing, analysis, operations.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The record has five sections:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- **Current Context:** present understanding, including `What defines this task`, which points to the task's defining artifacts such as its Spec and Plan.
|
|
15
|
+
- **Current Work:** the Current Slice (the unit of work in progress, with its `Material updates` log), `Recovery sources` to read when resuming, and one Next useful action.
|
|
16
|
+
- **Future Work:** the rough route ahead, as proposed Slices and Checkpoints.
|
|
17
|
+
- **History:** accepted Decisions, closed Checkpoints, and closed Slices.
|
|
18
|
+
- **Notes:** free-form context with no authority.
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
The **Rules** below are binding; if one cannot be met, stop and say why. Everything else is **judgment**: follow its stated goal, and adapt when a different choice serves that goal better.
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
.freeflow/tasks/task-NNN-<short-name>/record.md
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
[Workflow](../workflow/SKILL.md) establishes record need, authority, current ownership, and the route that receives maintenance results. [Discuss](../discuss/SKILL.md) resolves open intent, alternatives, or task ownership. Track Work preserves supported meaning without taking over those judgments.
|
|
23
|
-
|
|
24
|
-
Only the user changes task state. An agreement may cover record maintenance and several Slices, but a proposal, recorded next action, or successful lifecycle command never authorizes implementation, active evidence generation, commit, publication, or another controlled effect.
|
|
25
|
-
|
|
26
|
-
## Keep The Existing Record Shape
|
|
27
|
-
|
|
28
|
-
Use the five Schema 4 sections in order:
|
|
29
|
-
|
|
30
|
-
1. **Current Context** — concise present understanding.
|
|
31
|
-
2. **Current Work** — one Current Slice or none, and one Next useful action.
|
|
32
|
-
3. **Future Work** — an ordered sequence of proposed Slices and non-terminal Checkpoints.
|
|
33
|
-
4. **History** — Decisions, terminal Checkpoints, and settled Slices, in that order.
|
|
34
|
-
5. **Notes** — inert task-local context.
|
|
35
|
-
|
|
36
|
-
Current Context and Notes are ordinary Markdown. Structured entities use compact field-list rows: `- Field: value` for one value, with two-space-indented nested bullets for multiple values. Expanded Schema 4 fields remain supported; do not mix layouts within an entity.
|
|
37
|
-
|
|
38
|
-
Read [Working Record Format](references/working-record-format.md) before editing structured content or preparing a lifecycle fragment. It owns the exact headings, fields, states, omission rules, and mechanical invariants. Do not add phase, context-cycle, delegation, global Evidence, or global Blocker sections.
|
|
39
|
-
|
|
40
|
-
Initialization creates every canonical heading. Supply a supported Goal, any known defining source or material Open question, task State, `Current Slice: None`, and one next action or honest wait condition. Preserve the material understanding that justified initialization; do not create an empty shell and lose it. If even the Goal and next action are unclear, return to discussion first.
|
|
41
|
-
|
|
42
|
-
`Last updated` is advisory: `init` and successful lifecycle commands maintain it; direct Markdown edits may leave it stale. It is not evidence that the record is semantically current.
|
|
43
|
-
|
|
44
|
-
## Recover The Whole Record After Context Loss
|
|
45
|
-
|
|
46
|
-
After compaction, summarization that replaces prior context, clear, session resume or navigation, a transfer into another context, or uncertain continuity, read `view full` before continuing task work. Read the complete canonical record, including History and Notes—not only the `resume` projection or a summary of it.
|
|
47
|
-
|
|
48
|
-
Use core recovery guidance and the active capability route for the read. Load this skill's current body when absent; an earlier reference to the skill is not its method.
|
|
49
|
-
|
|
50
|
-
If the tool truncates the record, continue bounded reads of the same canonical source until complete. If full recovery cannot be completed within the available context or access boundary, report the limitation and stop affected work. Do not silently substitute `resume`, summarize unseen History, or claim complete recovery from a pointer.
|
|
51
|
-
|
|
52
|
-
With intact context, use `view resume` when active-state readback is needed, or read the exact entity or changed section. Do not reread the whole record after every user turn, tool call, or Slice. A pause without context loss may need a freshness check, not full reconstruction.
|
|
53
|
-
|
|
54
|
-
The views do not change:
|
|
55
|
-
|
|
56
|
-
- `full` returns the complete canonical Markdown exactly as stored.
|
|
57
|
-
- `resume` shows the header, all Current Context, active Decisions derived from History, Current Work, Future Work, and Notes; it omits terminal History.
|
|
22
|
+
## Rules
|
|
58
23
|
|
|
59
|
-
|
|
24
|
+
- The record is memory, not authority. It never authorizes work, and current user direction, live state, and accepted artifacts override it.
|
|
25
|
+
- Record a Slice before causing effects outside the record: edits, commands, generated files, sent messages, or changes to external systems.
|
|
26
|
+
- Use [working-record.mjs](scripts/working-record.mjs) for every lifecycle change: IDs, states, and moves between sections. Edit only meaning directly.
|
|
27
|
+
- Only the user changes task state.
|
|
28
|
+
- After context loss, recover in this order before any task action: the complete record through `view full`, then every artifact listed under `What defines this task`, then `Recovery sources`. If any of them cannot be read completely, report that and stop affected work.
|
|
29
|
+
- Recover only a record that the context you still have ties to the current work, such as the user's direction, or a summary or handoff that names it. A recent change does not show that a record belongs to the current work. When a record's task and the current work disagree, report it instead of recovering the record.
|
|
30
|
+
- Never record a requested, reported, or expected result as observed. Keep unverified work, failures, and contradictions visible.
|
|
31
|
+
- Never claim that state will survive context loss unless it is written in the record or in a source the record points to.
|
|
60
32
|
|
|
61
|
-
##
|
|
33
|
+
## Decide What To Track
|
|
62
34
|
|
|
63
|
-
|
|
35
|
+
Goal: after any interruption, the next context can continue correctly without re-deriving what you already knew.
|
|
64
36
|
|
|
65
|
-
|
|
66
|
-
- the agreed outcome, scope, and user-facing return condition;
|
|
67
|
-
- active Decisions, amendments, and relevant supersession;
|
|
68
|
-
- pending or deferred Checkpoints;
|
|
69
|
-
- actual completed and partial effects, evidence limits, and contradictions;
|
|
70
|
-
- prerequisites for the next work and whether they actually hold;
|
|
71
|
-
- the Next useful action and authority covering it.
|
|
37
|
+
Ask: **if context were lost now, what would the next context need that it could not recover from the workspace, the defining artifacts, or retrievable history?** Record that, at the moment it becomes true.
|
|
72
38
|
|
|
73
|
-
|
|
39
|
+
| When this happens | Record it in |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| Understanding changes: a fact is settled, a hypothesis forms, a question opens | Current Context |
|
|
42
|
+
| The user accepts a choice | a Decision |
|
|
43
|
+
| Work with partial state is about to begin | a Slice |
|
|
44
|
+
| You learn something needed to resume: a file, attachment, message, or section | Recovery sources |
|
|
45
|
+
| A Spec, Plan, or other defining artifact is created or accepted for the task | What defines this task |
|
|
46
|
+
| The next step or rough route becomes clear | Next useful action and Future Work |
|
|
47
|
+
| Work produces a result, an identity (commit, document version, sent message), or evidence | the Slice's Material updates, then its closure |
|
|
74
48
|
|
|
75
|
-
|
|
49
|
+
Default to less. One accurate line beats a paragraph. Update at boundaries, not after every step, and do not narrate routine actions. If maintaining the record is taking noticeable time from the task, you are tracking too much. But concise is not lossy: keep a detail when removing it could change the next action.
|
|
76
50
|
|
|
77
|
-
|
|
51
|
+
Keep hypotheses and proposals in Tentative until they are accepted. Permission to investigate an option does not accept it.
|
|
78
52
|
|
|
79
|
-
|
|
53
|
+
Use a record when the task spans several steps or sessions, or when losing its decisions, route, or partial state would misdirect continuation. A short self-contained result needs no record. Respect a user's choice not to keep one. Create a record with the understanding that justified it, not an empty shell; if even the Goal is unclear, discuss first.
|
|
80
54
|
|
|
81
|
-
|
|
55
|
+
When the record starts after work has already happened, compress that stretch; do not replay it. Settled results go into Current Context. Record an earlier result as a Slice with `slice record` only when later work depends on it, such as evidence, a failed approach, or a retraction, and point to where its exact history lives. Never backfill with `slice start-direct` and `slice close`, and never close a live Slice to make room.
|
|
82
56
|
|
|
83
|
-
Use
|
|
57
|
+
## Use The Record While Discussing And Executing
|
|
84
58
|
|
|
85
|
-
|
|
86
|
-
- **What defines this task:** accepted artifacts, user decisions, constraints, and governing source pointers.
|
|
87
|
-
- **Settled:** supported present facts and accepted understanding.
|
|
88
|
-
- **Tentative:** hypotheses and provisional approaches.
|
|
89
|
-
- **Open:** unresolved questions capable of changing the work.
|
|
90
|
-
- **Current direction:** the remaining approach and why it is currently useful, not a completed-work narrative.
|
|
91
|
-
- **Boundaries:** scope exclusions, evidence limits, user-facing return conditions, and separately controlled effects.
|
|
59
|
+
The record serves both halves of the work; update it at meaningful boundaries, not on every turn.
|
|
92
60
|
|
|
93
|
-
|
|
61
|
+
**Discussing:** the record is working memory.
|
|
94
62
|
|
|
95
|
-
|
|
63
|
+
- Start a record, with the understanding gathered so far, once the task is likely to outlast the current context or span sessions.
|
|
64
|
+
- When the user makes a choice, record a Decision. Put options under consideration in Tentative and unanswered questions in Open.
|
|
65
|
+
- Use Open to choose what to ask next, and check Settled and Decisions before asking the user something again.
|
|
66
|
+
- When the user supplies material that governs the work, point to it from Recovery sources, or from `What defines this task` if it defines the task.
|
|
67
|
+
- When what and how are settled, propose the route in Future Work.
|
|
96
68
|
|
|
97
|
-
|
|
69
|
+
**Executing:** the record is bookkeeping.
|
|
98
70
|
|
|
99
|
-
|
|
71
|
+
- Record the Slice before its first effect.
|
|
72
|
+
- Add Material updates at boundaries: evidence, identities such as commit SHAs or document versions, scope extensions, and contradictions.
|
|
73
|
+
- Add Recovery sources as the work reveals what a resume would need.
|
|
74
|
+
- Close Checkpoints as their boundaries happen, then close the Slice with a distilled result.
|
|
75
|
+
- Keep temporary files for the task, such as throwaway scripts, saved command output, and downloads, in the task directory's `scratch/`. They stay with the task and out of version control; nothing in them is memory unless the record points to it.
|
|
100
76
|
|
|
101
|
-
|
|
77
|
+
## Use Slices For Work With Partial State
|
|
102
78
|
|
|
103
|
-
A
|
|
79
|
+
A Slice is a unit of work that would leave something to reconcile if interrupted: half-applied edits, a draft in progress, findings from 12 of 20 sources, a running process.
|
|
104
80
|
|
|
105
|
-
|
|
81
|
+
- Implementing a change, producing an artifact, or running an experiment is a Slice.
|
|
82
|
+
- An in-depth investigation across many sources can be a Slice; stopping halfway would lose which sources were covered and what they said.
|
|
83
|
+
- A discussion usually is not. Its results land directly in Current Context, Decisions, and Future Work.
|
|
106
84
|
|
|
107
|
-
|
|
85
|
+
Start a Slice before its first effect (Rules). A Slice with no effects, such as an investigation, may be recorded once it becomes substantial.
|
|
108
86
|
|
|
109
|
-
|
|
87
|
+
Size a Slice by one coherent result that can be checked and corrected with a manageable working set. A Slice may cover a whole phase of a Plan, or one Plan step may take several Slices. Do not split by tool call, file, or test, and do not merge unrelated results because they happen together.
|
|
110
88
|
|
|
111
|
-
|
|
89
|
+
Keep checking and correction inside the Slice that produced the work. When accepted scope grows, record the extension in the Slice before acting on it. Start a new Slice when the result, authority, or evidence boundary changes.
|
|
112
90
|
|
|
113
|
-
|
|
91
|
+
An experiment or investigation completes when its question is answered or its limit is reached; a negative answer is a valid result. Record what it showed and what it changes, not how it was built.
|
|
114
92
|
|
|
115
|
-
|
|
116
|
-
- allowed wording and optional fields in active or proposed blocks;
|
|
117
|
-
- proposed-item order or removal;
|
|
118
|
-
- the Next useful action;
|
|
119
|
-
- Material updates and Notes;
|
|
120
|
-
- clerical clarification of active prose;
|
|
121
|
-
- the format's linked clerical correction block in terminal History.
|
|
93
|
+
## Keep A Rolling Route In Future Work
|
|
122
94
|
|
|
123
|
-
|
|
95
|
+
Future Work is your route at this moment, not a commitment. When you know roughly what comes next, write it down: propose the next Slices and the Checkpoints between them. At the next boundary, drop, add, reorder, or reword proposals freely; they cost nothing and authorize nothing.
|
|
124
96
|
|
|
125
|
-
|
|
97
|
+
- After discussing what and how, propose the route before starting.
|
|
98
|
+
- With a Plan, propose only the next few steps and point into the Plan rather than copying it.
|
|
99
|
+
- During hands-on iteration, where each step depends on the last result, keep only the Next useful action. Do not invent distant steps.
|
|
126
100
|
|
|
127
|
-
|
|
101
|
+
Before starting a proposal, check its dependencies against what actually happened and against the current agreement. Being next in Future Work is not a reason to take on its obligations.
|
|
128
102
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
A command must publish one complete valid transition or none. If its result is uncertain, stop and inspect `full` before retrying or editing related state. Do not duplicate an entity to recover from an unknown result.
|
|
132
|
-
|
|
133
|
-
## Start And Maintain One Current Slice
|
|
134
|
-
|
|
135
|
-
Keep implementation, learning, verification, review, and accepted correction in the same Slice while the intended result, authority, evidence boundary, and independently useful outcome remain coherent. Use a new Slice when those boundaries materially change.
|
|
136
|
-
|
|
137
|
-
For selected Future Work, start its proposal. For an immediately authorized outcome that needs no proposal ordering, use `slice start-direct`; it does not consume or change Future Work. Never disguise proposal selection as a direct start.
|
|
138
|
-
|
|
139
|
-
Starting assigns a new `S-NNN` and persists the detailed Current Slice before execution. Include authority source, scope, expected evidence, stop condition, and starting state. Do not begin Slice work until the transition has successfully persisted and validated both Current Slice and Next useful action. Return successful start or reopen to [Execute Work](../execute-work/SKILL.md); persistence is not implementation authority.
|
|
103
|
+
A **Checkpoint** is a boundary on the route that is not itself a unit of work: a commit, a publication, a review, a decision, a continuity point. It belongs to the Slice it follows. Do not make a Checkpoint into a Slice.
|
|
140
104
|
|
|
141
105
|
```text
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
106
|
+
User: "Implement the parser, then commit, then do the CLI."
|
|
107
|
+
Future Work:
|
|
108
|
+
Slice — Implement the parser
|
|
109
|
+
Checkpoint — Commit the parser (preserve, applies to: Implement the parser)
|
|
110
|
+
Slice — Add the CLI
|
|
111
|
+
Not: a separate "Commit the parser" Slice.
|
|
146
112
|
```
|
|
147
113
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Before expanded work, record the accepted extension's authority, scope, evidence boundary, and changed stop condition where applicable. A finding or suggestion does not authorize the extension.
|
|
157
|
-
|
|
158
|
-
A material evidence entry names the claim, observing boundary, result, what it proves and does not prove, and a real pointer when available. Preserve enough existing code/artifact, check, or output identity to distinguish it from a later candidate. Record separately that a check ran and whether its result still applies after relevant edits. A missing output is unavailable evidence, not proof the earlier run never occurred.
|
|
159
|
-
|
|
160
|
-
Do not record a requested correction as performed or a producer's unsupported report as observed acceptance. Keep implemented work, exercised assertions, and unresolved claims distinguishable. Append later counterevidence rather than rewriting the earlier observation. Keep evidence and blockers with their Slice, not global sections.
|
|
114
|
+
| Type | Code | Other work |
|
|
115
|
+
| --- | --- | --- |
|
|
116
|
+
| `preserve` | local commit | save a draft version or snapshot |
|
|
117
|
+
| `publish` | push, pull request | publish, send to a client |
|
|
118
|
+
| `review` | independent code review | editor or reviewer sign-off |
|
|
119
|
+
| `decision` | owner chooses a design | owner chooses between options |
|
|
120
|
+
| `continuity` | pause or handoff point | pause or handoff point |
|
|
161
121
|
|
|
162
|
-
|
|
122
|
+
A Checkpoint is `proposed` while it is only anticipated and `pending` once the user authorizes or selects it. Activate it as soon as authority exists. A pending or deferred Checkpoint must be closed before its Slice closes; `completed` means the boundary happened, even when its judgment was adverse.
|
|
163
123
|
|
|
164
|
-
|
|
124
|
+
On long tasks, a `preserve` Checkpoint every few Slices keeps a recoverable point without a Slice of its own.
|
|
165
125
|
|
|
166
|
-
|
|
126
|
+
## Recover After Context Loss
|
|
167
127
|
|
|
168
|
-
|
|
128
|
+
Context loss includes compaction, summarization that replaces context, clear, session resume or navigation, transfer to another context, or uncertain continuity. Recover before task work (Rules), in order:
|
|
169
129
|
|
|
170
|
-
|
|
130
|
+
1. `view full`: read the complete record, including History and Notes. If output is truncated, keep reading the same file until complete. `view resume` and summaries are not full recovery.
|
|
131
|
+
2. Every artifact listed under `What defines this task`, such as the task's Spec and Plan.
|
|
132
|
+
3. Every entry under `Recovery sources`, except one whose stated trigger ("read when …") does not apply yet; read that one when it does.
|
|
171
133
|
|
|
172
|
-
|
|
134
|
+
Then reconcile before acting. Establish the task and Slice state, the agreed outcome and return condition, active Decisions, pending Checkpoints, completed and partial effects, whether the next action's prerequisites hold, and what authorizes it.
|
|
173
135
|
|
|
174
|
-
|
|
136
|
+
- Current user direction supersedes older instructions in the record, including a record written on another conversation branch.
|
|
137
|
+
- Compare the record with the live state the next action depends on. If they disagree, resolve it from sources; do not follow whichever version lets work continue.
|
|
138
|
+
- If the record conflicts with a defining Spec or Plan, the record does not win. Return the conflict to that artifact's owner before dependent work.
|
|
139
|
+
- Reuse evidence that still applies instead of repeating the investigation. Reopen further sources only when their exact content or freshness changes the next action.
|
|
175
140
|
|
|
176
|
-
|
|
141
|
+
With context intact, use `view resume` or read the relevant section. Another turn or an ordinary pause is not context loss.
|
|
177
142
|
|
|
178
|
-
|
|
179
|
-
proposed -> pending <-> deferred
|
|
180
|
-
pending | deferred -> completed | cancelled | replaced
|
|
181
|
-
```
|
|
143
|
+
## Prepare For A Context Boundary
|
|
182
144
|
|
|
183
|
-
|
|
145
|
+
When a context limit is near or a pause or transfer is coming, make the record sufficient before stopping:
|
|
184
146
|
|
|
185
|
-
|
|
147
|
+
- Record partial effects, unverified work, failed approaches that would otherwise be repeated, and anything running whose result is unknown.
|
|
148
|
+
- Update `Recovery sources` with what the next context must read, and why each matters. Drop entries the current work no longer needs; give a source needed only in some situation a trigger ("read when …").
|
|
149
|
+
- Material that exists only in the conversation, such as a pasted image, file, or long message, will not survive. Save a copy under the task's `sources/` directory and point to it, or point to host-retrievable history when the host provides it.
|
|
150
|
+
- Leave one Next useful action that a fresh context can act on.
|
|
186
151
|
|
|
187
|
-
|
|
152
|
+
Do not rush a Slice to completion, claim an unfinished check passed, or guess the outcome of a running operation.
|
|
188
153
|
|
|
189
|
-
|
|
190
|
-
active -> superseded | retired
|
|
191
|
-
```
|
|
154
|
+
A context boundary is not a Slice transition or a Checkpoint. Pause the Slice only when safe continuation is actually suspended, and use a `continuity` Checkpoint only for a planned pause or handoff, not for every compaction.
|
|
192
155
|
|
|
193
|
-
|
|
156
|
+
## Maintain The Record
|
|
194
157
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
Before expected compaction, clear, pause, or transfer, reconcile the record when material state changed. Preserve what a fresh continuation needs:
|
|
158
|
+
Read [Working Record Format](references/working-record-format.md) before editing structure or preparing input for a command. It owns the exact shape, fields, states, and command contract.
|
|
198
159
|
|
|
199
|
-
|
|
200
|
-
- actual completed and partial work, evidence limits, and residual effects;
|
|
201
|
-
- active assumptions, important rejected approaches, and contradictory findings;
|
|
202
|
-
- the current assignment's scope and source, including superseded stopping instructions that could misdirect continuation;
|
|
203
|
-
- existing evidence pointers, the state examined, and any subsequent changes leaving applicability unresolved;
|
|
204
|
-
- remaining dependencies and one next useful action, including the sources it needs.
|
|
160
|
+
Edit meaning directly: Current Context bullets, optional fields, Material updates, Recovery sources, proposal order or removal, the Next useful action, and Notes. After a structural edit, run `validate`. It checks structure only; it cannot tell whether an edit changed history or skipped a lifecycle step, so never make those edits by hand.
|
|
205
161
|
|
|
206
|
-
|
|
162
|
+
Run `working-record.mjs <group> <operation> --help` before preparing a command's input; the help and the format reference are the contract, so read `scripts/lib/` only when diagnosing a defect. If a command exits with code 2, the write may have happened: read `view full` before retrying or editing. Never duplicate an entity to recover from an uncertain result.
|
|
207
163
|
|
|
208
|
-
|
|
164
|
+
If `init` reports that the task directory is not ignored by Git, ask the user before changing ignore rules. Records must stay out of version control.
|
|
209
165
|
|
|
210
|
-
|
|
166
|
+
If a record uses another schema or fails validation, read it through `view full` and stop before edits or transitions. Repair or migration needs separate authorization.
|
|
211
167
|
|
|
212
|
-
|
|
168
|
+
## Close Without Losing What Matters
|
|
213
169
|
|
|
214
|
-
|
|
215
|
-
active <-> paused
|
|
216
|
-
active | paused -> completed | abandoned
|
|
217
|
-
completed | abandoned -> active only by explicit user reopening
|
|
218
|
-
```
|
|
170
|
+
Close a Slice as `completed` only when its result is supported by evidence, live state agrees, no material contradiction or authority conflict remains, and no Checkpoint on it is pending or deferred. Close as `blocked` from `paused` when it cannot continue, or as `abandoned` with explicit authority and a reason.
|
|
219
171
|
|
|
220
|
-
|
|
172
|
+
Closing keeps only the historical fields; Material updates and Recovery sources do not carry over. Before closing, put every evidence pointer, residual effect, and limit that still matters into `Evidence and limits` or `Task effect`, and remove Recovery sources that no longer apply.
|
|
221
173
|
|
|
222
|
-
|
|
174
|
+
When the Slice settled how a documented part of the software works or why, such as a design choice, a rejected alternative, or a limit accepted on purpose, record it in that documentation with [Write Docs](../write-docs/SKILL.md) before closing. The record is task memory; it does not outlive the task.
|
|
223
175
|
|
|
224
|
-
|
|
176
|
+
Closing selects nothing. Set the Next useful action from the actual result.
|
|
225
177
|
|
|
226
|
-
|
|
178
|
+
## Return
|
|
227
179
|
|
|
228
|
-
|
|
180
|
+
Return to the activity that asked for the update: [Discuss](../discuss/SKILL.md) for discussion, [Execute Work](../execute-work/SKILL.md) for Slice work, [Workflow](../workflow/SKILL.md) for routing. [Handoff](../handoff/SKILL.md) owns point-in-time transfer; [Write Spec](../write-spec/SKILL.md) and [Write Plan](../write-plan/SKILL.md) own the task's artifacts.
|
|
229
181
|
|
|
230
|
-
Stop rather than invent
|
|
182
|
+
Stop when the record lets a fresh context continue correctly. Stop and report, rather than invent, when authority, structure, or the meaning of a transition is missing. A record update never completes the work it describes.
|