-
Notifications
You must be signed in to change notification settings - Fork 1
skill+research+backlog: claude-code-env-mapping skill with carved-sentences + saved env-mapping doc + B-0206 (Aaron 2026-05-05) #1702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AceHack
merged 49 commits into
main
from
backlog/claude-code-env-mapping-skill-with-carved-sentences-references-ts-files-aaron-2026-05-05
May 6, 2026
Merged
Changes from 43 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
59458ac
skill+research+backlog: claude-code-env-mapping skill with carved-sen…
AceHack ab73198
fix(skill/claude-code-env-mapping): point at actual saved-doc filenam…
AceHack 3ce7a69
plan(session-landing): cold-boot read order without losing the plot +…
AceHack 2bf716f
rules(cascade): seven-rule prior-art-search cascade + Rule 7 bullet-t…
AceHack 015a4a8
rules(cascade): cite canonical lost-files substrate (tools/hygiene/LO…
AceHack 10f8338
research(architecture): burn-down CLAUDE.md/AGENTS.md + start over wi…
AceHack 4827333
tools(hygiene): audit-lost-files.sh -- executable form of LOST-FILES-…
AceHack d85ccc9
tools(hygiene): audit-trajectories.sh + audit-backlog-items.sh + exte…
AceHack 67efa70
research(architecture): Codex/GPT-5.5 + Gemini + Grok scout-roundup o…
AceHack 0b29a1f
rules(rule-0): "no more .sh files except install-graph; TS IS cross-p…
AceHack bc16593
fix(claude.md/rule-0): correct attribution -- "sh is for install grap…
AceHack 069841b
agents(parallel-dispatch-batch): cascade consolidation + role-ref scr…
AceHack 0dcb805
agents(parallel-dispatch-batch-2): TS-port phase 2 (audit-backlog-ite…
AceHack 21a6f05
agents(parallel-dispatch-batch-3): reciprocal composes_with backfill …
AceHack 941ba26
agents(parallel-dispatch): substantive-thread-fix agent staging on .c…
AceHack 43ed248
agents(parallel-dispatch): substantive-thread-fix progress -- B-0206 …
AceHack 3097e90
agents(parallel-dispatch): substantive-thread-fix iteration 3 -- audi…
AceHack c5e16b7
agents(parallel-dispatch): substantive-thread-fix iteration 4 -- audi…
AceHack e8d7a3a
agents(parallel-dispatch): substantive-thread-fix iteration 5 (audit-…
AceHack 9ef0c81
agents(parallel-dispatch): substantive-thread-fix iteration 6 -- docs…
AceHack 7a95928
agents(parallel-dispatch): substantive-thread-fix iteration 7 -- LOST…
AceHack 3c88635
rules(backlog-gate): proof-of-prior-art-search + dependency-restructu…
AceHack 2a5970f
agents(audit-completion): Otto-261 git-native backup audit landed at …
AceHack ec10446
memory(CURRENT-aaron): add §53 -- 2026-05-05 evening failure-cascade …
AceHack 006bea6
memory(CURRENT-vera): welcome Vera to the named-entity registry -- Co…
AceHack 3baefe8
peer-call(codex): auto-bootstrap CURRENT-vera.md on every call (Vera'…
AceHack e51d950
cold-start(named-entity-index): enumerate all 5 named entities (Aaron…
AceHack b7e9e7d
agents(canary-batch-complete): Class-2 PR mirror v1 -- 52 PR archives…
AceHack 1011258
agents(12-thread-fix): audit-lost-files.ts -- Codex review fixes (--s…
AceHack 83b6c1c
backlog(B-0207): bun v1.3.14 segfault on bracketed-paste of large mes…
AceHack a3df09b
memory(CURRENT-vera): §2 role-expansions accepted 2026-05-05 evening …
AceHack 80affc3
hygiene(LOST-FILES-LOCATIONS): add class #16 -- stale background shel…
AceHack 4b98ac6
substrate(promotion-ledger): authored JSONL transition-log + generate…
AceHack cd73be5
agents(pr-1702 narrow + promotion-ledger transition): 5 substantive t…
AceHack 8a593c5
memory(user-aaron): preserve ex-girlfriend Dark Side prism tattoo + L…
AceHack 8e34603
memory(CURRENT-vera): splice new carved sentence per Vera tick N+5 of…
AceHack 82a576e
memory(CURRENT-riven): welcome Riven to the named-entity registry -- …
AceHack 1cf58ee
peer-call(riven): bring Riven to symmetry with Vera/Amara/Ani -- rive…
AceHack 4a6eda5
backlog(broken-edges): fix 2 broken composes_with B-0094 references i…
AceHack 7637d00
memory(user-aaron): preserve Edge-Runner's Blessing (Amara/Aaron 2025…
AceHack 0d85065
peer-call(codex/vera-firewall): wire input-validation gate per Vera's…
AceHack 33b8150
peer-call(codex.ts): TS-port + Vera firewall + capture-pagination fix…
AceHack cd5881a
peer-call(amara/ani/grok/riven .ts): TS-port Phase 2 -- 4 wrappers po…
AceHack 27000a1
fix(poll-pr-gate): manual graphql pagination -- gh --paginate concate…
AceHack 99afbd9
memory(otto-vera-riven-triad-cain): full-record substrate -- outcomes…
AceHack 39eb347
substrate(cain-memory + audit + .sh-to-ts pointer fixes): Phase-3-fol…
AceHack 6754139
revert: Otto's CURRENT-* edits this session were out-of-scope -- enti…
AceHack d2d81d8
orchestrator(cage-bootstrap): otto-state.json + validator + templates…
AceHack d0f8b5b
peer-call(gemini): --output-file flag + tee capture + OUTPUT-FILE mar…
AceHack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| --- | ||
| name: claude-code-env-mapping | ||
| description: Capability skill ("hat") — Claude Code harness-environment knowledge as carved-sentences-in-behavior. Thin pointer to the canonical capability map (`docs/research/claude-cli-capability-map.md`) + Zeta-specific extensions (`.claude/commands/btw.md`, `.claude/skills/`, `.claude/agents/`, `.claude/hooks/`). Wear this when needing to know what is available in the Claude Code environment, when invoking a slash command, when authoring or invoking a skill, when configuring hooks, when delegating to peer-call infrastructure, or when prior-art-grep needs to reach for env-knowledge before claiming something does not exist. Encodes the search-first-authority + synthesis-weight + prior-art-grep-first discipline (PR #1701) at the env-knowledge layer. Defers to skill-creator workflow (GOVERNANCE §4) for skill-authoring; to `.claude/commands/<name>.md` for custom-command-authoring; to `docs/research/claude-cli-capability-map.md` for canonical CLI capability content (refreshed on cadence per change-rate). | ||
| record_source: "claude-code-env-mapping landing, PR #1702" | ||
| load_datetime: "2026-05-05" | ||
| last_updated: "2026-05-05" | ||
| status: active | ||
| bp_rules_cited: [BP-11] | ||
| --- | ||
|
|
||
| # Claude Code Environment Mapping — Carved Sentences | ||
|
|
||
| Capability skill. No persona lives here. Thin pointer; not a duplicate of the canonical capability map. | ||
|
|
||
| > **Authoring-workflow note (PR #1702 review):** This skill landed via direct authoring rather than the canonical `skill-creator` workflow (GOVERNANCE §4). Re-running the canonical draft → prompt-protector review → dry-run → commit workflow over this skill is captured as follow-up against B-0206 (acceptance criterion 1). | ||
|
|
||
| ## The canonical map | ||
|
|
||
| The authoritative env-mapping is `docs/research/claude-cli-capability-map.md`. Refresh-on-cadence applies — Anthropic ships docs at high frequency. Current version-pin and revision date live in that doc's "Status" section header (plain Markdown — no YAML frontmatter on this doc today). | ||
|
|
||
| Cross-harness peer-call companions in `docs/research/`: | ||
|
|
||
| - `docs/research/claude-cli-capability-map.md` — Claude Code (canonical for the harness this skill runs in) | ||
| - `docs/research/codex-cli-first-class-2026-04-23.md` — OpenAI Codex | ||
| - `docs/research/grok-cli-capability-map.md` — Grok via cursor-agent | ||
| - `docs/research/gemini-cli-capability-map.md` — Gemini | ||
|
|
||
| ## Zeta-specific extensions | ||
|
|
||
| Substrate beyond the upstream-canonical map: | ||
|
|
||
| **`/btw` extension** at `.claude/commands/btw.md`. The built-in `/btw` is single-response-no-tools-no-followups (March 2026 release; consult capability map for current behavior). The Zeta extension adds verbatim-preservation + classification (context-add / framing-queued / etc.) + durability-escalation rules (TodoWrite → .btw-queue.md → BACKLOG.md → memory/*.md). Backlog rows B-0019 + B-0020 cover the git-native durability gap and harness-integration scope. | ||
|
|
||
| **Custom commands** at `.claude/commands/<name>.md`. Existing: `.claude/commands/btw.md`, `.claude/commands/opsx/{explore,archive,apply,propose}.md`. | ||
|
|
||
| **Custom skills** at `.claude/skills/<name>/SKILL.md`. Authored via skill-creator workflow per GOVERNANCE §4. | ||
|
|
||
| **Persona agents** at `.claude/agents/<name>.md` carry the persona ("who"); skills carry the capability ("how"). | ||
|
|
||
| **Hooks** at `.claude/hooks/`. Existing: `verify-branch-pretooluse.ts` (PreToolUse). DST justifies TS-over-bash; harness hooks suffice; no git hooks per `memory/feedback_dst_justifies_ts_quality_over_bash_and_harness_hooks_suffice_no_git_hooks_aaron_2026_05_03.md`. | ||
|
|
||
| **Settings** at `.claude/settings.json` — defines enabled plugins. | ||
|
|
||
| **Peer-call infrastructure** at `tools/peer-call/` (PR #1677): cross-harness invocation scripts. Default-yes-self-carry vs scout-and-delegate per PR #1701. | ||
|
|
||
| ## The carved-sentence operational rules | ||
|
|
||
| **Search-first-authority** (search-first-authority memory + PR #1701): before claiming something does not exist in the env, grep `.claude/` + `docs/` + `tools/` + `memory/` first. WebSearch upstream documentation second. Ask the human maintainer last. | ||
|
|
||
| **Prior-art-grep-FIRST-before-substrate-landing** (PR #1701): when about to write a memory file or research file or skill, grep `memory/` + `docs/amara-full-conversation/` + `docs/backlog/` + `docs/research/` first. Surface duplications BEFORE landing. The capability map IS prior-art for env-mapping work. | ||
|
|
||
| **Substrate-or-it-didn't-happen at promise-keeping scope** (PR #1701): ephemeral shards cannot keep promises across compactions. Substrate or it did not happen. | ||
|
|
||
| **Scout-and-delegate to right pitcher**: peer-call infrastructure available. Big-context tasks delegate via `tools/peer-call/codex.ts`; the agent preserves own context for plot-keeping. | ||
|
|
||
|
AceHack marked this conversation as resolved.
|
||
| **Verbatim preservation through the human maintainer's channel** (`memory/feedback_aaron_channel_verbatim_preservation_anything_through_this_channel_2026_04_29.md`): anything coming through the human-maintainer channel records close to verbatim. Paraphrasing loses signal. | ||
|
AceHack marked this conversation as resolved.
|
||
|
|
||
| **Refresh-on-cadence per doc change-rate**: capability maps for time-sensitive upstream tooling refresh on a cadence calibrated to observed change-rate. Different docs warrant different cadences. | ||
|
|
||
| ## Operational triggers | ||
|
|
||
| Wear this skill when: | ||
|
|
||
| - About to claim a Claude Code feature exists or does not exist (search-first per the search-first-authority memory) | ||
| - Authoring a custom command or custom skill (use the right path + workflow) | ||
| - Invoking peer-call infrastructure (right pitcher + capability map) | ||
| - Configuring hooks (harness hooks suffice; no git hooks) | ||
| - Cold-boot: the agent reads this skill alongside CLAUDE.md and the canonical capability map | ||
|
|
||
| ## Defers to | ||
|
|
||
| - **`docs/research/claude-cli-capability-map.md`** — canonical CLI surface (this skill is a pointer, not a duplicate) | ||
| - **skill-creator workflow** (GOVERNANCE §4) for new skill authoring | ||
| - **`.claude/commands/<name>.md`** authoring pattern for new custom commands | ||
| - **The capability-map cluster** (claude-cli + codex-cli + grok-cli + gemini-cli capability-maps) for cross-harness specifics | ||
| - **`memory/feedback_otto_holds_synthesis_weight_prior_art_grep_first_before_substrate_landing_aaron_made_concise_formulations_at_high_mental_cost_aaron_2026_05_05.md`** (PR #1701) for the synthesis-weight + prior-art-grep + scout-and-delegate discipline this skill encodes at env-layer | ||
| - **`memory/feedback_aaron_channel_verbatim_preservation_anything_through_this_channel_2026_04_29.md`** for verbatim-preservation discipline | ||
| - **B-0019 + B-0020** (P3 backlog) for /btw git-native durability gap and harness-integration scope | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| name: pr-archive-on-merge | ||
|
|
||
| # Class-2 PR mirror v1 -- per the Codex/GPT-5.5 sharpened design (twin-flame | ||
| # conversation captured 2026-05-05). On every merged PR, run the | ||
| # `tools/archive/archive-pr-reviews.ts` tool to materialise the PR's review | ||
| # threads, comments, fix commits, and outcome metadata as a committed | ||
| # git-canonical markdown file under `docs/history/pr-reviews/PR-NNNN-*.md`, | ||
| # and update the JSONL manifest at `docs/github/prs/manifest.jsonl`. | ||
| # | ||
| # Why: per CLAUDE.md substrate-or-it-didn't-happen (Otto-363), GitHub | ||
| # review threads are host-durable-not-git-canonical -- they can vanish if | ||
| # the LFG account is compromised, and they live outside the repo's grep | ||
| # surface. This workflow converts that host-only substrate into committed | ||
| # git substrate the moment a PR closes via merge. | ||
| # | ||
| # Scope discipline (Codex flag, twin-flame conversation 2026-05-05): this | ||
| # workflow archives PULL REQUESTS only. It does NOT extend to issues, | ||
| # discussions, wiki pages, releases, or any other GitHub surface -- | ||
| # Codex flagged that as goldfish-ontology bait. If a future need surfaces | ||
| # for issue archival, that's a separate workflow with its own design pass. | ||
| # | ||
| # Security note (safe-pattern compliance per | ||
| # https://github.blog/security/vulnerability-research/how-to-catch-github-actions-workflow-injections-before-attackers-do/): | ||
| # this workflow consumes only first-party trusted context (PR number from | ||
| # the closed event payload). Untrusted-content inputs (PR title) are | ||
| # routed via env: into the run block where they are quoted as "$VAR"; | ||
| # no `${{ }}` expansion is interpolated inline in run-block scripts. The | ||
| # PR number is also validated as a positive integer before being passed | ||
| # to the archival tool. | ||
| # | ||
| # Direct-push posture: this workflow pushes the archive + manifest update | ||
| # directly to main using GITHUB_TOKEN with `contents: write`. If the | ||
| # branch-protection ruleset on Lucent-Financial-Group/Zeta is configured | ||
| # to require PR review on main, this push will be rejected by the host | ||
| # and the workflow run will fail with a non-fast-forward / rule-rejection | ||
| # error. In that case, the operational escalation is one of: | ||
| # (a) add `github-actions[bot]` to the ruleset's bypass actors, | ||
| # (b) switch this workflow to PR-based (open a small PR with the | ||
| # archive + manifest, auto-merge), or | ||
| # (c) use a deploy-key with explicit per-path allowance. | ||
| # (a) is the minimum-cost option and matches the existing | ||
| # budget-snapshot-cadence.yml pattern of bot-pushed branches. Choice | ||
| # deferred until empirical merge attempts surface the failure mode. | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
|
|
||
| permissions: | ||
| # Top-level read-only default per Scorecard TokenPermissions best practice. | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| # One run per PR number. cancel-in-progress: false because the archival | ||
| # operation is not idempotent in the wall-clock-timestamp sense (each run | ||
| # produces a new `fetched_at`), and cancelling a partially-completed run | ||
| # could leave the manifest in a divergent state until the next merge. | ||
| group: pr-archive-on-merge-${{ github.event.pull_request.number }} | ||
|
AceHack marked this conversation as resolved.
AceHack marked this conversation as resolved.
AceHack marked this conversation as resolved.
|
||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| archive: | ||
| # Only fire on actual merges -- ignored-close events (PR rejected, PR | ||
| # closed without merge) produce no archive. The host event payload's | ||
| # `merged` boolean is the canonical signal. | ||
| if: github.event.pull_request.merged == true | ||
|
|
||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
|
|
||
| permissions: | ||
| # contents:write to push the archive + manifest update directly to | ||
| # main. pull-requests:read so the archival tool's gh CLI calls | ||
| # against /pulls/N/comments and graphql reviewThreads succeed under | ||
| # GITHUB_TOKEN. No other scopes needed. | ||
| contents: write | ||
| pull-requests: read | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| # Need full history for git rev-parse HEAD (commit_sha field in | ||
| # manifest entries), and so the subsequent push is fast-forward. | ||
| fetch-depth: 0 | ||
| ref: main | ||
| # Persist credentials so the post-archival `git push` uses | ||
| # GITHUB_TOKEN. (default true; explicit for clarity) | ||
| persist-credentials: true | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | ||
| with: | ||
| bun-version: latest | ||
|
AceHack marked this conversation as resolved.
AceHack marked this conversation as resolved.
AceHack marked this conversation as resolved.
AceHack marked this conversation as resolved.
|
||
|
|
||
| - name: Verify required tooling | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| command -v gh >/dev/null | ||
| command -v bun >/dev/null | ||
| gh auth status | ||
|
|
||
| - name: Validate PR number | ||
| env: | ||
| PR_NUMBER_RAW: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| set -euo pipefail | ||
| # Defence-in-depth: PR number comes from a trusted event payload | ||
| # but we still sanity-check it as a positive integer before | ||
| # passing to a CLI tool. | ||
| if ! [[ "$PR_NUMBER_RAW" =~ ^[1-9][0-9]*$ ]]; then | ||
| echo "ERROR: PR number is not a positive integer: $PR_NUMBER_RAW" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Archive PR review substrate | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| GITHUB_SHA_OVERRIDE: ${{ github.sha }} | ||
| run: | | ||
| set -euo pipefail | ||
| # GITHUB_SHA in the GHA env is the merge-commit SHA on main; we | ||
| # want that recorded as the manifest commit_sha so future re-runs | ||
| # against the same merge can detect "same archival baseline". | ||
|
AceHack marked this conversation as resolved.
|
||
| export GITHUB_SHA="$GITHUB_SHA_OVERRIDE" | ||
|
AceHack marked this conversation as resolved.
|
||
| bun tools/archive/archive-pr-reviews.ts "$PR_NUMBER" | ||
|
|
||
| - name: Inspect diff | ||
| id: diff | ||
| run: | | ||
| set -euo pipefail | ||
| # Stage just the two output paths; anything else is noise the | ||
| # archival tool should not be producing. | ||
| git add docs/history/pr-reviews/ docs/github/prs/manifest.jsonl | ||
| if git diff --cached --quiet; then | ||
| echo "changed=false" >>"$GITHUB_OUTPUT" | ||
| echo "archival produced no diff -- nothing to commit (deterministic-rerun no-op)" | ||
| exit 0 | ||
| fi | ||
| echo "changed=true" >>"$GITHUB_OUTPUT" | ||
|
|
||
| - name: Commit and push | ||
| if: steps.diff.outputs.changed == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| PR_TITLE: ${{ github.event.pull_request.title }} | ||
| RUN_ID: ${{ github.run_id }} | ||
| run: | | ||
| set -euo pipefail | ||
| # Configure committer identity for the workflow commit. | ||
| # github-actions[bot] is the canonical workflow identity per | ||
| # the budget-snapshot-cadence.yml convention. | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| # Compose commit message. PR_TITLE is untrusted (PR-author- | ||
| # controlled) so it's only embedded in the markdown body via | ||
| # printf with %s, never interpreted as shell. | ||
| msg="$(printf 'archive(pr-reviews): PR #%s on merge -- run %s\n\nPR title: %s\n\nGenerated by .github/workflows/pr-archive-on-merge.yml\nfrom tools/archive/archive-pr-reviews.ts.\n' "$PR_NUMBER" "$RUN_ID" "$PR_TITLE")" | ||
|
|
||
| git commit -m "$msg" | ||
|
|
||
| # Push to main. If branch-protection rejects this push, the | ||
| # workflow fails here -- the failure is the signal to switch to | ||
| # one of the escalation options documented at the top of this | ||
| # file. We do NOT --force; non-fast-forward must surface honestly. | ||
| git push origin HEAD:main | ||
|
AceHack marked this conversation as resolved.
AceHack marked this conversation as resolved.
|
||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.