@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
@@ -0,0 +1,71 @@
1
+ # Trajectory Stalls
2
+
3
+ Read this when two or more recent environment interactions have not materially changed the current question, advanced the covered effect, or supported a new branch.
4
+
5
+ A stall is evidence that the current interaction policy is no longer producing useful progress. It does not prove that the task is difficult, the design is wrong, or another model is required.
6
+
7
+ ## Recognize A Stall
8
+
9
+ Common stall patterns include:
10
+
11
+ - repeating searches with synonymous terms;
12
+ - rereading unchanged sources without a new question;
13
+ - rerunning the same check against unchanged state;
14
+ - widening search breadth without narrowing the hypothesis;
15
+ - collecting new output that does not change any belief or decision;
16
+ - revisiting a path already eliminated by supported evidence;
17
+ - changing hypotheses without a new observation;
18
+ - alternating edits, failures, and reversions without a supported cause;
19
+ - following each newly mentioned symbol or file away from the accepted outcome;
20
+ - continuing because interaction began rather than because evidence supports another step.
21
+
22
+ The following are not automatically stalls:
23
+
24
+ - several distinct mechanical interactions required by one exact covered effect;
25
+ - rerunning evidence after relevant state changed;
26
+ - a long-running operation that is still producing the selected result;
27
+ - checking a broader boundary after a focused result when that boundary was already required;
28
+ - returning through several files along one supported call or dependency path.
29
+
30
+ Judge progress by changed understanding, produced effects, or a newly supported branch—not raw action count.
31
+
32
+ ## Stop Before Another Similar Interaction
33
+
34
+ Before another environment action:
35
+
36
+ 1. restate the unresolved question or exact covered effect;
37
+ 2. identify what the recent interactions established;
38
+ 3. identify which paths or hypotheses they eliminated;
39
+ 4. state why the interactions failed to change the decision;
40
+ 5. determine whether another observer class could discriminate where the previous one could not.
41
+
42
+ Different observer classes may include:
43
+
44
+ - structural navigation instead of text search;
45
+ - caller or dependency tracing instead of concept search;
46
+ - runtime behavior instead of source inspection;
47
+ - source inspection instead of another runtime rerun;
48
+ - exact artifact comparison instead of summary output;
49
+ - a minimized reproduction instead of another speculative edit.
50
+
51
+ Changing syntax, keywords, directories, or tools without changing the evidence relationship is not a different observer class.
52
+
53
+ ## Recover With One Discriminating Action
54
+
55
+ When a different covered observer can answer the unresolved question:
56
+
57
+ 1. name what result would support or contradict the leading path;
58
+ 2. bound one interaction;
59
+ 3. execute it once;
60
+ 4. return its observation to the current owner.
61
+
62
+ Do not compensate for a stall by generating a long plan, exploring every remaining path, or broadening the task.
63
+
64
+ When no covered interaction can discriminate:
65
+
66
+ - return the smallest missing evidence to the current owner;
67
+ - return a changed authority, scope, ownership, direction, or required observing boundary to [Workflow](../../workflow/SKILL.md);
68
+ - use [Diagnose Failure](../../diagnose-failure/SKILL.md) when repeated failure lacks a supported cause;
69
+ - stop when the active execution contract requires return.
70
+
71
+ A stall recovery succeeds when the decision surface changes or the absence of a safe useful interaction becomes explicit. It does not require another tool call.
@@ -1,82 +1,153 @@
1
1
  ---
2
2
  name: bypass
3
- description: Use when the user explicitly asks to skip or reduce workflow steps for the next action or current task.
3
+ description: "Use when the user explicitly asks to skip or reduce optional workflow pressure for the next authorized activity or the current task."
4
4
  ---
5
5
 
6
6
  # Bypass
7
7
 
8
- Skip optional ceremony, not authority, judgment, safety, or evidence.
8
+ Reduce explicitly selected optional workflow pressure without changing authority, accepted intent, the current owner, execution method, evidence semantics, selected checkpoints, mode, active capability protocols, or host controls.
9
9
 
