docs: canonical development flow, HEADY.md, and daily agent context pack#222
Open
HeadyMe wants to merge 12 commits into
Open
docs: canonical development flow, HEADY.md, and daily agent context pack#222HeadyMe wants to merge 12 commits into
HeadyMe wants to merge 12 commits into
Conversation
Make the Heady development flow discoverable and enforced from the boot files, and establish a permanent CLAUDE.md <-> HEADY.md sync so customizing Claude benefits the whole Heady system. - docs/DEVELOPMENT_FLOW.md: authoritative repo roles + branching + promotion; declares HeadySystems/heady-ai as source of truth; supersedes REPO_ROLES.md and REPO_LANDSCAPE.md (both now carry superseded banners). - HEADY.md: Heady-native agent instructions for all agents, with the permanent HEADY.md <-> CLAUDE.md sync rule (section 0). - CLAUDE.md: wired in DEVELOPMENT FLOW + ARTIFACT CREATION CRITERIA sections and the sync rule, so agents are guided to the flow from the entry point. - docs/AGENT_CONTEXT_PACK.md: single daily-fresh bootstrap bundle for any agent. - scripts/refresh-agent-context.mjs: idempotent generator (+ --check CI gate). - .github/workflows/agent-context-refresh.yml: daily regeneration + auto-commit. - .claude/hooks/heady-sync-check.sh + settings.json PostToolUse hook: reminds to propagate CLAUDE.md changes to HEADY.md and regenerate the pack. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Companion to DEVELOPMENT_FLOW.md. Per-repo functionality assessment with keep/verify/archive recommendations based on activity, file counts, and structure. Flags Heady-Main-ddb9351d (redundant duplicate) and headydocs (empty shell) as archive candidates pending deploy-wiring confirmation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Require CLAUDE.md/AGENTS.md stop-notices on every soft-archived repo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Evidence-based audit isolating functional/connected services (37 CF workers, 1 Vercel project, 19 Sentry projects) from legacy/redundant artifacts. Buckets files/services into keep/archive/eliminate with a staged execution plan; destructive stages gated on owner confirmation. S1 (preventive .gitignore for zips/_downloads/binary-docs/dupes) applied — no tracked files removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
…solidate status)
S2: untrack 254 .zip build bundles + _downloads/ scratch (kept locally).
S4: untrack 181 .docx/.pdf binaries (move to object storage out-of-band).
S3: content-hash dedup of (1)/(2) files — removed only byte-identical twins;
kept 21 unique-content files for manual review (no blind deletion).
S5: consolidated scattered status/report dumps into docs/STATUS.md; removed 14
transient root dumps (refs were CSV inventories / regenerating scripts, not
structural deps; none in heady-registry.json) and git-ignored regenerated ones.
Net: 646 files untracked, source code untouched. History bytes remain (purge planned
separately). See docs/SYSTEM_AUDIT_AND_REMEDIATION_PLAN.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Record the Cloudflare worker consolidation proposal (survivors vs retire) and the MCP tooling limitation (no route/delete tools -> elimination needs wrangler/dashboard). Add scripts/history-purge.sh: guarded, dry-run-by-default git history rewrite for S-HIST size reclamation; never auto-executes (requires --execute + explicit env confirm). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
…t duplicates Inspecting worker code (workers_get_worker_code) disproved the naming-based duplicate assumption: heady-intent-router is a live multi-domain site server, not a redundant router. Mark worker elimination as hands-on review only (do not delete on naming evidence); MCP cannot list routes or delete workers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
…ation Audit found live GCP SA keys (real private_key material) tracked at configs/secrets/gen-lang-client-*.json. Untracked via git rm --cached (path already gitignored; local copies retained). Keys remain in history and MUST be rotated in GCP console. Verified design_*.pem and cloudflare-credentials.md are not raw secrets (left tracked). See docs/SYSTEM_AUDIT_AND_REMEDIATION_PLAN.md §8a. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Encode how to calibrate to the user's cognitive state across CLAUDE.md, HEADY.md, and the agent context pack, plus a UserPromptSubmit hook: - Silence is ambiguous (flow/thought-wave, not necessarily a gap) — add energy, don't dam. - Explicit triggers are the only interrupts: probe (okay so/wait/...) -> deep grounded explanation; alarm (wtf/makes no sense) -> full stop, ground-up diagnosis. - Diagnose the root to a comfortable level (depth = comfort, not exhaustiveness). - Grounding/anti-hallucination always: separate verified vs inferred vs guessed. - Name unknowables/immaterial so the user can let them go. - Recommendations are droppable, not deleted: no nagging in the moment; a single well-timed, lightly-cute callback later is welcome. Bound CLAUDE.md <-> HEADY.md per the sync rule; hook wired in .claude/settings.json. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
…based) Correct the flow protocol: a dropped recommendation is kept and repeated later when a CUE makes it relevant again (topic recurs, user exits flow, related blocker, or they ask) — cue-triggered, never time-based nagging. Synced across CLAUDE.md, HEADY.md, the context pack, and the understanding-workflow hook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Strengthen the grounding rule: it's not enough to flag when wrong; confident
teacher-tone can launder an improvised riff into perceived established fact. Require
pre-labeling epistemic status in the moment ('riffing' vs 'grounded/retrieved'). The
user's high trust amplifies the risk, so the labeling duty is greater for a trusted
source. Don't make the user run a 'wait, is that real?' check. Synced across CLAUDE.md,
HEADY.md, context pack, and the understanding-workflow hook.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Correct the just-added rule: labeling serious-vs-riff does NOT have to be in the moment (that would kill the joke). A riff may breathe, but it must never be left ambiguously taken as real — the user must find out at some point (after the fact is fine). Timing flexible, guarantee firm. Synced across CLAUDE.md, HEADY.md, context pack, and the understanding-workflow hook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
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.
Why
The dev flow was defined but not discoverable: it lived in
docs/REPO_ROLES.mdanddocs/REPO_LANDSCAPE.md, which (1) weren't referenced fromCLAUDE.md— the file every agent reads on boot, (2) contradicted each other, and (3) had drifted from the live repos. So no agent was ever guided toward it. This PR wires the flow into the boot files, reconciles the conflict, and makes the whole thing self-maintaining.What changed
Authoritative flow
docs/DEVELOPMENT_FLOW.md— single source of truth for repo roles (source-of-truth / staging / production / product / docs / sandbox), branching model, PR/merge, and promotion. DeclaresHeadySystems/heady-aias the platform source of truth.docs/REPO_ROLES.md+docs/REPO_LANDSCAPE.md— marked SUPERSEDED with banners pointing at the new doc.Two boot files, permanently in sync
HEADY.md(new) — Heady-native instructions governing all Heady agents, mirroringCLAUDE.md. Section 0 is the permanent sync rule: any shared-convention change applies to both files in the same change. Customizing Claude benefits the whole Heady system.CLAUDE.md— addedDEVELOPMENT FLOW+ARTIFACT CREATION CRITERIAsections and the sync rule, so agents are guided from the entry point.Daily-fresh context pack
docs/AGENT_CONTEXT_PACK.md— the optimal single bundle to feed any agent at task start (identity, source of truth, flow, rules, meta-rules). Has aDAILY_REFRESHblock that's regenerated daily.scripts/refresh-agent-context.mjs— idempotent generator (--checkdoubles as a CI staleness gate); pulls live state frompackage.json, git, andHEADY_CONTEXT.md..github/workflows/agent-context-refresh.yml— daily cron (06:00 UTC) regenerates and auto-commits the pack.Enforcement
.claude/hooks/heady-sync-check.sh+ aPostToolUsehook in.claude/settings.json— whenCLAUDE.mdis edited, the agent is reminded to propagate toHEADY.mdand regenerate the pack. Committed to the repo so it travels with every clone.Verification
scripts/refresh-agent-context.mjsruns and stamps the block;--checkreports current..claude/settings.jsonvalidated as JSON.CLAUDE.md(emits reminder) and a non-matching path (no-op).🤖 Generated with Claude Code
https://claude.ai/code/session_018ekBf2Tvqg9UnocbnvDYgg
Generated by Claude Code