Skip to content

feat: max-context config + active agent-onboarding system (onto rebuild)#224

Open
HeadyMe wants to merge 2 commits into
rebuildfrom
claude/code-context-rebuild-optimize-gfl0f4
Open

feat: max-context config + active agent-onboarding system (onto rebuild)#224
HeadyMe wants to merge 2 commits into
rebuildfrom
claude/code-context-rebuild-optimize-gfl0f4

Conversation

@HeadyMe

@HeadyMe HeadyMe commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

Two layers onto rebuild, both merged into the existing config (pnpm permissions + heady-rules/skeleton-guard hooks preserved verbatim):

1. Max-context Claude Code config

  • autoCompactWindow: 1000000 + env.ANTHROPIC_BETAS=context-1m-2025-08-07 (full 1M window before summarization), token-budget env (CLAUDE_CODE_MAX_OUTPUT_TOKENS/MAX_THINKING_TOKENS/MAX_MCP_OUTPUT_TOKENS), effortLevel: xhigh, always-thinking, file checkpointing, 90-day retention.
  • Secret-deny Read rules (.env*, .dev.vars, *.pem, id_rsa*, *.key, secrets/**); enableAllProjectMcpServers.

2. Active agent-onboarding system

The point: any agent (Claude, Cursor, Copilot, …) entering the repo is oriented to one obvious front door, and the environment enforces it stays wired — built active, per Heady being an always-on projection system, not a passive doc.

  • START_HERE.md — the single front door (what's going on + exactly what to do), routing to AGENTS.md (rules) and CLAUDE_MEMORY.md (current state).
  • CLAUDE.md / AGENTS.md / README.md all route agents to START_HERE.md.
  • AGENTS.md deps: bump express-rate-limit from 8.2.1 to 8.3.1 #12 — "Default to ACTIVE, never passive": Heady is a projection system; artifacts react/emit/stay current rather than sit inert.
  • SessionStart hook is now active: reads the live @heady/awareness snapshot (.data/awareness/context.json) and fires a non-blocking heady-awareness react (trigger=agent-session-start) to register the session as a durable event — degrading gracefully when the workspace isn't installed.
  • tooling/enforcers/agent-onboarding.mjs — fail-closed CI gate (new governance step): asserts START_HERE.md exists, every entry point links it, required spec files exist, and the .claude config is sound (settings.json parses; hooks exist + parse via node --check + carry the brand header; the SessionStart hook emits the documented contract). Validation, not a token-scan (the .claude tree legitimately names forbidden tokens).
  • node:test (6 cases) + the enforcer self-tests step fixed to a glob so every *.test.mjs actually runs.

Verification (ran the repo's own gates)

  • 20/20 enforcer unit tests pass (rules 9 + autocontext 5 + agent-onboarding 6).
  • Planted-fault proof: unlinking the front door from CLAUDE.md makes the gate exit 2 with entry-point-unlinked; restoring it returns to exit 0.
  • SessionStart hook emits a valid SessionStart contract and degrades gracefully when @heady/awareness deps aren't installed.
  • agent-onboarding.mjs scanned clean against the localhost / glass-box / secret rule sets. All new files are authored to AGENTS.md (ESM, HEADY_BRAND header, no console/localhost/placeholders, error-handled).

Co-Authored-By: Claude Opus 4.8 (1M context)

🤖 Generated with Claude Code

https://claude.ai/code/session_016WqBXQGJkjhG9RdAFiL2MZ

HeadyConnection and others added 2 commits June 19, 2026 02:22
Layer maximum-context Claude Code settings onto the rebuild .claude config,
merged with the existing config (pnpm permissions + heady-rules and
skeleton-guard PreToolUse hooks preserved verbatim).

- autoCompactWindow=1000000 + ANTHROPIC_BETAS=context-1m-2025-08-07: use the
  full 1M-token window before summarization
- token-budget env (output/thinking/MCP) + effortLevel=xhigh, always-thinking
- secret-deny Read rules (.env, .dev.vars, *.pem, id_rsa, *.key, secrets/**)
  matching the AGENTS.md secret-handling rule
- enableAllProjectMcpServers for the Heady MCP toolchain
- new SessionStart hook (.claude/hooks/heady-session-context.mjs): injects live
  branch/HEAD + source-of-truth file presence so sessions start grounded and
  read AGENTS.md/CLAUDE_MEMORY.md before authoring

Authored to AGENTS.md conventions (ESM, HEADY_BRAND header, no console/localhost/
placeholders, error-handled); verified clean against the governance enforcer
rule sets. .claude/ is exempt from the CI gate per ENF-anti-shortcut.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WqBXQGJkjhG9RdAFiL2MZ
Make agent onboarding a live participant in Heady's always-on projection system,
not a passive doc. Any agent (Claude, Cursor, Copilot, ...) entering the repo is
oriented to one obvious front door, and the environment enforces that it stays so.

- START_HERE.md: the single, obvious agent front door (what's going on + what to do)
- CLAUDE.md / AGENTS.md / README.md route every agent to START_HERE.md
- AGENTS.md #12 'Default to ACTIVE, never passive': Heady is a projection system,
  so artifacts react/emit/stay current rather than sit inert
- SessionStart hook is now ACTIVE: reads the live @heady/awareness snapshot
  (.data/awareness/context.json) and fires a non-blocking heady-awareness react
  (trigger=agent-session-start), degrading gracefully when the workspace is uninstalled
- tooling/enforcers/agent-onboarding.mjs: fail-closed CI gate — START_HERE present,
  every entry point links it, required spec files exist, .claude config sound
  (settings.json parses, hooks exist + parse + brand header, SessionStart contract)
- node:test (6 cases, all pure helpers) + wired into the governance CI job
- fix enforcer self-tests invocation to a glob so every *.test.mjs actually runs

Verified: 20/20 enforcer tests pass; gate exits 2 on a broken front-door link and
0 when wired; hook emits a valid SessionStart contract. agent-onboarding.mjs scanned
clean against the localhost/glass-box/secret rule sets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WqBXQGJkjhG9RdAFiL2MZ
@HeadyMe HeadyMe changed the title feat(claude): max-context config + SessionStart grounding hook (onto rebuild) feat: max-context config + active agent-onboarding system (onto rebuild) Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants