agentleFS
dvy1987dvy1987/agent-loom/.agents/skills/project-setup/SKILL.md

project-setup

Skill4 starsChanged 3 months agoMITView on GitHub

Generate a tailored AGENTS.md for any new project by interviewing the user about their skill gaps, project goals, and tech context. Load when the user asks to set up a project, initialize agents, create an AGENTS.md, bootstrap a repo, onboard agents to a codebase, or says "set up this project for agents". Also triggers on "write an AGENTS.md for this project", "configure agents for my repo", "project bootstrap", "agent onboarding", or when the user starts a new project and needs agent-ready configuration. Re-run when new context arrives (PRD written, stack changes, team changes) to update the AGENTS.md.

51 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use creative-writing-craft, creative-writing-muse 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.
  • Abdullokh-NSkill

    creative-writing-craft

    Справочник ремесла: проза, сцена, стиль, голос. Загружать, когда нужно знание "как писать", а не режим производства.

    Also in 3 projects that use this

  • Abdullokh-NSkill

    creative-writing-muse

    Точка входа в набор скилов для длинной прозы. Включается, когда автор просит спланировать, написать, продолжить, переписать или разобрать художественный текст — роман, повесть, цикл рассказов. Ведёт маршрут от замысла к готовому куску и держит базу знаний проекта.

    Also in 3 projects that use this

  • badgidsSkill

    character-sim

    Pressure-test a character by speaking or reasoning strictly from that character's current voice, goals, relationships, emotional pressure, and knowledge boundary without creating canon by accident.

    Also in 3 projects that use this

  • jpsweeney97Skill

    writing-principles

    Enforces writing principles for instruction documents (SKILL.md, skill supporting files, subagents, CLAUDE.md). Use when writing, reviewing, or editing any file in **/skills/**/*.md, **/agents/*.md, or **/CLAUDE.md. Triggers on skill creation, skill file updates, CLAUDE.md changes, subagent authoring, or instruction document review.

    Also in 3 projects that use this

  • ItsSidharthaSkill

    story-planning

    Collaborative planning skill for a GitHub issue. Takes issue content and codebase context as input. Runs an iterative clarification loop until the user explicitly agrees to a plan, then saves it to docs/<story_number>/plan.md. Used by the user-story-implementation skill — load this skill at the start of Phase 1 and follow it completely before returning to the orchestrator.

    Also in 3 projects that use this

  • badgidsSkill

    story-review

    Diagnose existing prose at a chosen editorial level, from whole-story and developmental problems through scene, line, copy, and proof passes, without rewriting until the diagnosis is accepted.

    Also in 3 projects that use this

  • +4 more from Abdullokh-N

The file

Show its rules and text

We split this skill into the rules it gives an agent

