refactor(instructions): centralize AGENTS.md core and gate session context injection - #76
Open
hapo-nghialuu wants to merge 47 commits into
Open
refactor(instructions): centralize AGENTS.md core and gate session context injection#76hapo-nghialuu wants to merge 47 commits into
hapo-nghialuu wants to merge 47 commits into
Conversation
Install one shared AGENTS.md core and keep runtime adapters thin. Co-Authored-By: Claude <noreply@anthropic.com>
Remove timestamp cooldowns and trim dynamic reminders to project-specific context. Co-Authored-By: Claude <noreply@anthropic.com>
Record Wave 1 instruction refactor in the package changelog. Co-Authored-By: Claude <noreply@anthropic.com>
Document shared AGENTS composition and Claude root instruction installation. Co-Authored-By: Claude <noreply@anthropic.com>
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
Wave 1 of the instructions refactor: shrink the always-on instruction layer that every user loads each session, and make the machine actually verify what ships.
CLAUDE.mdbecomes a thin Claude-specific wrapper importing it via@AGENTS.md. always-on của user Claude: ~130 → ~64 dòng (AGENTS.md 39 + CLAUDE.md ~25).## Evidenceas source of truth, theNO_TESTSrule, skill venv paths for macOS and Windows, edit-skills-in-project,<!-- cafekit:lang -->marker, addressing canary.Defects found by independent review and fixed in this branch
An independent read-only review of the first implementation found five blocking defects. All five were reproduced by execution and fixed:
runtime.jsoninjected defaults anyway — including a Plans/Docs path resolved from a possibly stalePROJECT_ROOT, which could point at a different project. Now silent.payload.cwdis authoritative;PROJECT_ROOTis a fallback only.post-install.jsbuilt instruction targets for claude and codex only, so--lang vileft OpenCode in English.AGENTS.md. Newbin/lib/instruction-blocks.jsmanages a<!-- CAFEKIT CORE START --> / <!-- CAFEKIT CORE END -->block; later installers detect it and append only their runtime-specific block. Idempotent across re-runs.PASS: 211. Assertions now run against real installs into temp directories.Verification
Each item verified by installing into
mktemp -ddirectories rather than reading source:--lang viKnown issue, not fixed here
node bin/install.js --dry-runwrites into the repository it runs from — it modifiedpackages/spec/.gitignoreand createdpackages/spec/AGENTS.mdandpackages/spec/opencode.json. Pre-existing installer bug, out of scope for this wave, worth a separate fix.Test plan
npm testinpackages/spec(225 tests)--lang vi) on each platform