agentleFS
KoshuxKoshux/agentic-sdlc-scaffold/.claude/skills/adopt/SKILL.md

adopt

Skill0 starsChanged 4 months agoMITView on GitHub

Agentic installer for this scaffold. Use immediately after copying the scaffold payload into a real repository — when the operator says "adopt the scaffold", "customize these rules for this repo", "run the installer", or the tree still contains Acme Tracker vocabulary. Explores the host repo, builds a substitution map, rewrites every must-edit file, regenerates the codemap, prunes inapplicable optional modules, then verifies and reports — stopping before any commit.

  • Reads credentials

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use asset-spec, create-control-manifest and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • cenconq25Skill

    asset-spec

    Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.

    Also in 5 projects that use this

  • cenconq25Skill

    create-control-manifest

    Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.

    Also in 5 projects that use this

  • +10 more from cenconq25

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Delete or stub optional modules that don't apply here.

    line 19
  2. Distinctive:

    Verify its own work and produce a customization report.

    line 20
  3. Distinctive:

    Commit. It stops for operator review.

    line 30
  4. Distinctive:

    If a file you believe needs editing is not in this set, put it in the report as a question.

    line 60
  5. Very specific:

    thin twins: update only their vocabulary and glob scopes (applyTo) to real paths.

    line 158
  6. Distinctive:

    Do not expand them; they summarize-and-route to the same canonical docs.

    line 159
  7. Distinctive:

    Keep every deletion listed for the report.

    line 169
  8. Distinctive:

    STOP: Do not commit, branch, or push.

    line 216
  9. Distinctive:

    If the repo already had a CLAUDE.md or AGENTS.md before the scaffold was copied in:

    line 221
  10. Distinctive:

    Existing content wins: Never delete or rewrite the team's established instructions.

    line 223
  11. Very specific:

    Append, clearly fenced: Add the scaffold's contribution as a distinct trailing section (e.g.

    line 224
  12. Very specific:

    If the copy step already clobbered a pre-existing file, say so in the report and recover the original from git history before merging (git …

    line 230

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

adopt — agentic scaffold installer

What this skill does — and does not do

You are running inside the adopter's repository, after they copied the scaffold files in. Your job is to convert the scaffold from documents-someone-must-hand-edit into configuration that matches this repo.

It does:

  • Rewrite the fictional Acme Tracker vocabulary (services, databases, containers, ports, commands, paths) into this repo's real equivalents.
  • Regenerate navigation aids (.claude/rules/codemap.md) from what it actually finds.
  • Delete or stub optional modules that don't apply here.
  • Verify its own work and produce a customization report.

It does not:

  • Invent your architecture. If a mapping is ambiguous (two candidate API services, no obvious test command, unclear which file is the "central route registry"), it becomes a question in the report — never a guess written into a rule file.
  • Touch anything outside the scaffold file set (defined below). Your source code, package.json, CI workflows, and existing docs are read-only to this skill, with the single exception of the merge strategy for pre-existing CLAUDE.md / AGENTS.md (see Conflicts).
  • Commit. It stops for operator review.

Idempotent: safe to re-run. Each run re-derives the map and re-checks the tree; files already rewritten are left alone. If Phase 4's leak grep comes back clean, report "already adopted" and skip to verification.

Inputs

  • The scaffold's substitution table: docs/reference-stack.md if it was copied along (it is classed meta and normally isn't). If absent, use the inline vocabulary table in Phase 2 — it is self-sufficient.
  • The file list and adoption classes: docs/manifest.md if present; otherwise the scaffold file set listed under "Scope guard" below.

Scope guard — the scaffold file set

You may create, edit, or delete only these paths (plus AGENTS.md / CLAUDE.md under the Conflicts rules):

