PRD: Chunk 2 — Core Instructions #17
Closed
opened 2026-06-28 16:44:55 +00:00 by Claude
·
0 comments
main
Clear current reference
main
research/copilot-cli-agents
research/team-structures
research/enforcement-hooks
research/team-patterns
research/existing-infra-skills
feat/66-wire-gitea-mcp-config
Clear current reference
v2.0.1
v2.0.0
v1.0.0
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Status/Needs Triage
Status/Ready for Agent
Status/Ready for Human
Wayfinder/Grilling
Wayfinder/Map
Wayfinder/Prototype
Wayfinder/Research
Wayfinder/Task
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Maintainer needs to evaluate this issue
Fully specified, ready for an AFK agent
Requires human implementation
Wayfinder ticket (HITL): decision made in conversation
Wayfinder map: index of decisions for an effort
Wayfinder ticket (HITL): cheap artifact to react to
Wayfinder ticket (AFK): research a fact a decision waits on
Wayfinder ticket: work that unblocks a decision (or build work when the map's Notes allow)
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Milestone
No items
No Milestone
Legacy / Triage
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mortis/Holocron#17
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
PRD: Chunk 2 — Core Instructions
Problem Statement
Claude Code runs without any domain conventions or coding standards — every session starts from scratch. The placeholder
core/instructions/global.mdexists but contains no content.providers/claude-code/CLAUDE.mdhas only one rule and no communication or behavior guidelines. There are no rules about how code should be written, how commits should be structured, or how tests should be approached. The agent has no basis for challenging bad ideas, explaining decisions, or behaving consistently across sessions.Separately,
docs/has no consistent naming convention. As workflow artifacts accumulate (PRDs, ARDs, Bug Briefs), there is no predictable place to find them.Solution
Write three topic-specific instruction files (
coding.md,git.md,testing.md) that the agent reads on demand. Updateproviders/claude-code/CLAUDE.mdwith a proper always-on section covering communication style and behavior rules. Retire the placeholderglobal.md. Establish the subdirectory-by-type naming convention fordocs/and migrate the existing PRD into it.This gives the agent real conventions to follow from every session forward, and gives humans a clean, navigable document structure as the repo grows.
User Stories
docs/, so that I can navigate artifacts without guessing where they live.global.mdretired, so that there is no ambiguity about where instruction content lives.CLAUDE.mdto include a load trigger for each file, so that the agent knows when to read each instruction file without requiring frontmatter.Implementation Decisions
Module 1 —
providers/claude-code/CLAUDE.md(rewrite)The source file deployed to
~/.claude/CLAUDE.mdviainstall.sh. Rewritten with two top-level sections replacing the current sparse content.Always-on / Communication:
Always-on / Behavior:
On-demand content index (inline load triggers to guide agent judgment):
~/.claude/core/when invokedModule 2 —
core/instructions/coding.md(new, thin draft)Plain markdown. On-demand. Read when writing, editing, or reviewing code.
Key rules for the thin draft:
Module 3 —
core/instructions/git.md(new, thin draft)Plain markdown. On-demand. Read when doing git operations. Includes conventional commits convention.
Key rules for the thin draft:
--no-verify) — hooks are the automated QA gate; bypassing them breaks the pipelinefeat:,fix:,docs:,chore:,refactor:,test:Module 4 —
core/instructions/testing.md(new, thin draft)Plain markdown. On-demand. Read when writing or running tests.
Key rules for the thin draft:
Module 5 —
core/instructions/global.md(retire)Delete this file. It is a placeholder stub with no content. The content index in
providers/claude-code/CLAUDE.mdwill be updated to point to the three topic files instead.install.shcopiescore/wholesale, so deletion automatically removes the deployed file on next install.Module 6 —
docs/restructureCreate subdirectories by artifact type. Migrate the one existing PRD.
New structure:
Migration:
docs/prd-chunk-1.md→docs/prd/chunk-1.md. No other files need moving.install.sh
No changes required. It copies
core/wholesale and deploysproviders/claude-code/CLAUDE.mdverbatim. Adding new files tocore/instructions/and deletingglobal.mdtakes effect automatically on next install run.Testing Decisions
Instruction files and CLAUDE.md content cannot be unit tested. A well-formed file is not the same as an effective file — the test is whether the agent actually follows the rule in a real session.
Approach: Each issue carries a short acceptance criteria checklist. After committing the issue, the developer opens a new Claude session and exercises the relevant behaviour. The issue is closed only when the behaviour is confirmed.
What a good test looks like:
Prior art: Chunk 1 used the same approach — manual smoke test in a new session to verify the always-on rule was in effect. Chunk 2 formalises this as per-issue acceptance criteria.
No automated tests for this chunk. Automated QA applies to tooling (scripts, hooks); behavioural QA for content is always human-executed.
Out of Scope
docs/VISION.mdfile path does not change — it stays atdocs/VISION.md, not moved into a subdirectoryFurther Notes
install.shcopiescore/wholesale — adding or removing files incore/instructions/automatically affects what is deployed on the next install run. No install script changes are needed for this chunk.docs/prd/convention. The migration ofdocs/prd-chunk-1.mdis a Chunk 2 deliverable, not a precondition for writing this PRD.