feat: #65 remaining polish — import gate, import:true opt-in, SPEC-006 core (3 of 4) - #67
Merged
Merged
Conversation
…m 2) import used to write remote content straight into .agents/ with no scan and no review gate, while pull was gated — the exact hole SPEC-005 names. Now import scans the fetched artifact and quarantines it by default; --trust (or quarantine=off) bypasses, loudly, with the scan still run. Adds source.QuarantineImport; Approve skips origin/lock writes for untracked imports. Tests: quarantine-by-default, --trust bypass, CRITICAL blocks approve. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…UDE.md block (fixes #65 item 1) Reference-doc buckets can now join the managed @-import block by setting 'import: true' in frontmatter. Both collectors (global CollectClaude... and local ManagedImportBlockForLocal) share one managedImportSuffix helper that routes reference docs to their own bucket dir (.claude/specs/X.md) mirroring the symlink destination, while rules/ workflows keep qualifying by semantic. Tests for opt-in routing and frontmatter parsing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…06 core, #65 item 3) macos/linux/unix/windows subdirs under any bucket route only when the host matches (runtime.GOOS), gated at discovery so non-matching subtrees are skipped. Scoped artifacts keep the subdir as a name prefix, so destinations (.claude/rules/macos/brew.md) and @-imports mirror the source tree for free — all destinations already filepath.Join(name). Adds .agents/config 'os = <goos>' override for cross-platform CI/tests. Tests: scope table, per-OS discovery, config override. Pending (follow-up, non-blocking): AGENTS.md [os] badges + concat OS-header comments — OS rules route correctly now, just aren't listed in the static index yet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🤖 AI Code Review CompleteReview performed on changed files. Check inline comments for specific findings. Severity Levels:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the deferred backlog in #65. Three of four items done, each with tests; the fourth (Part C sandbox) is deliberately not included — see below.
Done (tested,
go test ./...+go vetgreen)Item 2 —
importroutes through the quarantine gate (security)import <url>used to write remote content straight into.agents/with no scan and no review gate, whilepullwas gated — the exact hole SPEC-005 names. Nowimportscans the fetched artifact and quarantines it by default;sync-agents quarantine/approvehandle it identically topull.--trust(orquarantine = off) bypasses, loudly, with the scan still run. CRITICAL findings block a non-forced approve.Item 1 —
import: trueopt-in for plans/specs/adrsReference-doc buckets can join the managed CLAUDE.md
@-import block viaimport: truefrontmatter. Both collectors share onemanagedImportSuffixhelper routing them to their own bucket dir (.claude/specs/X.md), mirroring the symlink destination.Item 3 — SPEC-006 OS-scoped routing (core)
macos//linux//unix//windows/subdirs under any bucket route only whenruntime.GOOSmatches, gated at discovery. Scoped names keep the subdir prefix so destinations +@-imports nest for free. Adds.agents/configos = <goos>override for CI/tests.Pending (non-blocking): AGENTS.md
[os]badges + concat OS-header comments — OS rules route correctly, they're just not listed in the static index yet.Deliberately NOT included
Item 4 — SPEC-005 Part C sandboxed exec (
sandbox-exec/bwrap+Landlock).This is the security-critical "stretch" item. A sandbox that looks like it confines but doesn't is worse than none. Verifying a correct default-deny macOS seatbelt profile needs iteration I can't complete confidently in one pass, and the Linux
bwrap/Landlock path can't be tested on a macOS dev box — it needs a Linux CI runner. Shipping it unverified would be security theater. Left for a focused, CI-tested PR.🤖 Generated with Claude Code