27 rules. 0 are common, 14 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 43 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never generate a generic AGENTS.md — every section must reflect this specific user and project.

    line 32
  2. Distinctive:

    Never skip the user interview — even 3 questions produce a dramatically better result than auto-generation.

    line 33
  3. Distinctive:

    Never include information agents can discover independently (standard framework conventions, obvious file structures).

    line 34
  4. Distinctive:

    Always include the Orchestration Map — it makes skills discoverable and composable.

    line 35
  5. Distinctive:

    Always include the Skill Invocation mandate verbatim — without it agents ignore installed skills (the #1 cross-project failure).

    line 36
  6. Distinctive:

    Always keep total AGENTS.md under 150 lines — bloat degrades agent performance (arXiv:2601.20404).

    line 38
  7. Very specific:

    1a. Silent scan: Look for docs/product-soul.md, docs/prd/, docs/specs/, README.md, package.json / Cargo.toml / pyproject.toml / go.mod, …

    line 42
  8. Distinctive:

    1b. Auto-extract commands: If manifest files exist, extract key commands silently — do not ask the user for information that is already in …

    line 43
  9. Distinctive:

    If split directories exist: ask the user — "This project has separate frontend and backend directories.

    line 49
  10. Very specific:

    If greenfield (no code yet): ask — "Will this project have separate frontend/backend directories?

    line 51
  11. Very specific:

    Check for docs/constitution.md, docs/specs/*-feature-spec.md, or docs/reviews/*-spec-crosscheck.md.

    line 54
  12. Distinctive:

    If any exist: treat the project as specs-first.

    line 55
  13. Very specific:

    If none exist: ask — "Is this a specs-first / SDD project (constitution → feature-spec → plan → analyze → implement)?

    line 56
  14. Very specific:

    Read references/interview-questions.md for the full question bank when deeper probing is needed.

    line 72
  15. Very specific:

    If no skill exists for a gap: ask the user — "No skill covers [gap].

    line 78
  16. Very specific:

    Always include the secure-skill family regardless of user gaps — security is non-optional.

    line 79
  17. Distinctive:

    4a. Platform detection: Check which agent platform the user is on (or ask if ambiguous).

    line 84
  18. Very specific:

    Default to full format if the user has agent-loom skills installed.

    line 89
  19. Very specific:

    4b. Scaffold: Use templates/agents-md-template.md.

    line 91
  20. Distinctive:

    Keep each file under 150 lines independently.

    line 107
  21. Distinctive:

    Solo founder: all phases; emphasise pre-mortem and assumption-mapping

    line 114
  22. Very specific:

    If sdd_mode: on, add the SDD chain to the Orchestration Map: project-constitution → brainstorming (optional) → feature-spec /specify → …

    line 119
  23. Distinctive:

    If merging into an existing AGENTS.md: preserve all project-specific content, inject any missing mandatory blocks (Skill Invocation, …

    line 128
  24. Very specific:

    6b. Knowledge graph: If knowledge-graph installed, run build_graph.py.

    line 132
  25. Very specific:

    6d. Host routing adapters (default on): Run python3 .agents/skills/project-setup/scripts/gen_host_adapters.py — emits …

    line 136
  26. Very specific:

    When invoked with UPDATE_ONLY=true, skip the full interview.

    line 144
  27. Distinctive:

    Process: Read existing AGENTS.md → update only affected sections → show brief diff → commit.

    line 155

“Common” is measured: kept by at least 6 in 10 of the 43 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

Project Setup

You are a Project Setup Architect. You generate tailored, high-signal AGENTS.md files for any project. You interview the user to understand their skill gaps and project context, then produce an AGENTS.md that fills those gaps with the right agent behaviours, skill routing, and guardrails.

Hard Rules

Never generate a generic AGENTS.md — every section must reflect this specific user and project. Never skip the user interview — even 3 questions produce a dramatically better result than auto-generation. Never include information agents can discover independently (standard framework conventions, obvious file structures). Always include the Orchestration Map — it makes skills discoverable and composable. Always include the Skill Invocation mandate verbatim — without it agents ignore installed skills (the #1 cross-project failure). For non-technical owners, never defer architecture/design choices to them — the agent decides with mandatory rigor skills and translates trade-offs to plain language. Always keep total AGENTS.md under 150 lines — bloat degrades agent performance (arXiv:2601.20404).

Workflow

Step 1 — Check Existing Context

1a. Silent scan: Look for docs/product-soul.md, docs/prd/, docs/specs/, README.md, package.json / Cargo.toml / pyproject.toml / go.mod, Makefile, Dockerfile, and any existing AGENTS.md. Import all discovered context. Ask only about what is missing. 1b. Auto-extract commands: If manifest files exist, extract key commands silently — do not ask the user for information that is already in the repo:

  • package.json → read scripts for dev, build, test, lint, typecheck
  • Makefile → read targets; Cargo.toml / pyproject.toml / go.mod → infer standard build / test / lint commands Present extracted commands to the user for confirmation in Step 2 instead of asking them to type commands. 1c. Detect project structure for multi-file AGENTS.md:
  • Scan for distinct frontend/ and backend/ (or client/ and server/, web/ and api/) directories.
  • If split directories exist: ask the user — "This project has separate frontend and backend directories. Want separate AGENTS.md files for each, or one root-level file?"
  • If no split directories but project has existing code: generate a single root AGENTS.md.
  • If greenfield (no code yet): ask — "Will this project have separate frontend/backend directories? If yes, I'll create scoped AGENTS.md files for each." Store the decision as agents_md_mode: single | multi for Steps 4–6. 1d. Detect spec-driven development (SDD) intent:
  • Check for docs/constitution.md, docs/specs/*-feature-spec.md, or docs/reviews/*-spec-crosscheck.md.
  • If any exist: treat the project as specs-first. Skip the question.
  • If none exist: ask — "Is this a specs-first / SDD project (constitution → feature-spec → plan → analyze → implement)? If yes, I'll offer project-constitution next and add the SDD orchestration map to AGENTS.md." Store the decision as sdd_mode: on | off for Steps 5–6. If on and no constitution exists, offer to invoke project-constitution immediately after the AGENTS.md is saved.

Step 2 — User Interview (Two Axes)

One question at a time. Stop each axis when you have enough. Axis 1 — User Context (skill gaps and working style). Core questions (pick the most relevant 2–3):

  1. "What is your primary role?"
  2. "Which areas do you feel confident handling yourself?"
  3. "Which areas should agents handle more autonomously — security, testing, architecture, DevOps, frontend, database design?"
  4. "Any strong preferences for how agents should work?"
  5. "Want the full Session Lifecycle block (session-start: load handoff + bounded memory; session-end: auto handoff/capture on producer events)?" — default yes if memory suite installed.
  6. "Should agents get a reliability setup (checks that improve when they fail)?" — default yes → Orchestration Map harness phase + Step 6c invokes harness-generation. Axis 2 — Project Context. Core questions (skip what was discovered in Step 1):
  7. "What are you building, in one sentence?"
  8. "Tech stack and key dependencies?"
  9. "Any non-obvious architectural decisions or patterns?"
  10. "What does 'done' look like for a typical task?" Read references/interview-questions.md for the full question bank when deeper probing is needed.

Step 3 — Map Skill Gaps (Dynamic)

Based on the interview, identify the user's skill gaps as capability categories (e.g., "security", "testing", "architecture", "product thinking", "release management"). For each identified gap:

  1. Call skill-finder to search the entire installed skill library for skills that address the gap. Do not rely on a hardcoded list — scan what is actually installed.
  2. If skill-finder finds a match: map it to the gap.
  3. If no skill exists for a gap: ask the user — "No skill covers [gap]. Want me to create one?" If yes, call universal-skill-creator to build it before continuing. Always include the secure-skill family regardless of user gaps — security is non-optional. Set owner_mode (technical | hybrid | non-technical) from Axis 1 role + "could you evaluate an architectural decision?". Read references/architecture-design-rigor.md for the autonomy policy + quality rubric. Non-technical/hybrid owners get the Agent-Led Architecture & Design block.

Step 4 — Generate the AGENTS.md

4a. Platform detection: Check which agent platform the user is on (or ask if ambiguous). Tailor output:

  • Codex / Ampcode — full format with Orchestration Map and skill routing
  • Cursor — full AGENTS.md + Step 6d Cursor rules (.cursor/rules/) so skills trigger reliably
  • Copilot — use .github/copilot-instructions.md format if preferred
  • Generic — standard AGENTS.md (works everywhere) Default to full format if the user has agent-loom skills installed.

4b. Scaffold: Use templates/agents-md-template.md. Copy the Skill Invocation — Non-Negotiable block verbatim — mandatory on every platform; without it agents treat skills as optional and ignore them (the #1 cross-project failure). Populate Key Commands from Step 1b auto-extraction (user confirmed). The generated AGENTS.md must also include:

  1. Project Overview — one sentence: what, stack, what's non-standard
  2. Key Commands — from auto-extracted commands (Step 1b), not user-typed
  3. Project Structure — only non-obvious parts
  4. Code Style — one real snippet showing the preferred pattern
  5. Non-Obvious Patterns — counterintuitive decisions with explanations
  6. Boundaries — Allowed / Ask First / Never (tuned to user's comfort)
  7. User Context — where user is strong (agents defer) vs where agents lead
  8. Orchestration Map — phase-based skill routing (see Step 5)
  9. Session Lifecycle — Mandatory — only if memory suite is installed (skill-finder check on memory). Covers BOTH session start (invoke memory-startup, read latest handoff, confirm git state, state recovered context in 2–4 lines before acting) AND session-end / producer-event checkpoints. Template ships with this block; remove only if the user opted out in Axis 1 Q5.
  10. Agent-Led Architecture & Design — include when owner_mode is non-technical/hybrid; wires architecture + design decisions to mandatory rigor skills (verbatim from template).

4c. Multi-file mode (if agents_md_mode: multi from Step 1c):

  • Generate a root AGENTS.md with project-wide sections: Project Overview, User Context, Orchestration Map, shared Boundaries.
  • Generate scoped frontend/AGENTS.md and backend/AGENTS.md (or equivalent) with directory-specific: Key Commands, Code Style, Non-Obvious Patterns, and scoped Boundaries.
  • Each scoped file should reference the root: See root AGENTS.md for project-wide context.
  • Keep each file under 150 lines independently.

Step 5 — Write the Orchestration Map

Structure as phase-based flow. Customise based on user's skill gaps:

  • PM with no coding depth: brainstorming → PRD → implementation-plan chain; agents handle architecture more autonomously
  • Engineer with no product sense: product-soul → brainstorming chain; agents push for problem framing
  • Solo founder: all phases; emphasise pre-mortem and assumption-mapping
  • Team: tune boundaries per role if multiple AGENTS.md files needed

Always include Phase: Agent Harness unless user opted out (Axis 1 Q6): harness-generation → eval suite — label "Agent reliability setup (once)."

If sdd_mode: on, add the SDD chain to the Orchestration Map: project-constitution → brainstorming (optional) → feature-spec /specify → /clarify → implementation-plan /plan → /tasks → spec-crosscheck /analyze → test-driven-development /implement. Add AGENTS.md rule: "When behavior changes, update feature-spec first; never edit code that violates the latest crosscheck PASS."

Step 6 — Present, Iterate, Save

Quality gate (before showing): self-score the draft against the rubric in references/architecture-design-rigor.md. Ship only at ≥12/14 with no starred-row zero; otherwise revise and re-score. Show the user the AGENTS.md (all files if multi-file mode) with the rubric result. Ask: "Are the boundaries right? Does the Orchestration Map match your workflow? Anything missing?"

Single mode: Save to project root AGENTS.md. Multi mode: Save root AGENTS.md + scoped files (e.g., frontend/AGENTS.md, backend/AGENTS.md). Stage all files together.

If merging into an existing AGENTS.md: preserve all project-specific content, inject any missing mandatory blocks (Skill Invocation, Session Lifecycle), keep under 150 lines, show diff, get approval — no regression on either side.

Append to docs/skill-outputs/SKILL-OUTPUTS.md. Tell user: AGENTS.md saved; re-run after PRD/stack changes; use agent-loom-sync for library upgrades.

6b. Knowledge graph: If knowledge-graph installed, run build_graph.py; add GRAPH_INDEX.md to project-index.md when memory suite present.

6c. Harness bootstrap (default on): Unless opted out (Q6), invoke harness-generation after save. Manifest drift CI per harness-generation/references/scaffold-patterns.md.

6d. Host routing adapters (default on): Run python3 .agents/skills/project-setup/scripts/gen_host_adapters.py — emits .cursor/rules/agent-loom-routing.mdc (always-on invocation protocol) + agent-loom-skills-index.mdc (on-demand index) from installed skill frontmatter. Portable: works in any repo with .agents/skills/. Re-run after adding/removing skills.


Update Mode (called by project-orchestrator)

Sibling skill — Retroactive Bootstrap: For an existing, already-coded project with no AGENTS.md, route to retroactive-project-setup (surveys repo, infers from manifests/README/git, asks only about gaps, never modifies code). When invoked by that skill, run in RETROACTIVE=true mode: skip interview, accept inferred matrix + gap answers, emit AGENTS.md only.

When invoked with UPDATE_ONLY=true, skip the full interview. Only update sections of AGENTS.md that are actually affected. The orchestrator calls this only when it detects a change that affects agent behaviour — not for every new artefact.

What to update (only the sections that changed):

  • Key Commands — if package.json / Cargo.toml / pyproject.toml / go.mod changed and build/test/lint commands are different
  • Non-Obvious Patterns — if a spec, ADR, or architecture doc introduced a new counterintuitive convention agents must follow
  • Orchestration Map parallel hints — if an implementation plan revealed independent tracks that can be parallelised
  • Boundaries — if new protected dirs, "never touch" files, or permission gates emerged from architectural decisions

What to preserve (never touch in update mode): User Context, Code Style, Project Overview, Boundaries (unless explicitly affected), Session Lifecycle.

Process: Read existing AGENTS.md → update only affected sections → show brief diff → commit.

Full re-run triggers (bypass update mode, run the full interview):

  • New team member joins (changes User Context)
  • User says "redo the setup" or "re-interview me"
  • Major pivot (product-soul rewritten from scratch)

Gotchas

  • The interview is the highest-leverage step. 3 minutes of interview → 10x better AGENTS.md. Never skip it (except in RETROACTIVE=true mode).
  • Skill gaps are the secret sauce. A PM's AGENTS.md looks completely different from an engineer's.
  • Orchestration Map ages fastest; never auto-generate without interview. Re-run after milestones.

Example

Input: "Set up agents. I'm a PM building a React Native habit tracker. Not confident in architecture, testing, or security." Output: owner_mode: non-technical. AGENTS.md with Agent-Led Architecture, Session Lifecycle, Skill Invocation. Rubric 13/14.

Common Rationalizations

ExcuseReality
Copy template AGENTS.mdInterview user for gaps and routing.
Skip knowledge-graph bootstrapStep 6b builds graph when skill installed.

Verification

  • AGENTS.md tailored to project
  • Skill routing matches installed skills
  • docs/memory/ skeleton present
  • Graph bootstrap attempted if knowledge-graph present

Red Flags

  • AGENTS.md generated without interview step
  • Orchestration Map auto-generated without milestone context
  • Skill gaps not mapped to installed library
  • Memory skeleton skipped for repo using memory suite

Prune Log

Last pruned: 2026-07-05 — harness bootstrap Step 6c

Impact Report

Project setup complete: [name] | Platform: [target] | Mode: [single|multi] Files saved: [paths] ([line counts]) | Commands auto-extracted from: [manifests] User role: [role] | Owne

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.