본문으로 건너뛰기
cccskills
무료GitHub에 공개

importing-a-codebase

Build a draft specification graph for an existing codebase that has no specs. Survey its guidance files, documentation, manifests, and code; infer project purpose and module boundaries, adopt suitable existing design documents, and validate the resulting graph for review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Creating initial specs for an undocumented codebase
  • Mapping modules and their dependencies
  • Turning existing architecture documents into specs

포함된 파일(1)

  • SKILL.md6.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Importing a codebase

The workspace holds real code but no specs. Reverse-engineer the spec graph the project should have had. When the repo already carries real spec-like documents, build the graph around them, not parallel to them. Do as much as possible yourself, from the files; ask the user only where the code genuinely can't tell you and the answer changes a spec.

Hold the writing-specs bar. Read that concept skill before drafting — everything in this flow is inferred rather than confirmed, so its honesty rules (draft until the user reviews, unconfirmed marked inline) bind hardest here.

1. Read first, ask last

Survey before you ask a single question. Read, in roughly this order:

  • Agent files (mine these first — they state intent + conventions directly): AGENTS.md, CLAUDE.md, .cursor/rules/*, .cursorrules, .github/copilot-instructions.md, GEMINI.md, .windsurfrules.
  • Docs: README, docs/, CONTRIBUTING, ADRs.
  • Manifests & layout: package.json / pyproject.toml / go.mod / Cargo.toml, workspace globs, tree-style structure, entry points, build/test scripts.
  • Code: entry points and the top of each candidate module — enough to see responsibilities and the dependency edges between them.

While you read, collect adoption candidates: durable, declarative documents that state the world as it is — architecture/design docs, ADRs / decision records, domain glossaries, protocol/contract docs. Never candidates (input only): READMEs, CONTRIBUTING, changelogs, roadmaps, TODOs, implementation plans (finished or planned), generated API docs.

Confirm with the spec tools (spec_grep / spec_graph) that there's no graph yet. If specs already exist, stop and hand back to the setting-up-a-project dispatcher — this flow is for un-specced repos.

2. Build a working model

From what you read, form a working model of what the project is and how it's shaped — held in the conversation, not written to a file (this flow declares no working files):

what:       one-sentence purpose (the job the codebase does)
domain:     the space it's in
stack:      languages / frameworks / runtime
modules:    the real boundaries + the dependency edges between them (who imports whom)
invariants: rules the code already enforces (layering, "X never imports Y", public surfaces)
decisions:  non-obvious choices visible in the code (and where the "why" is missing)

Agent files and READMEs usually hand you what, invariants, and decisions for free — prefer them over re-deriving from code.

3. Interview only the gaps

Ask only what the files can't answer and that would change a spec — typically: the primary job / who it's for, explicit non-goals, and the why behind a non-obvious decision. Interview them in rounds per the asking-user-questions concept skill; infer a concrete answer and let the user correct it rather than asking open-ended.

Two kinds of question belong in the round whenever the files leave them open — the code shows what, rarely why:

  • The why behind each non-obvious decision in your working model that the files don't explain — "I see X is done this way — why?" — with your inferred reasons as options. The answer goes into the spec that owns the decision.
  • Known limitations — one multiSelect of the gaps you saw (unhandled cases, TODOs, missing tests, slow paths) for the user to confirm; confirmed ones are recorded in the owning spec.

If adoption candidates exist, add one question to the same round: a multiSelect listing them (grouped when many — an adr/ set is one option) — which should become spec-graph nodes? A contradiction between a candidate and the code found by now goes into the round too (confirm the correction). Skipped or declined → adopt none; candidates stay input, noted at hand-off.

If the files answered everything material — the whys and limitations included — skip the interview and say so; don't manufacture questions (adoption candidates alone still make a round — the offer is never dropped as "no gaps"). A skipped/declined question is not a blocker: record the assumption inline in the spec, marked unconfirmed.

4. Draft the graph, top-down

Save with the spec tools as you go (spec_create per node, edit for prose). Order:

  1. goal-and-requirements.md (type: goal-and-requirements) — what the product is and why, in the goal-doc shape writing-specs sets; capabilities are what the code already does. This is the graph root; the confirmed intent lives here.
  2. architecture.md (type: architecture-design, parent: <goal id>) — topology, the module boundaries, the real dependency edges (a small DAG only if it carries real information), and the invariants the code enforces.
  3. One short SPEC.md per genuine module (type: module-design, or submodule-design for a directory-level module inside a package; parent: its enclosing module or architecture). Each states its responsibility and its boundary (allowed deps / forbidden reaches).

Adopted docs become nodes in place. First, for each accepted candidate: read it carefully, then add spec frontmatter where the file lies (id, type, title, status: draft, parent; depends-on/references only where real) — content untouched. A slot an adopted doc fills is not drafted again: an adopted architecture doc is the architecture-design node, an adopted module design doc is that module's node, an ADR earns a node only while its decision is still in force. Build the rest of the graph around them, linked by id. One exception to "content untouched": where an adopted doc is unclear or has drifted from the code, correct that content as part of adoption and call the correction out (in the interview round when caught in time, at hand-off otherwise).

Wire parent to mirror the code hierarchy and depends-on only on edges the code actually shows. Keep each file you draft to the writing-specs bar — its granularity and say-it-once rules decide what counts as a module and where shared edges live. If a boundary is genuinely unclear, ask, or leave that spec draft with a one-line note — don't guess elaborately.

5. Validate & hand off

  • Run spec_validate; fix dangling links, duplicate ids, parent cycles.
  • Tell the user the specs are drafted on this workspace's branch — review them in Changes; nothing merges until they approve — and summarize what you inferred vs. what they confirmed, which docs were adopted vs. left as input, and any drift corrections made.
  • Later features, behavior changes, and bug fixes go through brainstorming; work that changes no behavior proceeds directly. This workflow ends here.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Helps an agent ask focused questions when a workflow needs user decisions. It groups independent questions into rounds, frames choices as visible outcomes, and explains how to continue when answers are skipped or interactive questions are unavailable.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Gathering scope and behavior decisions for a feature
  • Clarifying choices that depend on earlier answers
  • Confirming an inference with clear options
JetBrains/thinkrail1.8천2026년 10월 26일 업데이트

Clarify the product goal and technical choices before a feature, behavior change, or bug fix is built. The workflow records an agreed task specification, guides implementation against it, and updates durable project specs when the work lands.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Clarifying goals before building a feature
  • Agreeing on behavior changes before coding
  • Investigating and planning a bug fix
JetBrains/thinkrail1.8천2026년 10월 26일 업데이트

Route new project setup, pull request lifecycle work, and product changes such as features or bug fixes to the workflow that governs them. It also identifies when a request needs no workflow, so routine questions and nonbehavioral edits can proceed directly.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Choosing a workflow for a new project
  • Routing a feature or bug fix
  • Handling pull request checks or review feedback
JetBrains/thinkrail1.8천2026년 10월 26일 업데이트

Manage MCP server settings in ThinkRail when servers need to be added, changed, enabled, or troubleshot. It explains user and repository configuration, safe credential references, approval and sign-in steps, and how to load deferred tools.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding or removing an MCP server
  • Changing server settings or exposure
  • Troubleshooting missing or failing MCP tools
JetBrains/thinkrail1.8천2026년 10월 26일 업데이트

Routes project setup to the appropriate workflow by checking whether specs and source code already exist. It sends an empty workspace with a new idea toward a requirements document, or an existing codebase toward an initial spec graph, and offers review when specs are already present.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Setting up a project with no existing specifications
  • Routing a new idea to a requirements workflow
  • Preparing initial specs for an existing codebase
JetBrains/thinkrail1.8천2026년 10월 26일 업데이트

Create and maintain pull requests for finished work. The workflow can sync a branch, update PR details or screenshots, report checks, monitor CI when asked, and address review comments while confirming the latest Git and GitHub state.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Opening a pull request for finished changes
  • Syncing a PR branch with its base
  • Updating a PR title, body, or screenshots
JetBrains/thinkrail1.8천2026년 10월 26일 업데이트

JetBrains의 스킬 모두 보기

이 스킬의 문제 신고