10
- Bypass changes the workflow method within an already accepted action. It does not authorize work, expand scope, switch mode, resolve a user-owned decision, override source truth, or create host permissions.
10
+ Bypass is a user-controlled pressure modifier. It does not authorize the underlying work and does not perform that work itself.
11
11
 
12
- ## Establish The Boundary
12
+ **Optional pressure** is a workflow step whose removal does not weaken accepted intent, material risk control, required evidence, a selected checkpoint, or safe continuation.
13
13
 
14
- Before using bypass, identify:
14
+ ## Interpret The Request Narrowly
15
15
 
16
- - the accepted action it applies to;
17
- - the named optional step, or whether the user selected `next` or `task` scope;
18
- - the effective mode;
19
- - the evidence and checkpoints that still govern the action.
16
+ Use Bypass only when the user explicitly asks to skip or reduce workflow pressure. Do not infer bypass from urgency, frustration, brevity, “just do it,” or a preference for concise responses.
20
17
 
21
- A bare `/bypass` means `/bypass next`. If no accepted action exists, return to [Workflow](../workflow/SKILL.md); do not treat bypass itself as implementation authorization.
18
+ Establish:
22
19
 
23
- Bypass never changes mode. In `conversation`, remain read-only and use [Mode Contract](../mode-contract/SKILL.md) before mutation. In `workflow` or `strict-workflow`, keep the active mode's decision and evidence pressure.
20
+ - the already-authorized bounded activity;
21
+ - the specific pressure the user wants removed;
22
+ - whether the requested scope is `next` or `task`;
23
+ - the authority, evidence, checkpoints, and stop conditions that remain;
24
+ - when the bypass expires.
25
+
26
+ A bare `/bypass` means `/bypass next`.
27
+
28
+ If the same user turn both authorizes an activity and explicitly requests reduced pressure, interpret the whole turn through [Workflow](../workflow/SKILL.md). Bypass may modify that authorized activity; it does not supply its authority.
29
+
30
+ If no authorized activity exists, return to Workflow and wait. Do not treat bypass as permission to implement, inspect actively, mutate, deliver, commit, or continue.
24
31
 
25
32
  ## Skip Only Optional Pressure
26
33
 
27
- A bypass may remove a step that does not protect accepted intent, material risk, required evidence, or a selected checkpoint, such as:
34
+ A valid bypass may remove:
28
35
 
29
- - an unnecessary Spec or Plan;
30
- - extended questioning whose answer would not change the action;
36
+ - an unnecessary Spec, Plan, or Working Record;
37
+ - extended questioning whose answer would not change the accepted activity;
31
38
  - an artifact created only for ceremony;
32
- - an optional checkpoint or extra review with no remaining risk purpose.
39
+ - duplicate explanation or status reporting;
40
+ - a proposed but unselected review or checkpoint with no remaining risk purpose;
41
+ - another optional step whose removal does not weaken the supported outcome.
33
42
 
34
- Do not infer that a named artifact or review is optional. Inspect why it exists first.
43
+ Do not infer that a named artifact, review, check, or checkpoint is optional. Inspect what it protects before removing it.
44
+
45
+ Freeflow should already avoid unnecessary ceremony. Bypass is an explicit user override when optional pressure was proposed or recommended but was not selected as a required boundary, or would otherwise remain in the route.
35
46
 
36
47
  ## Preserve Non-Bypassable Boundaries
37
48
 
