target-instructions-bootstrap
Skill12 starsChanged 6 months agoApache-2.0View on GitHub
Create the target repository's local AI instruction scaffold during first-use bootstrap. Use from repo-init-scan when `.github/instructions`, runtime adapters such as `AGENTS.md` / `CLAUDE.md`, or the neutral project facts scaffold are missing. Do not use to overwrite existing project-specific rules.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- change-verificationSkill
- context-packet-fastpathSkill
- core-workflow-contractSkill
- developer-workflowSkill
- development-branch-closeoutSkill
- dispatching-parallel-agentsSkill
- evolution-loopSkill
- executing-plansSkill
- frontend-designer-workflowSkill
- frontend-design-guardrailsSkill
- quality-assurance-workflowSkill
- repo-init-gateSkill
- repo-init-manual-fallbackSkill
- repo-init-officialSkill
- repo-init-scanSkill
- root-cause-fixer-workflowSkill
- root-cause-investigationSkill
- search-fastpathSkill
- security-reviewer-workflowSkill
- senior-project-expertSkill
- senior-project-expert-workflowSkill
- spec-execution-fastpathSkill
- specification-writer-workflowSkill
- spec-review-gauntletSkill
- structured-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- target-memory-bootstrapSkill
- target-spec-bootstrapSkill
- td-java-coding-guidelinesSkill
- td-python-coding-guidelinesSkill
- technical-architect-workflowSkill
- test-driven-developmentSkill
- verification-before-completionSkill
- web-experience-auditSkill
- workspace-isolationSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 10 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Create or repair target-local instruction entrypoints during repo-init-scan.
- Distinctive: line 14
Write into the target repository, never into the installed plugin package or plugin cache.
- Distinctive: line 15
Create missing files only.
- Distinctive: line 16
If an existing file lacks a required compatible section, append the smallest compatible section instead of replacing the file.
- Distinctive: line 17
Do not copy this plugin repository's active state, specs, memory, or private workflow examples into the target repository.
- Distinctive: line 18
Keep generated target files short and runtime-neutral unless a runtime-specific adapter is explicitly requested.
- Distinctive: line 19
Do not generate hooks or script-based enforcement.
- Very specific: line 20
Do not create best-copilot.md here.
- Distinctive: line 34
Create when absent, repair only compatible missing sections when present:
- Distinctive: line 54
search precision and command output budget
- Distinctive: line 65
Never replace an existing file wholesale.
- Very specific: line 67
If .claude/settings.json already has a different agent, do not overwrite it silently.
- Very specific: line 68
If .claude/settings.json already has a different worktree policy, preserve it and report the difference.
- Very specific: line 69
If safe JSON repair is not possible, return BLOCKED target_instructions_bootstrap_conflict and list .claude/settings.json.
- Very specific: line 70
If a required section cannot be inserted without conflicting with project-specific rules, return BLOCKED …
- Distinctive: line 75
Read only the listed target instruction/adapter files that exist.
- Very specific: line 76
Create missing files from references/templates.md.
- Very specific: line 78
Verify required paths, required headings, Codex TOML adapter names when applicable, Claude import lines when applicable, and valid JSON …
- Very specific: line 90
When a stable Claude PM entry is required, confirm .claude/settings.json is valid JSON and contains "agent": "senior-project-expert" plus …
- Very specific: line 93
If invoked because instructions or adapters were missing and required files still do not exist, return BLOCKED …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Target Instructions Bootstrap
Create or repair target-local instruction entrypoints during repo-init-scan. The neutral project facts scaffold is not enough to pass initialization until repo-init-scan replaces neutral markers with bounded repository facts or bounded-scan unknown gaps, verifies required artifacts, and writes the root best-copilot.md sentinel.
Load references/templates.md for exact file contents and repair snippets.
Boundary
- Write into the target repository, never into the installed plugin package or plugin cache.
- Create missing files only. Preserve existing project-specific instructions.
- If an existing file lacks a required compatible section, append the smallest compatible section instead of replacing the file.
- Do not copy this plugin repository's active state, specs, memory, or private workflow examples into the target repository.
- Keep generated target files short and runtime-neutral unless a runtime-specific adapter is explicitly requested.
- Do not generate hooks or script-based enforcement; init, native ask, closeout, and state sync gates must be instruction-text enforceable.
- Do not create
best-copilot.mdhere. Onlyrepo-init-scanwrites the verified-init sentinel after full verification.
Verified Init Sentinel
repo-init-scan writes target root best-copilot.md only after full init verification:
---
version: "0.8.0"
---Files
Create when absent, repair only compatible missing sections when present:
.github/instructions/project.instructions.md.github/instructions/must.instructions.md.github/instructions/skills-index.instructions.mdAGENTS.mdwhen Codex compatibility is requested or current runtime needs it.codex/agents/*.tomlwhen Codex custom-agent compatibility is requested or current runtime needs target-local Codex agentsCLAUDE.mdwhen Claude Code compatibility is requested or current runtime is Claude Code.claude/settings.jsonwhen Claude Code needs a stable Senior Project Expert session entry and current-branch worktree base
Required Local Rules
Target .github/instructions/must.instructions.md must cover:
- source priority and language policy
- request flow, per-request timestamp, init normalization, and packet freeze
- reliability gates: think before coding, simplicity, surgical changes, read before writing, verification evidence
- native ask and no-silent-closeout rules
- PM/specialist ask boundary
- shared
work_mode,task_type, and specialist handback vocabulary - search precision and command output budget
- memory/spec progressive disclosure
- seven-part self-evolution loop and
evolution_signal - first-use scaffold gate
- Spec Bundle rule for MEDIUM/LARGE work
STATE_SYNC: task status changes updatetasks.mdandmemories/repo/current-workstreams.mdbefore continuing- agents/dispatch and cross-review lanes
- implementation/review/verification requirements
Repair Rules
- Never replace an existing file wholesale.
- Append missing headings from
references/templates.mdonly when compatible. - If
.claude/settings.jsonalready has a differentagent, do not overwrite it silently; returnBLOCKED target_instructions_bootstrap_conflictunless the user explicitly requested the change. - If
.claude/settings.jsonalready has a different worktree policy, preserve it and report the difference. - If safe JSON repair is not possible, return
BLOCKED target_instructions_bootstrap_conflictand list.claude/settings.json. - If a required section cannot be inserted without conflicting with project-specific rules, return
BLOCKED target_instructions_bootstrap_conflictand list the file.
Procedure
- Determine target root and requested runtime compatibility from
repo-init-scan. - Read only the listed target instruction/adapter files that exist.
- Create missing files from
references/templates.md. - Append compatible missing sections from the reference to existing files.
- Verify required paths, required headings, Codex TOML adapter names when applicable, Claude import lines when applicable, and valid JSON when
.claude/settings.jsonis present. - Return created, preserved, repaired, conflict, and missing path lists.
Verification
- Confirm generated files exist in the target repository.
- Confirm path existence plus required sections; path existence alone is insufficient.
- Confirm existing files were not overwritten.
- Confirm
.github/instructions/must.instructions.mdcontains request flow, reliability gates, native ask, memory/spec,STATE_SYNC, self-evolution,evolution_signal, agents/dispatch, implementation/verification, and mixed-language rules. - Confirm
.github/instructions/skills-index.instructions.mdcontains Claude Code skill-name guidance when relevant. - For Claude Code, confirm
CLAUDE.mdhas standalone unindented imports for.github/instructions/project.instructions.md,.github/instructions/must.instructions.md, and.github/instructions/skills-index.instructions.md. - For Claude Code, confirm PM coordinator dispatch, foreground/background policy, isolated worktree closeout, scoped plugin agent names, namespaced skill commands, skill-load-is-not-execution, code intelligence fallback, TypeScript LSP fallback, provider compatibility smoke check,
AskUserQuestion, andSTATE_SYNCare covered. - When a stable Claude PM entry is required, confirm
.claude/settings.jsonis valid JSON and contains"agent": "senior-project-expert"plus"worktree": {"baseRef": "head"}unless a different explicit policy was preserved. - For Codex, confirm
AGENTS.mdreferences.codex/agents/*.toml, all eight.codex/agents/*.tomlfiles exist, and each file contains its expectedname = "<role>"field plusdeveloper_instructions. - Confirm no generated file contains unresolved project-specific claims, secrets, plugin-cache paths, or active plugin-package state.
- If invoked because instructions or adapters were missing and required files still do not exist, return
BLOCKED target_instructions_bootstrap_incompletewith missing paths.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

