@hassangameryt/freeflow 0.5.0 → 0.7.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 +2 -2
- package/.codex-plugin/plugin.json +4 -5
- package/README.md +141 -163
- package/capabilities/cognitive-routing/SKILL.md +387 -0
- package/capabilities/context-virtualization/SKILL.md +103 -0
- package/capabilities/conversation-history/SKILL.md +53 -0
- package/command-surface.json +6 -37
- package/hooks/freeflow-runtime-context.mjs +50 -541
- package/hooks/hooks.json +1 -26
- package/hooks/tests/check-runtime-context-hook.sh +114 -308
- package/package.json +27 -17
- package/pi-extension/dist/cognitive-routing/commands.js +96 -0
- package/pi-extension/dist/cognitive-routing/config.js +232 -0
- package/pi-extension/dist/cognitive-routing/controller.js +1292 -0
- package/pi-extension/dist/cognitive-routing/history.js +451 -0
- package/pi-extension/dist/cognitive-routing/host.js +188 -0
- package/pi-extension/dist/cognitive-routing/pi-routing-session.js +414 -0
- package/pi-extension/dist/cognitive-routing/pi-session-control.js +320 -0
- package/pi-extension/dist/cognitive-routing/runtime.js +43 -0
- package/pi-extension/dist/cognitive-routing/tool.js +212 -0
- package/pi-extension/dist/cognitive-routing/types.js +6 -0
- package/pi-extension/dist/context-virtualization/commands.js +89 -0
- package/pi-extension/dist/context-virtualization/projector.js +42 -0
- package/pi-extension/dist/context-virtualization/runtime.js +356 -0
- package/pi-extension/dist/context-virtualization/state.js +57 -0
- package/pi-extension/dist/context-virtualization/types.js +10 -0
- package/pi-extension/dist/conversation-history/passages.js +66 -0
- package/pi-extension/dist/conversation-history/ranking.js +105 -0
- package/pi-extension/dist/conversation-history/runtime.js +226 -0
- package/pi-extension/dist/conversation-history/search.js +56 -0
- package/pi-extension/dist/conversation-history/types.js +1 -0
- package/pi-extension/dist/freeflow-context/resolver.js +120 -0
- package/pi-extension/dist/freeflow-context/runtime.js +80 -0
- package/pi-extension/dist/freeflow-context/source-projector.js +95 -0
- package/pi-extension/dist/freeflow-context/tool.js +308 -0
- package/pi-extension/dist/freeflow-context/types.js +12 -0
- package/pi-extension/dist/freeflow-context/visibility.js +28 -0
- package/pi-extension/dist/index.js +564 -129
- package/pi-extension/dist/runtime/runtime-context.js +357 -470
- package/pi-extension/dist/runtime/runtime-identity.js +5 -0
- package/pi-extension/dist/settings/settings-tui.js +78 -0
- package/pi-extension/dist/settings/settings-ui.js +572 -826
- package/pi-extension/dist/ui/text-component.js +57 -0
- package/pi-extension/src/cognitive-routing/commands.ts +129 -0
- package/pi-extension/src/cognitive-routing/config.ts +303 -0
- package/pi-extension/src/cognitive-routing/controller.ts +1628 -0
- package/pi-extension/src/cognitive-routing/history.ts +650 -0
- package/pi-extension/src/cognitive-routing/host.ts +266 -0
- package/pi-extension/src/cognitive-routing/pi-routing-session.ts +538 -0
- package/pi-extension/src/cognitive-routing/pi-session-control.ts +444 -0
- package/pi-extension/src/cognitive-routing/runtime.ts +57 -0
- package/pi-extension/src/cognitive-routing/tool.ts +273 -0
- package/pi-extension/src/cognitive-routing/types.ts +89 -0
- package/pi-extension/src/context-virtualization/commands.ts +111 -0
- package/pi-extension/src/context-virtualization/projector.ts +62 -0
- package/pi-extension/src/context-virtualization/runtime.ts +406 -0
- package/pi-extension/src/context-virtualization/state.ts +79 -0
- package/pi-extension/src/context-virtualization/types.ts +92 -0
- package/pi-extension/src/conversation-history/passages.ts +81 -0
- package/pi-extension/src/conversation-history/ranking.ts +155 -0
- package/pi-extension/src/conversation-history/runtime.ts +250 -0
- package/pi-extension/src/conversation-history/search.ts +79 -0
- package/pi-extension/src/conversation-history/types.ts +31 -0
- package/pi-extension/src/freeflow-context/resolver.ts +139 -0
- package/pi-extension/src/freeflow-context/runtime.ts +100 -0
- package/pi-extension/src/freeflow-context/source-projector.ts +106 -0
- package/pi-extension/src/freeflow-context/tool.ts +360 -0
- package/pi-extension/src/freeflow-context/types.ts +70 -0
- package/pi-extension/src/freeflow-context/visibility.ts +53 -0
- package/pi-extension/src/index.ts +597 -135
- package/pi-extension/src/runtime/runtime-context.ts +373 -491
- package/pi-extension/src/runtime/runtime-identity.ts +8 -0
- package/pi-extension/src/settings/settings-tui.ts +93 -0
- package/pi-extension/src/settings/settings-ui.ts +679 -910
- package/pi-extension/src/ui/text-component.ts +66 -0
- package/pi-extension/tests/cognitive-routing/commands.test.js +134 -0
- package/pi-extension/tests/cognitive-routing/controller.test.js +1128 -0
- package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +1142 -0
- package/pi-extension/tests/cognitive-routing/history.test.js +274 -0
- package/pi-extension/tests/cognitive-routing/host-fixture.js +4 -0
- package/pi-extension/tests/cognitive-routing/host-identity.test.js +63 -0
- package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +434 -0
- package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +174 -0
- package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +91 -0
- package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +279 -0
- package/pi-extension/tests/cognitive-routing/tool.test.js +230 -0
- package/pi-extension/tests/context-virtualization/extension.test.js +749 -0
- package/pi-extension/tests/context-virtualization/projector.test.js +110 -0
- package/pi-extension/tests/context-virtualization/runtime.test.js +216 -0
- package/pi-extension/tests/conversation-history/runtime.test.js +98 -0
- package/pi-extension/tests/conversation-history/search.test.js +97 -0
- package/pi-extension/tests/integration/mode-free-core.test.js +218 -0
- package/pi-extension/tests/integration/pi-extension.test.js +532 -3701
- package/pi-extension/tests/integration/prompt-architecture.test.js +350 -0
- package/pi-extension/tests/integration/unaffected-regressions.test.js +411 -0
- package/runtime/prompts/cognitive-routing.md +10 -0
- package/runtime/prompts/context-virtualization.md +3 -0
- package/runtime/prompts/conversation-history.md +3 -0
- package/runtime/prompts/core.md +84 -0
- package/runtime/prompts/interaction-contract.md +11 -0
- package/skills/action-selection/SKILL.md +140 -0
- package/skills/action-selection/references/trajectory-stalls.md +71 -0
- package/skills/bypass/SKILL.md +109 -38
- package/skills/commit-work/SKILL.md +94 -55
- package/skills/commit-work/references/git-state-edges.md +94 -0
- package/skills/commit-work/references/simple-push.md +92 -0
- package/skills/commit-work/references/staging-decisions.md +79 -46
- package/skills/decision-gate/SKILL.md +80 -22
- package/skills/design-for-depth/SKILL.md +206 -60
- package/skills/design-for-depth/references/design-pressure-signals.md +108 -240
- package/skills/design-for-depth/references/interface-design-loop.md +77 -97
- package/skills/design-for-depth/references/module-and-dependency-design.md +147 -0
- package/skills/design-for-depth/references/software-design-philosophy.md +128 -174
- package/skills/design-for-depth/references/state-and-failure-boundaries.md +136 -0
- package/skills/diagnose-failure/SKILL.md +200 -48
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +18 -6
- package/skills/diagnose-failure/references/{flaky-and-performance.md → flaky-and-performance-diagnosis.md} +13 -5
- package/skills/discuss/SKILL.md +119 -65
- package/skills/discuss/references/discussion-continuity.md +123 -0
- package/skills/evaluate-skill/SKILL.md +166 -52
- package/skills/evaluate-skill/references/{definition-schema.md → evaluation-definition-schema.md} +43 -3
- package/skills/evaluate-skill/references/evaluation-design.md +56 -30
- package/skills/evaluate-skill/references/execution-and-evidence.md +8 -3
- package/skills/evaluate-skill/references/review-and-revision.md +62 -21
- package/skills/evaluate-skill/scripts/lib/definitions.mjs +114 -3
- package/skills/evaluate-skill/scripts/lib/grade-interaction.mjs +156 -1
- package/skills/evaluate-skill/scripts/lib/grade.mjs +9 -1
- package/skills/evaluate-skill/scripts/lib/pi.mjs +147 -32
- package/skills/evaluate-skill/scripts/lib/rpc.mjs +4 -4
- package/skills/evaluate-skill/scripts/lib/runner.mjs +36 -14
- package/skills/evaluate-skill/scripts/lib/sandbox.mjs +92 -0
- package/skills/evaluate-skill/scripts/pi-guard.mjs +1 -1
- package/skills/evaluate-skill/scripts/pi-observer.mjs +66 -0
- package/skills/evaluate-skill/scripts/skill-eval.mjs +6 -5
- package/skills/execute-work/SKILL.md +99 -57
- package/skills/execute-work/references/code-practices.md +4 -4
- package/skills/execute-work/references/execute-work-edges.md +62 -0
- package/skills/finish-branch/SKILL.md +2 -2
- package/skills/finish-branch/references/integration-options.md +1 -1
- package/skills/handoff/SKILL.md +3 -3
- package/skills/launch-work/SKILL.md +1 -1
- package/skills/launch-work/references/launch-readiness.md +2 -2
- package/skills/migration-work/SKILL.md +2 -2
- package/skills/migration-work/references/migration-lifecycle.md +1 -1
- package/skills/release-work/SKILL.md +1 -1
- package/skills/release-work/references/release-evidence.md +1 -1
- package/skills/review-artifact/SKILL.md +129 -66
- package/skills/review-artifact/references/adjudicate-artifact-review.md +101 -0
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +159 -0
- package/skills/review-work/SKILL.md +113 -68
- package/skills/review-work/references/adjudicate-work-review.md +97 -0
- package/skills/review-work/references/independent-work-reviewer-contract.md +139 -0
- package/skills/review-work/references/security-risk-lens.md +18 -16
- package/skills/setup-freeflow/SKILL.md +16 -17
- package/skills/setup-freeflow/references/activation-contract.md +24 -30
- package/skills/setup-freeflow/references/host-setup.md +6 -7
- package/skills/simplify-code/SKILL.md +97 -39
- package/skills/simplify-code/references/simplification-patterns.md +1 -1
- package/skills/tdd/SKILL.md +100 -53
- package/skills/tdd/references/test-design.md +3 -3
- package/skills/track-work/SKILL.md +195 -58
- package/skills/track-work/references/working-record-format.md +515 -0
- package/skills/track-work/scripts/lib/document.mjs +713 -0
- package/skills/track-work/scripts/lib/format.mjs +166 -0
- package/skills/track-work/scripts/lib/store.mjs +233 -0
- package/skills/track-work/scripts/lib/transitions.mjs +790 -0
- package/skills/track-work/scripts/lib/views.mjs +40 -0
- package/skills/track-work/scripts/working-record.mjs +316 -0
- package/skills/verify-work/SKILL.md +57 -19
- package/skills/verify-work/references/browser-runtime-evidence.md +2 -2
- package/skills/verify-work/references/integration-evidence.md +1 -7
- package/skills/verify-work/references/performance-evidence.md +2 -2
- package/skills/workflow/SKILL.md +137 -55
- package/skills/workflow/references/domain-skill-composition.md +26 -40
- package/skills/write-plan/SKILL.md +1 -1
- package/skills/write-skill/SKILL.md +218 -61
- package/skills/write-skill/references/activation-boundaries.md +63 -21
- package/skills/write-skill/references/agent-first-instructions.md +61 -27
- package/skills/write-skill/references/progressive-disclosure.md +97 -33
- package/skills/write-skill/references/skill-dependency-graphs.md +190 -0
- package/capabilities/output-router/SKILL.md +0 -206
- package/capabilities/output-router/references/safety-policy.md +0 -40
- package/capabilities/output-router/references/setup.md +0 -110
- package/pi-extension/dist/output-router/host-producer-identification.js +0 -232
- package/pi-extension/dist/output-router/native-safety-net.js +0 -216
- package/pi-extension/dist/output-router/observed-tool-routing.js +0 -122
- package/pi-extension/dist/output-router/renderers.js +0 -1023
- package/pi-extension/dist/output-router/router-tools.js +0 -554
- package/pi-extension/dist/output-router/schemas.js +0 -383
- package/pi-extension/dist/output-router/status.js +0 -744
- package/pi-extension/dist/output-router/utils.js +0 -502
- package/pi-extension/src/output-router/host-producer-identification.ts +0 -256
- package/pi-extension/src/output-router/native-safety-net.ts +0 -248
- package/pi-extension/src/output-router/observed-tool-routing.ts +0 -134
- package/pi-extension/src/output-router/renderers.ts +0 -1108
- package/pi-extension/src/output-router/router-tools.ts +0 -579
- package/pi-extension/src/output-router/schemas.ts +0 -387
- package/pi-extension/src/output-router/status.ts +0 -791
- package/pi-extension/src/output-router/utils.ts +0 -554
- package/pi-extension/tests/output-router/observed-producers.test.js +0 -132
- package/pi-extension/tests/output-router/search.test.js +0 -722
- package/router/dist/benchmarks/benchmark-harness.d.ts +0 -35
- package/router/dist/benchmarks/benchmark-harness.js +0 -92
- package/router/dist/benchmarks/benchmarks.d.ts +0 -109
- package/router/dist/benchmarks/benchmarks.js +0 -979
- package/router/dist/benchmarks/codex-qa-benchmarks.d.ts +0 -95
- package/router/dist/benchmarks/codex-qa-benchmarks.js +0 -500
- package/router/dist/benchmarks/command-benchmarks.d.ts +0 -143
- package/router/dist/benchmarks/command-benchmarks.js +0 -698
- package/router/dist/benchmarks/context-mode-normalized-benchmarks.d.ts +0 -82
- package/router/dist/benchmarks/context-mode-normalized-benchmarks.js +0 -773
- package/router/dist/benchmarks/context-mode-real-deep-benchmark.d.ts +0 -132
- package/router/dist/benchmarks/context-mode-real-deep-benchmark.js +0 -1380
- package/router/dist/benchmarks/context-saving-baseline.d.ts +0 -60
- package/router/dist/benchmarks/context-saving-baseline.js +0 -470
- package/router/dist/benchmarks/index-benchmarks.d.ts +0 -103
- package/router/dist/benchmarks/index-benchmarks.js +0 -862
- package/router/dist/benchmarks/storage-policy-benchmarks.d.ts +0 -101
- package/router/dist/benchmarks/storage-policy-benchmarks.js +0 -618
- package/router/dist/benchmarks/vault-index-benchmarks.d.ts +0 -56
- package/router/dist/benchmarks/vault-index-benchmarks.js +0 -322
- package/router/dist/config/config.d.ts +0 -103
- package/router/dist/config/config.js +0 -632
- package/router/dist/config/router-contract.d.ts +0 -10
- package/router/dist/config/router-contract.js +0 -54
- package/router/dist/config/schema.d.ts +0 -27
- package/router/dist/config/schema.js +0 -648
- package/router/dist/config/types.d.ts +0 -573
- package/router/dist/config/types.js +0 -41
- package/router/dist/evidence/bounded-evidence.d.ts +0 -40
- package/router/dist/evidence/bounded-evidence.js +0 -323
- package/router/dist/evidence/evidence-range-selector.d.ts +0 -24
- package/router/dist/evidence/evidence-range-selector.js +0 -232
- package/router/dist/evidence/evidence-search.d.ts +0 -27
- package/router/dist/evidence/evidence-search.js +0 -490
- package/router/dist/evidence/evidence.d.ts +0 -38
- package/router/dist/evidence/evidence.js +0 -200
- package/router/dist/evidence/failure-contracts.d.ts +0 -37
- package/router/dist/evidence/failure-contracts.js +0 -166
- package/router/dist/evidence/line-ranges.d.ts +0 -24
- package/router/dist/evidence/line-ranges.js +0 -22
- package/router/dist/experiments/local-index.d.ts +0 -64
- package/router/dist/experiments/local-index.js +0 -581
- package/router/dist/index.d.ts +0 -30
- package/router/dist/index.js +0 -32
- package/router/dist/local/local-traversal.d.ts +0 -18
- package/router/dist/local/local-traversal.js +0 -334
- package/router/dist/processing/engine.d.ts +0 -132
- package/router/dist/processing/engine.js +0 -533
- package/router/dist/processing/reducers.d.ts +0 -280
- package/router/dist/processing/reducers.js +0 -1673
- package/router/dist/processing/renderers.d.ts +0 -31
- package/router/dist/processing/renderers.js +0 -195
- package/router/dist/processing/scripts.d.ts +0 -91
- package/router/dist/processing/scripts.js +0 -386
- package/router/dist/repo/repo-traversal.d.ts +0 -18
- package/router/dist/repo/repo-traversal.js +0 -245
- package/router/dist/routing/observed-reducers.d.ts +0 -41
- package/router/dist/routing/observed-reducers.js +0 -661
- package/router/dist/routing/observed-routing.d.ts +0 -26
- package/router/dist/routing/observed-routing.js +0 -378
- package/router/dist/routing/parsers.d.ts +0 -16
- package/router/dist/routing/parsers.js +0 -521
- package/router/dist/routing/run-filters.d.ts +0 -60
- package/router/dist/routing/run-filters.js +0 -238
- package/router/dist/routing/run-reducers.d.ts +0 -49
- package/router/dist/routing/run-reducers.js +0 -122
- package/router/dist/sandbox/adapter-roots.d.ts +0 -46
- package/router/dist/sandbox/adapter-roots.js +0 -66
- package/router/dist/sandbox/eryx-python-adapter.d.ts +0 -13
- package/router/dist/sandbox/eryx-python-adapter.js +0 -868
- package/router/dist/sandbox/jq-wasm-adapter.d.ts +0 -9
- package/router/dist/sandbox/jq-wasm-adapter.js +0 -429
- package/router/dist/sandbox/quickjs-wasi-adapter.d.ts +0 -13
- package/router/dist/sandbox/quickjs-wasi-adapter.js +0 -384
- package/router/dist/sandbox/script-sandbox.d.ts +0 -134
- package/router/dist/sandbox/script-sandbox.js +0 -337
- package/router/dist/setup/script-transform-adapters.d.ts +0 -32
- package/router/dist/setup/script-transform-adapters.js +0 -278
- package/router/dist/tools/batch.d.ts +0 -33
- package/router/dist/tools/batch.js +0 -586
- package/router/dist/tools/run.d.ts +0 -62
- package/router/dist/tools/run.js +0 -1304
- package/router/dist/tools/search.d.ts +0 -66
- package/router/dist/tools/search.js +0 -1364
- package/router/dist/transform/engine.d.ts +0 -168
- package/router/dist/transform/engine.js +0 -2072
- package/router/dist/vault/vault-index.d.ts +0 -125
- package/router/dist/vault/vault-index.js +0 -416
- package/router/dist/vault/vault.d.ts +0 -138
- package/router/dist/vault/vault.js +0 -630
- package/runtime/interaction-contract.md +0 -16
- package/skills/discuss/references/checkpoints.md +0 -66
- package/skills/execute-work/references/execution-loop.md +0 -77
- package/skills/mode-contract/SKILL.md +0 -104
- package/skills/review-artifact/references/reviewer-prompt.md +0 -148
- package/skills/review-work/references/reviewer-prompt.md +0 -134
- package/skills/track-work/references/working-record-schema.md +0 -378
- package/skills/workflow/references/workflow-loop.md +0 -92
- /package/skills/handoff/references/{templates.md → handoff-templates.md} +0 -0
package/skills/tdd/SKILL.md
CHANGED
|
@@ -1,96 +1,143 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tdd
|
|
3
|
-
description: Use when implementing or changing behavior test-first,
|
|
3
|
+
description: Use when implementing or changing settled behavior test-first, reproducing a bug through regression evidence, or protecting existing behavior before a refactor.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Test-Driven Development
|
|
7
7
|
|
|
8
|
-
Use one observed failing behavior check to guide the smallest complete implementation for one
|
|
8
|
+
Use one observed failing behavior check to guide the smallest complete implementation for one settled behavior.
|
|
9
9
|
|
|
10
|
-
TDD
|
|
10
|
+
TDD provides test-first behavior discipline. It does not define intended behavior, authorize test or production effects, select or close a Slice, or prove claims beyond its observing boundary.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
One behavior loop is one coherent method result. It may contain several reads, edits, commands, and focused checks. Finish and return one behavior before starting another.
|
|
13
|
+
|
|
14
|
+
## Enter With Settled Behavior
|
|
15
|
+
|
|
16
|
+
Before RED, establish:
|
|
17
|
+
|
|
18
|
+
- the accepted behavior and caller-visible result;
|
|
19
|
+
- relevant success and failure semantics;
|
|
20
|
+
- the boundary where the behavior must hold;
|
|
21
|
+
- authority covering both the check and production effects;
|
|
22
|
+
- the expected reason RED should fail.
|
|
23
|
+
|
|
24
|
+
Return unsettled behavior, source conflicts, or user-owned choices to [Workflow](../workflow/SKILL.md). Do not encode a guess as a test.
|
|
25
|
+
|
|
26
|
+
Use TDD for:
|
|
27
|
+
|
|
28
|
+
- accepted behavior changes;
|
|
29
|
+
- bug corrections with a supported cause or reliable regression loop;
|
|
30
|
+
- consequential logic whose contract benefits from executable evidence;
|
|
31
|
+
- characterization needed before a protected refactor.
|
|
32
|
+
|
|
33
|
+
Do not force TDD onto documentation, static content, formatting, generated output, or a disposable prototype that is not selected production behavior.
|
|
34
|
+
|
|
35
|
+
When a bug lacks a supported cause or reliable reproduction, use [Diagnose Failure](../diagnose-failure/SKILL.md) before selecting a production correction.
|
|
36
|
+
|
|
37
|
+
## Design The Behavior Check
|
|
38
|
+
|
|
39
|
+
Before designing or materially changing the check, read [Test Design](references/test-design.md).
|
|
40
|
+
|
|
41
|
+
Name:
|
|
42
|
+
|
|
43
|
+
- the behavior concept;
|
|
44
|
+
- the stable caller-visible seam;
|
|
45
|
+
- an oracle independent from the implementation;
|
|
46
|
+
- the expected missing behavior RED should expose;
|
|
47
|
+
- the focused and affected boundaries that must be rerun after GREEN.
|
|
48
|
+
|
|
49
|
+
Use the smallest test environment that still exercises the real behavior and relevant failure path. Do not choose a smaller boundary that mocks away the claim or a larger one that adds noise without proving more.
|
|
50
|
+
|
|
51
|
+
Keep one behavior concept per loop. Several assertions are appropriate when they jointly describe one outcome.
|
|
13
52
|
|
|
14
53
|
## Follow The Behavior Loop
|
|
15
54
|
|
|
16
55
|
```text
|
|
17
|
-
[
|
|
56
|
+
[Settled accepted behavior]
|
|
18
57
|
-> [Choose stable seam and independent oracle]
|
|
19
58
|
-> [RED: write and run the smallest behavior check]
|
|
20
|
-
-> fails for
|
|
21
|
-
-> passes immediately -> inspect test, boundary,
|
|
22
|
-
-> errors
|
|
23
|
-
-> [GREEN: smallest complete
|
|
24
|
-
-> [
|
|
25
|
-
-> [REFACTOR when useful
|
|
26
|
-
-> [
|
|
27
|
-
-> [
|
|
28
|
-
-> another accepted behavior in this slice -> next TDD loop
|
|
29
|
-
-> coherent extension -> approve and record when needed
|
|
30
|
-
-> unclear cause or structural pressure -> Workflow
|
|
31
|
-
-> supported bounded action -> return to Execute Work
|
|
59
|
+
-> fails for the intended missing behavior -> GREEN
|
|
60
|
+
-> passes immediately -> inspect test, boundary, and existing behavior
|
|
61
|
+
-> errors or fails elsewhere -> correct the harness or diagnose
|
|
62
|
+
-> [GREEN: implement the smallest complete behavior]
|
|
63
|
+
-> [Run the focused behavior check]
|
|
64
|
+
-> [REFACTOR locally when useful]
|
|
65
|
+
-> [Rerun the original path and affected boundary]
|
|
66
|
+
-> [Return the method result and evidence]
|
|
32
67
|
```
|
|
33
68
|
|
|
34
|
-
Do not write all tests first and
|
|
69
|
+
Do not write all tests first and implementation later. Finish one behavior loop before another.
|
|
35
70
|
|
|
36
|
-
##
|
|
71
|
+
## Observe Valid RED
|
|
37
72
|
|
|
38
|
-
|
|
73
|
+
Run RED before changing production behavior.
|
|
39
74
|
|
|
40
|
-
|
|
75
|
+
RED is valid only when:
|
|
41
76
|
|
|
42
|
-
|
|
77
|
+
- the check executes through the intended seam;
|
|
78
|
+
- its assertion represents accepted behavior;
|
|
79
|
+
- it fails because the behavior is missing or incorrect;
|
|
80
|
+
- unrelated syntax, setup, environment, or fixture failures do not explain it.
|
|
43
81
|
|
|
44
|
-
|
|
82
|
+
If the check passes immediately, inspect whether:
|
|
45
83
|
|
|
46
|
-
|
|
84
|
+
- the behavior already exists;
|
|
85
|
+
- the assertion is ineffective;
|
|
86
|
+
- the observing boundary is wrong;
|
|
87
|
+
- the test is reproducing a nearby path rather than the reported behavior.
|
|
47
88
|
|
|
48
|
-
|
|
89
|
+
Do not proceed automatically to GREEN.
|
|
49
90
|
|
|
50
|
-
|
|
51
|
-
- survives internal refactoring;
|
|
52
|
-
- reaches the real behavior or failure path;
|
|
53
|
-
- keeps setup proportionate;
|
|
54
|
-
- can disagree with the implementation.
|
|
91
|
+
Correct a clear local harness defect. When the failure remains unexplained or repeated harness changes do not establish valid RED, return to Diagnose Failure.
|
|
55
92
|
|
|
56
|
-
|
|
93
|
+
## Implement Complete GREEN
|
|
57
94
|
|
|
58
|
-
|
|
95
|
+
Before changing production code, read [Code Practices](../execute-work/references/code-practices.md).
|
|
59
96
|
|
|
60
|
-
|
|
97
|
+
Implement the smallest complete behavior that satisfies the accepted contract—not merely the visible assertion.
|
|
61
98
|
|
|
62
|
-
|
|
99
|
+
Do not:
|
|
63
100
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
- Re-run the original path and smallest affected boundary before returning the supported action and evidence to Execute Work.
|
|
70
|
-
- Do not claim TDD when the check was written after implementation or RED was never observed for the intended reason.
|
|
101
|
+
- weaken or rewrite a valid test to obtain GREEN;
|
|
102
|
+
- calculate expected values through production logic;
|
|
103
|
+
- add public hooks, states, flags, or branches used only by tests;
|
|
104
|
+
- silently invent fallback, retry, recovery, or edge-case behavior;
|
|
105
|
+
- broaden implementation into another accepted behavior.
|
|
71
106
|
|
|
72
|
-
|
|
107
|
+
If GREEN requires an unsettled behavior, public contract, subsystem, or material scope expansion, return the evidence to Workflow.
|
|
73
108
|
|
|
74
|
-
|
|
109
|
+
## Refactor Locally
|
|
75
110
|
|
|
76
|
-
|
|
111
|
+
Refactor only when it improves the behavior just implemented while its focused check remains green.
|
|
77
112
|
|
|
78
|
-
|
|
113
|
+
TDD refactoring is immediate local cleanup within the behavior loop. It may improve names, remove nearby duplication, simplify control flow, or clarify ownership without changing the accepted result.
|
|
79
114
|
|
|
80
|
-
|
|
115
|
+
Do not turn REFACTOR into a general cleanup stream. When reducing existing complexity is itself an accepted result, return the completed behavior loop and use [Simplify Code](../simplify-code/SKILL.md) as a separate execution route.
|
|
116
|
+
|
|
117
|
+
When test pressure exposes caller coordination, public states, test-only seams, or ownership problems, preserve that evidence. Use [Design for Depth](../design-for-depth/SKILL.md) only when structural pressure is supported.
|
|
81
118
|
|
|
82
119
|
## Fix Bugs Through The Reported Boundary
|
|
83
120
|
|
|
84
|
-
First reproduce the reported symptom through the correct seam. A nearby failing path is not the bug.
|
|
121
|
+
First reproduce the reported symptom through the correct seam. A nearby failing path is diagnostic evidence, not the bug.
|
|
122
|
+
|
|
123
|
+
After GREEN, rerun:
|
|
85
124
|
|
|
86
|
-
|
|
125
|
+
1. the minimized regression check;
|
|
126
|
+
2. the original unminimized symptom or strongest available observer;
|
|
127
|
+
3. the smallest affected boundary capable of exposing regression.
|
|
87
128
|
|
|
88
|
-
|
|
129
|
+
Do not report a fix when only the minimized check passes and the reported boundary remains unavailable.
|
|
89
130
|
|
|
90
|
-
Return
|
|
131
|
+
## Return The Method Result
|
|
91
132
|
|
|
92
|
-
|
|
133
|
+
Return to the current owner with:
|
|
93
134
|
|
|
94
|
-
|
|
135
|
+
- accepted behavior and observing seam;
|
|
136
|
+
- observed RED result and why it was valid;
|
|
137
|
+
- GREEN implementation result;
|
|
138
|
+
- local refactor, when performed;
|
|
139
|
+
- focused, original-path, and affected-boundary evidence;
|
|
140
|
+
- what the evidence supports and does not support;
|
|
141
|
+
- unresolved or unverified behavior.
|
|
95
142
|
|
|
96
|
-
|
|
143
|
+
Do not select another behavior, close the Slice, trigger review, commit, or continue merely because GREEN was reached.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Test Design
|
|
2
2
|
|
|
3
|
-
Read this
|
|
3
|
+
Read this before designing or materially changing a TDD behavior check. Use it to choose the test level, seam, oracle, failure coverage, doubles, time or concurrency boundary, and characterization strategy.
|
|
4
4
|
|
|
5
|
-
The goal is confidence in accepted behavior, not maximal isolation or a fixed unit/integration/end-to-end ratio.
|
|
5
|
+
The goal is confidence in accepted behavior, not maximal isolation or a fixed unit/integration/end-to-end ratio.
|
|
6
6
|
|
|
7
7
|
## Choose The Confidence Boundary
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ Start from the highest stable interface used by callers, then choose the smalles
|
|
|
13
13
|
- **End-to-end or user-path check:** the requirement is a critical flow whose value depends on the assembled system.
|
|
14
14
|
- **Characterization test:** existing behavior must be observed and protected before a behavior-preserving refactor.
|
|
15
15
|
|
|
16
|
-
A characterization test records current behavior; it does not make that behavior desired or authoritative. Stop when intended behavior conflicts with source truth or remains user-owned.
|
|
16
|
+
A characterization test records current behavior; it does not make that behavior desired or authoritative. When characterization supports Simplify Code, protect only behavior that accepted source truth requires or that must remain unchanged for the selected simplification. Stop when intended behavior conflicts with source truth or remains user-owned.
|
|
17
17
|
|
|
18
18
|
A smaller environment is not better when it mocks away the behavior being claimed. A larger environment is not better when its extra machinery adds noise without proving more.
|
|
19
19
|
|
|
@@ -1,84 +1,221 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: track-work
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when ongoing work needs durable task memory, or when creating, recovering, maintaining, transitioning, or closing a Working Record.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Track Work
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Maintain one compact Working Record as the current projection of a task. It is memory, not authority, source truth, a Spec, a Plan, or a transcript. Current user direction, accepted artifacts, live evidence, and repository instructions override stale record content.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Track Only When Continuity Matters
|
|
11
|
+
|
|
12
|
+
Use a record when losing current understanding, accepted decisions, future obligations, one active outcome, evidence, or the next useful action could misalign later work. Do not create one for a short disposable result merely because work occurred.
|
|
13
|
+
|
|
14
|
+
Use one ignored record per task:
|
|
11
15
|
|
|
12
16
|
```text
|
|
13
|
-
|
|
14
|
-
-> existing Working Record owns it
|
|
15
|
-
-> read the required reference
|
|
16
|
-
-> maintain it
|
|
17
|
-
-> select an authorized slice and route to Execute Work, or wait
|
|
18
|
-
-> no existing Working Record
|
|
19
|
-
-> would losing context, decisions, evidence, or the next action risk misalignment?
|
|
20
|
-
-> no
|
|
21
|
-
-> authorized work in a mutation-permitting mode -> Execute Work
|
|
22
|
-
-> otherwise -> Workflow or wait
|
|
23
|
-
-> yes, but a record is unapproved
|
|
24
|
-
-> recommend a Working Record
|
|
25
|
-
-> wait
|
|
26
|
-
-> yes, and a record is approved
|
|
27
|
-
-> mode permits durable mutation
|
|
28
|
-
-> read the required reference
|
|
29
|
-
-> create the record
|
|
30
|
-
-> first slice already requested or approved
|
|
31
|
-
-> select the slice
|
|
32
|
-
-> Execute Work
|
|
33
|
-
-> only record creation was approved
|
|
34
|
-
-> Current Slice: None
|
|
35
|
-
-> wait
|
|
36
|
-
-> mode does not permit durable mutation
|
|
37
|
-
-> recommend the required mode change
|
|
38
|
-
-> wait
|
|
17
|
+
.freeflow/tasks/task-NNN-<short-name>/record.md
|
|
39
18
|
```
|
|
40
19
|
|
|
41
|
-
|
|
20
|
+
[Workflow](../workflow/SKILL.md) establishes record need, authority, ownership, and the route that receives the result. Use [Discuss](../discuss/SKILL.md) when intent, assumptions, alternatives, or task ownership are materially open. Track Work preserves accepted state and returns to that owning activity; it does not take over discussion.
|
|
21
|
+
|
|
22
|
+
Only the user changes task state. Creating or updating a record never authorizes implementation, evidence generation, commit, publication, deployment, or another controlled action.
|
|
23
|
+
|
|
24
|
+
## Keep Five Canonical Sections
|
|
25
|
+
|
|
26
|
+
Keep the record in this order:
|
|
27
|
+
|
|
28
|
+
1. **Current Context** — concise present understanding.
|
|
29
|
+
2. **Current Work** — one Current Slice or none, plus one next useful action.
|
|
30
|
+
3. **Future Work** — one ordered sequence of Slices and Checkpoints not yet in History.
|
|
31
|
+
4. **History** — Decisions, Checkpoints, and settled Slices, in that order.
|
|
32
|
+
5. **Notes** — inert retained context.
|
|
33
|
+
|
|
34
|
+
Current Context and Notes remain ordinary Markdown prose and bullets. Structured entities in Current Work, Future Work, and History use compact field-list rows: one value stays inline as `- Field: value`, while multiple values use nested two-space-indented bullets. This changes presentation only; the Schema 4 sections, fields, IDs, states, and lifecycle semantics remain unchanged.
|
|
35
|
+
|
|
36
|
+
Read [Working Record Format](references/working-record-format.md) before directly editing structured record content or preparing Markdown for a lifecycle command. It owns the exact headings, fields, state tables, omission rules, and compact entity layout. Do not invent fields, headings, IDs, or lifecycle states.
|
|
37
|
+
|
|
38
|
+
## Create Or Recover Honestly
|
|
39
|
+
|
|
40
|
+
Initialization creates every canonical heading. Start with at least:
|
|
41
|
+
|
|
42
|
+
- the task state;
|
|
43
|
+
- a supported Goal;
|
|
44
|
+
- any defining source or material Open question already known;
|
|
45
|
+
- `Current Slice: None`;
|
|
46
|
+
- one next useful action or an honest wait condition.
|
|
47
|
+
|
|
48
|
+
If the task is too unclear to state a Goal and next action without invention, discuss it before initialization.
|
|
49
|
+
|
|
50
|
+
The header’s `Last updated` is created by `init` and refreshed by successful lifecycle commands. Direct Markdown edits may leave it stale; it is advisory recency metadata, not proof of validity, freshness, authority, or semantic truth.
|
|
51
|
+
|
|
52
|
+
Use `resume` after context loss, compaction, session navigation, handoff, an intentional pause, or uncertain continuity. Do not reload it merely because another conversational turn began. Compare the recovered projection with current user direction and the live environment, then reconcile only affected state.
|
|
53
|
+
|
|
54
|
+
## Reconstruct State Before Action
|
|
55
|
+
|
|
56
|
+
Before any consequential action, especially after recovery, confirm:
|
|
57
|
+
|
|
58
|
+
- task State;
|
|
59
|
+
- Current Slice and its state;
|
|
60
|
+
- active Decisions;
|
|
61
|
+
- pending or deferred Checkpoints;
|
|
62
|
+
- the Next useful action;
|
|
63
|
+
- applicable authority, scope, and stop condition;
|
|
64
|
+
- unresolved Evidence or contradictions.
|
|
65
|
+
|
|
66
|
+
Reconcile the projection from the Working Record, selected exact History, accepted artifacts under `What defines this task`, the live environment, and current human intent and authority. Retrieve only the exact historical block needed for rationale, chronology, supersession, lineage, or Evidence. Do not act from the Working Record alone.
|
|
67
|
+
|
|
68
|
+
A record from another conversation branch remains memory. It does not transfer branch-local authority. If the record does not use the supported schema, inspect it through `full` and stop before direct edits or lifecycle transitions; migration is a separate explicit operation.
|
|
69
|
+
|
|
70
|
+
Before an expected compaction, clear, session pause, or handoff, reconcile the record only when material task state changed. The context boundary itself is not a History event, Evidence item, or Checkpoint.
|
|
71
|
+
|
|
72
|
+
## Keep Current Context Small And Current
|
|
73
|
+
|
|
74
|
+
Use concise bullets under exactly seven headings:
|
|
75
|
+
|
|
76
|
+
- Goal
|
|
77
|
+
- What defines this task
|
|
78
|
+
- Settled
|
|
79
|
+
- Tentative
|
|
80
|
+
- Open
|
|
81
|
+
- Current direction
|
|
82
|
+
- Boundaries
|
|
83
|
+
|
|
84
|
+
`Settled` contains supported present understanding, not duplicate Decision history. `What defines this task` points to accepted artifacts, user decisions, constraints, and source truth that determine interpretation.
|
|
85
|
+
|
|
86
|
+
Change Context only when its present meaning changes. Do not rewrite it after every Slice, Checkpoint, test, review, or ordinary transition. Add, edit, move, or remove only the affected bullet. Completed-event detail belongs with its Slice; accepted choice and rationale belong to a Decision.
|
|
87
|
+
|
|
88
|
+
## Edit Content Directly; Script Lifecycles
|
|
89
|
+
|
|
90
|
+
Use ordinary Markdown reads and edits for content that requires judgment:
|
|
91
|
+
|
|
92
|
+
- Current Context bullets;
|
|
93
|
+
- allowed wording and optional fields inside Future Work or the Current Slice;
|
|
94
|
+
- proposed-item order or removal;
|
|
95
|
+
- the next useful action;
|
|
96
|
+
- Material updates;
|
|
97
|
+
- Notes;
|
|
98
|
+
- clerical correction of active prose;
|
|
99
|
+
- the defined clerical correction block in terminal History.
|
|
100
|
+
|
|
101
|
+
A direct edit may change allowed content inside a block. It must not change the block’s durable ID, lifecycle state, entity kind, or owning top-level section. Do not delete or reactivate terminal History or erase its prior value; append a defined correction instead.
|
|
102
|
+
|
|
103
|
+
Prose-only bullet edits need no extra validation. After editing headings, fields, references, or other structured blocks, run `validate` before consequential work; every lifecycle command validates its source and candidate.
|
|
104
|
+
|
|
105
|
+
Use a deterministic lifecycle command when an operation creates structured identity or changes lifecycle state:
|
|
106
|
+
|
|
107
|
+
- initialize the record;
|
|
108
|
+
- propose a Slice or Checkpoint;
|
|
109
|
+
- start, pause, resume, close, or reopen a Slice;
|
|
110
|
+
- activate, defer, resume, or close a Checkpoint;
|
|
111
|
+
- add, supersede, or retire a Decision;
|
|
112
|
+
- change task state.
|
|
113
|
+
|
|
114
|
+
Commands own placement, ID allocation, legal state transitions, complete multi-block movement, and the script-maintained `Last updated` field. The agent owns meaning and supplies the content. Slice and task-state transitions also require agent-supplied Next useful action text; Checkpoint transitions may update it when supplied. Use [working-record.mjs](scripts/working-record.mjs) directly for the lifecycle boundary. Read the format reference first, then run the complete operation help—`working-record.mjs <group> <operation> --help`—before preparing a fragment; use `--input -` when supplying agent-authored Markdown through stdin. `validate --record` checks the stored Schema 4 record after structured direct edits. Do not inspect the implementation source under `scripts/lib/` unless diagnosing a concrete defect.
|
|
115
|
+
|
|
116
|
+
A lifecycle command must validate the source and candidate before publication and apply one complete transition or none. If its result is uncertain, stop and re-read `full` before retrying or editing related state.
|
|
42
117
|
|
|
43
|
-
|
|
118
|
+
## Keep One Coherent Slice
|
|
44
119
|
|
|
45
|
-
|
|
120
|
+
A Slice is one coherent learning, delivery, or deepening outcome. Keep implementation, verification, review, accepted correction, and associated Checkpoints inside the same Slice while its intended result, authority boundary, evidence boundary, and independently useful outcome remain coherent.
|
|
46
121
|
|
|
47
|
-
|
|
48
|
-
- `Current understanding` is a present-state summary, not a running task summary or compressed transcript. Replace superseded prose instead of appending completed events.
|
|
49
|
-
- Give detailed facts one schema-owned home. Other sections summarize or point to that owner rather than repeating findings, hashes, commands, or test inventories.
|
|
50
|
-
- Only the user changes task state. Do not infer `Paused`, `Completed`, `Abandoned`, or renewed `Active` state from inactivity, apparent completion, or failure.
|
|
51
|
-
- A **slice** is one bounded piece of learning, delivery, or structural improvement. One slice may span multiple iterations of [Workflow's](../workflow/SKILL.md) Feedback Loop and calls to other owning skills.
|
|
52
|
-
- Record state changes, not every edit or conversation. Apply authorized in-scope steering and reconcile its meaningful final effect when the slice closes.
|
|
53
|
-
- Before work changes the recorded result, scope, authority, evidence boundary, or stop conditions, decide and record whether it extends the current slice or requires a new one.
|
|
54
|
-
- Questions, criticism, and review findings do not authorize changes. Ordinary in-slice feedback is not a checkpoint or history event merely because work pauses for the user.
|
|
55
|
-
- Workflow establishes slice outcomes. Implementation, verification, self-review, or a review report does not end a slice by itself, and review need not Pass.
|
|
56
|
-
- The record may preserve authority sources, decisions, checkpoints, and evidence; it never creates authority or proof.
|
|
122
|
+
Use a new Slice when any of those boundaries materially changes. Do not split ordinary implementation stages, tests, reviews, or corrections into separate Slices.
|
|
57
123
|
|
|
58
|
-
|
|
124
|
+
A proposed Slice has no durable ID or authority. Its title must be unique across Future Work. It may be edited, reordered, or removed until selected.
|
|
59
125
|
|
|
60
|
-
|
|
126
|
+
When an immediately authorized outcome does not need Future Work ordering or recovery, use `slice start-direct`. It creates a new Current Slice without consuming or changing any Future Work item. Never silently treat a direct start as proposal selection.
|
|
127
|
+
|
|
128
|
+
Starting requires current authority and creates one detailed Current Slice with a new `S-NNN` ID before execution. Do not begin Slice work until that start transition has successfully persisted and validated the Current Slice and Next useful action. After a successful start or reopen, return the bounded result to [Execute Work](../execute-work/SKILL.md); the transition itself is not implementation authority.
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
Future proposed
|
|
132
|
+
-> Current in_progress
|
|
133
|
+
<-> Current paused
|
|
134
|
+
-> History completed | blocked | abandoned
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- `in_progress` means the selected outcome is actively being pursued.
|
|
138
|
+
- `paused` means the outcome remains current but safe continuation is suspended. Ordinary feedback or a turn boundary is not a pause.
|
|
139
|
+
- Historical `blocked` means the unresolved paused attempt deliberately left Current Work.
|
|
140
|
+
- Historical `completed` means the intended result and required evidence boundary were settled.
|
|
141
|
+
- Historical `abandoned` means the outcome is no longer pursued under explicit authority.
|
|
142
|
+
- Close as historical `blocked` only from a paused Current Slice; close as `abandoned` only with explicit authority and a reason; close as `completed` only after required Evidence and applicable Checkpoints are settled.
|
|
143
|
+
|
|
144
|
+
Append a Material update only when safe continuation or truthful closure would otherwise lose a material change. Use concise labeled bullets for Evidence, pauses and resumptions, accepted extensions, contradictions, review outcomes, or corrections. Routine commands, edits, tests, and conversation turns are not record events.
|
|
145
|
+
|
|
146
|
+
Record an accepted extension before expanded work begins. Preserve its authority, added scope, added evidence boundary, and changed stop condition when applicable. Questions, criticism, findings, and useful suggestions do not authorize an extension.
|
|
147
|
+
|
|
148
|
+
A Slice cannot close while a `pending` or `deferred` Checkpoint applies to it. Resolve the Checkpoint first. Closure compacts the active declaration and Material updates into one historical Slice; it does not copy the active block wholesale.
|
|
149
|
+
|
|
150
|
+
Before closing as `completed`, establish that every material completion claim has supporting Evidence at its required boundary, the live state does not contradict the result, no authority conflict remains, and no material contradiction is unresolved. A Learning Slice may complete by disproving its hypothesis when its question and Evidence boundary are settled. The command can enforce structure, not semantic truth.
|
|
151
|
+
|
|
152
|
+
Closing never selects or starts another Future Work item. After closure, Current Slice is `None` until another outcome is explicitly selected.
|
|
153
|
+
|
|
154
|
+
To continue a historical `completed` or `blocked` Slice, create a new Current Slice with a new ID and `Reopened from: S-old`. Supply fresh authority, scope, expected evidence, stop condition, and starting state. Leave the historical entry unchanged. Resuming returns a Current paused Slice to `in_progress`; reopening creates a linked Slice from History.
|
|
155
|
+
|
|
156
|
+
## Keep Checkpoints Prospective Until Terminal
|
|
157
|
+
|
|
158
|
+
Every Checkpoint belongs to one Slice. Its title must be unique across Future Work.
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
proposed -> pending <-> deferred
|
|
162
|
+
pending | deferred -> completed | cancelled | replaced
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
- `proposed` is a candidate with no authority or durable ID.
|
|
166
|
+
- `pending` is an accepted unresolved boundary that dependent work must not cross.
|
|
167
|
+
- `deferred` remains accepted but dormant until its recorded condition.
|
|
168
|
+
- `completed` means the boundary occurred; its result may still be adverse or blocking.
|
|
169
|
+
- `cancelled` means it is no longer required.
|
|
170
|
+
- `replaced` names the pending Checkpoint that takes its place.
|
|
171
|
+
|
|
172
|
+
A proposed Checkpoint may be removed without History. Activate it only when the boundary is explicitly selected or authorized; a proposal or recommendation is not acceptance. Activation assigns `C-NNN`. When its proposed Slice starts, the same transition replaces the exact proposed-title reference with the new `S-NNN`. An accepted Checkpoint leaves Future Work only through a lifecycle command and remains there until terminal.
|
|
173
|
+
|
|
174
|
+
## Preserve Decisions Without Rewriting Their Meaning
|
|
175
|
+
|
|
176
|
+
Decisions live under History and receive `D-NNN` when added:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
active -> superseded | retired
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
A clerical clarification may edit an active Decision directly without changing its meaning. A material change creates a new Decision and supersedes the old one. A superseded Decision names its replacement; a retired Decision records why it no longer governs. Terminal Decisions are not reactivated. Adopting an old choice again creates a new active Decision.
|
|
183
|
+
|
|
184
|
+
## Keep Evidence And Blockers With Their Slice
|
|
185
|
+
|
|
186
|
+
Do not create global Evidence or Blocker sections. A material Evidence update states the claim, observing boundary, result, what it proves and does not prove, and a real pointer when available. Later contradictory Evidence is appended rather than silently rewriting the earlier observation.
|
|
187
|
+
|
|
188
|
+
A pause update states why continuation stopped and what permits resumption. A resume update states the resolution source. At closure, distill the strongest relevant Evidence, proof limits, unresolved blocker, and task effect into the historical Slice.
|
|
189
|
+
|
|
190
|
+
Evidence supports claims only at its observing boundary. A green check, completed implementation, or review opinion alone does not establish a supported exit. If an attempt fails, is rolled back, or leaves residual effects that change the next decision, preserve that attempt, reason, Evidence, and residual state in Material updates or the historical Slice.
|
|
191
|
+
|
|
192
|
+
## Change Task State Explicitly
|
|
193
|
+
|
|
194
|
+
Task states are:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
active <-> paused
|
|
198
|
+
active | paused -> completed | abandoned
|
|
199
|
+
completed | abandoned -> active only by explicit user reopening
|
|
200
|
+
```
|
|
61
201
|
|
|
62
|
-
|
|
63
|
-
2. **Select or wait:** select a slice only when its concrete work is requested or approved. If only record creation is approved, keep `Current Slice` as `None` and wait. When selected, move one proposal into `Current Slice`, assign its chronological `S-` ID, save the write-ahead state, then route to Execute Work.
|
|
64
|
-
3. **Maintain the slice:** keep small steering out of the event history; record accepted extensions before execution; preserve blockers, review routes, and evidence without replacing a coherent slice.
|
|
65
|
-
4. **Close the slice:** move the Workflow-established outcome to History, preserve the original boundary and accepted extensions, rewrite Current Context from the resulting present state, remove completed-event detail already owned by History, and set `Current Slice` to `None`.
|
|
66
|
-
5. **Preserve what matters:** keep task-local decisions, selected checkpoints, evidence pointers, and Notes in their schema-owned sections.
|
|
202
|
+
Pausing a task pauses its Current Slice first when one exists. Reactivating the task does not automatically resume that Slice. A completed or abandoned task requires Current Slice `None` and no pending or deferred Checkpoint. Proposed Future Work may remain only when it is clearly retained as non-obligating future material; otherwise reconcile or remove it before the terminal transition. Reopening a task does not automatically select work.
|
|
67
203
|
|
|
68
|
-
##
|
|
204
|
+
## Keep Notes Inert
|
|
69
205
|
|
|
70
|
-
|
|
206
|
+
Notes have no field schema. Add or edit them directly as ordinary Markdown. Remove a user-authored Note only when the user requests it; remove other Notes only when current maintenance authority clearly covers that correction.
|
|
71
207
|
|
|
72
|
-
|
|
208
|
+
Notes do not authorize, prioritize, schedule, block, unblock, prove, or require follow-up.
|
|
73
209
|
|
|
74
|
-
##
|
|
210
|
+
## Read Through Two Views
|
|
75
211
|
|
|
76
|
-
|
|
212
|
+
- `resume` shows the record header, complete Current Context, active Decisions derived from History, complete Current Work, complete Future Work, and Notes. It omits terminal History.
|
|
213
|
+
- `full` returns the complete canonical Markdown exactly as stored.
|
|
77
214
|
|
|
78
|
-
|
|
215
|
+
Both views are direct Markdown text, not JSON. A host may render that Markdown visually. Neither view follows external pointers or mutates the record. When one historical entity is needed, search and read its bounded `S-NNN`, `C-NNN`, or `D-NNN` block instead of loading all History.
|
|
79
216
|
|
|
80
|
-
|
|
217
|
+
## Return To The Requesting Activity
|
|
81
218
|
|
|
82
|
-
|
|
219
|
+
After maintenance, return to the activity that requested the record operation. Discussion returns to [Discuss](../discuss/SKILL.md) after accepted state is preserved; authorized Slice work returns to [Execute Work](../execute-work/SKILL.md). Point-in-time transfer uses [Handoff](../handoff/SKILL.md). Task-local durable content remains owned by [Write Spec](../write-spec/SKILL.md) and [Write Plan](../write-plan/SKILL.md). Do not continue execution, select Future Work, or treat a recorded proposal, Decision, Checkpoint, or next action as fresh authority merely because it is present.
|
|
83
220
|
|
|
84
|
-
|
|
221
|
+
Stop instead of guessing when authority, intended result, scope, evidence, record structure, migration, or a transition is unclear. Track Work ends when the record accurately preserves supported current state and one next useful action. It does not claim implementation, verification, review, commit, release, publication, or task completion on its own.
|