38
- A generic or scoped bypass does not remove:
49
+ Bypass does not remove or override:
50
+
51
+ - the user’s authority over product behavior, scope, priorities, public interfaces, compatibility, permissions, security, privacy, billing, data loss, migration direction, deployment, or another hard-to-reverse outcome;
52
+ - conflicts among the request, code, tests, docs, policies, requirements, accepted behavior, or another source of truth;
53
+ - the accepted authority envelope or separately controlled effects;
54
+ - host safety, sandbox, permission, approval, or tool controls;
55
+ - mode boundaries or active capability protocols;
56
+ - the distinction between available evidence and supported claims;
57
+ - required self-review before accepting or reusing a supported result;
58
+ - an accepted Spec, Plan, selected checkpoint, required artifact review, or selected independent review;
59
+ - a stop condition, blocker, or evidence that invalidates the current route.
60
+
61
+ Material risk still requires the decisions and evidence that address it. A domain label alone does not require ceremony, but bypass cannot erase an observed risk.
62
+
63
+ Bypass cannot allow an active compute profile to act outside its execution protocol. Use the capability’s own user controls when the user wants to change manual or automatic control, profile behavior, or another capability setting.
64
+
65
+ ## Respect Declined Evidence Without Inventing Support
66
+
67
+ A user may explicitly decline a test, build, runtime probe, review, or other evidence generation. Respect that instruction unless a higher-priority repository, host, or safety requirement prevents it.
68
+
69
+ Declining evidence does not make the corresponding claim supported.
70
+
71
+ When evidence is declined:
72
+
73
+ - perform only the remaining authorized work that can continue safely;
74
+ - leave the affected claim explicitly unverified;
75
+ - do not accept or reuse the result beyond the remaining evidence boundary;
76
+ - do not cross a checkpoint or dependent boundary that requires the missing evidence;
77
+ - return to Workflow when the expected exit, checkpoint, or safe continuation must change.
39
78
 
40
- - the user's authority over product behavior, scope, public interfaces, compatibility, permissions, security, privacy, billing, data loss, migrations, deployment, or another hard-to-reverse outcome;
41
- - a conflict with code, tests, docs, policies, requirements, accepted behavior, or another source of truth;
42
- - host safety, sandbox, permission, or approval controls;
43
- - proportionate verification and supported self-review before a factual or completion claim;
44
- - an accepted Spec, Plan, selected checkpoint, required artifact review, selected independent review, or other accepted completion boundary;
45
- - a stop condition or evidence that invalidates the current route.
79
+ A request to skip evidence generation changes what may be claimed. It does not change what the available evidence proves.
46
80
 
47
- Material risk still needs the decisions and evidence that address that risk. A domain label alone does not require ceremony, but bypass cannot erase an observed risk.
81
+ ## Route Changes Are Not Bypass
48
82
 
49
- If the user wants to change an accepted requirement, evidence boundary, or selected review, treat that as a route change rather than bypass. Use [Decision Gate](../decision-gate/SKILL.md) when one user-owned choice or source conflict blocks progress; use Workflow when the route itself must change.
83
+ Treat the request as a Workflow route change when the user wants to:
84
+
85
+ - change accepted behavior, scope, effects, or stop conditions;
86
+ - weaken or replace an accepted evidence requirement;
87
+ - cancel or replace a selected checkpoint;
88
+ - revise an accepted Spec or Plan;
89
+ - change mode or an active capability protocol;
90
+ - continue despite contradictory evidence or a source conflict.
91
+
92
+ An explicit user instruction may authorize the changed route, but Workflow must reconcile its consequences before dependent work continues.
93
+
94
+ Use [Decision Gate](../decision-gate/SKILL.md) only when one user-owned choice or source conflict remains unresolved.
50
95
 
51
96
  ## Apply The Selected Scope
52
97
 
53
98
  ### Next
54
99
 
55
- `/bypass next` skips one identified optional step for the current accepted action. Re-check the route immediately after skipping it.
100
+ `/bypass next` removes one identified optional pressure from the current authorized activity.
56
101
 
57
- If that step was the only remaining optional pressure, complete the bounded action and verify it. The bypass is then spent. It also expires if the action changes, another gate appears, or the route stops.
102
+ The bypass is spent when:
103
+
104
+ - the selected pressure is skipped;
105
+ - the activity changes;
106
+ - another gate or stop condition appears;
107
+ - the route ends.
108
+
109
+ Re-check the route immediately after applying it. Do not carry the bypass into another activity by implication.
58
110
 
59
111
  ### Task
60
112
 
61
- `/bypass task` reduces optional workflow pressure for the current accepted task. The task is the accepted request or active Working Record scope—not the repository, session, or future related work. If that boundary is unclear, ask before applying task scope.
113
+ `/bypass task` reduces identified optional pressure for the current accepted task.
114
+
115
+ The task is the accepted request or active Working Record scope—not the repository, session, branch, or future related work.
62
116
 