AGENTS.md  CLAUDE.md  .gitattributes
.claude/settings.json
.claude/rules/**  .claude/hooks/**  .claude/skills/**  .claude/agents/**  .claude/prompts/**
.github/copilot-instructions.md  .github/instructions/**  .github/agents/**
.github/skills/**  .github/prompts/**  .github/hooks/enforce-repo-policy.json
docs/sdlc.md  docs/operating-model.md  docs/parallelisation.md  docs/testing.md
docs/memory-convention.md  docs/templates/**
docs/reference-stack.md  docs/manifest.md   (meta — removal candidates, see Phase 3.5)

If a file you believe needs editing is not in this set, put it in the report as a question.


Phase 1 — EXPLORE (read-only)

Inventory the real repo using read-only tools (Glob, Grep, Read, read-only shell commands). Do not modify anything in this phase. Establish:

  1. Package manager + workspace shape — lockfile present (pnpm-lock.yaml, package-lock.json, yarn.lock, Cargo.lock, go.sum, poetry.lock, …), workspace manifest (pnpm-workspace.yaml, turbo.json, nx.json, single-package?).
  2. Services and apps — top-level apps/, services/, packages/, frontend/, or a single-service layout. For each: language, framework, entry point.
  3. Databases + ORM — schema files (schema.prisma, migrations/, models.py, *.sql), which service owns which database, seed scripts.
  4. Infra — docker-compose*.yml / compose.yaml (service names, container names, ports, healthchecks), Dockerfiles, dev-proxy/gateway config, .env.example.
  5. Test commands — scripts in package.json (or Makefile / justfile / pyproject.toml): unit, integration, e2e, typecheck, lint. Note which need running containers.
  6. Existing agent config — pre-existing CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, .claude/, .cursor/. Record them for the Conflicts step.
  7. Optional-module signals:

    ModuleKeep ifOtherwise
    rules/windows-wsl2.md + .github/instructions/windows-wsl2.instructions.mdHost is Windows (check platform / wsl availability) or the team says sodelete
    skills/pr-review/ (+ Stage 5.6 references)A PR-bot reviewer (Copilot/Codex/etc.) reviews PRs on this repo — check repo settings via gh or askdelete + strip Stage 5.6 to a one-line "no PR bot configured" note in the SDLC rule
    skills/browser-verify/, .github/skills/browser-verify/, .github/agents/browser-verifier.agent.md, .github/instructions/browser-verification.instructions.md, .github/prompts/browser-test.prompt.mdA browser MCP server (e.g. chrome-devtools) is configured, or the repo has a browser-served UI worth wiring it for laterdelete
    skills/orchestrate/, agents/backend-implementer.md, agents/frontend-implementer.md, docs/parallelisation.mdThe repo has ≥2 genuinely independent subtrees (e.g. separate backend + frontend) worth parallel workersdelete
    rules/ux.md + .github/instructions/ux.instructions.mdThe repo has a UI and the team wants a design-system rule file (it ships as an example system — flag it for rewrite either way)delete
    agents/docker-debugger.mdDocker/compose is part of the dev workflowdelete

Phase 2 — MAP (build the substitution table)

Map every Acme Tracker term to its real equivalent. The full glossary lives in docs/reference-stack.md; the load-bearing terms are inlined here so this phase works without it:

Acme termMeaningReal equivalent
apps/api-coremain backend service path?
apps/auth-serviceauth service path?
frontend/apps/webfrontend app path?
frontend/layers/sharedshared frontend layer?
frontend/e2ee2e test root?
postgres-maindatabase container/service name?
acme_core_db, acme_auth_dbdatabase names?
5433DB host port?
https://localhost:8443local full-stack URL?
docker compose up -d postgres-maintest-infra preflight command?
pnpm tsc --noEmitcheap typecheck command?
pnpm --filter api-core vitest run <path>targeted backend test command?
pnpm e2ee2e command?
pnpm zod:generate / frontend/layers/shared/zod/generated-contract pipeline + output dir?
schema.prisma → migrate → generate pipelineschema-change pipeline?
apps/auth-service/prisma/seed.tsidempotent reference-data seed?
BaseController<T> / BaseRepository<T>shared CRUD base classes?
audit.service.ts / ActivityLogaudit-log write path?
sse.service.tsreal-time push path?
Project, Task, Comment, Attachment, Memberdomain entities?
docs/specs/ + SPEC-NNNspec directory + numberingkeep as-is unless the repo already has one

Classify every row:

  • Mapped — a real equivalent exists; record it.
  • No equivalent — the concept doesn't exist here (no generated-contract pipeline, no audit log, no SSE). Mark every rule/skill passage that depends on it for removal or stubbing, not for rewriting into fiction.
  • Ambiguous — two candidates, or you'd have to guess. Record the candidates and add a question to the report. Leave the affected passage marked <!-- ADOPT: unresolved — see report -->.

Present the completed table to the operator before Phase 3 if any row is Ambiguous; otherwise proceed.

Phase 3 — REWRITE

Apply the map to every must-edit file per docs/manifest.md:

  • AGENTS.md — rewrite the stack-specific sections (§2 architecture, §3 repo layout, §4 canonical commands) to the real structure discovered in Phase 1. Process sections (SDLC, gates, effort discipline) stay verbatim.
  • .claude/settings.json — retarget path-scoped permissions and any command allow/deny entries that name Acme services.
  • .claude/rules/00-core-workflow.md, database.md, backend.md, frontend.md — vocabulary substitution; remove passages mapped "no equivalent".
  • .claude/rules/testing.md and docs/testing.md — rewrite the infrastructure preflight commands to the real infra: the exact docker compose up -d <real services> (or this repo's equivalent) and the real test/typecheck commands from Phase 1.5.
  • .claude/rules/codemap.md — regenerate from scratch, do not substitute. Build the task → files table from what exploration actually found (entity change, new endpoint, new page, shared component, config change → real paths), and rebuild the single-owner high-contention list (lockfile, schema files, central registries such as route/controller index files, generated directories). Rows you can't ground in a real file don't go in.
  • .claude/rules/architecture.md — one-paragraph orientation naming the real services.
  • .claude/skills/implement-spec/SKILL.md, .claude/agents/backend-implementer.md, .claude/agents/frontend-implementer.md — retarget paths, preflight, and test commands.
  • .github/copilot-instructions.md + .github/instructions/*.instructions.md — these are thin twins: update only their vocabulary and glob scopes (applyTo) to real paths. Do not expand them; they summarize-and-route to the same canonical docs.
  • .github/skills/implement-spec/SKILL.md — same retargeting as the Claude twin.
  • docs/sdlc.md — vocabulary substitution in its examples only.

Then:

  • Delete or stub optional modules ruled out in Phase 1.7. Deleting a rule/skill means also removing its references from AGENTS.md, CLAUDE.md, .claude/settings.json hook wiring, and .github/copilot-instructions.md routing tables — a dangling reference is a Phase 4 failure.
  • Keep every deletion listed for the report.

Phase 3.5 — remove mistakenly-copied meta files

Files classed meta in docs/manifest.md belong to the scaffold's own repository and should not live in the adopter's repo. If any were copied (docs/reference-stack.md, docs/manifest.md, ADOPTING.md, the scaffold's README.md/governance files, docs/examples/*, scripts/check-banned-strings.sh, scripts/setup-github.sh, .github/workflows/validate.yml, tests/hooks.test.mjs), list them as removal candidates in the report. Delete them only after this skill no longer needs them this run — and never delete a file the operator's repo plausibly owned before adoption (a pre-existing README.md is theirs; leave it).

Phase 4 — VERIFY + REPORT

  1. Leak grep — the tree must contain no leftover reference-stack vocabulary. Run (excluding any meta files still pending removal):

    grep -rniE "acme|api-core|postgres-main|acme_core_db|acme_auth_db|task-quick-filters" \
      AGENTS.md CLAUDE.md .claude .github docs/sdlc.md docs/testing.md docs/operating-model.md \
      docs/parallelisation.md docs/templates 2>/dev/null

    Also grep for terms that are only conditionally fictional — localhost:8443, 5433, frontend/layers/shared, zod:generate, BaseRepository — and confirm each surviving hit refers to something real in this repo.

  2. Cross-reference check — every relative link and file path mentioned in the scaffold files must resolve. Grep for markdown links and backticked paths in the scaffold set; verify each target exists. Dangling references from optional-module deletion are bugs: fix them now.
  3. Marker check — grep for ADOPT: markers left by Phase 2. Each one must correspond to a question in the report.
  4. Hook tests — if tests/hooks.test.mjs was copied, run it (node tests/hooks.test.mjs) to confirm the three hooks still pass after any edits. Then include it in the meta-removal list.
  5. Customization report — emit to the operator (as your reply, not a committed file):
    • Mapped — the final substitution table.
    • Removed — optional modules and meta files deleted, one line of reason each.
    • Stubbed / not-applicable — concepts with no real equivalent and what was done.
    • Questions — every ambiguous mapping, with candidates, awaiting a human decision.
    • Verification — leak-grep result, cross-reference result, hook-test result.
  6. STOP. Do not commit, branch, or push. Adoption lands only after the operator reviews the report and the diff.

Conflicts — pre-existing CLAUDE.md / AGENTS.md

If the repo already had a CLAUDE.md or AGENTS.md before the scaffold was copied in:

  • Existing content wins. Never delete or rewrite the team's established instructions.
  • Append, clearly fenced. Add the scaffold's contribution as a distinct trailing section (e.g. ## SDLC gates (scaffold)) containing the gate summary and pointers into .claude/rules/ and docs/sdlc.md — pointers, not pasted policy.
  • On contradiction (e.g. existing docs mandate a workflow a scaffold gate forbids), do not silently pick a side: record the contradiction under Questions in the report and leave the existing instruction in force until the operator decides.
  • If the copy step already clobbered a pre-existing file, say so in the report and recover the original from git history before merging (git show HEAD:CLAUDE.md).

Failure modes to avoid

  • Guessed architecture — a plausible-sounding command that doesn't exist is worse than a question. Every command written into a rule file must have been observed in Phase 1.
  • Half-deleted modules — deleting a skill but leaving its routing entries. The Phase 4 cross-reference check exists because of this.
  • Fat twins — expanding a .github/instructions/*.md twin while editing it. Twins stay thin; depth lives in the canonical docs.
  • Editing outside the scaffold set — never "fix" adopter code, tests, or CI while adopting.
  • Committing — this skill ends at the report, always.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.