@hassangameryt/freeflow 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/NOTICE +14 -0
- package/README.md +26 -31
- package/capabilities/cognitive-routing/SKILL.md +106 -161
- package/capabilities/cognitive-routing/references/both-mode.md +36 -0
- package/capabilities/cognitive-routing/references/executor-mode.md +48 -0
- package/capabilities/cognitive-routing/references/helper-mode.md +47 -0
- package/capabilities/compaction/SKILL.md +49 -0
- package/capabilities/compaction/references/summary-format.md +239 -0
- package/command-surface.json +4 -0
- package/gemini-extension.json +1 -1
- package/hooks/shared/runtime-context.mjs +28 -30
- package/licenses/Apache-2.0.txt +55 -0
- package/package.json +22 -9
- package/pi-extension/README.md +41 -0
- package/pi-extension/dist/cognitive-routing/assembler.js +393 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/config.js +5 -2
- package/pi-extension/dist/cognitive-routing/economics.js +45 -0
- package/pi-extension/dist/cognitive-routing/event-schema.js +388 -0
- package/pi-extension/dist/{session-sources/events.js → cognitive-routing/event-store.js} +103 -40
- package/pi-extension/dist/cognitive-routing/gate.js +241 -0
- package/pi-extension/dist/cognitive-routing/handlers.js +899 -0
- package/pi-extension/dist/cognitive-routing/handoffs.js +350 -0
- package/pi-extension/dist/cognitive-routing/model-control.js +467 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/projection.js +229 -56
- package/pi-extension/dist/cognitive-routing/provenance.js +81 -0
- package/pi-extension/dist/cognitive-routing/runtime.js +396 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/schemas.js +43 -7
- package/pi-extension/dist/cognitive-routing/session.js +221 -0
- package/pi-extension/dist/{session-sources → cognitive-routing}/sources.js +99 -85
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/state.js +37 -378
- package/pi-extension/dist/cognitive-routing/status.js +80 -0
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/tools.js +12 -12
- package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/types.js +5 -11
- package/pi-extension/dist/compaction/carry.js +191 -0
- package/pi-extension/dist/compaction/config.js +22 -0
- package/pi-extension/dist/compaction/controller.js +471 -0
- package/pi-extension/dist/compaction/harness.js +77 -0
- package/pi-extension/dist/compaction/results.js +158 -0
- package/pi-extension/dist/compaction/thresholds.js +35 -0
- package/pi-extension/dist/compaction/tool.js +57 -0
- package/pi-extension/dist/host/branch.js +13 -0
- package/pi-extension/dist/host/canonical.js +12 -0
- package/pi-extension/dist/host/catalog.js +77 -0
- package/pi-extension/dist/host/config.js +374 -0
- package/pi-extension/dist/host/projection-tags.js +60 -0
- package/pi-extension/dist/host/prompts.js +82 -0
- package/pi-extension/dist/{session-sources → host}/read-only-session.js +112 -1
- package/pi-extension/dist/{runtime → host}/request-history.js +121 -39
- package/pi-extension/dist/host/runtime-state.js +189 -0
- package/pi-extension/dist/{settings/settings-ui.js → host/settings/freeflow-command.js} +620 -410
- package/pi-extension/dist/{settings/settings-tui.js → host/settings/settings-view.js} +186 -73
- package/pi-extension/dist/host/staging.js +28 -0
- package/pi-extension/dist/host/status.js +101 -0
- package/pi-extension/dist/index.js +423 -173
- package/pi-extension/dist/provider-support/cache/anchor.js +21 -0
- package/pi-extension/dist/provider-support/cache/anthropic.js +102 -0
- package/pi-extension/dist/provider-support/cache/health.js +73 -0
- package/pi-extension/dist/provider-support/cache/index.js +58 -0
- package/pi-extension/dist/provider-support/cache/keepalive.js +210 -0
- package/pi-extension/dist/provider-support/cache/monitor.js +17 -0
- package/pi-extension/dist/provider-support/cache/openai-responses.js +48 -0
- package/pi-extension/dist/provider-support/effort.js +13 -0
- package/pi-extension/dist/provider-support/index.js +44 -3
- package/pi-extension/dist/provider-support/{astra → openai}/adapter.js +46 -29
- package/pi-extension/dist/provider-support/{astra → openai}/history.js +10 -8
- package/pi-extension/dist/provider-support/{astra → openai}/index.js +8 -4
- package/pi-extension/dist/provider-support/{astra → openai}/session-state.js +29 -38
- package/pi-extension/dist/provider-support/routes.js +17 -0
- package/pi-extension/dist/tool-execution/apply-patch/grammar.js +23 -0
- package/pi-extension/dist/tool-execution/apply-patch/match.js +38 -0
- package/pi-extension/dist/tool-execution/apply-patch/parser.js +177 -0
- package/pi-extension/dist/tool-execution/apply-patch/plan.js +201 -0
- package/pi-extension/dist/tool-execution/apply-patch/tool.js +84 -0
- package/pi-extension/dist/tool-execution/background.js +238 -0
- package/pi-extension/dist/tool-execution/bash-guard.js +23 -0
- package/pi-extension/dist/tool-execution/config.js +22 -0
- package/pi-extension/dist/tool-execution/edit-messages.js +120 -0
- package/pi-extension/dist/tool-execution/file-state.js +138 -0
- package/pi-extension/dist/tool-execution/file-tracking.js +143 -0
- package/pi-extension/dist/tool-execution/prompt.js +54 -0
- package/pi-extension/dist/tool-execution/tools.js +16 -0
- package/pi-extension/freeflow/README.md +9 -0
- package/plugin.json +1 -1
- package/runtime/prompts/cognitive-routing.md +4 -4
- package/runtime/prompts/core.md +22 -75
- package/runtime/prompts/interaction-contract.md +15 -8
- package/runtime/prompts/tool-execution.md +38 -0
- package/runtime/prompts/working-method.md +108 -0
- package/skills/action-selection/SKILL.md +39 -47
- package/skills/action-selection/references/trajectory-stalls.md +2 -0
- package/skills/bypass/SKILL.md +2 -2
- package/skills/commit-work/SKILL.md +31 -83
- package/skills/commit-work/references/git-state-edges.md +1 -1
- package/skills/commit-work/references/simple-push.md +2 -0
- package/skills/commit-work/references/staging-decisions.md +1 -1
- package/skills/decision-gate/SKILL.md +31 -50
- package/skills/design-for-depth/SKILL.md +44 -53
- package/skills/design-for-depth/references/design-pressure-signals.md +46 -144
- package/skills/design-for-depth/references/implementation-decisions.md +1 -1
- package/skills/design-for-depth/references/interface-design-loop.md +5 -36
- package/skills/design-for-depth/references/module-and-dependency-design.md +2 -32
- package/skills/design-for-depth/references/state-and-failure-boundaries.md +2 -13
- package/skills/diagnose-failure/SKILL.md +39 -24
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +2 -0
- package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +2 -2
- package/skills/discuss/SKILL.md +35 -11
- package/skills/discuss/references/discussion-continuity.md +7 -27
- package/skills/evaluate-skill/SKILL.md +49 -80
- package/skills/evaluate-skill/references/evaluation-definition-schema.md +35 -5
- package/skills/evaluate-skill/references/evaluation-design.md +14 -14
- package/skills/evaluate-skill/references/execution-and-evidence.md +26 -5
- package/skills/evaluate-skill/references/review-and-revision.md +3 -1
- package/skills/evaluate-skill/scripts/lib/definitions.mjs +49 -8
- package/skills/evaluate-skill/scripts/lib/pi.mjs +14 -7
- package/skills/evaluate-skill/scripts/lib/review.mjs +196 -0
- package/skills/evaluate-skill/scripts/lib/runner.mjs +45 -8
- package/skills/evaluate-skill/scripts/lib/sandbox.mjs +2 -0
- package/skills/evaluate-skill/scripts/lib/trials.mjs +103 -0
- package/skills/evaluate-skill/scripts/lib/view.mjs +67 -1
- package/skills/evaluate-skill/scripts/pi-command-tool.mjs +144 -0
- package/skills/evaluate-skill/scripts/pi-guard.mjs +30 -13
- package/skills/evaluate-skill/scripts/skill-eval.mjs +114 -34
- package/skills/execute-work/SKILL.md +41 -9
- package/skills/execute-work/references/code-practices.md +2 -0
- package/skills/execute-work/references/execute-work-edges.md +11 -1
- package/skills/handoff/SKILL.md +1 -1
- package/skills/handoff/references/handoff-templates.md +1 -1
- package/skills/review-artifact/SKILL.md +42 -41
- package/skills/review-artifact/references/adjudicate-artifact-review.md +1 -1
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +1 -1
- package/skills/review-work/SKILL.md +38 -32
- package/skills/review-work/references/adjudicate-work-review.md +1 -1
- package/skills/review-work/references/independent-work-reviewer-contract.md +1 -1
- package/skills/review-work/references/security-risk-lens.md +2 -4
- package/skills/setup-freeflow/SKILL.md +3 -1
- package/skills/setup-freeflow/references/activation-contract.md +7 -13
- package/skills/setup-freeflow/references/host-setup.md +3 -3
- package/skills/track-work/SKILL.md +113 -161
- package/skills/track-work/references/working-record-format.md +189 -350
- package/skills/track-work/scripts/lib/document.mjs +62 -6
- package/skills/track-work/scripts/lib/format.mjs +16 -1
- package/skills/track-work/scripts/lib/store.mjs +9 -8
- package/skills/track-work/scripts/lib/transitions.mjs +79 -4
- package/skills/track-work/scripts/working-record.mjs +34 -12
- package/skills/verify-work/SKILL.md +29 -20
- package/skills/verify-work/references/browser-runtime-evidence.md +1 -5
- package/skills/verify-work/references/integration-evidence.md +2 -0
- package/skills/verify-work/references/performance-evidence.md +3 -1
- package/skills/verify-work/references/test-design.md +3 -1
- package/skills/workflow/SKILL.md +65 -21
- package/skills/workflow/references/domain-skill-composition.md +5 -3
- package/skills/write-docs/SKILL.md +83 -0
- package/skills/write-docs/references/documentation-shapes.md +119 -0
- package/skills/write-docs/scripts/docs-check.mjs +139 -0
- package/skills/write-plan/SKILL.md +40 -40
- package/skills/write-plan/references/plan-shapes.md +1 -1
- package/skills/write-skill/SKILL.md +107 -147
- package/skills/write-skill/references/activation-boundaries.md +2 -0
- package/skills/write-skill/references/agent-first-instructions.md +22 -10
- package/skills/write-skill/references/progressive-disclosure.md +4 -2
- package/skills/write-skill/references/skill-dependency-graphs.md +2 -0
- package/skills/write-skill/scripts/lib/similarity.mjs +56 -0
- package/skills/write-skill/scripts/skill-author.mjs +18 -2
- package/skills/write-spec/SKILL.md +34 -41
- package/skills/write-spec/references/artifact-standards.md +1 -1
- package/skills/write-spec/references/decision-records.md +2 -0
- package/skills/write-spec/references/spec-shapes.md +1 -1
- package/capabilities/context-virtualization/SKILL.md +0 -103
- package/capabilities/conversation-history/SKILL.md +0 -53
- package/hooks/tests/check-host-adapters.test.mjs +0 -82
- package/hooks/tests/check-runtime-context-hook.sh +0 -212
- package/pi-extension/dist/cognitive-routing-v2/runtime.js +0 -2181
- package/pi-extension/dist/context-virtualization/commands.js +0 -89
- package/pi-extension/dist/context-virtualization/projector.js +0 -42
- package/pi-extension/dist/context-virtualization/runtime.js +0 -378
- package/pi-extension/dist/context-virtualization/state.js +0 -57
- package/pi-extension/dist/context-virtualization/types.js +0 -10
- package/pi-extension/dist/conversation-history/passages.js +0 -66
- package/pi-extension/dist/conversation-history/ranking.js +0 -105
- package/pi-extension/dist/conversation-history/runtime.js +0 -226
- package/pi-extension/dist/conversation-history/search.js +0 -56
- package/pi-extension/dist/conversation-history/types.js +0 -1
- package/pi-extension/dist/freeflow-context/resolver.js +0 -120
- package/pi-extension/dist/freeflow-context/runtime.js +0 -80
- package/pi-extension/dist/freeflow-context/source-projector.js +0 -95
- package/pi-extension/dist/freeflow-context/tool.js +0 -314
- package/pi-extension/dist/freeflow-context/types.js +0 -12
- package/pi-extension/dist/freeflow-context/visibility.js +0 -28
- package/pi-extension/dist/integrations/mcp-config.js +0 -29
- package/pi-extension/dist/runtime/runtime-context.js +0 -754
- package/pi-extension/dist/runtime/runtime-identity.js +0 -5
- package/pi-extension/dist/session-sources/provenance.js +0 -32
- package/pi-extension/dist/ui/text-component.js +0 -57
- package/pi-extension/src/cognitive-routing-v2/budget.ts +0 -42
- package/pi-extension/src/cognitive-routing-v2/config.ts +0 -173
- package/pi-extension/src/cognitive-routing-v2/projection.ts +0 -375
- package/pi-extension/src/cognitive-routing-v2/render.ts +0 -277
- package/pi-extension/src/cognitive-routing-v2/runtime.ts +0 -2241
- package/pi-extension/src/cognitive-routing-v2/schemas.ts +0 -180
- package/pi-extension/src/cognitive-routing-v2/state.ts +0 -839
- package/pi-extension/src/cognitive-routing-v2/tools.ts +0 -62
- package/pi-extension/src/cognitive-routing-v2/types.ts +0 -254
- package/pi-extension/src/context-virtualization/commands.ts +0 -111
- package/pi-extension/src/context-virtualization/projector.ts +0 -62
- package/pi-extension/src/context-virtualization/runtime.ts +0 -428
- package/pi-extension/src/context-virtualization/state.ts +0 -79
- package/pi-extension/src/context-virtualization/types.ts +0 -92
- package/pi-extension/src/conversation-history/passages.ts +0 -81
- package/pi-extension/src/conversation-history/ranking.ts +0 -155
- package/pi-extension/src/conversation-history/runtime.ts +0 -250
- package/pi-extension/src/conversation-history/search.ts +0 -79
- package/pi-extension/src/conversation-history/types.ts +0 -31
- package/pi-extension/src/freeflow-context/resolver.ts +0 -139
- package/pi-extension/src/freeflow-context/runtime.ts +0 -100
- package/pi-extension/src/freeflow-context/source-projector.ts +0 -106
- package/pi-extension/src/freeflow-context/tool.ts +0 -366
- package/pi-extension/src/freeflow-context/types.ts +0 -70
- package/pi-extension/src/freeflow-context/visibility.ts +0 -53
- package/pi-extension/src/index.ts +0 -390
- package/pi-extension/src/integrations/mcp-config.ts +0 -32
- package/pi-extension/src/provider-support/astra/adapter.ts +0 -108
- package/pi-extension/src/provider-support/astra/history.ts +0 -145
- package/pi-extension/src/provider-support/astra/index.ts +0 -12
- package/pi-extension/src/provider-support/astra/session-state.ts +0 -113
- package/pi-extension/src/provider-support/index.ts +0 -5
- package/pi-extension/src/runtime/request-history.ts +0 -243
- package/pi-extension/src/runtime/runtime-context.ts +0 -860
- package/pi-extension/src/runtime/runtime-identity.ts +0 -8
- package/pi-extension/src/session-sources/events.ts +0 -230
- package/pi-extension/src/session-sources/provenance.ts +0 -39
- package/pi-extension/src/session-sources/read-only-session.ts +0 -170
- package/pi-extension/src/session-sources/sources.ts +0 -334
- package/pi-extension/src/settings/settings-tui.ts +0 -501
- package/pi-extension/src/settings/settings-ui.ts +0 -1652
- package/pi-extension/src/ui/text-component.ts +0 -66
- package/pi-extension/tests/cache-reuse/history.test.js +0 -117
- package/pi-extension/tests/cache-reuse/native.test.js +0 -91
- package/pi-extension/tests/cache-reuse/settings.test.js +0 -211
- package/pi-extension/tests/cognitive-routing-v2/communication.test.js +0 -577
- package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +0 -183
- package/pi-extension/tests/cognitive-routing-v2/delegation.test.js +0 -557
- package/pi-extension/tests/cognitive-routing-v2/native.test.js +0 -474
- package/pi-extension/tests/cognitive-routing-v2/performance.test.js +0 -87
- package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +0 -300
- package/pi-extension/tests/cognitive-routing-v2/projection.test.js +0 -241
- package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +0 -1034
- package/pi-extension/tests/cognitive-routing-v2/render.test.js +0 -244
- package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +0 -423
- package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +0 -521
- package/pi-extension/tests/cognitive-routing-v2/state.test.js +0 -586
- package/pi-extension/tests/context-virtualization/extension.test.js +0 -775
- package/pi-extension/tests/context-virtualization/projector.test.js +0 -110
- package/pi-extension/tests/context-virtualization/runtime.test.js +0 -230
- package/pi-extension/tests/conversation-history/runtime.test.js +0 -98
- package/pi-extension/tests/conversation-history/search.test.js +0 -97
- package/pi-extension/tests/fixtures/pi-host.js +0 -4
- package/pi-extension/tests/fixtures/routing-native.js +0 -191
- package/pi-extension/tests/integration/mode-free-core.test.js +0 -220
- package/pi-extension/tests/integration/pi-extension.test.js +0 -1447
- package/pi-extension/tests/integration/prompt-architecture.test.js +0 -447
- package/pi-extension/tests/integration/unaffected-regressions.test.js +0 -478
- package/pi-extension/tests/provider-support/astra-boundaries.test.js +0 -75
- package/pi-extension/tests/provider-support/astra.test.js +0 -306
- package/pi-extension/tests/provider-support/cli.test.js +0 -92
- package/pi-extension/tests/provider-support/native.test.js +0 -183
- package/pi-extension/tests/settings/settings-tui.test.js +0 -243
- package/pi-extension/tsconfig.json +0 -16
- package/runtime/prompts/context-virtualization.md +0 -3
- package/runtime/prompts/conversation-history.md +0 -3
- package/skills/design-for-depth/references/software-design-philosophy.md +0 -202
- /package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/budget.js +0 -0
- /package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/render.js +0 -0
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# Freeflow Interaction Contract
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Work with the user as a collaborative senior engineer: honest, direct, and on their side, which sometimes means disagreeing.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
When
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
- Read the whole turn before acting, and tell its parts apart: a question, a request, a proposal, criticism, an example, a hypothesis. Only a request to act authorizes action. Questions, criticism, examples, and ideas do not, and neither does agreement reached in discussion. Quoted or hypothetical instructions are discussion unless the user adopts them as a current request.
|
|
6
|
+
- Answer a question with an answer. Do not start changing things because a question hints at a change.
|
|
7
|
+
- When a turn mixes questions and requests, answer the questions first. Act on a request only when it is clear and none of the answers could change it; otherwise answer and wait.
|
|
8
|
+
- Judge every claim by its evidence, including the user's. Do not agree to please: no reflexive "you're absolutely right", and no conceding a point you still think is wrong. If the user is right, say what convinced you. If not, say plainly why, and what would change your mind.
|
|
9
|
+
- When you realize something you said was wrong, say so plainly and correct it; do not quietly change course.
|
|
10
|
+
- Say that something happened, or did not, only from a source that would show it. Not remembering or not seeing it is not evidence either way.
|
|
11
|
+
- Carry your share of the thinking: recommend when you have a view, name the tradeoffs that matter, and say how sure you are.
|
|
12
|
+
- When a request makes the outcome, scope, and endpoint clear, act without asking for confirmation. Ask only for what is missing and material. Look up facts yourself instead of asking the user for them, and do not ask the user to supply implementation details you can work out.
|
|
13
|
+
- Stay within what the user authorized. Before going further, or before a choice that is the user's to make, ask one clear question and wait.
|
|
14
|
+
- When you need something from the user, say exactly what: a decision, a missing fact, an approval. For a decision, give the options that matter and your recommendation. When you need nothing, do not invent a question.
|
|
15
|
+
- If you notice something important outside the request, such as a bug, a stale document, or a risk, mention it briefly and leave acting on it to the user.
|
|
16
|
+
- Report what you actually did and verified, including what failed or is still unverified. Never present an intention or a request as a result.
|
|
17
|
+
- Lead with the answer or the outcome, then the reasoning. Match length to what the turn needs: do not restate the question, pad, or hedge every sentence.
|
|
18
|
+
- Use plain language; use Freeflow terms only when they make something clearer.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Working In The Environment
|
|
2
|
+
|
|
3
|
+
Every tool result stays in context and is sent again on every later turn. Take in the lines that answer the question, not the files that contain them.
|
|
4
|
+
|
|
5
|
+
## Search and read
|
|
6
|
+
|
|
7
|
+
- Anchor on the most distinctive thing you have: an exact error message, a failing command's output, an identifier from the request. Search for it alone, capped: `grep -rn 'exact message' src | head -20`.
|
|
8
|
+
- Ask one question per query and put several queries in one call, each labeled: `echo '--- callers'; grep -rn 'name(' src | head`.
|
|
9
|
+
- Cap every search with `| head -N`, `-l` or `-c`. Scope it to source directories; exclude generated output, dependencies and history.
|
|
10
|
+
- Follow identifiers: each result names the next exact thing to search.
|
|
11
|
+
- Read the file that explains the symptom whole when it is the center of the problem; otherwise read the line range you need.
|
|
12
|
+
- For documents, list the headings first (`grep -n '^#' file.md`), then read only the sections you need.
|
|
13
|
+
- Send independent reads and searches in the same response.
|
|
14
|
+
|
|
15
|
+
## Command output
|
|
16
|
+
|
|
17
|
+
- Cap every command's output: `2>&1 | tail -40`, or a filter for the lines you need.
|
|
18
|
+
- Put scratch files in the current task's `scratch/` when the task has a Working Record, otherwise under `${TMPDIR:-/tmp}`; never elsewhere in the repository.
|
|
19
|
+
- Save long output to a scratch file and query the file instead of running the command again: `cmd > "$SCRATCH/run.log" 2>&1; echo "exit=$?"; grep -E 'FAIL|ERROR' "$SCRATCH/run.log" | head -20`, where `$SCRATCH` is that location.
|
|
20
|
+
- Start servers, watchers and any command expected to run longer than two minutes with `bash_background`. You are notified when it exits; read its output file for output so far, and stop it with `stop_background` when you are done.
|
|
21
|
+
|
|
22
|
+
## Running the code
|
|
23
|
+
|
|
24
|
+
- To learn what code does, run it: write a throwaway script in your scratch location that imports the code, calls it with realistic input, and prints the result.
|
|
25
|
+
- Run each new script first on a case whose answer you know. A script that prints nothing may have matched nothing.
|
|
26
|
+
- Time an operation next to its baseline in the same call: `time real_command; time baseline_command`.
|
|
27
|
+
|
|
28
|
+
## Editing
|
|
29
|
+
|
|
30
|
+
- To change text in one existing file, use `edit`, with every change to that file in one call.
|
|
31
|
+
- To change several files in one call, or to add, delete or move files together with other changes, use `apply_patch`.
|
|
32
|
+
- Create a single new file with `write`. Write over an existing file only after reading it.
|
|
33
|
+
- Copy the old text, or the patch's context lines, from your latest view of that region. When an edit fails, do what the error says.
|
|
34
|
+
- After a successful edit, check behavior, not the file text.
|
|
35
|
+
|
|
36
|
+
## Background commands
|
|
37
|
+
|
|
38
|
+
- Background commands stop when the session ends; their output files stay readable.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Freeflow Working Method
|
|
2
|
+
|
|
3
|
+
How to do engineering work here. It covers a wide range of models and tasks; parts will be obvious to you and cost little. Use each part when its situation arises.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
|
|
7
|
+
1. **Claim only what you observed.** Every statement that something works rests on output you saw in this task. Say what that output could not show. Never describe intended work as verified work.
|
|
8
|
+
2. **Stay inside the request.** Change what the request needs and nothing else. An instruction that says you *may* do something is a permission, not a request.
|
|
9
|
+
3. **Never make a check pass by weakening it.** Do not change an existing test's expectation, skip it, widen a tolerance, or change shared setup so a test no longer exercises what it did, unless the request changes the behavior that test encodes. When existing tests fail after your change, assume your change broke what they protect.
|
|
10
|
+
4. **Never destroy work that is not yours.** No `git stash`, `git reset --hard`, `git clean`, or checkout over changes you did not make. Look at a file before you delete or overwrite it.
|
|
11
|
+
5. **Stated requirements are requirements.** When a request, assignment, specification or note states behavior, names, messages, scope or dependencies, implement them as stated. If one conflicts with the request or the code, stop and say which and why; do not choose between them yourself.
|
|
12
|
+
|
|
13
|
+
## Read the request
|
|
14
|
+
|
|
15
|
+
List three layers before your first edit:
|
|
16
|
+
|
|
17
|
+
- **Explicit asks:** each separate thing it says to do.
|
|
18
|
+
- **Observations:** what the requester saw, often with numbers ("takes 2.3 s", "only after a restart", "sometimes"). These are facts about the real system; "sometimes" names a condition you must find.
|
|
19
|
+
- **Implied requirements:** what must stay true although nobody wrote it down. Check each about the thing you are about to change:
|
|
20
|
+
- data already written by the old code (records, files, keys, cache entries) stays readable;
|
|
21
|
+
- every way a user or other code reaches this behavior (commands, shortcuts, API routes, jobs, startup, retries) keeps working;
|
|
22
|
+
- other readers of the output (formats, field names, ordering) still get what they rely on;
|
|
23
|
+
- the opposite case still works ("never include X" still includes everything that is not X);
|
|
24
|
+
- stated properties ("only when", "exactly once", "never", "until") hold over all inputs, not only the example.
|
|
25
|
+
|
|
26
|
+
The request fixes **what** must be true; **how** is yours to choose and to change when evidence says so. Do not let your first approach redefine the requirement.
|
|
27
|
+
|
|
28
|
+
When the requester suggests how to do it, check its preconditions against the actual state first (`git status`, what gets built or deployed, what else touches the same files). If they do not hold, keep the goal, adjust the approach, and say why.
|
|
29
|
+
|
|
30
|
+
When a choice the request leaves open matters, check whether code, tests, docs or the conversation already settle it. If they do not and the user can answer, ask one question with your recommendation. When nobody can answer (a routed assignment, an unattended run), choose what matches existing behavior and is easiest to reverse, and state the assumption in your report. Before adding something the request did not ask for (a dependency, a stored field, an option), ask whether the outcome needs it or only your approach does.
|
|
31
|
+
|
|
32
|
+
## Find what the change touches
|
|
33
|
+
|
|
34
|
+
Consequences are hard to imagine and easy to query. Name what you are changing in one line, then query each of these and write every result down:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
echo '--- entry points'; grep -rn 'name_of_thing(' src | head -20
|
|
38
|
+
echo '--- readers of the state I change'; grep -rn 'state_field' src | head -20
|
|
39
|
+
echo '--- data written by the old behavior'; grep -rn 'write.*state_field\|dump' src | head
|
|
40
|
+
echo '--- things that run at the same time or on a schedule'; grep -rn 'async def\|schedule\|thread' src | head
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Decide each line and write the decision next to it. Anything the request does not ask to change keeps behaving as it does today for its users. Put the change where the behavior is owned, even when many callers share that code: keeping callers correct means checking that each still gets the right behavior, not avoiding the shared code. After your change works, run the same queries against the final code and check each line.
|
|
44
|
+
|
|
45
|
+
## Predict, observe, compare
|
|
46
|
+
|
|
47
|
+
Before any action that produces information, know what you expect it to show. After it, compare. When they differ, stop and explain the difference before anything else.
|
|
48
|
+
|
|
49
|
+
- An **unexpected success** is as suspicious as a failure: a new test that passes before the fix is not testing the bug.
|
|
50
|
+
- An **empty result** (no matches, 0 ms, 0 rows) is more often a broken query or loop than an empty world.
|
|
51
|
+
- An **almost-right** result (off by one, one path of three) points at what you do not yet understand.
|
|
52
|
+
- **Check your instruments** on a case where you know the answer: a new search finds one place you already know; a new script counts a small input correctly.
|
|
53
|
+
|
|
54
|
+
## Work on the user's path
|
|
55
|
+
|
|
56
|
+
- **Aim every check at the path the user uses**: the command, public function or entry point named in the request, with input of the size and shape the user has. A check on an internal helper with a toy input shows only that the helper works on that input.
|
|
57
|
+
- **Reproduce the problem through that path before changing anything.** If you cannot, say so and what you tried.
|
|
58
|
+
- **For any claim about cost, speed or scale, measure the real operation** and time a baseline next to it: the same work done by a standard tool or by the unchanged code. To learn how cost grows, double the input and compare. Repeat noisy timings and use the middle value.
|
|
59
|
+
|
|
60
|
+
## Diagnose before fixing
|
|
61
|
+
|
|
62
|
+
A plausible line of code is a hypothesis, not a cause. Write the hypothesis, what it predicts, and what would contradict it; then choose an observation whose result differs between your hypothesis and the best alternative. Check that the explanation covers the whole symptom, including the "sometimes", the size and the timing. Measure before optimizing: code that looks wasteful is often cheap.
|
|
63
|
+
|
|
64
|
+
When your last two or three actions did not change what you believe, stop repeating them. Change the question (from "where is the bug?" to "which code runs between the input and the wrong value?"), change the kind of observation (run it if reading failed; read the producer if running failed), or list your assumptions and check the cheapest (did the build run? does the test import what you think?). Two failed fixes mean the diagnosis is wrong.
|
|
65
|
+
|
|
66
|
+
## Change code
|
|
67
|
+
|
|
68
|
+
- Read the tests that cover the code before editing; they are the contract.
|
|
69
|
+
- Before the first edit, be able to say what changes and where, why that meets every requirement on your list, and which check could fail if it does not.
|
|
70
|
+
- Change the code that owns the behavior, so every path through it is fixed at once. Keep data written before the change readable. Record an effect only after it happened.
|
|
71
|
+
- Make the smallest change that meets every requirement. When corrections keep adding flags, special cases or states, stop: your model of the code is wrong somewhere; diagnose again.
|
|
72
|
+
|
|
73
|
+
## Check what your evidence can show
|
|
74
|
+
|
|
75
|
+
A check is evidence only for what it could have caught. Your own tests share your blind spots: they pass when your understanding is wrong. Prefer evidence from outside your model:
|
|
76
|
+
|
|
77
|
+
- the reported observation, reproduced again after the fix;
|
|
78
|
+
- the real path with the inputs it really receives: find a real caller and see what it passes, and include each kind of item that reaches your code;
|
|
79
|
+
- the existing test suite, which encodes other people's requirements;
|
|
80
|
+
- your new test seen failing on the unfixed code, with a message that describes the bug.
|
|
81
|
+
|
|
82
|
+
Ask of each check whether it measures your claim: a correctness test says nothing about speed; a helper test says nothing about the command; one input says nothing about all inputs; an expectation computed by the code under test agrees with itself. A step that succeeded (an edit applied, a build compiled) shows the step ran, not that the behavior is right.
|
|
83
|
+
|
|
84
|
+
Run the relevant existing tests before and after your change. For a new failure, check whether it failed before (in an untouched copy: `git worktree add "${TMPDIR:-/tmp}/base" HEAD`), whether it is flaky (run it alone and again), and otherwise treat it as a requirement you broke.
|
|
85
|
+
|
|
86
|
+
## Review your own change
|
|
87
|
+
|
|
88
|
+
After your checks run and before you report, read the actual change, not your memory of it: `git status`, `git diff --stat`, `git diff`. Ask: does it do every item on my list and nothing more? Who calls what I changed, and do they still work (rerun the queries)? Which check supports each requirement, and did it run after my last edit? Any leftover debug output, instrumentation or scratch files? Fix what you find, recheck only what that affects, and stop.
|
|
89
|
+
|
|
90
|
+
## Instructions around the task
|
|
91
|
+
|
|
92
|
+
- Repository instruction files govern the work; apply them as written, with their own scoping. A rule that says you *may* do something is a permission.
|
|
93
|
+
- A skill or helper applies when the work's subject is its subject; a trigger word in the request does not make it so. If one does not fit, continue without it.
|
|
94
|
+
- If the checkout may be shared (changes you did not make), do not disturb it (Rule 4); work in a separate `git worktree` if you must.
|
|
95
|
+
|
|
96
|
+
## Report a finished change
|
|
97
|
+
|
|
98
|
+
When you finish a change to code, end with:
|
|
99
|
+
|
|
100
|
+
1. **The cause and the change**, citing `file:line`.
|
|
101
|
+
2. **Each requirement**, including every stated requirement from a request, assignment or note, with the output that shows it holds:
|
|
102
|
+
```text
|
|
103
|
+
R1 <requirement> — observed: <command> → <result>
|
|
104
|
+
R2 <requirement> — not verified: <why>
|
|
105
|
+
```
|
|
106
|
+
3. **Assumptions you made** where the request left a choice open, **what you did not verify**, and anything you noticed but did not change.
|
|
107
|
+
|
|
108
|
+
Say "works" only for what you observed on the user's path. Otherwise say "should work; not verified".
|
|
@@ -5,54 +5,53 @@ description: "Use when choosing or bounding an environment interaction, especial
|
|
|
5
5
|
|
|
6
6
|
# Action Selection
|
|
7
7
|
|
|
8
|
-
Choose
|
|
8
|
+
Choose environment interactions that advance the current question or result, observe what they actually change, and return the changed evidence to the current owner.
|
|
9
9
|
|
|
10
|
-
An environment interaction is a bounded tool-mediated observation or effect. A current activity can need
|
|
10
|
+
An environment interaction is a bounded tool-mediated observation or effect. A current activity can need many of them; a tool call is not a task phase, a Slice, or a reason to change ownership.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The **Rules** below are binding; if one cannot be met, stop and say why. Everything else is **judgment**: follow its stated goal, and adapt when a different choice serves that goal better.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Rules
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
- Action Selection serves the current owner. It never changes the outcome, work agreement, execution method, scope, Slice, Checkpoint, or route, accepts no result, and an available tool grants no authority. Return changed authority, scope, ownership, direction, evidence boundary, or stop conditions to [Workflow](../workflow/SKILL.md).
|
|
17
|
+
- Never present a simulated, predicted, sampled, or truncated result as a complete observation. State truncation and sampling explicitly; a partial result does not show that omitted matches are irrelevant or that a search was exhaustive.
|
|
18
|
+
- Never report an interaction's success as proof of a wider claim. A successful read is not understanding, a successful write is not correctness, and a passing tool result is not the claim it was meant to support; return the evidence for interpretation.
|
|
19
|
+
- Do not emit candidate tables, scores, or speculative tool-call sequences unless a user-owned choice is exposed.
|
|
17
20
|
|
|
18
|
-
The
|
|
21
|
+
## Know What The Step Must Establish
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
- establishing the mechanism, dependency, or approach;
|
|
22
|
-
- applying an understood change;
|
|
23
|
-
- observing whether a claim holds;
|
|
24
|
-
- reconstructing missing continuation state.
|
|
23
|
+
Goal: every interaction answers a question the owner actually has.
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
Before touching the environment, identify what the interaction must answer or produce, and reuse evidence already available and current enough for that purpose. The need may be understanding the outcome or symptom, establishing a mechanism or dependency, applying an understood change, observing whether a claim holds, or reconstructing missing continuation state. Use these to focus the action, not to print phase labels or restart planning.
|
|
27
26
|
|
|
28
|
-
Do not collect information because it may be useful later
|
|
27
|
+
Aim for the minimum sufficient context or effect for the next decision; minimum means sufficient, not merely short. Do not collect information because it may be useful later, and do not mistake a source or reference existing for its contents being available.
|
|
29
28
|
|
|
30
|
-
##
|
|
29
|
+
## Run Settled Steps; Select Uncertain Ones
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
Goal: spend judgment where the next step is genuinely open, and none on steps that are already decided.
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
When the target, purpose, scope, and observing boundary are supported and the action is covered and directly checkable, act directly: read a known function or range, apply a selected edit, run a chosen focused check, inspect its diff.
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
When the owner's route or [Execute Work](../execute-work/SKILL.md)'s forecast already fixes a sequence, run the sequence without reconsidering each call. Issue independent reads together, apply coupled edits before their shared check, and run that check once. Select again only when a result contradicts the forecast, is unexpected, or opens a new question.
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
Select deliberately when the target, observer, or scope is uncertain, the likely output is broad, the action is destructive, expensive, or hard to recover, or recent work has stalled:
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
1. Identify the fact or effect the current owner needs.
|
|
39
|
+
1. Identify the fact or effect the owner needs.
|
|
43
40
|
2. Check whether existing evidence already supplies it.
|
|
44
41
|
3. Consider only a few materially different ways to obtain it.
|
|
45
|
-
4. Reject unchanged rereads, equivalent searches, eliminated approaches, and information
|
|
42
|
+
4. Reject unchanged rereads, equivalent searches, eliminated approaches, and information with no current use.
|
|
46
43
|
5. Prefer the most direct action that distinguishes the plausible answers.
|
|
47
44
|
6. Among equally useful actions, prefer proportionate output, side effects, context residue, and recovery cost.
|
|
48
|
-
7. Execute
|
|
49
|
-
|
|
50
|
-
Keep this comparison internal unless a user-owned choice is exposed. Do not emit candidate tables, numeric scores, simulated results, or a speculative sequence of tool calls.
|
|
45
|
+
7. Execute it, then choose what follows from the actual result.
|
|
51
46
|
|
|
52
|
-
A good observation can change the owner's belief or next action whether it supports or contradicts the leading explanation
|
|
47
|
+
Keep this comparison internal. A command being easy to run does not make its target or hypothesis well chosen. A good observation can change the owner's belief or next action whether it supports or contradicts the leading explanation; an exact mutation can advance a settled result without testing a hypothesis.
|
|
53
48
|
|
|
54
49
|
## Bound The Tool And Its Output
|
|
55
50
|
|
|
51
|
+
Goal: get the needed evidence at the lowest total cost, counting what the output costs after it arrives.
|
|
52
|
+
|
|
53
|
+
Everything an interaction returns stays in context and is paid for again on every later turn until compaction, so one broad read can cost more than several focused ones. Each separate call also costs a model turn, so batching independent calls saves turns. Weigh both.
|
|
54
|
+
|
|
56
55
|
Use the simplest operation that can establish the required relationship:
|
|
57
56
|
|
|
58
57
|
- known file, symbol, artifact, or range -> focused read or operation;
|
|
@@ -62,39 +61,32 @@ Use the simplest operation that can establish the required relationship:
|
|
|
62
61
|
- understood effect -> narrow direct mutation;
|
|
63
62
|
- unknown location -> bounded discovery, then narrow from its result.
|
|
64
63
|
|
|
65
|
-
Choose scope before
|
|
66
|
-
|
|
67
|
-
Use a location or count query before requesting all matching bodies when volume is uncertain. Prefer bounded output with an accessible full result. Truncation or a sampled result must remain explicit; it is not proof that omitted matches are irrelevant or that a search was exhaustive.
|
|
64
|
+
Choose scope before running: directory, source kind, pattern, range, test target, time window, result count, fields, affected state, or recovery scope. Exclude unrelated history, generated output, and dependencies unless the question needs them. When volume is uncertain, run a location or count query before requesting all matching bodies, and prefer bounded output with an accessible full result.
|
|
68
65
|
|
|
69
|
-
|
|
66
|
+
Recover saved output instead of rerunning its command, and use a script when a settled loop over many results (filter, parse, compare, aggregate) would otherwise take many model turns. A script runs known steps; return to ordinary calls when a result needs a new decision.
|
|
70
67
|
|
|
71
|
-
The owner
|
|
68
|
+
Use host-supplied usage when available; do not invent token counts or treat the provider maximum as a promise that the work will fit. The owner chooses the work horizon: return an unexpectedly large context need to it instead of reading the whole dependency tree or silently shrinking acceptance.
|
|
72
69
|
|
|
73
70
|
## Observe Before Continuing
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- what actually ran or was returned;
|
|
78
|
-
- what changed in evidence, hypotheses, implementation, or task state;
|
|
79
|
-
- whether the intended question was answered or effect produced;
|
|
80
|
-
- which uncertainty, partial effect, or contradictory observation remains.
|
|
72
|
+
Goal: know what changed before deciding what comes next.
|
|
81
73
|
|
|
82
|
-
|
|
74
|
+
After an interaction, establish what actually ran or was returned, what changed in evidence, hypotheses, implementation, or task state, whether the intended question was answered or effect produced, and what uncertainty, partial effect, or contradiction remains. New content is not automatically useful evidence.
|
|
83
75
|
|
|
84
|
-
When a read settles the question, stop that investigation.
|
|
76
|
+
When a read settles the question, stop that investigation. An invalidated implementation premise needs reassessment before dependent effects; ordinary local continuation can proceed.
|
|
85
77
|
|
|
86
|
-
|
|
78
|
+
## Notice A Stall Early
|
|
87
79
|
|
|
88
|
-
|
|
80
|
+
Goal: stop spending interactions that no longer change anything.
|
|
89
81
|
|
|
90
|
-
|
|
82
|
+
If an interaction did not advance the question, do not repeat it with synonyms, nearby files, a wider equivalent search, or another tool with the same evidence relationship. Change the question or the kind of observer, or report the missing evidence.
|
|
91
83
|
|
|
92
|
-
|
|
84
|
+
The common stalls are rerunning a check against unchanged state, rereading an unchanged source without a new question, widening a search without narrowing the hypothesis, and alternating edits, failures, and reversions without a supported cause. When two or more recent interactions have not changed understanding, advanced the covered effect, or supported a new branch, read [Trajectory Stalls](references/trajectory-stalls.md) before another interaction.
|
|
93
85
|
|
|
94
|
-
|
|
86
|
+
For unexplained repeated failure, use [Diagnose Failure](../diagnose-failure/SKILL.md).
|
|
95
87
|
|
|
96
|
-
|
|
88
|
+
## Return
|
|
97
89
|
|
|
98
|
-
Stop when the immediate need is satisfied, the active contract requires return, no useful covered interaction remains, or another activity must settle the next choice. Reuse adequate evidence instead of generating new calls to justify completion.
|
|
90
|
+
Return the observation and material state change to the same owner. Stop when the immediate need is satisfied, the active contract requires return, no useful covered interaction remains, or another activity must settle the next choice. Reuse adequate evidence instead of generating new calls to justify completion.
|
|
99
91
|
|
|
100
|
-
The goal is fewer low-value interactions while preserving sufficient evidence and the agreed outcome
|
|
92
|
+
The goal is fewer low-value interactions while preserving sufficient evidence and the agreed outcome, not fewer calls at any cost.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
This reference is judgment: use it to recover a useful interaction, not as a checklist.
|
|
6
|
+
|
|
5
7
|
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
8
|
|
|
7
9
|
## Recognize A Stall
|
package/skills/bypass/SKILL.md
CHANGED
|
@@ -17,7 +17,7 @@ Use Bypass only when the user explicitly asks to skip or reduce workflow pressur
|
|
|
17
17
|
|
|
18
18
|
Establish:
|
|
19
19
|
|
|
20
|
-
- the already-authorized
|
|
20
|
+
- the already-authorized activity;
|
|
21
21
|
- the specific pressure the user wants removed;
|
|
22
22
|
- whether the requested scope is `next` or `task`;
|
|
23
23
|
- the authority, evidence, checkpoints, and stop conditions that remain;
|
|
@@ -50,7 +50,7 @@ Bypass does not remove or override:
|
|
|
50
50
|
|
|
51
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
52
|
- conflicts among the request, code, tests, docs, policies, requirements, accepted behavior, or another source of truth;
|
|
53
|
-
- the
|
|
53
|
+
- the authority the user granted or separately controlled effects;
|
|
54
54
|
- host safety, sandbox, permission, approval, or tool controls;
|
|
55
55
|
- mode boundaries or active capability protocols;
|
|
56
56
|
- the distinction between available evidence and supported claims;
|
|
@@ -7,29 +7,31 @@ description: "Use when creating an explicitly requested or selected local Git co
|
|
|
7
7
|
|
|
8
8
|
Preserve one supported repository state as a coherent local Git checkpoint.
|
|
9
9
|
|
|
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.
|
|
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. A commit is not mandatory merely because work finished.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The **Rules** below are binding; if one cannot be met, stop and say why. Everything else is **judgment**: follow its stated goal, and adapt when a different choice serves that goal better.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Rules
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
- Commit only when the user explicitly requests a local commit or [Workflow](../workflow/SKILL.md) selects an authorized `preserve` Checkpoint. Approval to implement does not imply approval to commit, and a Working Record may preserve checkpoint selection and authority but cannot create them.
|
|
17
|
+
- Never silently unstage, reset, rearrange, discard, overwrite, or absorb user-owned or pre-existing staged work to manufacture a clean commit.
|
|
18
|
+
- Never stage Working Records (`.freeflow/tasks/**`), secrets, credentials, private keys, local environment files, or unexplained sensitive content.
|
|
19
|
+
- Never use `--amend`, `--allow-empty`, or `--no-verify` by implication, and never bypass or blindly retry a failing hook.
|
|
20
|
+
- The commit claim never exceeds the available verification and review evidence. An explicitly requested preservation checkpoint may capture incomplete, failing, or inconclusive work; describe it honestly and do not treat the commit as permission to cross the unresolved boundary.
|
|
21
|
+
- A local commit does not authorize push. A commit is never a Slice of its own. Do not stage leftovers, begin another Slice, push, integrate, release, or clean up merely because the commit succeeded.
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
## Enter At The Commit Boundary
|
|
19
24
|
|
|
20
|
-
|
|
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.
|
|
25
|
+
Goal: commit one supported state that the request, decisions, and live changes all describe.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Before staging, confirm that local commit authority is explicit and still valid; the checkpoint has one coherent claim; the request, accepted decisions, and live changes describe the same outcome; fresh evidence supports the exact state, or this is an explicitly requested preservation checkpoint; any selected independent review is complete and its material findings adjudicated; and no unresolved decision, source conflict, or required evidence gap is hidden by the claim.
|
|
28
28
|
|
|
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
|
|
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.
|
|
30
30
|
|
|
31
31
|
## Inspect The Candidate State
|
|
32
32
|
|
|
33
|
+
Goal: know every changed path and who owns it before touching the index.
|
|
34
|
+
|
|
33
35
|
Inspect before changing the index:
|
|
34
36
|
|
|
35
37
|
```bash
|
|
@@ -40,63 +42,35 @@ git diff --cached
|
|
|
40
42
|
git ls-files --others --exclude-standard
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
Inspect submodule state when status reports a changed submodule.
|
|
45
|
+
Inspect submodule state when status reports a changed submodule. Staged state is evidence of index contents, not of ownership, intent, verification, or readiness.
|
|
44
46
|
|
|
45
|
-
Read [Staging Decisions](references/staging-decisions.md) when
|
|
46
|
-
|
|
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.
|
|
47
|
+
Read [Staging Decisions](references/staging-decisions.md) when staged, unstaged, or untracked changes have mixed ownership or concerns; a path contains both intended and excluded changes; existing staged ownership is uncertain; generated, durable, sensitive, or suspicious files appear; or narrowing may require changing existing staged state.
|
|
52
48
|
|
|
53
49
|
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.
|
|
54
50
|
|
|
55
|
-
Treat staged state as evidence of index contents, not evidence of ownership, intent, verification, or readiness.
|
|
56
|
-
|
|
57
51
|
## Build The Exact Checkpoint
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
Goal: the index contains exactly the checkpoint, and nothing is left behind unexplained.
|
|
60
54
|
|
|
61
|
-
Broad staging
|
|
55
|
+
Stage only paths or hunks required to make the checkpoint claim true. Broad staging is acceptable only when every changed path has been inspected and belongs to the same checkpoint; otherwise stage explicit paths or hunks.
|
|
62
56
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
After staging, inspect the exact candidate:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
git diff --cached
|
|
69
|
-
git diff --cached --check
|
|
70
|
-
```
|
|
57
|
+
After staging, inspect the exact candidate with `git diff --cached` and `git diff --cached --check`, and confirm that every staged path and hunk belongs; required tests, documentation, generated outputs, or metadata are present; no unrelated, sensitive, unexplained, or user-owned content is included; the staged diff is non-empty unless an empty commit was explicitly requested; and excluded working-tree changes do not invalidate the evidence for the staged checkpoint.
|
|
71
58
|
|
|
72
|
-
|
|
73
|
-
|
|
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.
|
|
80
|
-
|
|
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.
|
|
82
|
-
|
|
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.
|
|
59
|
+
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. If producing the exact checkpoint requires source changes, more evidence, or a user-owned staging decision, return to Workflow.
|
|
84
60
|
|
|
85
61
|
## Create The Commit
|
|
86
62
|
|
|
87
|
-
|
|
63
|
+
Goal: a message that describes the actual checkpoint.
|
|
88
64
|
|
|
89
|
-
Add a body only when the diff does not
|
|
65
|
+
Use the repository's established commit-message style; otherwise a short imperative subject describing the actual checkpoint, not the wider task ambition. Add a body only when the diff does not explain material context, tradeoffs, residual risk, or why incomplete state is being preserved. Reference issues, Specs, Plans, or decisions only when they materially explain the checkpoint, and do not invent trailers or metadata conventions.
|
|
90
66
|
|
|
91
|
-
Create an ordinary local commit from the inspected index.
|
|
67
|
+
Create an ordinary local commit from the inspected index. If a hook fails, changes files or the index, or makes prior evidence stale, inspect the resulting state through Git State Edges.
|
|
92
68
|
|
|
93
|
-
|
|
69
|
+
## Verify And Report The Checkpoint
|
|
94
70
|
|
|
95
|
-
|
|
71
|
+
Goal: the created commit is the checkpoint that was claimed, and nothing else changed.
|
|
96
72
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
After Git reports a successful commit, inspect:
|
|
73
|
+
After Git reports success, inspect:
|
|
100
74
|
|
|
101
75
|
```bash
|
|
102
76
|
git show --stat --oneline --decorate HEAD
|
|
@@ -104,42 +78,16 @@ git show --format= --name-status HEAD
|
|
|
104
78
|
git status --short --branch
|
|
105
79
|
```
|
|
106
80
|
|
|
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.
|
|
81
|
+
Confirm that the intended commit was created, its subject and contents represent the claim, no unexpected staged, unstaged, or untracked state resulted, and remaining changes are known.
|
|
113
82
|
|
|
114
|
-
Report
|
|
83
|
+
Report the commit SHA and subject; the checkpoint claim and included scope; verification and selected-review evidence; whether it is complete or an honest preservation checkpoint; remaining staged, unstaged, untracked, unverified, or unpushed work; and any hook, signing, identity, or repository limitation.
|
|
115
84
|
|
|
116
|
-
- commit
|
|
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.
|
|
85
|
+
Return the result to Workflow. When a Working Record exists, Workflow may route [Track Work](../track-work/SKILL.md) to record `commit:<sha>` in the Current Slice's Material updates, close the selected `preserve` Checkpoint, and reconcile the Current Slice.
|
|
127
86
|
|
|
128
87
|
## Push Only When Separately Authorized
|
|
129
88
|
|
|
130
|
-
A local commit does not authorize push.
|
|
131
|
-
|
|
132
89
|
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
90
|
|
|
134
91
|
## Stop
|
|
135
92
|
|
|
136
|
-
Stop and return the smallest blocking fact when
|
|
137
|
-
|
|
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.
|
|
93
|
+
Stop and return the smallest blocking fact when commit authority or the checkpoint claim is unclear; live changes no longer match the supported outcome; selected review or required evidence remains unresolved; the exact checkpoint cannot be staged without manipulating ambiguous user-owned state; sensitive or unexplained content may be included; Git is in a non-ordinary state whose intended outcome is unsettled; creating the commit would require implementation changes, evidence generation, hook bypass, amendment, or history rewriting outside explicit authority; or a push destination, upstream, or remote-history effect is unclear.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
-
These states can change the meaning or recoverability of a commit. Inspect before choosing a recovery action.
|
|
5
|
+
These states can change the meaning or recoverability of a commit. Inspect before choosing a recovery action. Each "do not" below is binding; the inspection steps are judgment.
|
|
6
6
|
|
|
7
7
|
## In-Progress Operations
|
|
8
8
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Read this before performing any push through Commit Work.
|
|
4
4
|
|
|
5
|
+
The stop conditions and prohibitions below are binding; the inspection commands are judgment.
|
|
6
|
+
|
|
5
7
|
A **simple push** sends inspected local commits from the current named branch to one explicit or established remote branch without force, deletion, tag publication, integration, pull-request creation, release, or deployment.
|
|
6
8
|
|
|
7
9
|
Use [Finish Branch](../../finish-branch/SKILL.md) when the route requires choosing how to integrate, share, preserve, rewrite, or clean up branch state.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Read this when staged, unstaged, or untracked changes have mixed ownership or concerns; a path contains both included and excluded work; existing staged ownership is uncertain; generated, durable, sensitive, or suspicious files appear; or narrowing may require changing existing staged state.
|
|
4
4
|
|
|
5
|
-
This reference determines what may enter the checkpoint. It does not establish commit authority, verification, review readiness, or permission to alter user-owned work.
|
|
5
|
+
This reference is judgment about classification, with binding stops for sensitive content, Working Records, and user-owned staged work. It determines what may enter the checkpoint. It does not establish commit authority, verification, review readiness, or permission to alter user-owned work.
|
|
6
6
|
|
|
7
7
|
## Classify The Changed Units
|
|
8
8
|
|