63
- The task scope ends at completion, abandonment, material scope change, or explicit withdrawal. Reassess each new risk, conflict, checkpoint, and completion claim inside that scope.
117
+ Name the pressure being reduced when possible. Do not interpret task scope as “ignore all workflow for this task.”
64
118
 
65
- When an existing Working Record is already authorized for maintenance and task-scoped bypass must survive context loss, record its exact source, scope, and expiry through [Track Work](../track-work/SKILL.md). The record preserves the instruction; it does not broaden it. Without durable task memory, do not claim bypass survives context loss.
119
+ Task scope ends when:
66
120
 
67
- Never convert either scope into a permanent, repository-wide, or cross-task bypass.
121
+ - the task completes or is abandoned;
122
+ - its accepted outcome changes materially;
123
+ - the user withdraws or replaces the bypass;
124
+ - a new task begins.
68
125
 
69
- ## Act Or Stop
126
+ Reassess new risks, conflicts, evidence requirements, checkpoints, and separately controlled effects inside the task. Task scope does not make them optional.
127
+
128
+ When an existing Working Record is already authorized for maintenance and the task-scoped bypass must survive context loss, use [Track Work](../track-work/SKILL.md) to preserve its source, exact pressure, scope, and expiry.
129
+
130
+ The record preserves the user instruction; it does not broaden it. Without durable task memory, do not claim task-scoped bypass survives context loss.
131
+
132
+ Never convert `next` or `task` scope into permanent, repository-wide, session-wide, or cross-task behavior.
133
+
134
+ ## Return The Modified Route
70
135
 
71
136
  When the bypass is valid:
72
137
 
73
- 1. skip only the selected optional pressure;
74
- 2. perform only the separately authorized bounded action;
75
- 3. gather the same proportionate evidence the outcome requires;
76
- 4. report what was skipped, the result, and whether the bypass is spent or still task-scoped.
138
+ 1. identify the optional pressure being removed;
139
+ 2. apply only the selected scope;
140
+ 3. return the reduced-pressure route to the unchanged current owner;
141
+ 4. let that owner perform the separately authorized activity;
142
+ 5. preserve the same evidence honesty, self-review, and stop conditions;
143
+ 6. report what was skipped only when it materially clarifies the result or remaining scope.
144
+
145
+ Do not narrate internal bypass state on every turn. Speak in ordinary engineering language unless the scope or expiry matters to the user.
77
146
 
78
147
  When a boundary remains:
79
148
 
80
149
  1. do not perform the blocked action;
81
- 2. name the boundary bypass cannot remove;
82
- 3. route to the owning mode, decision, discussion, or workflow step.
150
+ 2. state the boundary the bypass cannot remove;
151
+ 3. return to Workflow, Decision Gate, or the relevant current owner.
152
+
153
+ Bypass ends when the selected optional pressure has been removed, its scope expires, or a non-bypassable boundary requires another route.
@@ -1,106 +1,145 @@
1
1
  ---
2
- name: commit-work
3
- description: Use when committing work, including selecting and staging the intended changes, creating and verifying the commit, or explicitly pushing committed work.
2
+ name: "commit-work"
3
+ description: "Use when creating an explicitly requested or selected local Git commit, including staging its exact contents, verifying the resulting checkpoint, or performing a separately authorized simple push."
4
4
  ---
5
5
 
6
6
  # Commit Work
7
7
 
8
- Commit an intended, coherent checkpoint. A commit preserves rollback and provenance; it does not prove correctness or approve the next route.
8
+ Preserve one supported repository state as a coherent local Git checkpoint.
9
9
 
10
- This skill covers commits and simple pushes, not branch integration, release, or deployment orchestration. Use [Finish Branch](../finish-branch/SKILL.md), [Release Work](../release-work/SKILL.md), or [Launch Work](../launch-work/SKILL.md) for those later jobs.
10
+ Commit Work normally follows execution, verification, self-review, and any selected independent review. It preserves that supported state; it does not establish correctness, close the Slice, authorize another Slice, or imply push, integration, release, or launch.
11
11
 
12
- A local commit is authorized by an explicit user request, a checkpoint whose local-commit authority was explicitly granted through a user-approved Plan, or a checkpoint explicitly approved during discussion. A Working Record may preserve that authorization but cannot create it. Plan acceptance does not authorize push, integration, migration, deprecation, release, or launch.
12
+ A commit is not mandatory merely because work finished. Enter only when the user explicitly requests a local commit or [Workflow](../workflow/SKILL.md) selects an authorized Local commit checkpoint.
13
13
 
14
- A planned checkpoint remains conditional on live state. Do not force it when its intended outcome, evidence, review status, or change boundary no longer holds; return the deviation to [Workflow](../workflow/SKILL.md).
14
+ An explicitly requested preservation checkpoint may capture incomplete, failing, or inconclusive work. Describe that state honestly and do not treat the commit as permission to cross the unresolved boundary.
15
15
 
16
- A commit does not select or trigger independent review. Complete only review selected by Workflow, an approved Plan, or repository policy. Commit Work does not adjudicate findings or authorize corrections or follow-up review. Fresh verification is required for the claim the commit represents.
17
-
18
- Read [staging decisions](references/staging-decisions.md) when changes are mixed, generated files or durable docs appear, existing staged state is unclear, or broad commit/push language conflicts with diff evidence.
19
-
20
- ## Route Check
16
+ ## Enter At The Commit Boundary
21
17
 
22
18
  Before staging, confirm:
23
19
 
24
- - the slice or work package has one coherent outcome;
25
- - source truth and owner decisions still support it;
26
- - fresh evidence supports the claim represented by the commit, or an explicitly requested preservation checkpoint names its incomplete claim honestly;
27
- - any selected review has ended, its adjudicated status is known, and Workflow supports the checkpoint route;
28
- - no unresolved blocker, required evidence gap, or route-changing assumption is hidden by the checkpoint claim;
29
- - the checkpoint remains authorized and useful for rollback, integration, handoff, or repository workflow.
20
+ - local commit authority is explicit and still valid;
21
+ - the checkpoint has one coherent claim;
22
+ - the request, accepted decisions, and live changes still describe the same outcome;
23
+ - fresh evidence supports the exact state being preserved, or this is an explicitly requested preservation checkpoint;
24
+ - any selected independent review is complete and its material findings are adjudicated;
25
+ - no unresolved decision, source conflict, or required evidence gap is hidden by the checkpoint claim.
26
+
27
+ A Working Record may preserve checkpoint selection and authority but cannot create them. Approval to implement does not imply approval to commit.
30
28
 
31
- When review or evidence leaves unresolved work, return it to Workflow rather than deciding readiness here. If the user explicitly requests a preservation checkpoint of incomplete, unverified, blocked, or inconclusive work, label that state honestly and include only what is safe and useful to preserve. The commit does not authorize crossing the unresolved boundary.
29
+ Commit Work verifies fidelity between the supported state and the Git checkpoint. It does not dispatch missing review, repair implementation, or generate missing behavioral evidence. Return those needs to Workflow.
32
30
 
33
- ## Inspect
31
+ ## Inspect The Candidate State
34
32
 
35
- Inspect before staging or committing:
33
+ Inspect before changing the index:
36
34
 
37
35
  ```bash
38
- git status --short
36
+ git status --short --branch
37
+ git status
39
38
  git diff
40
39
  git diff --cached
41
40
  git ls-files --others --exclude-standard
42
41
  ```
43
42
 
44
- Diff evidence beats “staged,” “commit everything,” “push all,” “exactly as-is,” or “do not leave leftovers.” Treat unrelated changes as user-owned until proven otherwise.
43
+ Inspect submodule state when status reports a changed submodule.
45
44
 
46
- ## Stage Narrowly
45
+ Read [Staging Decisions](references/staging-decisions.md) when:
47
46
 
48
- Stage explicit paths or hunks that implement the coherent checkpoint.
47
+ - staged, unstaged, or untracked changes have mixed ownership or concerns;
48
+ - a path contains both intended and excluded changes;
49
+ - existing staged ownership is uncertain;
50
+ - generated, durable, sensitive, or suspicious files appear;
51
+ - narrowing the checkpoint may require changing existing staged state.
49
52
 
