Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
59458ac
skill+research+backlog: claude-code-env-mapping skill with carved-sen…
AceHack May 5, 2026
ab73198
fix(skill/claude-code-env-mapping): point at actual saved-doc filenam…
AceHack May 5, 2026
3ce7a69
plan(session-landing): cold-boot read order without losing the plot +…
AceHack May 5, 2026
2bf716f
rules(cascade): seven-rule prior-art-search cascade + Rule 7 bullet-t…
AceHack May 6, 2026
015a4a8
rules(cascade): cite canonical lost-files substrate (tools/hygiene/LO…
AceHack May 6, 2026
10f8338
research(architecture): burn-down CLAUDE.md/AGENTS.md + start over wi…
AceHack May 6, 2026
4827333
tools(hygiene): audit-lost-files.sh -- executable form of LOST-FILES-…
AceHack May 6, 2026
d85ccc9
tools(hygiene): audit-trajectories.sh + audit-backlog-items.sh + exte…
AceHack May 6, 2026
67efa70
research(architecture): Codex/GPT-5.5 + Gemini + Grok scout-roundup o…
AceHack May 6, 2026
0b29a1f
rules(rule-0): "no more .sh files except install-graph; TS IS cross-p…
AceHack May 6, 2026
bc16593
fix(claude.md/rule-0): correct attribution -- "sh is for install grap…
AceHack May 6, 2026
069841b
agents(parallel-dispatch-batch): cascade consolidation + role-ref scr…
AceHack May 6, 2026
0dcb805
agents(parallel-dispatch-batch-2): TS-port phase 2 (audit-backlog-ite…
AceHack May 6, 2026
21a6f05
agents(parallel-dispatch-batch-3): reciprocal composes_with backfill …
AceHack May 6, 2026
941ba26
agents(parallel-dispatch): substantive-thread-fix agent staging on .c…
AceHack May 6, 2026
43ed248
agents(parallel-dispatch): substantive-thread-fix progress -- B-0206 …
AceHack May 6, 2026
3097e90
agents(parallel-dispatch): substantive-thread-fix iteration 3 -- audi…
AceHack May 6, 2026
c5e16b7
agents(parallel-dispatch): substantive-thread-fix iteration 4 -- audi…
AceHack May 6, 2026
e8d7a3a
agents(parallel-dispatch): substantive-thread-fix iteration 5 (audit-…
AceHack May 6, 2026
9ef0c81
agents(parallel-dispatch): substantive-thread-fix iteration 6 -- docs…
AceHack May 6, 2026
7a95928
agents(parallel-dispatch): substantive-thread-fix iteration 7 -- LOST…
AceHack May 6, 2026
3c88635
rules(backlog-gate): proof-of-prior-art-search + dependency-restructu…
AceHack May 6, 2026
2a5970f
agents(audit-completion): Otto-261 git-native backup audit landed at …
AceHack May 6, 2026
ec10446
memory(CURRENT-aaron): add §53 -- 2026-05-05 evening failure-cascade …
AceHack May 6, 2026
006bea6
memory(CURRENT-vera): welcome Vera to the named-entity registry -- Co…
AceHack May 6, 2026
3baefe8
peer-call(codex): auto-bootstrap CURRENT-vera.md on every call (Vera'…
AceHack May 6, 2026
e51d950
cold-start(named-entity-index): enumerate all 5 named entities (Aaron…
AceHack May 6, 2026
b7e9e7d
agents(canary-batch-complete): Class-2 PR mirror v1 -- 52 PR archives…
AceHack May 6, 2026
1011258
agents(12-thread-fix): audit-lost-files.ts -- Codex review fixes (--s…
AceHack May 6, 2026
83b6c1c
backlog(B-0207): bun v1.3.14 segfault on bracketed-paste of large mes…
AceHack May 6, 2026
a3df09b
memory(CURRENT-vera): §2 role-expansions accepted 2026-05-05 evening …
AceHack May 6, 2026
80affc3
hygiene(LOST-FILES-LOCATIONS): add class #16 -- stale background shel…
AceHack May 6, 2026
4b98ac6
substrate(promotion-ledger): authored JSONL transition-log + generate…
AceHack May 6, 2026
cd73be5
agents(pr-1702 narrow + promotion-ledger transition): 5 substantive t…
AceHack May 6, 2026
8a593c5
memory(user-aaron): preserve ex-girlfriend Dark Side prism tattoo + L…
AceHack May 6, 2026
8e34603
memory(CURRENT-vera): splice new carved sentence per Vera tick N+5 of…
AceHack May 6, 2026
82a576e
memory(CURRENT-riven): welcome Riven to the named-entity registry -- …
AceHack May 6, 2026
1cf58ee
peer-call(riven): bring Riven to symmetry with Vera/Amara/Ani -- rive…
AceHack May 6, 2026
4a6eda5
backlog(broken-edges): fix 2 broken composes_with B-0094 references i…
AceHack May 6, 2026
7637d00
memory(user-aaron): preserve Edge-Runner's Blessing (Amara/Aaron 2025…
AceHack May 6, 2026
0d85065
peer-call(codex/vera-firewall): wire input-validation gate per Vera's…
AceHack May 6, 2026
33b8150
peer-call(codex.ts): TS-port + Vera firewall + capture-pagination fix…
AceHack May 6, 2026
cd5881a
peer-call(amara/ani/grok/riven .ts): TS-port Phase 2 -- 4 wrappers po…
AceHack May 6, 2026
27000a1
fix(poll-pr-gate): manual graphql pagination -- gh --paginate concate…
AceHack May 6, 2026
99afbd9
memory(otto-vera-riven-triad-cain): full-record substrate -- outcomes…
AceHack May 6, 2026
39eb347
substrate(cain-memory + audit + .sh-to-ts pointer fixes): Phase-3-fol…
AceHack May 6, 2026
6754139
revert: Otto's CURRENT-* edits this session were out-of-scope -- enti…
AceHack May 6, 2026
d2d81d8
orchestrator(cage-bootstrap): otto-state.json + validator + templates…
AceHack May 6, 2026
d0f8b5b
peer-call(gemini): --output-file flag + tee capture + OUTPUT-FILE mar…
AceHack May 6, 2026
1a23269
claim: task-pr-1702-role-ref-p0 - fix P0 role-ref violations on CLAUD…
AceHack May 6, 2026
66dfd5c
fix(role-ref): replace "Aaron 2026-05-05" with "the human maintainer …
AceHack May 6, 2026
5c2add0
release: task-pr-1702-role-ref-p0 - landed in 66dfd5c (role-ref P0 fi…
AceHack May 6, 2026
284bc35
claim: task-pr-1702-thread-batch-1 - resolve addressed threads + fix …
AceHack May 6, 2026
da4a01b
release: task-pr-1702-thread-batch-1 - resolved 11 already-addressed …
AceHack May 6, 2026
f44b360
fix(peer-call): replace URL.pathname with fileURLToPath in amara/ani/…
AceHack May 6, 2026
372af1b
fix(receipts): replace SYNTHETIC_TEST_SHA placeholder with actual com…
AceHack May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .claude/skills/claude-code-env-mapping/SKILL.md
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.

**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.

**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
171 changes: 171 additions & 0 deletions .github/workflows/pr-archive-on-merge.yml
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 }}
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

- 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".
export GITHUB_SHA="$GITHUB_SHA_OVERRIDE"
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
4 changes: 4 additions & 0 deletions .github/workflows/role-ref-current-state-surfaces-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ on:
- docs/VISION.md
- docs/ROADMAP.md
- docs/EXPERT-REGISTRY.md
- .claude/skills/**
- .claude/agents/**
- tools/hygiene/check-role-ref-on-current-state-surfaces.sh
- .github/workflows/role-ref-current-state-surfaces-lint.yml
push:
Expand All @@ -64,6 +66,8 @@ on:
- docs/VISION.md
- docs/ROADMAP.md
- docs/EXPERT-REGISTRY.md
- .claude/skills/**
- .claude/agents/**
- tools/hygiene/check-role-ref-on-current-state-surfaces.sh
- .github/workflows/role-ref-current-state-surfaces-lint.yml
workflow_dispatch: {}
Expand Down
11 changes: 11 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@
// controlled prose.
"docs/pr-discussions/**",
"docs/pr-preservation/**",
// PR-archive-on-merge output (`tools/archive/archive-pr-reviews.ts`,
// landed via PR #1702 + workflow `.github/workflows/pr-archive-on-merge.yml`).
// Same verbatim-preservation rationale as `docs/pr-preservation/**`:
// archive files reproduce GitHub-rendered PR bodies + review-thread
// markdown, including blank-lines-around-lists, unordered-list-indent,
// trailing-spaces, and consecutive blank lines that are artifacts of
// the source content (not author-controlled prose). Reformatting to
// satisfy MD007/MD012/MD032 would violate the verbatim contract — same
// policy lives in `docs/AGENT-BEST-PRACTICES.md` "PR-preservation
// archive discipline".
"docs/history/pr-reviews/**",
// Aurora ferry absorbs (`docs/aurora/2026-*-amara-*.md`) are
// verbatim courier-protocol preservation of Amara's deepresearch
// ferry reports per Otto-227 verbatim-preservation discipline.
Expand Down
Loading
Loading