@haposoft/cafekit 0.18.1 → 0.18.2
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/README.md +12 -1
- package/bin/__tests__/claude-settings.test.js +123 -0
- package/bin/__tests__/codex-ask-guard.test.js +123 -0
- package/bin/__tests__/codex-ask-projection.test.js +51 -0
- package/bin/__tests__/codex-hooks-ownership.test.js +80 -1
- package/bin/__tests__/codex-hooks.test.js +774 -6
- package/bin/__tests__/codex-native-hook-boundaries.test.js +136 -0
- package/bin/__tests__/codex-native.test.js +192 -59
- package/bin/__tests__/codex-projection-parity.test.js +314 -0
- package/bin/__tests__/codex-quiet-hooks.test.js +170 -0
- package/bin/__tests__/codex-research-projection.test.js +70 -0
- package/bin/__tests__/codex-specs-projection.test.js +76 -0
- package/bin/__tests__/develop-contract.test.js +1 -1
- package/bin/__tests__/docs-sync-on-demand.test.js +25 -20
- package/bin/__tests__/inspect-paths.test.js +183 -0
- package/bin/__tests__/installer-safety.test.js +335 -0
- package/bin/__tests__/legacy-hooks-retired.test.js +18 -8
- package/bin/__tests__/omp-bridge.test.js +66 -12
- package/bin/__tests__/omp-hooks.test.js +11 -5
- package/bin/__tests__/orca-session.test.js +7 -0
- package/bin/__tests__/privacy-paths.test.js +317 -0
- package/bin/__tests__/usage-hook-retired.test.js +5 -3
- package/bin/install.js +25 -0
- package/bin/lib/codex-install.js +134 -12
- package/bin/lib/context.js +1 -1
- package/bin/phases/claude-runtime.js +91 -25
- package/bin/phases/claude-settings.js +22 -1
- package/bin/phases/codex-hooks.js +96 -33
- package/bin/phases/codex-runtime.js +45 -52
- package/bin/phases/copy-payload.js +1 -3
- package/package.json +1 -1
- package/src/claude/CLAUDE.md +4 -0
- package/src/claude/gitignore +3 -0
- package/src/claude/hooks/__tests__/installed-root.test.js +111 -0
- package/src/claude/hooks/__tests__/precompact.test.js +206 -10
- package/src/claude/hooks/__tests__/privacy-block.test.js +27 -0
- package/src/claude/hooks/__tests__/session-writeenv.test.js +25 -0
- package/src/claude/hooks/__tests__/spec-gate.test.js +141 -10
- package/src/claude/hooks/__tests__/spec-state-touched.test.js +204 -8
- package/src/claude/hooks/__tests__/state.test.js +207 -7
- package/src/claude/hooks/__tests__/update-check.test.js +88 -0
- package/src/claude/hooks/agent.cjs +7 -6
- package/src/claude/hooks/inspect-block.cjs +15 -63
- package/src/claude/hooks/lib/inspect-paths.cjs +304 -0
- package/src/claude/hooks/lib/parser.cjs +1 -1
- package/src/claude/hooks/lib/privacy-command-analysis.cjs +191 -17
- package/src/claude/hooks/lib/privacy-paths.cjs +313 -0
- package/src/claude/hooks/lib/project-root.cjs +15 -0
- package/src/claude/hooks/lib/rules-reservation.cjs +36 -0
- package/src/claude/hooks/lib/spec-touch.cjs +67 -0
- package/src/claude/hooks/lib/update-check.cjs +77 -0
- package/src/claude/hooks/precompact.cjs +8 -15
- package/src/claude/hooks/privacy-block.cjs +23 -205
- package/src/claude/hooks/rules.cjs +6 -28
- package/src/claude/hooks/session.cjs +34 -117
- package/src/claude/hooks/spec-gate.cjs +9 -26
- package/src/claude/hooks/spec-state.cjs +43 -59
- package/src/claude/hooks/state.cjs +96 -51
- package/src/claude/migration-manifest.json +8 -1
- package/src/claude/rules/hook-protocols.md +1 -1
- package/src/claude/runtime.json +0 -3
- package/src/claude/scripts/generate-skill-catalog.cjs +2 -2
- package/src/claude/scripts/provenance.cjs +14 -0
- package/src/claude/settings/settings.json +1 -1
- package/src/claude/skills/ai-multimodal/scripts/check_setup.py +8 -68
- package/src/claude/skills/ai-multimodal/scripts/gemini_batch_process.py +6 -28
- package/src/claude/skills/git/SKILL.md +1 -1
- package/src/claude/skills/git/references/worktree-blueprint.md +1 -1
- package/src/codex/AGENTS.md +8 -0
- package/src/codex/hooks/ask-guard.cjs +54 -0
- package/src/codex/hooks/inspect-block.cjs +11 -7
- package/src/codex/hooks/lib/inspect-paths.cjs +1 -199
- package/src/codex/hooks/lib/privacy-paths.cjs +1 -0
- package/src/codex/hooks/lib/privacy-state.cjs +98 -16
- package/src/codex/hooks/lib/rules-reservation.cjs +38 -0
- package/src/codex/hooks/lib/secret-keywords.cjs +1 -0
- package/src/codex/hooks/lib/spec-session-touch.cjs +100 -0
- package/src/codex/hooks/lib/spec-touch.cjs +3 -0
- package/src/codex/hooks/lib/update-check.cjs +1 -0
- package/src/codex/hooks/precompact.cjs +39 -0
- package/src/codex/hooks/privacy-approval.cjs +28 -17
- package/src/codex/hooks/privacy-block.cjs +9 -215
- package/src/codex/hooks/rules.cjs +4 -30
- package/src/codex/hooks/secret-output-guardrail.cjs +1 -1
- package/src/codex/hooks/session.cjs +47 -11
- package/src/codex/hooks/spec-gate.cjs +21 -6
- package/src/codex/hooks/spec-state.cjs +32 -6
- package/src/codex/hooks/state.cjs +25 -4
- package/src/codex/hooks.json +39 -7
- package/src/codex/rules/hook-protocols.md +13 -6
- package/src/omp/extensions/cafekit-bridge.mjs +12 -4
- package/src/omp/hooks/privacy-block.cjs +24 -206
- package/src/codex/rules/state-sync.md +0 -60
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Process-first state synchronization
|
|
2
|
-
|
|
3
|
-
## Primary file state
|
|
4
|
-
|
|
5
|
-
For new work, `specs/<feature>/plan.md` and its direct-child
|
|
6
|
-
`task-NN-*.md` files are canonical, hand-editable state. Task files stay flat
|
|
7
|
-
beside the plan; indexes and host task views are disposable projections.
|
|
8
|
-
|
|
9
|
-
Each task has exactly one `Status:` field using `pending`, `in_progress`,
|
|
10
|
-
`paused`, `blocked`, or `done`. The controller is the sole writer of task
|
|
11
|
-
status and proof. A task's final `## Receipt` is its only canonical execution
|
|
12
|
-
proof.
|
|
13
|
-
|
|
14
|
-
## Surgical synchronization
|
|
15
|
-
|
|
16
|
-
Before changing state:
|
|
17
|
-
|
|
18
|
-
1. read the plan row and the task's Outcome, Acceptance, Dependencies,
|
|
19
|
-
Verification Plan, Status, and Receipt;
|
|
20
|
-
2. confirm every dependency and owned path at the requested boundary;
|
|
21
|
-
3. edit only the observed Status, concrete blocker, implemented checkbox, or
|
|
22
|
-
Receipt; and
|
|
23
|
-
4. re-read the file and confirm exactly one Status field and one Receipt
|
|
24
|
-
section.
|
|
25
|
-
|
|
26
|
-
Starting or resuming changes only Status to `in_progress`. Blocking records a
|
|
27
|
-
specific cause without creating proof. Do not replace a whole packet to make a
|
|
28
|
-
state transition.
|
|
29
|
-
|
|
30
|
-
Set `Status: done` only after the inline Receipt passes the
|
|
31
|
-
`validateCanonicalReceipt` contract: exact command, `Exit: 0`,
|
|
32
|
-
`Verification: PASS`, runtime-derived Base and Head values, and a non-empty
|
|
33
|
-
fenced block of current command output.
|
|
34
|
-
|
|
35
|
-
A done task is bound to live Base and Head only while its own task file has a copy in
|
|
36
|
-
`HEAD` that its current bytes no longer match. A file that is committed and unchanged,
|
|
37
|
-
and a file that was never committed at all, are both validated on structure alone: the
|
|
38
|
-
first has a baseline it still matches, the second has no baseline to drift from, and
|
|
39
|
-
committing a packet is the user's choice that a gitignored specs root removes entirely.
|
|
40
|
-
Work elsewhere in the tree never reopens a receipt, because Base is the last commit
|
|
41
|
-
touching anything outside the specs root, so every finished receipt records an older
|
|
42
|
-
Base by construction. Every structural check runs in all cases.
|
|
43
|
-
The gate detects drift, not invention: a valid
|
|
44
|
-
Base and Head pair costs one command and no verification run, so neither mode proves
|
|
45
|
-
that the command was executed. Missing, stale, contradictory,
|
|
46
|
-
placeholder, copied, failure, or zero-test evidence leaves the task unfinished.
|
|
47
|
-
|
|
48
|
-
Synchronization never fabricates commands, output, timestamps, completed
|
|
49
|
-
work, reviewer identity, user approval, or product readiness. A passing command
|
|
50
|
-
proves only the boundary it executed.
|
|
51
|
-
|
|
52
|
-
## Human gates and workflow ownership
|
|
53
|
-
|
|
54
|
-
- GATE-SCOPE records the user's scope decision before the plan is written.
|
|
55
|
-
- GATE-REVIEW records the user's disposition of deduplicated adversarial findings.
|
|
56
|
-
- Develop starts only after a new explicit user invocation and executes one
|
|
57
|
-
unblocked task at a time.
|
|
58
|
-
- Sync changes only observed file state and never starts implementation.
|
|
59
|
-
- GATE-DONE occurs after current receipts and limitations are shown; the user decides
|
|
60
|
-
whether the requested feature is complete.
|