feat: max-context config + active agent-onboarding system (onto rebuild)#224
Open
HeadyMe wants to merge 2 commits into
Open
feat: max-context config + active agent-onboarding system (onto rebuild)#224HeadyMe wants to merge 2 commits into
HeadyMe wants to merge 2 commits into
Conversation
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Two layers onto
rebuild, both merged into the existing config (pnpm permissions +heady-rules/skeleton-guardhooks 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.Readrules (.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 toAGENTS.md(rules) andCLAUDE_MEMORY.md(current state).CLAUDE.md/AGENTS.md/README.mdall route agents toSTART_HERE.md.AGENTS.mddeps: 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.@heady/awarenesssnapshot (.data/awareness/context.json) and fires a non-blockingheady-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 (newgovernancestep): assertsSTART_HERE.mdexists, every entry point links it, required spec files exist, and the.claudeconfig is sound (settings.json parses; hooks exist + parse vianode --check+ carry the brand header; the SessionStart hook emits the documented contract). Validation, not a token-scan (the.claudetree legitimately names forbidden tokens).node:test(6 cases) + theenforcer self-testsstep fixed to a glob so every*.test.mjsactually runs.Verification (ran the repo's own gates)
rules9 +autocontext5 +agent-onboarding6).CLAUDE.mdmakes the gate exit 2 withentry-point-unlinked; restoring it returns to exit 0.SessionStartcontract and degrades gracefully when@heady/awarenessdeps aren't installed.agent-onboarding.mjsscanned clean against thelocalhost/ glass-box / secret rule sets. All new files are authored to AGENTS.md (ESM,HEADY_BRANDheader, 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