@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.
Files changed (301) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +4 -5
  4. package/README.md +141 -163
  5. package/capabilities/cognitive-routing/SKILL.md +387 -0
  6. package/capabilities/context-virtualization/SKILL.md +103 -0
  7. package/capabilities/conversation-history/SKILL.md +53 -0
  8. package/command-surface.json +6 -37
  9. package/hooks/freeflow-runtime-context.mjs +50 -541
  10. package/hooks/hooks.json +1 -26
  11. package/hooks/tests/check-runtime-context-hook.sh +114 -308
  12. package/package.json +27 -17
  13. package/pi-extension/dist/cognitive-routing/commands.js +96 -0
  14. package/pi-extension/dist/cognitive-routing/config.js +232 -0
  15. package/pi-extension/dist/cognitive-routing/controller.js +1292 -0
  16. package/pi-extension/dist/cognitive-routing/history.js +451 -0
  17. package/pi-extension/dist/cognitive-routing/host.js +188 -0
  18. package/pi-extension/dist/cognitive-routing/pi-routing-session.js +414 -0
  19. package/pi-extension/dist/cognitive-routing/pi-session-control.js +320 -0
  20. package/pi-extension/dist/cognitive-routing/runtime.js +43 -0
  21. package/pi-extension/dist/cognitive-routing/tool.js +212 -0
  22. package/pi-extension/dist/cognitive-routing/types.js +6 -0
  23. package/pi-extension/dist/context-virtualization/commands.js +89 -0
  24. package/pi-extension/dist/context-virtualization/projector.js +42 -0
  25. package/pi-extension/dist/context-virtualization/runtime.js +356 -0
  26. package/pi-extension/dist/context-virtualization/state.js +57 -0
  27. package/pi-extension/dist/context-virtualization/types.js +10 -0
  28. package/pi-extension/dist/conversation-history/passages.js +66 -0
  29. package/pi-extension/dist/conversation-history/ranking.js +105 -0
  30. package/pi-extension/dist/conversation-history/runtime.js +226 -0
  31. package/pi-extension/dist/conversation-history/search.js +56 -0
  32. package/pi-extension/dist/conversation-history/types.js +1 -0
  33. package/pi-extension/dist/freeflow-context/resolver.js +120 -0
  34. package/pi-extension/dist/freeflow-context/runtime.js +80 -0
  35. package/pi-extension/dist/freeflow-context/source-projector.js +95 -0
  36. package/pi-extension/dist/freeflow-context/tool.js +308 -0
  37. package/pi-extension/dist/freeflow-context/types.js +12 -0
  38. package/pi-extension/dist/freeflow-context/visibility.js +28 -0
  39. package/pi-extension/dist/index.js +564 -129
  40. package/pi-extension/dist/runtime/runtime-context.js +357 -470
  41. package/pi-extension/dist/runtime/runtime-identity.js +5 -0
  42. package/pi-extension/dist/settings/settings-tui.js +78 -0
  43. package/pi-extension/dist/settings/settings-ui.js +572 -826
  44. package/pi-extension/dist/ui/text-component.js +57 -0
  45. package/pi-extension/src/cognitive-routing/commands.ts +129 -0
  46. package/pi-extension/src/cognitive-routing/config.ts +303 -0
  47. package/pi-extension/src/cognitive-routing/controller.ts +1628 -0
  48. package/pi-extension/src/cognitive-routing/history.ts +650 -0
  49. package/pi-extension/src/cognitive-routing/host.ts +266 -0
  50. package/pi-extension/src/cognitive-routing/pi-routing-session.ts +538 -0
  51. package/pi-extension/src/cognitive-routing/pi-session-control.ts +444 -0
  52. package/pi-extension/src/cognitive-routing/runtime.ts +57 -0
  53. package/pi-extension/src/cognitive-routing/tool.ts +273 -0
  54. package/pi-extension/src/cognitive-routing/types.ts +89 -0
  55. package/pi-extension/src/context-virtualization/commands.ts +111 -0
  56. package/pi-extension/src/context-virtualization/projector.ts +62 -0
  57. package/pi-extension/src/context-virtualization/runtime.ts +406 -0
  58. package/pi-extension/src/context-virtualization/state.ts +79 -0
  59. package/pi-extension/src/context-virtualization/types.ts +92 -0
  60. package/pi-extension/src/conversation-history/passages.ts +81 -0
  61. package/pi-extension/src/conversation-history/ranking.ts +155 -0
  62. package/pi-extension/src/conversation-history/runtime.ts +250 -0
  63. package/pi-extension/src/conversation-history/search.ts +79 -0
  64. package/pi-extension/src/conversation-history/types.ts +31 -0
  65. package/pi-extension/src/freeflow-context/resolver.ts +139 -0
  66. package/pi-extension/src/freeflow-context/runtime.ts +100 -0
  67. package/pi-extension/src/freeflow-context/source-projector.ts +106 -0
  68. package/pi-extension/src/freeflow-context/tool.ts +360 -0
  69. package/pi-extension/src/freeflow-context/types.ts +70 -0
  70. package/pi-extension/src/freeflow-context/visibility.ts +53 -0
  71. package/pi-extension/src/index.ts +597 -135
  72. package/pi-extension/src/runtime/runtime-context.ts +373 -491
  73. package/pi-extension/src/runtime/runtime-identity.ts +8 -0
  74. package/pi-extension/src/settings/settings-tui.ts +93 -0
  75. package/pi-extension/src/settings/settings-ui.ts +679 -910
  76. package/pi-extension/src/ui/text-component.ts +66 -0
  77. package/pi-extension/tests/cognitive-routing/commands.test.js +134 -0
  78. package/pi-extension/tests/cognitive-routing/controller.test.js +1128 -0
  79. package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +1142 -0
  80. package/pi-extension/tests/cognitive-routing/history.test.js +274 -0
  81. package/pi-extension/tests/cognitive-routing/host-fixture.js +4 -0
  82. package/pi-extension/tests/cognitive-routing/host-identity.test.js +63 -0
  83. package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +434 -0
  84. package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +174 -0
  85. package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +91 -0
  86. package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +279 -0
  87. package/pi-extension/tests/cognitive-routing/tool.test.js +230 -0
  88. package/pi-extension/tests/context-virtualization/extension.test.js +749 -0
  89. package/pi-extension/tests/context-virtualization/projector.test.js +110 -0
  90. package/pi-extension/tests/context-virtualization/runtime.test.js +216 -0
  91. package/pi-extension/tests/conversation-history/runtime.test.js +98 -0
  92. package/pi-extension/tests/conversation-history/search.test.js +97 -0
  93. package/pi-extension/tests/integration/mode-free-core.test.js +218 -0
  94. package/pi-extension/tests/integration/pi-extension.test.js +532 -3701
  95. package/pi-extension/tests/integration/prompt-architecture.test.js +350 -0
  96. package/pi-extension/tests/integration/unaffected-regressions.test.js +411 -0
  97. package/runtime/prompts/cognitive-routing.md +10 -0
  98. package/runtime/prompts/context-virtualization.md +3 -0
  99. package/runtime/prompts/conversation-history.md +3 -0
  100. package/runtime/prompts/core.md +84 -0
  101. package/runtime/prompts/interaction-contract.md +11 -0
  102. package/skills/action-selection/SKILL.md +140 -0
  103. package/skills/action-selection/references/trajectory-stalls.md +71 -0
  104. package/skills/bypass/SKILL.md +109 -38
  105. package/skills/commit-work/SKILL.md +94 -55
  106. package/skills/commit-work/references/git-state-edges.md +94 -0
  107. package/skills/commit-work/references/simple-push.md +92 -0
  108. package/skills/commit-work/references/staging-decisions.md +79 -46
  109. package/skills/decision-gate/SKILL.md +80 -22
  110. package/skills/design-for-depth/SKILL.md +206 -60
  111. package/skills/design-for-depth/references/design-pressure-signals.md +108 -240
  112. package/skills/design-for-depth/references/interface-design-loop.md +77 -97
  113. package/skills/design-for-depth/references/module-and-dependency-design.md +147 -0
  114. package/skills/design-for-depth/references/software-design-philosophy.md +128 -174
  115. package/skills/design-for-depth/references/state-and-failure-boundaries.md +136 -0
  116. package/skills/diagnose-failure/SKILL.md +200 -48
  117. package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +18 -6
  118. package/skills/diagnose-failure/references/{flaky-and-performance.md → flaky-and-performance-diagnosis.md} +13 -5
  119. package/skills/discuss/SKILL.md +119 -65
  120. package/skills/discuss/references/discussion-continuity.md +123 -0
  121. package/skills/evaluate-skill/SKILL.md +166 -52
  122. package/skills/evaluate-skill/references/{definition-schema.md → evaluation-definition-schema.md} +43 -3
  123. package/skills/evaluate-skill/references/evaluation-design.md +56 -30
  124. package/skills/evaluate-skill/references/execution-and-evidence.md +8 -3
  125. package/skills/evaluate-skill/references/review-and-revision.md +62 -21
  126. package/skills/evaluate-skill/scripts/lib/definitions.mjs +114 -3
  127. package/skills/evaluate-skill/scripts/lib/grade-interaction.mjs +156 -1
  128. package/skills/evaluate-skill/scripts/lib/grade.mjs +9 -1
  129. package/skills/evaluate-skill/scripts/lib/pi.mjs +147 -32
  130. package/skills/evaluate-skill/scripts/lib/rpc.mjs +4 -4
  131. package/skills/evaluate-skill/scripts/lib/runner.mjs +36 -14
  132. package/skills/evaluate-skill/scripts/lib/sandbox.mjs +92 -0
  133. package/skills/evaluate-skill/scripts/pi-guard.mjs +1 -1
  134. package/skills/evaluate-skill/scripts/pi-observer.mjs +66 -0
  135. package/skills/evaluate-skill/scripts/skill-eval.mjs +6 -5
  136. package/skills/execute-work/SKILL.md +99 -57
  137. package/skills/execute-work/references/code-practices.md +4 -4
  138. package/skills/execute-work/references/execute-work-edges.md +62 -0
  139. package/skills/finish-branch/SKILL.md +2 -2
  140. package/skills/finish-branch/references/integration-options.md +1 -1
  141. package/skills/handoff/SKILL.md +3 -3
  142. package/skills/launch-work/SKILL.md +1 -1
  143. package/skills/launch-work/references/launch-readiness.md +2 -2
  144. package/skills/migration-work/SKILL.md +2 -2
  145. package/skills/migration-work/references/migration-lifecycle.md +1 -1
  146. package/skills/release-work/SKILL.md +1 -1
  147. package/skills/release-work/references/release-evidence.md +1 -1
  148. package/skills/review-artifact/SKILL.md +129 -66
  149. package/skills/review-artifact/references/adjudicate-artifact-review.md +101 -0
  150. package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +159 -0
  151. package/skills/review-work/SKILL.md +113 -68
  152. package/skills/review-work/references/adjudicate-work-review.md +97 -0
  153. package/skills/review-work/references/independent-work-reviewer-contract.md +139 -0
  154. package/skills/review-work/references/security-risk-lens.md +18 -16
  155. package/skills/setup-freeflow/SKILL.md +16 -17
  156. package/skills/setup-freeflow/references/activation-contract.md +24 -30
  157. package/skills/setup-freeflow/references/host-setup.md +6 -7
  158. package/skills/simplify-code/SKILL.md +97 -39
  159. package/skills/simplify-code/references/simplification-patterns.md +1 -1
  160. package/skills/tdd/SKILL.md +100 -53
  161. package/skills/tdd/references/test-design.md +3 -3
  162. package/skills/track-work/SKILL.md +195 -58
  163. package/skills/track-work/references/working-record-format.md +515 -0
  164. package/skills/track-work/scripts/lib/document.mjs +713 -0
  165. package/skills/track-work/scripts/lib/format.mjs +166 -0
  166. package/skills/track-work/scripts/lib/store.mjs +233 -0
  167. package/skills/track-work/scripts/lib/transitions.mjs +790 -0
  168. package/skills/track-work/scripts/lib/views.mjs +40 -0
  169. package/skills/track-work/scripts/working-record.mjs +316 -0
  170. package/skills/verify-work/SKILL.md +57 -19
  171. package/skills/verify-work/references/browser-runtime-evidence.md +2 -2
  172. package/skills/verify-work/references/integration-evidence.md +1 -7
  173. package/skills/verify-work/references/performance-evidence.md +2 -2
  174. package/skills/workflow/SKILL.md +137 -55
  175. package/skills/workflow/references/domain-skill-composition.md +26 -40
  176. package/skills/write-plan/SKILL.md +1 -1
  177. package/skills/write-skill/SKILL.md +218 -61
  178. package/skills/write-skill/references/activation-boundaries.md +63 -21
  179. package/skills/write-skill/references/agent-first-instructions.md +61 -27
  180. package/skills/write-skill/references/progressive-disclosure.md +97 -33
  181. package/skills/write-skill/references/skill-dependency-graphs.md +190 -0
  182. package/capabilities/output-router/SKILL.md +0 -206
  183. package/capabilities/output-router/references/safety-policy.md +0 -40
  184. package/capabilities/output-router/references/setup.md +0 -110
  185. package/pi-extension/dist/output-router/host-producer-identification.js +0 -232
  186. package/pi-extension/dist/output-router/native-safety-net.js +0 -216
  187. package/pi-extension/dist/output-router/observed-tool-routing.js +0 -122
  188. package/pi-extension/dist/output-router/renderers.js +0 -1023
  189. package/pi-extension/dist/output-router/router-tools.js +0 -554
  190. package/pi-extension/dist/output-router/schemas.js +0 -383
  191. package/pi-extension/dist/output-router/status.js +0 -744
  192. package/pi-extension/dist/output-router/utils.js +0 -502
  193. package/pi-extension/src/output-router/host-producer-identification.ts +0 -256
  194. package/pi-extension/src/output-router/native-safety-net.ts +0 -248
  195. package/pi-extension/src/output-router/observed-tool-routing.ts +0 -134
  196. package/pi-extension/src/output-router/renderers.ts +0 -1108
  197. package/pi-extension/src/output-router/router-tools.ts +0 -579
  198. package/pi-extension/src/output-router/schemas.ts +0 -387
  199. package/pi-extension/src/output-router/status.ts +0 -791
  200. package/pi-extension/src/output-router/utils.ts +0 -554
  201. package/pi-extension/tests/output-router/observed-producers.test.js +0 -132
  202. package/pi-extension/tests/output-router/search.test.js +0 -722
  203. package/router/dist/benchmarks/benchmark-harness.d.ts +0 -35
  204. package/router/dist/benchmarks/benchmark-harness.js +0 -92
  205. package/router/dist/benchmarks/benchmarks.d.ts +0 -109
  206. package/router/dist/benchmarks/benchmarks.js +0 -979
  207. package/router/dist/benchmarks/codex-qa-benchmarks.d.ts +0 -95
  208. package/router/dist/benchmarks/codex-qa-benchmarks.js +0 -500
  209. package/router/dist/benchmarks/command-benchmarks.d.ts +0 -143
  210. package/router/dist/benchmarks/command-benchmarks.js +0 -698
  211. package/router/dist/benchmarks/context-mode-normalized-benchmarks.d.ts +0 -82
  212. package/router/dist/benchmarks/context-mode-normalized-benchmarks.js +0 -773
  213. package/router/dist/benchmarks/context-mode-real-deep-benchmark.d.ts +0 -132
  214. package/router/dist/benchmarks/context-mode-real-deep-benchmark.js +0 -1380
  215. package/router/dist/benchmarks/context-saving-baseline.d.ts +0 -60
  216. package/router/dist/benchmarks/context-saving-baseline.js +0 -470
  217. package/router/dist/benchmarks/index-benchmarks.d.ts +0 -103
  218. package/router/dist/benchmarks/index-benchmarks.js +0 -862
  219. package/router/dist/benchmarks/storage-policy-benchmarks.d.ts +0 -101
  220. package/router/dist/benchmarks/storage-policy-benchmarks.js +0 -618
  221. package/router/dist/benchmarks/vault-index-benchmarks.d.ts +0 -56
  222. package/router/dist/benchmarks/vault-index-benchmarks.js +0 -322
  223. package/router/dist/config/config.d.ts +0 -103
  224. package/router/dist/config/config.js +0 -632
  225. package/router/dist/config/router-contract.d.ts +0 -10
  226. package/router/dist/config/router-contract.js +0 -54
  227. package/router/dist/config/schema.d.ts +0 -27
  228. package/router/dist/config/schema.js +0 -648
  229. package/router/dist/config/types.d.ts +0 -573
  230. package/router/dist/config/types.js +0 -41
  231. package/router/dist/evidence/bounded-evidence.d.ts +0 -40
  232. package/router/dist/evidence/bounded-evidence.js +0 -323
  233. package/router/dist/evidence/evidence-range-selector.d.ts +0 -24
  234. package/router/dist/evidence/evidence-range-selector.js +0 -232
  235. package/router/dist/evidence/evidence-search.d.ts +0 -27
  236. package/router/dist/evidence/evidence-search.js +0 -490
  237. package/router/dist/evidence/evidence.d.ts +0 -38
  238. package/router/dist/evidence/evidence.js +0 -200
  239. package/router/dist/evidence/failure-contracts.d.ts +0 -37
  240. package/router/dist/evidence/failure-contracts.js +0 -166
  241. package/router/dist/evidence/line-ranges.d.ts +0 -24
  242. package/router/dist/evidence/line-ranges.js +0 -22
  243. package/router/dist/experiments/local-index.d.ts +0 -64
  244. package/router/dist/experiments/local-index.js +0 -581
  245. package/router/dist/index.d.ts +0 -30
  246. package/router/dist/index.js +0 -32
  247. package/router/dist/local/local-traversal.d.ts +0 -18
  248. package/router/dist/local/local-traversal.js +0 -334
  249. package/router/dist/processing/engine.d.ts +0 -132
  250. package/router/dist/processing/engine.js +0 -533
  251. package/router/dist/processing/reducers.d.ts +0 -280
  252. package/router/dist/processing/reducers.js +0 -1673
  253. package/router/dist/processing/renderers.d.ts +0 -31
  254. package/router/dist/processing/renderers.js +0 -195
  255. package/router/dist/processing/scripts.d.ts +0 -91
  256. package/router/dist/processing/scripts.js +0 -386
  257. package/router/dist/repo/repo-traversal.d.ts +0 -18
  258. package/router/dist/repo/repo-traversal.js +0 -245
  259. package/router/dist/routing/observed-reducers.d.ts +0 -41
  260. package/router/dist/routing/observed-reducers.js +0 -661
  261. package/router/dist/routing/observed-routing.d.ts +0 -26
  262. package/router/dist/routing/observed-routing.js +0 -378
  263. package/router/dist/routing/parsers.d.ts +0 -16
  264. package/router/dist/routing/parsers.js +0 -521
  265. package/router/dist/routing/run-filters.d.ts +0 -60
  266. package/router/dist/routing/run-filters.js +0 -238
  267. package/router/dist/routing/run-reducers.d.ts +0 -49
  268. package/router/dist/routing/run-reducers.js +0 -122
  269. package/router/dist/sandbox/adapter-roots.d.ts +0 -46
  270. package/router/dist/sandbox/adapter-roots.js +0 -66
  271. package/router/dist/sandbox/eryx-python-adapter.d.ts +0 -13
  272. package/router/dist/sandbox/eryx-python-adapter.js +0 -868
  273. package/router/dist/sandbox/jq-wasm-adapter.d.ts +0 -9
  274. package/router/dist/sandbox/jq-wasm-adapter.js +0 -429
  275. package/router/dist/sandbox/quickjs-wasi-adapter.d.ts +0 -13
  276. package/router/dist/sandbox/quickjs-wasi-adapter.js +0 -384
  277. package/router/dist/sandbox/script-sandbox.d.ts +0 -134
  278. package/router/dist/sandbox/script-sandbox.js +0 -337
  279. package/router/dist/setup/script-transform-adapters.d.ts +0 -32
  280. package/router/dist/setup/script-transform-adapters.js +0 -278
  281. package/router/dist/tools/batch.d.ts +0 -33
  282. package/router/dist/tools/batch.js +0 -586
  283. package/router/dist/tools/run.d.ts +0 -62
  284. package/router/dist/tools/run.js +0 -1304
  285. package/router/dist/tools/search.d.ts +0 -66
  286. package/router/dist/tools/search.js +0 -1364
  287. package/router/dist/transform/engine.d.ts +0 -168
  288. package/router/dist/transform/engine.js +0 -2072
  289. package/router/dist/vault/vault-index.d.ts +0 -125
  290. package/router/dist/vault/vault-index.js +0 -416
  291. package/router/dist/vault/vault.d.ts +0 -138
  292. package/router/dist/vault/vault.js +0 -630
  293. package/runtime/interaction-contract.md +0 -16
  294. package/skills/discuss/references/checkpoints.md +0 -66
  295. package/skills/execute-work/references/execution-loop.md +0 -77
  296. package/skills/mode-contract/SKILL.md +0 -104
  297. package/skills/review-artifact/references/reviewer-prompt.md +0 -148
  298. package/skills/review-work/references/reviewer-prompt.md +0 -134
  299. package/skills/track-work/references/working-record-schema.md +0 -378
  300. package/skills/workflow/references/workflow-loop.md +0 -92
  301. /package/skills/handoff/references/{templates.md → handoff-templates.md} +0 -0