50
- Avoid `git add .` and `git add -A` when unrelated, unreviewed, generated, sensitive, or user-owned changes are present.
53
+ Read [Git State Edges](references/git-state-edges.md) when Git reports an in-progress operation, unmerged paths, detached `HEAD`, submodule ambiguity, or an empty candidate; a requested commit would amend, be empty, or bypass hooks; or any commit or hook fails.
51
54
 
52
- Verify existing staged changes rather than inheriting them blindly. Do not unstage, rearrange, discard, or overwrite user-owned changes merely to manufacture a clean commit without permission.
55
+ Treat staged state as evidence of index contents, not evidence of ownership, intent, verification, or readiness.
53
56
 
54
- ## Stop
57
+ ## Build The Exact Checkpoint
58
+
59
+ Stage only paths or hunks required to make the checkpoint claim true.
55
60
 
56
- Stop before commit or push when:
61
+ Broad staging commands are acceptable only when every changed path has been inspected and belongs to the same checkpoint. Otherwise stage explicit paths or hunks.
57
62
 
58
- - included changes are unrelated, unreviewed when review is required, or outside the accepted outcome;
59
- - staged and unstaged edits make commit ownership ambiguous;
60
- - logs, debug output, secrets, generated artifacts, lockfiles, or formatter churn lack evidence they belong;
61
- - durable docs and implementation describe different behavior or authority;
62
- - verification failed or proves less than the commit message would claim;
63
- - the commit mixes separable concerns in a way that harms review, diagnosis, or rollback;
64
- - product, security, privacy, billing, permissions, data-loss, compatibility, public API, migration, or architecture behavior changed without an explicit decision.
63
+ Do not silently unstage, rearrange, discard, overwrite, or absorb user-owned work to manufacture a clean commit.
64
+
65
+ After staging, inspect the exact candidate:
66
+
67
+ ```bash
68
+ git diff --cached
69
+ git diff --cached --check
70
+ ```
65
71
 
66
- Use [Decision Gate](../decision-gate/SKILL.md) when the safe commit path depends on an owner or source-truth decision. If a clean narrow commit is possible without touching unrelated work, prefer it and report what remains.
72
+ Confirm:
67
73
 
68
- ## Commit Shape
74
+ - every staged path and hunk belongs;
75
+ - required tests, documentation, generated outputs, or metadata are present;
76
+ - no unrelated, sensitive, unexplained, or user-owned content is included;
77
+ - the staged diff is non-empty unless an empty commit was explicitly requested;
78
+ - the commit claim does not exceed available verification and review evidence;
79
+ - excluded working-tree changes do not invalidate evidence for the staged checkpoint.
69
80
 
70
- Keep the checkpoint independently understandable and revertible.
81
+ Interpret `git diff --cached --check` against repository conventions. Unresolved conflict markers or unintended whitespace damage stop the commit; do not edit content merely to silence the command.
71
82
 
72
- Use the repo's established message style. Otherwise use a short imperative subject. Add a body only when source context, tradeoffs, residual risk, or the reason for the checkpoint would not be clear from the diff.
83
+ If producing the exact checkpoint requires source changes, additional evidence, or a user-owned staging decision, return to Workflow rather than performing that work here.
73
84
 
74
- Reference specs, plans, ADRs, issues, or decisions only when they materially explain the change. Do not invent metadata conventions.
85
+ ## Create The Commit
75
86
 
76
- A learning-slice commit must distinguish diagnostic or exploratory output from production behavior. A deepening commit should not silently change behavior. A delivery commit should name the behavior it adds or changes.
87
+ Use the repository's established commit-message style. Otherwise use a short imperative subject describing the actual checkpoint, not the wider task ambition.
77
88
 
78
- ## Push
89
+ Add a body only when the diff does not adequately explain material context, tradeoffs, residual risk, or why incomplete state is being preserved. Reference existing issues, Specs, Plans, or decisions only when they materially explain the checkpoint. Do not invent trailers or metadata conventions.
79
90
 
