@hassangameryt/freeflow 0.6.0 → 0.7.1
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 +3 -2
- package/.codex-plugin/plugin.json +5 -6
- package/.cursor-plugin/plugin.json +25 -0
- package/README.md +66 -56
- package/capabilities/cognitive-routing/SKILL.md +288 -130
- package/com.github.copilot/hooks/hooks.json +11 -0
- package/command-surface.json +0 -24
- package/gemini-extension.json +5 -0
- package/hooks/adapters/claude-session-start.mjs +16 -0
- package/hooks/adapters/codex-session-start.mjs +16 -0
- package/hooks/adapters/copilot-session-start.mjs +13 -0
- package/hooks/adapters/cursor-session-start.mjs +13 -0
- package/hooks/adapters/gemini-session-start.mjs +15 -0
- package/hooks/claude/hooks.json +18 -0
- package/hooks/codex/hooks.json +18 -0
- package/hooks/cursor/hooks.json +9 -0
- package/hooks/freeflow-runtime-context.mjs +3 -650
- package/hooks/hooks.json +4 -30
- package/hooks/shared/runtime-context.mjs +210 -0
- package/hooks/tests/check-host-adapters.test.mjs +82 -0
- package/hooks/tests/check-runtime-context-hook.sh +140 -320
- package/package.json +20 -4
- package/pi-extension/dist/cognitive-routing/commands.js +3 -3
- package/pi-extension/dist/cognitive-routing/config.js +16 -20
- package/pi-extension/dist/cognitive-routing/controller.js +478 -48
- package/pi-extension/dist/cognitive-routing/history.js +12 -0
- package/pi-extension/dist/cognitive-routing/host.js +74 -12
- package/pi-extension/dist/cognitive-routing/pi-routing-session.js +414 -0
- package/pi-extension/dist/cognitive-routing/pi-session-control.js +320 -0
- package/pi-extension/dist/cognitive-routing/tool.js +1 -0
- package/pi-extension/dist/cognitive-routing/types.js +1 -1
- package/pi-extension/dist/index.js +236 -219
- package/pi-extension/dist/runtime/runtime-context.js +126 -286
- package/pi-extension/dist/settings/settings-ui.js +52 -336
- package/pi-extension/src/cognitive-routing/commands.ts +15 -5
- package/pi-extension/src/cognitive-routing/config.ts +16 -20
- package/pi-extension/src/cognitive-routing/controller.ts +561 -51
- package/pi-extension/src/cognitive-routing/history.ts +12 -0
- package/pi-extension/src/cognitive-routing/host.ts +110 -16
- package/pi-extension/src/cognitive-routing/pi-routing-session.ts +538 -0
- package/pi-extension/src/cognitive-routing/pi-session-control.ts +444 -0
- package/pi-extension/src/cognitive-routing/tool.ts +1 -0
- package/pi-extension/src/cognitive-routing/types.ts +1 -1
- package/pi-extension/src/index.ts +249 -239
- package/pi-extension/src/runtime/runtime-context.ts +129 -305
- package/pi-extension/src/settings/settings-ui.ts +53 -371
- package/pi-extension/tests/cognitive-routing/commands.test.js +1 -1
- package/pi-extension/tests/cognitive-routing/controller.test.js +69 -40
- package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +128 -57
- package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +434 -0
- package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +174 -0
- package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +91 -0
- package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +47 -4
- package/pi-extension/tests/integration/mode-free-core.test.js +218 -0
- package/pi-extension/tests/integration/pi-extension.test.js +430 -2478
- package/pi-extension/tests/integration/prompt-architecture.test.js +124 -79
- package/pi-extension/tests/integration/unaffected-regressions.test.js +411 -0
- package/plugin.json +33 -0
- package/runtime/prompts/cognitive-routing.md +5 -4
- package/runtime/prompts/conversation-history.md +1 -1
- package/runtime/prompts/core.md +77 -6
- package/runtime/prompts/interaction-contract.md +6 -2
- package/skills/action-selection/SKILL.md +93 -44
- package/skills/action-selection/references/trajectory-stalls.md +71 -0
- package/skills/bypass/SKILL.md +109 -39
- package/skills/commit-work/SKILL.md +94 -55
- package/skills/commit-work/references/git-state-edges.md +94 -0
- package/skills/commit-work/references/simple-push.md +92 -0
- package/skills/commit-work/references/staging-decisions.md +79 -46
- package/skills/decision-gate/SKILL.md +80 -22
- package/skills/design-for-depth/SKILL.md +208 -43
- package/skills/design-for-depth/references/design-pressure-signals.md +108 -240
- package/skills/design-for-depth/references/interface-design-loop.md +77 -97
- package/skills/design-for-depth/references/module-and-dependency-design.md +147 -0
- package/skills/design-for-depth/references/software-design-philosophy.md +127 -173
- package/skills/design-for-depth/references/state-and-failure-boundaries.md +136 -0
- package/skills/diagnose-failure/SKILL.md +198 -52
- package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +19 -5
- package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +13 -5
- package/skills/discuss/SKILL.md +118 -76
- package/skills/discuss/references/discussion-continuity.md +84 -32
- package/skills/evaluate-skill/SKILL.md +166 -52
- package/skills/evaluate-skill/references/evaluation-definition-schema.md +2 -2
- package/skills/evaluate-skill/references/evaluation-design.md +56 -30
- package/skills/evaluate-skill/references/execution-and-evidence.md +1 -1
- package/skills/evaluate-skill/references/review-and-revision.md +62 -21
- package/skills/execute-work/SKILL.md +98 -59
- package/skills/execute-work/references/code-practices.md +4 -4
- package/skills/execute-work/references/execute-work-edges.md +42 -22
- package/skills/review-artifact/SKILL.md +132 -71
- package/skills/review-artifact/references/adjudicate-artifact-review.md +101 -0
- package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +52 -41
- package/skills/review-work/SKILL.md +115 -72
- package/skills/review-work/references/adjudicate-work-review.md +97 -0
- package/skills/review-work/references/independent-work-reviewer-contract.md +40 -35
- package/skills/review-work/references/security-risk-lens.md +17 -15
- package/skills/setup-freeflow/SKILL.md +14 -17
- package/skills/setup-freeflow/references/activation-contract.md +24 -30
- package/skills/setup-freeflow/references/host-setup.md +6 -7
- package/skills/simplify-code/SKILL.md +97 -39
- package/skills/simplify-code/references/simplification-patterns.md +1 -1
- package/skills/tdd/SKILL.md +108 -41
- package/skills/tdd/references/test-design.md +1 -1
- package/skills/track-work/SKILL.md +133 -300
- package/skills/track-work/references/working-record-format.md +515 -0
- package/skills/track-work/scripts/lib/document.mjs +713 -0
- package/skills/track-work/scripts/lib/format.mjs +166 -0
- package/skills/track-work/scripts/lib/store.mjs +233 -0
- package/skills/track-work/scripts/lib/transitions.mjs +790 -0
- package/skills/track-work/scripts/lib/views.mjs +27 -430
- package/skills/track-work/scripts/working-record.mjs +292 -98
- package/skills/verify-work/SKILL.md +46 -20
- package/skills/verify-work/references/browser-runtime-evidence.md +1 -1
- package/skills/verify-work/references/integration-evidence.md +1 -7
- package/skills/verify-work/references/performance-evidence.md +1 -1
- package/skills/workflow/SKILL.md +110 -80
- package/skills/workflow/references/domain-skill-composition.md +24 -18
- package/skills/write-skill/SKILL.md +218 -62
- package/skills/write-skill/references/activation-boundaries.md +63 -21
- package/skills/write-skill/references/agent-first-instructions.md +61 -27
- package/skills/write-skill/references/progressive-disclosure.md +91 -41
- package/skills/write-skill/references/skill-dependency-graphs.md +190 -0
- package/runtime/prompts/skills.md +0 -65
- package/skills/mode-contract/SKILL.md +0 -104
- package/skills/track-work/scripts/lib/codec.mjs +0 -570
- package/skills/track-work/scripts/lib/commands.mjs +0 -568
- package/skills/track-work/scripts/lib/contract.mjs +0 -303
- package/skills/track-work/scripts/lib/model.mjs +0 -506
- package/skills/track-work/scripts/lib/operations.mjs +0 -965
- package/skills/track-work/scripts/lib/record-store.mjs +0 -264
- package/skills/track-work/scripts/lib/result.mjs +0 -37
- package/skills/track-work/scripts/lib/rewrites.mjs +0 -740
- package/skills/track-work/scripts/lib/schema.mjs +0 -277
- package/skills/track-work/scripts/lib/source-inventory.mjs +0 -162
- package/skills/track-work/scripts/lib/workspace.mjs +0 -134
|
@@ -1,106 +1,145 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: commit-work
|
|
3
|
-
description: Use when
|
|
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
|
-
|
|
8
|
+
Preserve one supported repository state as a coherent local Git checkpoint.
|
|
9
9
|
|
|
10
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
Read [staging decisions](references/staging-decisions.md) when changes or staged state are mixed, generated files or durable docs appear, existing staged ownership is unclear, broad commit/push language conflicts with diff evidence, or producing a narrow checkpoint may touch user-owned work.
|
|
19
|
-
|
|
20
|
-
## Route Check
|
|
16
|
+
## Enter At The Commit Boundary
|
|
21
17
|
|
|
22
18
|
Before staging, confirm:
|
|
23
19
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
43
|
+
Inspect submodule state when status reports a changed submodule.
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
Read [Staging Decisions](references/staging-decisions.md) when:
|
|
47
46
|
|
|
48
|
-
|
|
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
|
-
|
|
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
|
-
|
|
55
|
+
Treat staged state as evidence of index contents, not evidence of ownership, intent, verification, or readiness.
|
|
53
56
|
|
|
54
|
-
##
|
|
57
|
+
## Build The Exact Checkpoint
|
|
58
|
+
|
|
59
|
+
Stage only paths or hunks required to make the checkpoint claim true.
|
|
55
60
|
|
|
56
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
72
|
+
Confirm:
|
|
67
73
|
|
|
68
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
85
|
+
## Create The Commit
|
|
75
86
|
|
|
76
|
-
|
|
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
|
-
|
|
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
|
-
|
|
91
|
+
Create an ordinary local commit from the inspected index.
|
|
81
92
|
|
|
82
|
-
|
|
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
|
-
|
|
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
|
|
99
|
+
After Git reports a successful commit, inspect:
|
|
89
100
|
|
|
90
101
|
```bash
|
|
91
|
-
git show --stat --oneline --
|
|
92
|
-
git
|
|
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
|
-
-
|
|
99
|
-
- verification and review evidence;
|
|
100
|
-
-
|
|
101
|
-
- remaining staged, unstaged, untracked,
|
|
102
|
-
-
|
|
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
|
-
|
|
136
|
+
Stop and return the smallest blocking fact when:
|
|
105
137
|
|
|
106
|
-
|
|
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.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Simple Push
|
|
2
|
+
|
|
3
|
+
Read this before performing any push through Commit Work.
|
|
4
|
+
|
|
5
|
+
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
|
+
|
|
7
|
+
Use [Finish Branch](../../finish-branch/SKILL.md) when the route requires choosing how to integrate, share, preserve, rewrite, or clean up branch state.
|
|
8
|
+
|
|
9
|
+
## Confirm Push Authority
|
|
10
|
+
|
|
11
|
+
Push requires authority separate from local commit.
|
|
12
|
+
|
|
13
|
+
Confirm:
|
|
14
|
+
|
|
15
|
+
- which commits are intended;
|
|
16
|
+
- the local branch;
|
|
17
|
+
- the destination remote and branch;
|
|
18
|
+
- whether setting a new upstream is included;
|
|
19
|
+
- that no force, deletion, tag, or history rewrite is implied.
|
|
20
|
+
|
|
21
|
+
Do not infer a remote, destination branch, pull-request target, or shared-branch policy when the wrong choice could affect collaborators.
|
|
22
|
+
|
|
23
|
+
## Inspect The Route
|
|
24
|
+
|
|
25
|
+
Inspect:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git branch --show-current
|
|
29
|
+
git status --short --branch
|
|
30
|
+
git branch -vv
|
|
31
|
+
git remote -v
|
|
32
|
+
git log -1 --oneline --decorate
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
When an upstream exists, inspect:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git rev-parse --abbrev-ref --symbolic-full-name @{upstream}
|
|
39
|
+
git rev-list --left-right --count @{upstream}...HEAD
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Ahead/behind state is only as fresh as the local remote-tracking reference. Do not claim current remote state unless it was freshly observed.
|
|
43
|
+
|
|
44
|
+
Stop before pushing when:
|
|
45
|
+
|
|
46
|
+
- `HEAD` is detached;
|
|
47
|
+
- destination or upstream is unclear;
|
|
48
|
+
- unexpected commits or dirty state change the route;
|
|
49
|
+
- protected or shared-branch policy disallows the push or leaves its route unclear;
|
|
50
|
+
- local and observed upstream history diverge;
|
|
51
|
+
- the push would require force, deletion, tag publication, or another separately controlled action.
|
|
52
|
+
|
|
53
|
+
## Push The Exact Branch
|
|
54
|
+
|
|
55
|
+
Use the established upstream when it clearly matches the approved route.
|
|
56
|
+
|
|
57
|
+
When no upstream exists, set one only when the remote and branch destination are explicit and the configuration change is included in the accepted route.
|
|
58
|
+
|
|
59
|
+
Do not push additional branches or tags.
|
|
60
|
+
|
|
61
|
+
A force push is not a simple push. Return an explicitly requested history rewrite to Workflow or Finish Branch.
|
|
62
|
+
|
|
63
|
+
## Handle Rejection Without Escalation
|
|
64
|
+
|
|
65
|
+
If the push is rejected or fails:
|
|
66
|
+
|
|
67
|
+
- preserve the complete result;
|
|
68
|
+
- do not automatically pull, merge, rebase, force, change remotes, or change destination;
|
|
69
|
+
- inspect whether any remote update occurred;
|
|
70
|
+
- return authentication, divergence, policy, or destination decisions to [Workflow](../../workflow/SKILL.md) or Finish Branch.
|
|
71
|
+
|
|
72
|
+
A failed push does not invalidate the local commit.
|
|
73
|
+
|
|
74
|
+
## Verify And Report
|
|
75
|
+
|
|
76
|
+
After a successful push, inspect:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
git status --short --branch
|
|
80
|
+
git branch -vv
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Report:
|
|
84
|
+
|
|
85
|
+
- pushed commit range;
|
|
86
|
+
- remote and destination branch;
|
|
87
|
+
- whether an upstream was created or changed;
|
|
88
|
+
- command result and strongest observed remote-state evidence;
|
|
89
|
+
- remaining unpushed commits or dirty state;
|
|
90
|
+
- CI, review, integration, release, or deployment work not established by the push.
|
|
91
|
+
|
|
92
|
+
A successful push proves transfer to the observed destination. It does not prove pull-request creation, merge, release, deployment, or remote CI success.
|
|
@@ -1,73 +1,106 @@
|
|
|
1
1
|
# Staging Decisions
|
|
2
2
|
|
|
3
|
-
Read this when
|
|
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
|
-
|
|
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.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Classify The Changed Units
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- `git diff --cached`
|
|
11
|
-
- `git diff`
|
|
12
|
-
- `git ls-files --others --exclude-standard`
|
|
9
|
+
Classify at the path level only when the whole path has one role. Otherwise classify individual hunks.
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
- **Checkpoint content:** directly implements or proves the checkpoint claim.
|
|
12
|
+
- **Required companion:** tests, documentation, schema, metadata, or generated output required for that same claim.
|
|
13
|
+
- **Related but separable:** useful work that does not need to be preserved in this checkpoint.
|
|
14
|
+
- **Unrelated or user-owned:** work outside the accepted outcome or whose ownership is not established.
|
|
15
|
+
- **Sensitive or unsafe:** secrets, credentials, personal data, environment files, debug output, destructive state, or unexplained artifacts.
|
|
16
|
+
- **Unclear:** content whose purpose, generator, ownership, or evidence relationship is not yet supported.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
Only checkpoint content and required companions belong.
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
A broad request such as "commit everything" may authorize broad inclusion, but it does not remove the obligation to inspect unsafe, unclear, or unexpectedly unrelated content.
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
- **Required generated output:** repo convention or task requires it and its generator is known.
|
|
22
|
-
- **Durable artifact:** Spec, policy, ADR, or Plan that belongs to the same accepted checkpoint while retaining its own authority and lifecycle.
|
|
23
|
-
- **Durable continuation memory:** Working Record or Handoff describing the same checkpoint without becoming authority over live evidence.
|
|
24
|
-
- **Related but separable:** useful work that should remain outside this checkpoint.
|
|
25
|
-
- **Unrelated or user-owned:** not part of the current outcome.
|
|
26
|
-
- **Sensitive or unsafe:** secrets, private data, debug output, destructive state, or unclear generated content.
|
|
22
|
+
## Protect Existing Staged State
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
Existing staged changes may belong to another workflow.
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
Inspect them, but do not infer that they are intended merely because they are staged. Do not silently:
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
- absorb them into the checkpoint;
|
|
29
|
+
- unstage or reset them;
|
|
30
|
+
- amend them into another commit;
|
|
31
|
+
- move them through a stash or temporary commit;
|
|
32
|
+
- replace the index or use index tricks to bypass ownership ambiguity.
|
|
33
33
|
|
|
34
|
-
-
|
|
35
|
-
- its outcome and source requirement are clear;
|
|
36
|
-
- every included path belongs to that outcome;
|
|
37
|
-
- verification supports the claim represented by the commit;
|
|
38
|
-
- selected review status is known and [Workflow](../../workflow/SKILL.md) supports the checkpoint route;
|
|
39
|
-
- excluded changes can remain untouched without loss;
|
|
40
|
-
- the final report names remaining dirty state.
|
|
34
|
+
When intended and pre-existing staged work cannot be separated without manipulating ambiguous state, present the smallest safe options and ask which checkpoint the user wants.
|
|
41
35
|
|
|
42
|
-
|
|
36
|
+
## Handle Partial Files Carefully
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
A file may contain both checkpoint and excluded hunks. Stage only the intended hunks when their behavior and evidence remain independently coherent.
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
Stop when:
|
|
47
41
|
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
- security, privacy, billing, permissions, migration, data-loss, compatibility, or public API behavior plus unrelated work;
|
|
53
|
-
- learning-slice evidence plus production changes that have not passed promotion criteria.
|
|
42
|
+
- included and excluded hunks depend on each other;
|
|
43
|
+
- partial staging would produce an invalid intermediate state;
|
|
44
|
+
- verification ran against the combined working tree and excluded changes may have affected the result;
|
|
45
|
+
- the staged version differs materially from the state that was reviewed or verified.
|
|
54
46
|
|
|
55
|
-
|
|
47
|
+
Do not claim an isolated staged checkpoint is supported merely because the combined dirty worktree passed.
|
|
56
48
|
|
|
57
|
-
## Generated Files
|
|
49
|
+
## Include Generated Files Deliberately
|
|
58
50
|
|
|
59
|
-
|
|
51
|
+
Include generated files, snapshots, lockfiles, formatter output, or build artifacts only when repository convention or the accepted outcome requires them.
|
|
60
52
|
|
|
61
|
-
|
|
53
|
+
Establish:
|
|
62
54
|
|
|
63
|
-
|
|
55
|
+
- which command or generator produced them;
|
|
56
|
+
- whether their changes are expected from the accepted source change;
|
|
57
|
+
- whether they are deterministic enough to review;
|
|
58
|
+
- whether hand edits are prohibited;
|
|
59
|
+
- whether their verification belongs to the checkpoint evidence.
|
|
64
60
|
|
|
65
|
-
|
|
61
|
+
Do not include generated output merely because it changed. Do not hand-edit it unless the repository explicitly expects that workflow.
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
## Preserve Durable Artifacts Honestly
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
A Spec, Plan, ADR, policy, public documentation file, or release artifact may have authority and maintenance rules independent of implementation.
|
|
70
66
|
|
|
71
|
-
|
|
67
|
+
Include it only when:
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
- its change is explicitly covered;
|
|
70
|
+
- it belongs to the same coherent checkpoint;
|
|
71
|
+
- it describes the same accepted behavior;
|
|
72
|
+
- its own maintenance policy permits the update.
|
|
73
|
+
|
|
74
|
+
Do not edit a durable artifact merely to make implementation appear coherent. Return contradictions to [Workflow](../../workflow/SKILL.md).
|
|
75
|
+
|
|
76
|
+
Working Records under `.freeflow/tasks/**` are ignored local memory and must never be staged or committed.
|
|
77
|
+
|
|
78
|
+
## Reject Sensitive Or Suspicious Content
|
|
79
|
+
|
|
80
|
+
Stop before staging:
|
|
81
|
+
|
|
82
|
+
- secrets, tokens, credentials, private keys, or local environment files;
|
|
83
|
+
- databases, dumps, recordings, or personal data;
|
|
84
|
+
- unexplained binaries or generated archives;
|
|
85
|
+
- logs, traces, screenshots, or debug output not explicitly required;
|
|
86
|
+
- destructive state or files whose inclusion could expose or lose user data.
|
|
87
|
+
|
|
88
|
+
Do not "clean up" suspicious files by deleting or discarding them. Preserve their state and report the exact paths.
|
|
89
|
+
|
|
90
|
+
## Verify The Candidate
|
|
91
|
+
|
|
92
|
+
After staging, compare all three states:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git diff --cached
|
|
96
|
+
git diff
|
|
97
|
+
git status --short --branch
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The checkpoint is narrow only when:
|
|
101
|
+
|
|
102
|
+
- the index contains exactly the intended checkpoint;
|
|
103
|
+
- excluded work remains untouched;
|
|
104
|
+
- remaining dirty state is understood;
|
|
105
|
+
- verification still supports the staged version rather than only the combined worktree;
|
|
106
|
+
- the final report can name everything left behind.
|