@@ -1,96 +1,143 @@
1
1
  ---
2
2
  name: tdd
3
- description: Use when implementing or changing behavior test-first, fixing a bug with regression evidence, protecting behavior during refactoring, or when a test is difficult to write or starts shaping production design.
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 accepted behavior.
8
+ Use one observed failing behavior check to guide the smallest complete implementation for one settled behavior.
9
9
 
10
- TDD is an execution method inside [Execute Work](../execute-work/SKILL.md). One vertical RED/GREEN/REFACTOR loop is a bounded action, not automatically a Track Work slice. Several accepted behavior loops may remain inside one coherent current slice.
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
- TDD does not define intended behavior. The accepted request, source truth, and user decisions establish what should happen.
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
- [Accepted behavior with settled expectation]
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 expected missing behavior -> GREEN
21
- -> passes immediately -> inspect test, boundary, or existing behavior
22
- -> errors for unrelated reason -> correct harness or diagnose
23
- -> [GREEN: smallest complete implementation]
24
- -> [Verify focused behavior]
25
- -> [REFACTOR when useful, without behavior change]
26
- -> [Verify original path and affected boundary]
27
- -> [Route]
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 all implementation later. Finish, verify, and route one accepted behavior before starting another.
69
+ Do not write all tests first and implementation later. Finish one behavior loop before another.
35
70
 
36
- ## Use Or Exit Deliberately
71
+ ## Observe Valid RED
37
72
 
38
- Use TDD for accepted behavior changes, bug fixes with a supported cause, consequential logic, and refactors whose behavior needs protection.
73
+ Run RED before changing production behavior.
39
74
 
40
- Do not force test-first work onto documentation, static content, mechanical formatting, generated output, or a disposable learning prototype whose result is not selected production behavior.
75
+ RED is valid only when:
41
76
 
42
- Stop before RED when expected behavior, failure semantics, or a public contract is unsettled. Return the missing direction to [Workflow](../workflow/SKILL.md) rather than encoding a guess as a test.
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
- ## Choose The Seam And Oracle
82
+ If the check passes immediately, inspect whether:
45
83
 
46
- Test observable behavior through the highest stable interface that exercises the real requirement.
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
- A useful seam:
89
+ Do not proceed automatically to GREEN.
49
90
 
50
- - is used by callers rather than created only for tests;
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
- Derive expected results from source truth, a worked example, protocol contract, or independent calculation—not the implementation algorithm.
93
+ ## Implement Complete GREEN
57
94
 
58
- Read [Test Design](references/test-design.md) when the test level, oracle, double, rejected state, composed failure, time or concurrency boundary, or legacy seam is unclear.
95
+ Before changing production code, read [Code Practices](../execute-work/references/code-practices.md).
59
96
 
