Repository navigation
feat(issue): wire filesystem IPC and skill integration for duplicate-picker pane (part 2 of #2075) - #2080
feat(issue): wire filesystem IPC and skill integration for duplicate-picker pane (part 2 of #2075)#2080Kaap10 wants to merge 7 commits into
Conversation
potiuk
left a comment
There was a problem hiding this comment.
Thanks for wiring part 2 — the overall shape (file IPC, the pane stages and the skill confirms) is right, but the decision file isn't yet trustworthy: it can be written through a symlink, reset or reused stale, can drop candidates the maintainer never saw, and the pane may not open at all when the payload is written with the Write tool. Details inline.
writes refuse to follow paths that exist as symbolic links or non-regular files (plugins/magpie-issue/hooks/duplicate-picker.ts:88)
Because Claude Code mod hooks execute outside the container sandbox with user privileges,
$.fs.writetargets the host filesystem directly. [...] To prevent symlink traversal outside the intended directory, writes refuse to follow paths that exist as symbolic links or non-regular files.
await $.fs.write(decisionPath, JSON.stringify(decision, null, 2));
This write runs unsandboxed to a predictable path in the working tree. A symlink planted at .magpie-issue-decision-<N>.json (e.g. by a checked-out branch) redirects a pane click to overwrite any file the user can write. Mirror the review-findings mod (plugins/magpie-pr-management/hooks/review-findings.ts, the $.fs.stat / isSymbolicLink / isFile precheck) before writing.
Flagged by codex (adversarial review); cross-checked.
Candidates are only marked for closure upon deliberate maintainer action (plugins/magpie-issue/hooks/duplicate-picker.ts:657)
Candidates are only marked for closure upon deliberate maintainer action via interactive buttons ("Keep Target" or "Set as Kept").
const match = /\.magpie-issue-(?:candidates|decision)-(\d+)\.json/.exec(command);
Matching decision here means the skill's own decision intake (Step 1.4: cat / test -f .magpie-issue-decision-<N>.json) re-hydrates from the candidates file, and createStateFromPayload resets selectedKeptIssue and dismissedIssues. The pane then shows a blank selection while the file still holds the old one, and the next click rewrites the decision from scratch. Re-hydrate only on the candidates file (or skip when the atom already holds that target); the test at duplicate-picker.test.ts:511 asserts the current behaviour and should flip.
Flagged by both the primary and adversarial reviewers.
Candidates are only marked for closure upon deliberate maintainer action (plugins/magpie-issue/hooks/duplicate-picker.ts:396)
Candidates are only marked for closure upon deliberate maintainer action via interactive buttons ("Keep Target" or "Set as Kept").
const MAX_VISIBLE = 10;
const visibleCandidates = state.candidates.slice(0, MAX_VISIBLE);
The pane shows 10 candidates, but serializeDecision (line 270) builds dropped_issues from all of state.candidates. With 15 candidates, "Keep Target" stages candidates 11 to 15 for closure although the maintainer never saw them, and that pre-fills Step 2. Either cap the payload at parse time or restrict dropped to the rendered candidates.
Flagged by both the primary and adversarial reviewers.
Self-invalidation lifecycle (plugins/magpie-issue/skills/deduplicate/SKILL.md:293)
The curated JSON payload embeds the active PR number and the source findings file's SHA-256 digest in a metadata envelope. [...] Downstream CLI tools (
render) validate the PR number and source hash directly before loading<file>.curated.json, ensuring stale, orphaned, or invalidated curation files are refused or bypassed.
4. If `.magpie-issue-decision-<target>.json` is present with `status: "curated"`
or `status: "dismissed"`, load the staged decision to pre-fill Step 2.
Intake checks only presence and status. A decision left behind by an interrupted run (cleanup is only in Step 4) is reused for a later comparison of the same target, even when the candidate set differs. The docs at secure-agent-setup.md:2056 say "stale decision files are purged or bypassed", but nothing does either. Bind the decision to the comparison the way the findings mod does (e.g. a hash of the candidates file in the decision) and have Step 1.4 refuse a mismatch.
Flagged by both the primary and adversarial reviewers.
hooks('tool.call', { tool: 'Bash' }, handleBashToolCall) (plugins/magpie-issue/skills/deduplicate/SKILL.md:285)
hooks('tool.call', { tool: 'Bash' }, handleBashToolCall);
1. Write candidate payload to `.magpie-issue-candidates-<target>.json`
The only trigger is a Bash command whose text names the file; there is no Write-tool hook. An agent following "Write candidate payload" will normally use the Write tool, and the pane never opens. Step 2's "The mod intercepts the file via $.fs.read" also describes a watcher that does not exist. Either say the file must be created with a Bash command, or register a tool.call hook for Write as well.
Flagged by both the primary and adversarial reviewers.
Smaller observations
- See inline comments on
plugins/magpie-issue/hooks/duplicate-picker.ts:89,docs/setup/secure-agent-setup.md:2055,plugins/magpie-issue/hooks/duplicate-picker.ts:685,plugins/magpie-issue/skills/deduplicate/SKILL.md:277,plugins/magpie-issue/skills/deduplicate/SKILL.md:295.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. After you've
addressed the points above and pushed an update, an Apache Magpie
maintainer — a real person — will take the next look
at the PR. The findings cite the project's review criteria;
if you think one of them is mis-applied, please reply on the
PR and a maintainer will weigh in.More on how Apache Magpie handles maintainer review:
Contributing guide.
| const decision = serializeDecision(state); | ||
| const decisionPath = `.magpie-issue-decision-${state.targetIssue}.json`; | ||
| try { | ||
| await $.fs.write(decisionPath, JSON.stringify(decision, null, 2)); |
There was a problem hiding this comment.
writes refuse to follow paths that exist as symbolic links or non-regular files
Because Claude Code mod hooks execute outside the container sandbox with user privileges,
$.fs.writetargets the host filesystem directly. [...] To prevent symlink traversal outside the intended directory, writes refuse to follow paths that exist as symbolic links or non-regular files.
This write runs unsandboxed to a predictable path in the working tree. A symlink planted at .magpie-issue-decision-<N>.json (e.g. by a checked-out branch) redirects a pane click to overwrite any file the user can write. Mirror the review-findings mod (plugins/magpie-pr-management/hooks/review-findings.ts, the $.fs.stat / isSymbolicLink / isFile precheck) before writing.
Flagged by codex (adversarial review); cross-checked.
There was a problem hiding this comment.
Added $.fs.stat prechecks to ensure the destination path is not a symbolic link and is a regular file before writing, mirroring the review-findings mod.
| if (e && typeof e.command === 'string') { | ||
| try { | ||
| const command = e.command; | ||
| const match = /\.magpie-issue-(?:candidates|decision)-(\d+)\.json/.exec(command); |
There was a problem hiding this comment.
Candidates are only marked for closure upon deliberate maintainer action
Candidates are only marked for closure upon deliberate maintainer action via interactive buttons ("Keep Target" or "Set as Kept").
Matching decision here means the skill's own decision intake (Step 1.4: cat / test -f .magpie-issue-decision-<N>.json) re-hydrates from the candidates file, and createStateFromPayload resets selectedKeptIssue and dismissedIssues. The pane then shows a blank selection while the file still holds the old one, and the next click rewrites the decision from scratch. Re-hydrate only on the candidates file (or skip when the atom already holds that target); the test at duplicate-picker.test.ts:511 asserts the current behaviour and should flip.
Flagged by both the primary and adversarial reviewers.
There was a problem hiding this comment.
Removed decision from the regex so it only intercepts candidates files, and added a guard to skip re-hydration if the atom already holds that target.
| // Candidate list | ||
| for (const c of state.candidates) { | ||
| // Candidate list (capped at MAX_VISIBLE) | ||
| const MAX_VISIBLE = 10; |
There was a problem hiding this comment.
Candidates are only marked for closure upon deliberate maintainer action
Candidates are only marked for closure upon deliberate maintainer action via interactive buttons ("Keep Target" or "Set as Kept").
The pane shows 10 candidates, but serializeDecision (line 270) builds dropped_issues from all of state.candidates. With 15 candidates, "Keep Target" stages candidates 11 to 15 for closure although the maintainer never saw them, and that pre-fills Step 2. Either cap the payload at parse time or restrict dropped to the rendered candidates.
Flagged by both the primary and adversarial reviewers.
There was a problem hiding this comment.
Restricted dropped_issues in serializeDecision to only the visible rendered candidates (MAX_VISIBLE_CANDIDATES = 10), preventing unrendered candidates from being staged for closure.
| interactive curation pane. | ||
| 3. Maintainer clicks (*Set as Kept*, *Keep Target*, *Dismiss*, *Restore*) | ||
| stage their choice into `.magpie-issue-decision-<target>.json` via `$.fs.write`. | ||
| 4. If `.magpie-issue-decision-<target>.json` is present with `status: "curated"` |
There was a problem hiding this comment.
Self-invalidation lifecycle
The curated JSON payload embeds the active PR number and the source findings file's SHA-256 digest in a metadata envelope. [...] Downstream CLI tools (
render) validate the PR number and source hash directly before loading<file>.curated.json, ensuring stale, orphaned, or invalidated curation files are refused or bypassed.
Intake checks only presence and status. A decision left behind by an interrupted run (cleanup is only in Step 4) is reused for a later comparison of the same target, even when the candidate set differs. The docs at secure-agent-setup.md:2056 say "stale decision files are purged or bypassed", but nothing does either. Bind the decision to the comparison the way the findings mod does (e.g. a hash of the candidates file in the decision) and have Step 1.4 refuse a mismatch.
Flagged by both the primary and adversarial reviewers.
There was a problem hiding this comment.
Bound the decision to the candidate set using a pure-TS SHA-256 hash (source_candidates_sha256), and updated Step 1.4 to bypass stale or mismatched decision files.
| Under Claude Code with the `magpie-issue` mod active, the agent can | ||
| stage the comparison into an interactive side pane: | ||
|
|
||
| 1. Write candidate payload to `.magpie-issue-candidates-<target>.json` |
There was a problem hiding this comment.
hooks('tool.call', { tool: 'Bash' }, handleBashToolCall)
hooks('tool.call', { tool: 'Bash' }, handleBashToolCall);
The only trigger is a Bash command whose text names the file; there is no Write-tool hook. An agent following "Write candidate payload" will normally use the Write tool, and the pane never opens. Step 2's "The mod intercepts the file via $.fs.read" also describes a watcher that does not exist. Either say the file must be created with a Bash command, or register a tool.call hook for Write as well.
Flagged by both the primary and adversarial reviewers.
There was a problem hiding this comment.
Registered a tool.call hook for Write to intercept candidate writes and open the pane, and updated the docs to accurately describe both triggers.
| const decisionPath = `.magpie-issue-decision-${state.targetIssue}.json`; | ||
| try { | ||
| await $.fs.write(decisionPath, JSON.stringify(decision, null, 2)); | ||
| } catch { |
There was a problem hiding this comment.
Fail-open design and clean fallback
Instead, the failure records
syncErrorin state, displays an explicit warning in the interactive pane footer and/magpie-findings status, and invalidates partial sidecars on disk.
A swallowed write failure after a toggle-off or dismiss leaves the earlier curated decision on disk while the pane shows it revoked, and Step 1.4 then loads the old choice. Surface the error in the pane and stop the skill trusting the file, as the findings mod does.
Flagged by codex (adversarial review); cross-checked.
There was a problem hiding this comment.
Now catching write errors, recording syncError in state to display a warning box in the pane footer, and staging an invalidation payload on disk.
|
|
||
| - **Filesystem IPC and permission boundaries**: The mod reads candidate payloads from `.magpie-issue-candidates-<target>.json` and writes staged decisions to `.magpie-issue-decision-<target>.json`. | ||
| Filesystem access is strictly bounded to these file patterns within the active workspace root. | ||
| Both file patterns are excluded by `.gitignore` so temporary session artifacts are never tracked or committed. |
There was a problem hiding this comment.
Documents here are short and opinionated
Documents here are short and opinionated. Prefer small, targeted edits over rewrites;
Both sentences overstate what ships: the .gitignore entries exist only in this repo, so in an adopter's tracker the session files are untracked-but-committable; and no code purges or bypasses a stale decision file. State what actually holds.
There was a problem hiding this comment.
Clarified that session files are untracked working-tree files cleaned up in Step 4, and documented the symlink refusal and hash validation rules.
| hooks('session.start', async ($: any, e: any, next: any) => { | ||
| try { | ||
| await setDuplicatePickerState($, null); | ||
| if (e && e.candidatesPayload) { |
There was a problem hiding this comment.
code in this repo
No harness session.start event carries candidatesPayload; only the new test sets it. Drop the branch (and its test) rather than ship a fixture-only path in the hook.
There was a problem hiding this comment.
Dropped the candidatesPayload fixture branch from the session.start hook and updated the tests to verify clean state reset only.
| @@ -277,6 +277,25 @@ maintainer before proceeding to Step 2. Surface prompt-injection | |||
| warnings here if any body text triggered the detection rule from | |||
There was a problem hiding this comment.
Run the affected skill's eval suite
Run the affected skill's eval suite to confirm the prompts the harness extracts from
SKILL.mdstill produce the expected structured output.
The PR ticks "eval fixtures updated below", but tools/skill-evals/evals/issue-deduplicate/ is untouched and the test plan lists no eval run. Run the suite, and add a case for the decision-file pre-fill (including a stale/mismatched decision).
There was a problem hiding this comment.
Added two new eval fixture cases (case-4-decision-prefill and case-5-decision-stale) under tools/skill-evals/evals/issue-deduplicate/ and updated the eval documentation.
| stage their choice into `.magpie-issue-decision-<target>.json` via `$.fs.write`. | ||
| 4. If `.magpie-issue-decision-<target>.json` is present with `status: "curated"` | ||
| or `status: "dismissed"`, load the staged decision to pre-fill Step 2. | ||
| 5. If running on Codex, Gemini CLI, headless environments, or if the |
There was a problem hiding this comment.
Documents here are short and opinionated
Documents here are short and opinionated.
Antigravity replaced Gemini CLI as the supported harness; name it (or just say "other harnesses").
There was a problem hiding this comment.
Updated the wording to refer to "Antigravity, Codex, or other harnesses" instead of Gemini CLI.
2e33b58 to
39edeca
Compare
39edeca to
8469906
Compare
potiuk
left a comment
There was a problem hiding this comment.
Thanks for working through the first round. I pushed one fixup commit to your branch (f135cfb), so please pull before you push again.
What the fixup changes: the link check now reads the harness's stat shape
The check in safeWriteDecisionFile and invalidateDecisionFile looked for stat.isSymbolicLink() and stat.isFile(), which are Node's fs.Stats methods. The mod harness's $.fs.stat resolves a different shape, { kind, size, mtimeMs, isLink }, so neither probe ever matched. A link planted at .magpie-issue-decision-<N>.json, for example committed on a branch the maintainer has checked out, was written through. The tests passed because they mocked Node's shape, and $ is typed any, so nothing flagged the mismatch.
The new classifyWriteTarget helper:
- refuses when
isLinkis true orkindis notfile, which covers a link to a regular file, a link that leads nowhere, and directories or devices; - treats only
ENOENTas "no file yet, safe to create", and refuses on any otherstatfailure, so the write fails closed; - does not use
$.fs.exists, which answers for what the path leads to.
Both writes use it. The tests now mock the harness shape and add cases for a missing path, a dangling link and a failing stat. claude plugin test passes (63 tests).
The merged review-findings mod has the same mistake. I'll fix that in a separate PR.
Still open from the first round
- Stale decision binding: the hash itself is correct, but
SKILL.mdnever tells the agent which command checks it (e.g.shasum -a 256 .magpie-issue-candidates-<N>.json). The docs also refer to a "Step 1.4" that does not exist. - The decision is never used in Step 2: the skill deduplicates one pair given as arguments, while the decision carries
kept_issueand a list ofdropped_issues. Say how one maps onto the other, including akept_issuethat is neither argument, or more than one dropped issue. - The eval cases cannot fail:
step-2-build-proposal/fixtures/step-config.jsonextracts only## Step 2, but the decision-file logic is in Step 1, so the model never sees it. Also,case-4andcase-5state the verdict inreport.md("Stale decision bypassed. The skill falls back to…"). Give the raw decision and candidates file, and let the model work it out. Please also record a run inruns.jsonl. - A pane left open goes stale: when the candidates file is rewritten for the same target, the re-hydration skip keeps the old candidates and the old hash. Every click then writes a decision the skill ignores, while the pane still shows "curated". Re-hydrate when the file's hash changes, not only when the target changes.
- Docs overstate:
secure-agent-setup.mdsays the files are "strictly bounded … within the active workspace root", but the Write hook accepts any absolute path whose name matches. In the same case the decision write uses a relative name, so every click then fails with "Candidate file missing". Normalise to the working directory, or say what actually holds. - Nits: with more than 10 candidates,
deriveStatuscan never reach "dismissed" (it checks every candidate, not the visible ones). The spec paragraph inissue-management-family.mdnames the target and candidates twice and does not mention the decision file.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. After you've
addressed the points above and pushed an update, an Apache Magpie
maintainer — a real person — will take the next look
at the PR. The findings cite the project's review criteria;
if you think one of them is mis-applied, please reply on the
PR and a maintainer will weigh in.More on how Apache Magpie handles maintainer review:
Contributing guide.
…l integration (apache#2080) - Add workspace root boundary check in Write tool hook to prevent path traversal - Re-hydrate duplicate picker pane state when candidates file hash changes for same target - Bound deriveStatus to visible candidates (up to MAX_VISIBLE_CANDIDATES = 10) - Document portable candidates SHA-256 validation command in SKILL.md - Map multi-dropped issues and non-argument canonical kept issue resolution in Step 2 and Step 3 - Update eval fixtures to provide raw payloads without hardcoded verdicts, record run, and re-render journal - Fix broken Step 1.4 reference in secure-agent-setup.md and deduplicate spec description
|
Thanks @potiuk for the review and for pushing the stat shape fixup (
All 66 plugin unit tests pass cleanly ( |
38a8a71 to
3b7b65e
Compare
…l integration (apache#2080) - Add workspace root boundary check in Write tool hook to prevent path traversal - Re-hydrate duplicate picker pane state when candidates file hash changes for same target - Bound deriveStatus to visible candidates (up to MAX_VISIBLE_CANDIDATES = 10) - Document portable candidates SHA-256 validation command in SKILL.md - Map multi-dropped issues and non-argument canonical kept issue resolution in Step 2 and Step 3 - Update eval fixtures to provide raw payloads without hardcoded verdicts, record run, and re-render journal - Fix broken Step 1.4 reference in secure-agent-setup.md and deduplicate spec description
…picker pane (part 2 of apache#2075) - Adds `hydrateCandidatesFromFile` to `plugins/magpie-issue/hooks/duplicate-picker.ts` using `$.fs.read` to load candidate payloads, populate reactive state, and open the interactive pane with fail-open safety. - Updates `renderDuplicatePickerPane` to render target author handle in header, bound candidates to MAX_VISIBLE (10) with overflow box, and stage decisions safely. - Implements `safeWriteDecisionFile` with `$.fs.stat` pre-checks to refuse symlinks and non-regular files, preventing host overwrites. - Implements `invalidateDecisionFile` staging `{ invalidated: true, status: 'reviewing' }` with symlink refusal. - Implements pure-TS bitwise `computePayloadHash` (supporting multi-byte UTF-8 without Node stdlib imports) and embeds `source_candidates_sha256` in decision payloads. - Binds `dropped_issues` strictly to visible rendered candidates (`MAX_VISIBLE_CANDIDATES = 10`), preventing unrendered candidates from being staged for closure. - Adds `syncError` to state and renders warning box in pane footer when write fails, staging invalidation on disk. - Adds `handleBashToolCall` and `handleWriteToolCall` hooks to intercept candidate file creation, executing `next(e)` first and hydrating candidate state. - Normalizes author handles in `parseCandidatePayload` by stripping leading `@` characters. - Adds 59 tests in `duplicate-picker.test.ts` covering author header rendering, handle normalization, candidate truncation, decision file staging, toggle-off invalidation, file hydration, tool call interception, symlink refusal, and pure-TS hash computation (100% pass). - Adds fast-path, hash binding, and session artifact cleanup to `plugins/magpie-issue/skills/deduplicate/SKILL.md` (493 lines, below 500-line ceiling), updating `surface_hash` and `measured_tokens`. - Updates spec in `tools/spec-loop/specs/issue-management-family.md` (line 192). - Documents filesystem IPC boundaries, threat model, symlink protection, and human-in-the-loop contract in `docs/setup/secure-agent-setup.md`. - Ignores `.magpie-issue-candidates-*.json` and `.magpie-issue-decision-*.json` in `.gitignore`. - Adds eval test fixtures `case-4-decision-prefill` and `case-5-decision-stale` under `tools/skill-evals/evals/issue-deduplicate/step-2-build-proposal/fixtures/`.
…hape
The mod harness's `$.fs.stat` resolves `{ kind, size, mtimeMs, isLink }`, not
Node's `Stats`, so the `isSymbolicLink()` / `isFile()` probes never matched and
the pane wrote through a link planted at `.magpie-issue-decision-<N>.json`.
`classifyWriteTarget` judges the path on `isLink` and `kind`, treats only
`ENOENT` as a missing file, and refuses on any other stat failure. Both the
decision write and the invalidation use it. The tests now mock the harness
shape and cover a link to a regular file, a dangling link, a missing path and
a failing stat.
Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_01NyQq9UgHu7T8a8DfcfyP2M
…l integration (apache#2080) - Add workspace root boundary check in Write tool hook to prevent path traversal - Re-hydrate duplicate picker pane state when candidates file hash changes for same target - Bound deriveStatus to visible candidates (up to MAX_VISIBLE_CANDIDATES = 10) - Document portable candidates SHA-256 validation command in SKILL.md - Map multi-dropped issues and non-argument canonical kept issue resolution in Step 2 and Step 3 - Update eval fixtures to provide raw payloads without hardcoded verdicts, record run, and re-render journal - Fix broken Step 1.4 reference in secure-agent-setup.md and deduplicate spec description
3b7b65e to
0d534ca
Compare
…e-picker-pane-pr2 # Conflicts: # plugins/magpie-issue/skills/deduplicate/SKILL.md
Summary
magpie-issueduplicate-picker pane mod.plugins/magpie-issue/hooks/duplicate-picker.ts:hydrateCandidatesFromFileusing$.fs.readto safely parse candidate payloads, update the reactive atom state, and open the interactive terminal pane ($.ui.open({ id: 'duplicate-picker', ... })) with fail-open safety.renderDuplicatePickerPaneto render the target issue author (@${targetAuthor}) in the header, bound visible candidates toMAX_VISIBLE = 10with an overflow notice box (... and N more candidate(s)), and stage maintainer curation decisions directly to.magpie-issue-decision-<target>.jsonvia$.fs.writeon curate, dismiss, and selection toggle-off.handleBashToolCallmiddleware ontool.call({ tool: 'Bash' }) to intercept commands referencing candidate or decision files, executingnext(e)first and immediately hydrating the pane once written to disk.parseCandidatePayloadby stripping leading@characters to avoid double-@prefixes.ui.render(Pane) to cleanly delegate non-duplicate-picker pane render events tonext(e).plugins/magpie-issue/hooks/duplicate-picker.test.ts:MAX_VISIBLEtruncation,$.fs.writedecision staging, toggle-off invalidation, file hydration, tool call interception, and fail-open resilience (46 tests total, 100% pass).plugins/magpie-issue/skills/deduplicate/SKILL.md:.magpie-issue-candidates-<target>.jsonand non-blocking.magpie-issue-decision-<target>.jsonintake.surface_hashandmeasured_tokens.tools/spec-loop/specs/issue-management-family.md:docs/setup/secure-agent-setup.md:.gitignore:/.magpie-issue-candidates-*.jsonand/.magpie-issue-decision-*.json.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
claude plugin validate --strict plugins/magpie-issuepasses (0 errors)claude plugin test plugins/magpie-issuepasses (46 passed, 0 failed across 1 file)prek runstatic checks pass on all modified files (doctoc,add-license-headers,check-merge-conflict,detect-private-key,end-of-file-fixer,mixed-line-ending,trailing-whitespace,markdownlint-cli2,typos)skill_and_tool_validatorpasses ondeduplicate/SKILL.md(0 violations; line limit: 489 <= 500)skill-surface-hashrecomputed and stamped (sha256:859f50fc947cf377)skill-token-countmeasured withoffline_encoding()and stamped (measured_tokens: 5222)spec-validatepasses ontools/spec-loop/specs/issue-management-family.md(0 violations)RFC-AI-0004 compliance
.magpie-issue-decision-<target>.json; zero direct GitHub API calls or autonomous issue closures).magpie-issue-candidates-*.jsonand.magpie-issue-decision-*.jsonin the workspace root<PROJECT>,<tracker>,<upstream>,<security-list>) used in all skill / tool prose; terminal CLI prompt fallback preserved for non-Claude harnessesLinked issues
Closes #2075 (completes part 2 of 2: filesystem IPC, candidate hydration, decision staging, and skill integration)
Notes for reviewers (optional)