Codebase inference
Use when attaching Charter to an existing codebase via /charter-attach. Reads README, entry points, existing docs, and infers the project vision, then presents a draft for user correction before scaffolding non-destructively.From its SKILL.md
npx -y skills add fjoad/charter --skill codebase-inferenceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.2 KB, as published. Nobody here has run it
Codebase Inference
You are attaching Charter to an existing project. Your job is to infer the vision from what's already there, present it for user correction, then scaffold Charter's structure non-destructively alongside existing files.
Phase 1: Read
Read the following in order (skip gracefully if they don't exist):
README.mdorREADME.rst— project description, goals, install instructionspackage.json,pyproject.toml,go.mod,Cargo.toml— name, description, dependenciesdocs/ordoc/directory — any existing documentation- Main entry point(s) — top-level files,
main.py,index.ts,cmd/,src/main.* - Test files (a sample) — often reveal what the code is supposed to do
Phase 2: Infer
Based on what you read, infer:
- Thesis: What problem does this project solve?
- What it does: Major features/components visible in the code
- Non-goals: What's notably absent that someone might expect?
- Success criteria: What would "working correctly" look like?
- Key concepts: What are the core domain objects/terms in the codebase?
Phase 3: Draft
Delegate to the vision-drafter subagent with your inferences. The subagent will produce a VISION.md draft.
Present the draft to the user. Say:
Here's my inferred VISION.md for this project. I read [list what you read]. Does this capture what the project is? Correct anything that's wrong, and I'll scaffold Charter's structure around it.
Phase 4: Scaffold (non-destructive)
Once the user approves or corrects the vision:
- Write
docs/VISION.md(ordocs/charter/VISION.mdifdocs/has conflicting content) - Copy the Charter template files that don't already exist:
docs/STATUS.md— only if none existsdocs/ARCHITECTURE.md— only if none existsdocs/decisions/TEMPLATE.mddocs/plans/TEMPLATE.md.claude/rules/project-flow.md.claude/rules/workflow.md.claude/rules/turn-ritual.md.claude/rules/testing.md.claude/settings.json— only if none existsAGENTS.md— only if none existsCLAUDE.md— only if none exists.gitignore— DO NOT overwrite existing
- Fill in
AGENTS.mdwith the project name, brief description, and any stack-specific notes inferred from the codebase (test command, dev server command, known gotchas) - Report:
**Charter attached.**
- Read: [list of files read]
- docs/VISION.md: drafted from codebase inference
- Files added: [list only files actually written — skip ones that already existed]
- Files skipped (already exist): [list]
- Next step: review VISION.md — does it capture the project correctly?
Rules
- Never overwrite existing files. Charter attaches alongside, not on top of.
- Flag conflicts. If existing docs contradict the inferred vision, say so explicitly.
- Preserve existing structure. Don't reorganize
docs/if it already has a structure. - Minimal footprint. Only add what Charter needs. Don't reorganize the project.