60
- If testing requires owned internals, duplicated caller choreography, or production hooks used only by tests, return the evidence to Workflow. Use [Design for Depth](../design-for-depth/SKILL.md) only when it establishes design-bearing interface or ownership pressure; do not redesign merely because one test is inconvenient.
97
+ Implement the smallest complete behavior that satisfies the accepted contract—not merely the visible assertion.
61
98
 
62
- ## Enforce The Test-First Evidence
99
+ Do not:
63
100
 
64
- - Observe RED failing for the intended missing behavior before changing production code.
65
- - If RED passes immediately, inspect the test, observing boundary, and existing behavior; do not proceed to GREEN automatically.
66
- - If RED fails because of syntax, setup, environment, or unrelated behavior, correct the harness or diagnose before implementation.
67
- - Implement the smallest complete GREEN behavior. Read [Code Practices](../execute-work/references/code-practices.md) while changing code.
68
- - Refactor only when it improves the result while the focused behavior check remains green.
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
- ## Keep Tests About Accepted Behavior
107
+ If GREEN requires an unsettled behavior, public contract, subsystem, or material scope expansion, return the evidence to Workflow.
73
108
 
74
- Prefer observable outcomes over internal call sequences, real implementations before doubles, independent expected values, descriptive domain names, and one behavior concept per test.
109
+ ## Refactor Locally
75
110
 