80
- Push only inspected commits when the user request and branch state make the route clear.
91
+ Create an ordinary local commit from the inspected index.
81
92
 
82
- Before pushing, inspect branch, upstream, remote, and ahead/behind state. Stop before protected/shared branches, upstream changes, force pushes, remote-history rewrites, divergence, or release/PR decisions that were not explicitly requested.
93
+ Do not use `--amend`, `--allow-empty`, or `--no-verify` by implication. Read Git State Edges when one is explicitly requested or becomes relevant.
83
94
 
84
- Use `--force-with-lease` only for an intended rewrite of the user's own branch with explicit approval and supporting branch evidence.
95
+ If a hook fails, changes files or the index, or makes prior evidence stale, do not bypass or blindly retry it. Inspect the resulting state through Git State Edges.
85
96
 
86
97
  ## Verify The Checkpoint
87
98
 
88
- After commit or push, inspect:
99
+ After Git reports a successful commit, inspect:
89
100
 
90
101
  ```bash
91
- git show --stat --oneline --name-only HEAD
92
- git status --branch --short
102
+ git show --stat --oneline --decorate HEAD
103
+ git show --format= --name-status HEAD
104
+ git status --short --branch
93
105
  ```
94
106
 
107
+ Confirm that:
108
+
109
+ - the intended commit was created;
110
+ - its subject and contents represent the checkpoint claim;
111
+ - no unexpected staged, unstaged, or untracked state resulted;
112
+ - remaining changes are known and were not silently absorbed.
113
+
95
114
  Report:
96
115
 
97
116
  - commit SHA and subject;
98
- - what the checkpoint contains;
99
- - verification and review evidence;
100
- - push result when applicable;
101
- - remaining staged, unstaged, untracked, unpushed, or unverified work;
102
- - recommended next route.
117
+ - the checkpoint claim and included scope;
118
+ - verification and selected-review evidence;
119
+ - whether the commit is complete or an honest preservation checkpoint;
120
+ - remaining staged, unstaged, untracked, unverified, or unpushed work;
121
+ - any hook, signing, identity, or repository limitation;
122
+ - the route returned to Workflow.
123
+
124
+ Return the checkpoint result to Workflow. When a Working Record exists, Workflow may route [Track Work](../track-work/SKILL.md) to record `commit:<sha>`, settle the selected checkpoint, and reconcile the Current Slice.
125
+
126
+ Do not stage leftovers, begin another Slice, push, integrate, release, or clean up merely because the commit succeeded.
127
+
128
+ ## Push Only When Separately Authorized
129
+
130
+ A local commit does not authorize push.
131
+
132
+ Before any push, read [Simple Push](references/simple-push.md). Use [Finish Branch](../finish-branch/SKILL.md) instead when the request involves integration, pull-request strategy, branch cleanup, history rewriting, or choosing among branch-closeout routes.
133
+
134
+ ## Stop
103
135
 
104
- When a Working Record exists, use [Track Work](../track-work/SKILL.md) to record the commit SHA, checkpoint result, remaining state, and next useful action.
136
+ Stop and return the smallest blocking fact when:
105
137
 
