一键导入
bundle-extract
Copy artifacts from a worktree to a main-tree archive directory with per-file sha256 verification.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Copy artifacts from a worktree to a main-tree archive directory with per-file sha256 verification.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Close a bd issue with structured rationale, evidence-path verification, worktree-owner lifecycle enforcement, and post-close verification. Idempotent.
Assemble a bdClosureAttestation JSON object (bd-close evidence shape — issueId/head/timestamp/evidenceBundle/evidencePaths/rationaleHash). This is DISTINCT from the canonical ADR-016 §6 closureAttestation (post-sign-off-correction) shape; see amnesia-pdqi.
Resolve P1 references per-class (Cerberus-aggregate; no halt-on-first) — invoke tools/validate-refs.sh to validate file_path / commit_sha / bd_id / adr_anchor / memory_binding citations against their named targets via the 5 per-class adapters at tools/role_schema/adapters/refs/. Returns full inventory of {resolved, violations, warnings}; exit 1 on any block-severity (STALE/NOT_FOUND/AMBIGUOUS for non-warn classes), exit 0 on all RESOLVED OR only warn-severity (bd_id STALE; memory ACTIVE_PENDING_CODIFICATION) per ADR-017 §2.4 + AC
Assemble a canonical role identity (P3 adapter per ADR-017 §2.1 Layer 3) for a dispatch — resolve a role name against the canonical roster (Directive
Manage halt-condition state across a dispatch lifecycle (ARMED → CHECKED → FIRED → ATTESTED) per ADR-017 §2.4 — arm halts pre-flight via tools/halt-arm.sh (Task 3.2), query/fire mid-dispatch via tools/halt-check.sh (Task 3.3 TBD).
Validate a dispatch contract YAML against ADR-017 §2.2 canonical packet shape + P4 structural + P3 role-canonical + P1 reference resolution; emit conformance diagnostic for pre-launch gating.
| name | bundle-extract |
| description | Copy artifacts from a worktree to a main-tree archive directory with per-file sha256 verification. |
After every evidence-only-output dispatch completes (before merging the worktree back to main), and during any bundle-archival workflow that moves artifacts out of an agent worktree into a main-tree perf-evidence archive. The sha256 round-trip catches transport corruption and silent races.
Invokes tools/bundle-extract.sh with a source worktree path, a destination archive directory, and a comma-separated manifest of paths (relative to source). For each path it copies the file to the destination, computes sha256 at both ends, and reports a per-file match flag plus an aggregate all_match boolean. Per ADR-016 §6 Worktree Retention Discipline, the marker-commit primitive keeps the worktree alive long enough for this extractor to run against it.
tools/bundle-extract.sh--source <worktree-path> (required)--dest <dest-dir> (required; created if absent)--manifest <comma-separated-paths> (required; paths relative to --source)--json (output is JSON regardless; flag retained for symmetry){
"extracted": [
{"file": "<relpath>", "sha256_source": "<hash>", "sha256_dest": "<hash>", "match": true},
...
],
"all_match": true
}
all_match is true; 1 on any mismatch or missing source file.tools/bundle-extract.sh \
--source .claude/worktrees/agent-xxxx \
--dest apps/amnesia/docs/perf-evidence/2026-05-11/o4fp.6 \
--manifest manifest.json,raw-metrics.json,summary.md
all_match is false — sha256 mismatch indicates corruption or a race; halt + surface the per-file evidence before relying on the archive.bundle-extract is normally paired with marker-commit.sh upstream (commit keeps worktree alive) and with closure-attest.sh downstream (records the archived paths in the attestation).