76
- Use fakes, stubs, mocks, or spies only at a boundary where replacement is necessary and the double preserves the fields, effects, invariants, and failure behavior the test needs.
111
+ Refactor only when it improves the behavior just implemented while its focused check remains green.
77
112
 
78
- Do not copy the implementation into the expected value, add production methods used only by tests, change a valid test merely to make implementation pass, or treat coverage and test count as proof.
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
- Add an edge-case check only when accepted behavior, observed failure, material safety, or a settled failure contract requires it. If behavior is undefined, return it to Workflow. When related cases keep adding states, flags, setup, or patches, stop the behavior-loop stream and diagnose the shared contract, cause, ownership, or interface.
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
- If no reliable diagnostic loop or supported cause exists, use [Diagnose Failure](../diagnose-failure/SKILL.md) before selecting a production correction. After RED and GREEN, rerun both the minimized regression check and the original unminimized symptom or strongest available observer.
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
- ## Stop When Tests Start Designing The System
129
+ Do not report a fix when only the minimized check passes and the reported boundary remains unavailable.
89
130
 
90
- Return evidence to Workflow when test setup grows faster than behavior coverage, each case requires another public state or fallback, tests protect machinery introduced by earlier patches, the next check requires an unplanned subsystem, or making it pass expands accepted scope.
131
+ ## Return The Method Result
91
132
 