106
- Do not continue to the next slice, push, or integrate merely because the commit succeeded. Return the result to [Workflow](../workflow/SKILL.md), or use [Finish Branch](../finish-branch/SKILL.md) when branch closeout is selected.
138
+ - commit authority or the checkpoint claim is unclear;
139
+ - live changes no longer match the supported outcome;
140
+ - selected review or required evidence remains unresolved;
141
+ - the exact checkpoint cannot be staged without manipulating ambiguous user-owned state;
142
+ - sensitive or unexplained content may be included;
143
+ - Git is in a non-ordinary state whose intended outcome is unsettled;
144
+ - creating the commit would require implementation changes, evidence generation, hook bypass, amendment, or history rewriting outside explicit authority;
145
+ - push destination, upstream, or remote-history effect is unclear.
@@ -0,0 +1,94 @@
1
+ # Git State Edges
2
+
3
+ Read this when Git reports an in-progress operation, unmerged paths, detached `HEAD`, submodule ambiguity, or an empty candidate; a requested commit would amend, be empty, or bypass hooks; or any commit or hook fails.
4
+
5
+ These states can change the meaning or recoverability of a commit. Inspect before choosing a recovery action.
6
+
7
+ ## In-Progress Operations
8
+
9
+ A commit during merge, rebase, cherry-pick, or revert may complete or advance that operation rather than create an ordinary checkpoint.
10
+
11
+ Stop and establish:
12
+
13
+ - which operation is active;
14
+ - whether the current checkpoint is intended to conclude it;
15
+ - whether all conflicts and behavior decisions are settled;
16
+ - which owner should continue the operation;
17
+ - what verification is required on the resulting state.
18
+
19
+ Do not use Commit Work to finish an operation merely because Git currently permits `commit`.
20
+
21
+ Unmerged paths always stop an ordinary commit.
22
+
23
+ ## Detached HEAD
24
+
25
+ A detached-`HEAD` commit may be valid but can become difficult to recover or push.
26
+
27
+ Before committing, require an explicit preservation route naming how the resulting commit will remain reachable. Use [Finish Branch](../../finish-branch/SKILL.md) when branch creation, integration, or checkout ownership must be decided.
28
+
29
+ Do not silently create or switch branches.
30
+
31
+ ## Amend And Empty Commits
32
+
33
+ `git commit --amend` rewrites an existing checkpoint. Use it only when the user explicitly requests amendment and the exact target commit, included changes, authorship effects, and remote-history state are known.
34
+
35
+ If the target may already be shared or pushed, return to [Workflow](../../workflow/SKILL.md) or Finish Branch before rewriting it.
36
+
37
+ Use `--allow-empty` only for an explicitly requested empty checkpoint with a named repository purpose. An accidentally empty index is not authorization for an empty commit.
38
+
39
+ ## Hooks
40
+
41
+ Do not bypass hooks merely because they block the commit.
42
+
43
+ When a hook fails:
44
+
45
+ 1. preserve its complete result;
46
+ 2. inspect `HEAD`, the index, and working tree;
47
+ 3. determine whether a commit was created despite the reported failure;
48
+ 4. determine whether the hook changed files or staged content;
49
+ 5. return implementation, verification, policy, or environment failures to their owning route.
50
+
51
+ When a hook changes repository content, the previously supported state may no longer be the state being committed. Reinspect the complete diff and obtain affected verification before retrying.
52
+
53
+ Use `--no-verify` only when the user explicitly requests that exact bypass and repository policy permits it. Report which checks were skipped and which claims therefore remain unsupported.
54
+
55
+ ## Commit Command Failures
56
+
57
+ After any failed or interrupted commit attempt, inspect:
58
+
59
+ ```bash
60
+ git status
61
+ git diff
62
+ git diff --cached
63
+ git log -1 --oneline --decorate
64
+ ```
65
+
66
+ Do not assume failure means no commit was created or no state changed.
67
+
68
+ For identity, signing, credential-helper, editor, lock, filesystem, or permission failures:
69
+
70
+ - do not change global or repository Git configuration without authority;
71
+ - do not delete lock files while process ownership is unclear;
72
+ - do not retry through a materially different command without a supported cause;
73
+ - report the exact blocker and preserved state.
74
+
75
+ Use [Diagnose Failure](../../diagnose-failure/SKILL.md) when the cause remains unclear or a retry repeats the failure.
76
+
77
+ ## Submodules
78
+
79
+ A parent commit records a submodule pointer, not the submodule's uncommitted contents.
80
+
81
+ Inspect:
82
+
83
+ - the recorded pointer change;
84
+ - whether the nested worktree is dirty;
85
+ - whether the intended checkpoint includes the pointer update;
86
+ - whether nested changes have their own preservation route.
87
+
88
+ Do not claim nested changes are preserved by committing only the parent repository.
89
+
90
+ ## Return Safely
91
+
92
+ Return to Commit Work only when the repository has one supported, recoverable checkpoint candidate.
93
+
94
+ Otherwise preserve the exact Git state and return to Workflow, Finish Branch, Diagnose Failure, or the producing activity whose responsibility changed.