Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 5 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ and the user-level MCP baseline.

Read these for current state:

- [`docs/restart-handoff-2026-08-08.md`](./docs/restart-handoff-2026-08-08.md) — dated restart snapshot for a fresh agent: verified Git and host state, updater evidence, remaining work, scope boundaries, and first commands. It routes to the authorities below and does not replace them
- [`docs/ai-tool-config-ownership.md`](./docs/ai-tool-config-ownership.md) — **the ownership boundary across every AI tool**: which of the four mechanisms deploys each path, the global-user config tree, the project-scope model, the established managed/root tier, the git-identity registration gap, and the leftover-workflow register. Read before editing any agent config file
- [`docs/project-conventions.md`](./docs/project-conventions.md) — compatibility guide for downstream projects (link this from a project's own `AGENTS.md`)
- [`docs/secrets.md`](./docs/secrets.md) — secret-handling policy (1Password)
- [`docs/1password-service-account.md`](./docs/1password-service-account.md) — **live** operator runbook for the `mcp-gui-readonly` service account: the non-interactive `op` auth plane that GUI/headless MCP wrappers (brave-search, firecrawl, runpod) are coded to use. **Provisioning state 2026-07-27: LIVE** — service account created (read-only on `Dev`), keychain item present and intact, `ng-doctor mcp` 6/6. Read the token-storage box before rotating: `security add-generic-password -w` truncates at 128 bytes and cannot store an SA token; use `scripts/store-op-sa-token.sh`. Indexed here directly because it was previously reachable only through the two draft platform docs below, which this file labels "not live provisioning policy" — the runbook that would have caught the failure was two hops behind a "not live" sign
- [`docs/secret-records.md`](./docs/secret-records.md) — credential-record register (identifier, owner, consumer, scope, rotation, stop rules; no secret values). The SA token's record is tracked here with status `planned`
- [`docs/secret-records.md`](./docs/secret-records.md) — credential-record register (identifier, owner, consumer, scope, rotation, stop rules; no secret values). The SA token's current record status is `active`; the dated 2026-05-28 transition entry remains historical evidence of its earlier `planned` state
- [`docs/infisical-cli.md`](./docs/infisical-cli.md) — Infisical CLI baseline for project runtime secret workflows; Homebrew core install/update path and syntax guardrails
- [`docs/homebrew-tap-trust.md`](./docs/homebrew-tap-trust.md) — Homebrew 6 third-party tap trust boundary; item-level trust policy, operator review workflow, and fail-closed updater behavior
- [`docs/1password-platform-architecture.md`](./docs/1password-platform-architecture.md) — draft target architecture for 1Password developer-platform adoption; not live provisioning policy
Expand Down Expand Up @@ -209,12 +210,9 @@ promote it in `collect_notices` instead.
`ProgramArguments` point into this repo. It has run every 60s since 2026-04-24,
writing daily JSONL to `~/.local/state/system-config/mcp-usage-collector/` and
logs to `~/Library/Logs/system-config/`. **There is no retention policy and the
state directory has grown to 6.3 GB across 95 daily JSONL files** (`du -shk`,
2026-07-27; this figure supersedes the "roughly 13 GB" previously stated here and
the "roughly 6.7 GB" previously stated in the ownership map — the same directory
was carrying two different numbers). It grows continuously; treat it as a dated
reading, not a constant. The plist itself has no chezmoi source and no drift
check. See
state directory has grown to 7.3 GB across 107 daily JSONL files** (`du -sk` =
7,603,080 KiB, 2026-08-08). It grows continuously; treat this as a dated reading,
not a constant. The plist itself has no chezmoi source and no drift check. See
[`docs/ai-tool-config-ownership.md`](./docs/ai-tool-config-ownership.md) §1.1.

## Source of truth
Expand Down
14 changes: 7 additions & 7 deletions docs/ai-tool-config-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: AI Tool Configuration Ownership Map
category: reference
component: ai_tool_config_ownership
status: active
version: 1.3.1
last_updated: 2026-08-01
version: 1.3.2
last_updated: 2026-08-08
tags: [claude, codex, cursor, devin, copilot, gemini, aider, mcp, chezmoi, ownership, managed-settings, git-identity]
priority: high
---
Expand Down Expand Up @@ -96,11 +96,11 @@ currently overstate.
A fifth mechanism exists and is undocumented elsewhere in this repo:
**`scripts/mcp-usage-collector.sh`** writes
`~/Library/LaunchAgents/com.jefahnierocks.mcp-usage-collector.plist`, whose
`ProgramArguments` point into this repo, and has produced **6.3 GB** of MCP
telemetry across **95 daily JSONL files** under
`ProgramArguments` point into this repo, and has produced **7.3 GB** of MCP
telemetry across **107 daily JSONL files** under
`~/.local/state/system-config/mcp-usage-collector/` since 2026-04-24 —
re-measured by `du -shk` on 2026-07-27 **[V]**. It is repo-deployed by mechanism,
unowned by documentation. See §7.
re-measured as **7.3 GB** (`du -sk` = 7,603,080 KiB) on 2026-08-08
**[V]**. It is repo-deployed by mechanism, unowned by documentation. See §7.

> Earlier revisions of this document carried **two different figures for the same
> directory** — "roughly 6.7 GB" here and "~13 GB" in §2.3 — and `AGENTS.md`
Expand Down Expand Up @@ -229,7 +229,7 @@ tooling prunes **[A]**:
| --- | --- | --- |
| `~/.codex/` (`logs_2.sqlite` 1.0 GB + WAL 386 MB, 1741 session transcripts) | ~7.3 GB | runtime |
| `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb` (+ backup) | ~4.1 GB | runtime, secret-bearing |
| `~/.local/state/system-config/mcp-usage-collector/` (95 daily JSONL) | 6.3 GB **[V, 2026-07-27]** | runtime, repo-produced |
| `~/.local/state/system-config/mcp-usage-collector/` (107 daily JSONL) | 7.3 GB **[V, 2026-08-08]** | runtime, repo-produced |
| `~/.local/share/claude/versions/` (4 retained binaries) | ~1.0 GB | runtime |
| `~/Library/Caches/claude-cli-nodejs/` | 346 MB | runtime |

Expand Down
172 changes: 172 additions & 0 deletions docs/restart-handoff-2026-08-08.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
---
title: "Restart Handoff — 2026-08-08"
category: handoff
component: workstation
status: active
version: 1.0.0
last_updated: 2026-08-08
tags: [restart, handoff, system-update, git, identity, mcp, vscode]
priority: high
---

# Restart Handoff — 2026-08-08

This is a dated, evidence-backed orientation snapshot for the next agent after a
workstation restart. It records direct local and GitHub observations from
2026-08-08 in America/Anchorage. It does not supersede `AGENTS.md` or any
task-specific authority linked there. Re-run the commands below before acting on
mutable state.

## Start here

1. Read [`../AGENTS.md`](../AGENTS.md) in full.
2. Read this handoff and establish exact Git/PR state with the commands below.
3. Follow the task-specific authority from `AGENTS.md`; do not treat this dated
snapshot as permission to modify another repository or operator-owned state.

```bash
pwd
git status -sb
git log -3 --show-signature --oneline
git rev-list --left-right --count HEAD...@{upstream}
gh pr view 61 --json number,title,state,isDraft,url,headRefName,baseRefName,statusCheckRollup
```

## Durable Git and publication state

Verified at 2026-08-08 09:31 AKDT, before this handoff document was added:

- Work branch: `agent/system-update-restart-readiness`.
- Draft PR: [#61](https://github.com/jefahnierocks/system-config/pull/61),
targeting `main` from that branch.
- The branch was clean and matched its upstream (`0 0`).
- It was two signed commits ahead of `origin/main`:
- `1ff05e6` — `fix(system-update): report and resolve updates truthfully`
- `33852e4` — `docs: refresh verified host state`
- `origin/main` was `bdec977`; PR #61 was open and its validation jobs had
started. GitHub status is mutable, so re-read it rather than assuming the PR
was merged or its checks remained green.

This handoff and its `AGENTS.md` index entry follow those two commits on the same
branch. The closeout gate is a clean worktree, `HEAD...@{upstream}` equal to
`0 0`, valid signatures, and a successful PR validation check.

## Updater incident and verified repair

Full update run `20260808-080519` completed every step except stable npm globals.
The stable lane passed exact `wrangler@4.120.0` with `--min-release-age 2`; that
release was too new, so npm returned `ETARGET` rather than resolving backward.

The repair keeps the exact inventory target for logs and comparison, but uses
`<package>@latest` as the install spec while the stable cooldown is active. The
install-script identity gate remains strict and owner-scoped. The AI channel
lane is unchanged. The authoritative incident and implementation record is
[`system-update-status-and-resilience-plan.md`](./system-update-status-and-resilience-plan.md)
§§23–24.

Verified evidence:

- Focused updater suite: 156 passed, 0 failed.
- Targeted live update `20260808-092739`: zero failures; Wrangler advanced from
`4.118.0` to eligible `4.119.0`; requested `4.120.0` remained held and was
disclosed by `npm-global-resolved-drift:`.
- Installed readback: `wrangler --version` and `npm ls -g --depth=0 wrangler`
both reported `4.119.0`.
- Full read-only check `20260808-093230`: all steps successful in 36 seconds;
Homebrew current; all three AI channels current with exact platform binaries;
Claude Code and gh extensions current.
- The check inventory still reported Wrangler `4.120.0` and mise-managed uv
`0.12.3` as newer. This is inventory, not proof of a failed update. Re-run
`system-update --check` before deciding either item still needs work.
- Full `scripts/validate-repo.sh`: PASS.
- `chezmoi apply --dry-run --force`: exit 0.

Relevant logs:

```text
~/Library/Logs/system-update/run-20260808-080519.log
~/Library/Logs/system-update/run-20260808-092739.log
~/Library/Logs/system-update/run-20260808-093230.log
```

## Verified host state

- `ng-doctor` before commit closeout reported 71 passed, 3 failed, 20 skipped.
One failure was this repo's then-dirty worktree and should disappear when the
closeout gate is clean. The two identity failures below are external scope.
- The GitHub MCP disable marker exists and containment passes; no managed host
exposes GitHub MCP while it exists.
- The GUI/headless MCP service-account keychain item is present; all six MCP
doctor checks passed. The current secret-record status is `active`.
- The MCP usage collector LaunchAgent is registered, interval-driven, and last
exited 0. Its state directory measured 7,603,080 KiB (7.3 GB) across 107 daily
JSONL files. No retention policy or chezmoi-owned plist source exists.
- No updater process or `system-update.lock` was active during the initial
restart audit. Recheck after restart rather than relying on that dated fact.

## Remaining work with current evidence

### 1. External Git identity drift — do not repair from this repo

`ng-doctor identity` reports 7 passed and 2 failed. The failures overlap across
three real clones:

| Clone path | Verified live fact |
| --- | --- |
| `/Users/verlyn13/Organizations/the-nash-group-github-profile` | Origin uses `github.com`, while the registry expects `github.com-nash-group`; local status already had 3 entries. The doctor prints this same clone as `parent-org/.github` in the remote check and `The-Nash-Group/.github` in the config-drift check. |
| `/Users/verlyn13/Organizations/happy-patterns/apps/happy-patterns-org.github.io` | Clean worktree; origin uses `github.com`, while the registry expects `github.com-happy-patterns`; email/signing/host configuration also differs from the registered lane. |
| `/Users/verlyn13/Organizations/happy-patterns/apps/scopecam` | Clean worktree on `development`; origin uses `github.com`, while the registry expects `github.com-happy-patterns`; email/signing/host configuration also differs from the registered lane. |

The registry gates themselves pass: schema version 1, internal visibility, and
zero unresolved repositories. These clone changes belong to their repositories
and identity owner. Preserve the Nash clone's existing local changes.

### 2. MCP telemetry retention and ownership

The collector grows continuously and has no retention policy. Treat deletion,
compression, LaunchAgent ownership, and migration as unapproved design work
until the operator selects a policy. The ownership authority and full leftover
register are [`ai-tool-config-ownership.md`](./ai-tool-config-ownership.md)
§§1.1, 7, and 8.

### 3. Operator-gated editor and posture work

`ng-doctor` skipped 20 checks rather than proving them complete. Current examples
include the staged VS Code profiles, 12 extension retirement candidates, and
the phased macOS/network posture checks. Use
[`vscode-configuration-plan.md`](./vscode-configuration-plan.md) and
[`security-hardening-implementation-plan.md`](./security-hardening-implementation-plan.md)
as planning authorities; re-verify live state and obtain the named operator
decisions before mutation.

## Do not infer

- A draft PR is not merged authority.
- A successful targeted npm update is not a substitute for re-reading the latest
full check before a future update.
- An `outdated` inventory entry under a release-age policy is not automatically
a defect or permission to bypass the hold.
- Doctor `skipped` means unverified or deferred, not passed.
- External clone drift is evidence, not authorization for cross-repo edits.
- Never expose secret values while validating the MCP service-account plane.

## Fresh-agent restart commands

These are read-only except the validation suite's temporary fixtures:

```bash
cd /Users/verlyn13/Organizations/jefahnierocks/system-config
git status -sb
git fetch --prune origin
git rev-list --left-right --count HEAD...@{upstream}
git log -3 --show-signature --oneline
gh pr view 61 --json state,isDraft,url,statusCheckRollup
system-update --check
ng-doctor
scripts/validate-repo.sh
chezmoi apply --dry-run --force
```

Do not run `chezmoi apply`, merge PR #61, modify the three external clones, or
delete telemetry solely because this handoff exists. Each requires its normal
authority and a current readback.
46 changes: 44 additions & 2 deletions docs/system-update-status-and-resilience-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: "System-Update — Resilience & Status Plan"
category: reference
component: system_update
status: active
version: 1.13.0
last_updated: 2026-07-29
version: 1.15.0
last_updated: 2026-08-08
tags: [system-update, brand, terminal-style, jr-style, resilience, network, status, ux, npm, mise, concerns, homebrew, 1password, architecture, android-studio]
priority: high
---
Expand Down Expand Up @@ -1481,6 +1481,48 @@ CLI invoked daily, "runtime" means every invocation. It also misses long-dwell
compromise — event-stream hid for ~72 days — and a 2-day cooldown delays this
host's own `npm audit fix` by 2 days.

## 23. 2026-08-05 AI-channel check-summary truthfulness

Read-only run `20260805-083114` resolved all three configured dist-tags
successfully and rendered `available 3`. That count was not an update inventory:
Gemini's installed version equalled its target, while Codex and Copilot were the
only mismatches. The summary was counting `ai-cli-channel-ok:`, whose contract is
"the registry lookup and channel health checks succeeded," not "an update is
available."

Check mode now compares each resolved target with the package manifest under the
configured npm prefix and emits one of two additive markers:

- `ai-cli-channel-current:` — installed and target versions are equal.
- `ai-cli-channel-outdated:` — installed is absent or differs from the target.

The result row derives its update count only from the second marker and reports
the current count separately. Update mode retains `ai-cli-channel-ok:` as its
successful-install count, so the correction does not reinterpret update runs or
change channel installation behavior. The test harness reproduces the incident's
one-current/two-outdated shape and requires `2 outdated, current 1`.

## 24. 2026-08-08 stable-global cooldown resolution

Update run `20260808-080519` asked for `wrangler@4.120.0` under the stable
global lane's two-day release-age policy. That release was published on
2026-08-07 and was inside the cooldown, so npm rejected the exact version with
`ETARGET`: an exact ineligible target cannot resolve backward. Wrangler remained
at `4.118.0` and the run ended with one failure.

A read-only reproduction separated the policy from the target shape:

- exact `wrangler@4.120.0` plus `--min-release-age 2` reproduced `ETARGET`;
- `wrangler@latest` with the same gate resolved eligible `4.119.0`, published
2026-08-05, and completed its dry run successfully.

The stable update step now retains the exact `npm outdated` target for log and
post-install comparison, but passes `<package>@latest` to npm whenever a positive
cooldown is active. npm can therefore select the newest eligible release, while
`npm-global-resolved-drift:` still discloses that the inventory requested a newer
version. With no cooldown, the exact inventory target remains the install spec.
The AI channel lane is unchanged.

## Related

- [`docs/brand/terminal-style.md`](./brand/terminal-style.md) — the four-tier brand spec (authority)
Expand Down
Loading
Loading