92
- A green local loop does not prove the global design is right. Diagnose repeated or unexplained failure before redesigning.
133
+ Return to the current owner with:
93
134
 
94
- ## Report
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
- Report the accepted behavior and seam, observed RED result, GREEN implementation, refactor if any, original-path and broader verification, current slice effect, and remaining unverified behavior. Return route-changing evidence rather than silently beginning another behavior or slice.
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 when the right test level is unclear, a dependency needs a double, legacy behavior lacks a seam, or test setup starts driving production design.
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. One TDD behavior loop is a bounded action and may remain inside a larger coherent Track Work slice.
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 deciding whether proposed or ongoing work needs a durable Working Record, or when creating, resuming, or updating one to preserve task state across execution, pauses, or context loss.
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
- Decide whether proposed or ongoing work needs a durable Working Record, then maintain selected records without turning them into a transcript, fixed Plan, or authority over live evidence and user decisions. Deciding or reading an existing record is read-only; create or update one only when the effective mode permits mutation.
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
- Use this route to decide whether to wait, return to Workflow, or continue through [Execute Work](../execute-work/SKILL.md):
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
- [Proposed or ongoing work]
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
- ## Read The Required Reference
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
- Before creating, resuming, or updating a Working Record, read the complete [Working Record method and schema](references/working-record-schema.md). This skill and its reference form one method. Do not invent fields, states, or transitions from memory; if the reference is unavailable, do not mutate the record.
118
+ ## Keep One Coherent Slice
44
119
 
