importing-a-codebase
Agent skill fromJetBrains/thinkrail
Use when asked to create the initial spec graph for an existing codebase that has source code but no specs. Normally reached via setting-up-a-project.
How to install importing-a-codebase
install importing-a-codebase
# install the thinkrail pack with the skills CLI
npx skills add JetBrains/thinkrail# or add only this skill to Claude Code: copy the folder
packages/pi-thinkrail-workflow/skills/importing-a-codebase/
# into
~/.claude/skills/importing-a-codebase/ (all projects)
.claude/skills/importing-a-codebase/ (one project)
1# Importing a codebase23The workspace holds real code but no specs. **Reverse-engineer the spec graph the project should have4had.** When the repo already carries real spec-like documents, build the graph around them, not5parallel to them. Do as much as possible yourself, from the files; ask the user only where the code genuinely can't6tell you and the answer changes a spec.78**Hold the writing-specs bar.** Read that concept skill before drafting — everything in this flow is9inferred rather than confirmed, so its honesty rules (draft until the user reviews, unconfirmed marked10inline) bind hardest here.1112## 1. Read first, ask last1314Survey before you ask a single question. Read, in roughly this order:1516- **Agent files (mine these first — they state intent + conventions directly):** `AGENTS.md`, `CLAUDE.md`,17 `.cursor/rules/*`, `.cursorrules`, `.github/copilot-instructions.md`, `GEMINI.md`, `.windsurfrules`.18- **Docs:** `README`, `docs/`, `CONTRIBUTING`, ADRs.19- **Manifests & layout:** `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml`, workspace globs,20 `tree`-style structure, entry points, build/test scripts.21- **Code:** entry points and the top of each candidate module — enough to see responsibilities and the22 dependency edges between them.2324While you read, collect **adoption candidates**: durable, declarative documents that state the world25as it is — architecture/design docs, ADRs / decision records, domain glossaries, protocol/contract26…
Excerpt shown under the repository's Apache-2.0 license.