45
- ## Core Contract
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
- - A record preserves current context, one current slice, revisable proposals, durable history, inert Notes, and one next useful action. It is memory; live evidence and user decisions win.
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
- ## Follow The Lifecycle
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
- After reading the required reference:
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
- 1. **Create or resume:** use the established task directory, restore task state after context loss, and orient from live evidence.
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
- ## Context Boundaries
204
+ ## Keep Notes Inert
69
205
 
70
- Before an expected compaction, summarization, pause, clear, or transfer, reconcile the record only when task state changed. The boundary itself is not a record event.
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
- After compaction, summarization, resume, clear, or session navigation, read the complete record before the next task action and compare it with the current conversation and live state. Identify the task from current context or inspect and ask rather than guessing. A record written on another conversation branch is memory, not authority.
208
+ Notes do not authorize, prioritize, schedule, block, unblock, prove, or require follow-up.
73
209
 
74
- ## Route Or Stop
210
+ ## Read Through Two Views
75
211
 
76
- Use [Discuss](../discuss/SKILL.md) before selecting a slice when a collaborative question could materially change its result, scope, or route.
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
- Use `Blocked` only when a required decision, dependency, capability, evidence source, stop condition, or other unavailable condition prevents safe continuation. Keep the blocked slice current, record what is needed, then stop. General execution authority does not override a stop condition.
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
- When the user requests a separate point-in-time transfer artifact, read [Handoff](../handoff/SKILL.md). Creating a handoff does not replace living Working Record state.
217
+ ## Return To The Requesting Activity
81
218
 
82
- ## Check The Record
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
- After every update, silently compare the record with live evidence and the required reference. Correct clear local issues. Remove historical narration from Current Context once its active consequence is captured, and replace duplicated detail with a compact pointer to its owner. Do not create review history or request review merely because the record changed.
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.