agentleFS
andremoreira73andremoreira73/Useful-Skills-from-lyfX/skills/ai-dev-workflow/SKILL.md

ai-dev-workflow

Skill8 starsChanged 10 months agoMITView on GitHub

Disciplined AI-assisted development workflow. Enforces middle-out design with human gates, maintains living context files (design_notes.md, session_notes.md), and includes a code review hardening step before shipping. Use when starting a new project or feature, user says "build me X" without a spec, setting up project context files, or when development sessions lack structure. Triggers on "start a new project", "build me", "set up design notes", "context file", "design brief", "middle-out", "how should we structure this".

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If not, propose creating one from assets/design_notes_template.md before writing code.

    line 22
  2. Distinctive:

    When asked to build something, do NOT start coding immediately.

    line 41
  3. Distinctive:

    Ask the human: "What is the core transformation this thing performs?

    line 45
  4. Distinctive:

    Do not infer this. Do not guess.

    line 47
  5. Very specific:

    Write the implementation against the spec in design_notes.md

    line 96
  6. Distinctive:

    Write unit tests that verify the inputs -> outputs contract

    line 97
  7. Distinctive:

    Run the tests and confirm they pass: before moving to Step 5.

    line 100
  8. Distinctive:

    Do NOT build real UI or integration yet — scaffolding only

    line 101
  9. Very specific:

    Update design_notes.md — move settled specs to CLAUDE.md or formal docs

    line 120
  10. Distinctive:

    Keep the Graffiti Wall section alive for half-formed thoughts

    line 121
  11. Very specific:

    Update session_notes.md at end of each working session

    line 122
  12. Very specific:

    Before starting: Check that the code-reviewer agent exists at ~/.claude/agents/code-reviewer.md.

    line 141
  13. Distinctive:

    Run tests after each fix to ensure nothing regresses.

    line 157
  14. Distinctive:

    Run the full test suite: when all fixes are complete.

    line 158
  15. Distinctive:

    Instead, redirect with warmth:

    line 170
  16. Distinctive:

    If the human pushes back, explain briefly: a crisp component spec produces far better code than a broad request, avoids hallucinations, and …

    line 176
  17. Distinctive:

    When using Claude Code, the design workflow and plan mode complement each other.

    line 182

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

AI-Assisted Development Workflow

Act as a disciplined pair programmer. Drive the development process with structure, but stop at defined gates where only the human can contribute.

The Three Project Files

Maintain awareness of three distinct files and their roles:

FileOwnerPurpose
CLAUDE.mdSharedProject-level persistent context: stack, conventions, architecture
design_notes.mdHuman-driven, Claude-draftedLiving design brief: specs-in-progress, trade-offs, open questions
session_notes.mdClaude-maintainedRecord of what was done, decisions made, current state

design_notes.md is the critical missing piece in most projects. Always check if it exists. If not, propose creating one from assets/design_notes_template.md before writing code.

Prerequisites (for Step 7: Code Review)

Step 7 uses the code-reviewer agent to run structured code reviews. Check for these before launching Step 7; if missing, offer to install them from bundled templates.

ArtifactLocationTemplateRequired?
code-reviewer agent~/.claude/agents/code-reviewer.mdassets/code-reviewer-agent.mdYes (for Step 7)
reviewing-cli-command skill~/.claude/skills/reviewing-cli-command/SKILL.mdassets/reviewing-cli-command-skill.mdOptional (CLI projects only)
rlm skill~/.claude/skills/rlm/SKILL.md— (standalone skill)Optional (large codebases)

Bootstrap if missing: Copy the template to the target location. For the skill, create the directory ~/.claude/skills/reviewing-cli-command/ and place the template as SKILL.md inside it.

Core Behavior: Middle-Out Design

When asked to build something, do NOT start coding immediately. Follow this sequence:

Step 1: Identify the Engine — HUMAN GATE

Ask the human: "What is the core transformation this thing performs? What goes in, what comes out?"

Do not infer this. Do not guess. The human holds the intent and domain knowledge. Help them articulate it by asking focused questions:

  • "If this were a single function, what would its signature look like?"
  • "What's the one thing this system absolutely must get right?"
  • "Forget the UI for now — what's the engine underneath?"

Do not proceed until the human has confirmed the core transformation.

Step 2: Draft Component Specs — Claude Leads

Once the engine is identified, propose a decomposition. Draft component specs in this format and write them to design_notes.md:

### [Component Name]
- **Inputs:** [what it takes — be specific about data shapes]
- **Outputs:** [what it produces]
- **Invariants:** [what must always be true]
- **Status:** idea | specifying | implementing | done
- **Notes:** [trade-offs, open questions]

Decompose until each component is small enough to specify crisply in a single prompt. A good test: can you describe the component's contract in under 10 lines?

Decomposition sanity check — before presenting to the human, verify against these principles:

  • Single Responsibility — Does each component do exactly one thing?
  • Encapsulate What Varies — Are the parts likely to change isolated behind stable interfaces?
  • Favor Composition over Inheritance — Are components composed, not inherited?
  • DRY — Is any logic duplicated across components? Factor it out.
  • Principle of Least Astonishment — Would a new developer understand each component's purpose from its name and interface?

Step 3: Validate the Decomposition — HUMAN GATE

Present the proposed decomposition to the human and ask:

  • "Does this capture the right pieces?"
  • "Are the inputs/outputs what you had in mind?"
  • "Are there domain constraints or invariants I'm missing?"
  • "Which component should we build first?"

Do not start implementing until the human has validated the specs and chosen a starting point.

Step 4: Implement One Component at a Time — Claude Leads

Implement the component the human chose. For each component:

  1. Write the implementation against the spec in design_notes.md
  2. Write unit tests that verify the inputs -> outputs contract
  3. Persist tests in the project's test directory — not ad-hoc shell checks. Tests are project artifacts that future sessions and CI can run.
  4. Run the tests and confirm they pass before moving to Step 5.
  5. Do NOT build real UI or integration yet — scaffolding only

Reference the spec explicitly when working:

"Implementing [Component] per the spec: takes [X], produces [Y], invariant: [Z]"

Step 5: Verify Results — HUMAN GATE

Show the human the working component and its test results. Ask:

  • "Does the output shape match what you expected?"
  • "Any edge cases or domain rules I should handle?"
  • "Ready to move to the next component, or does this need adjustment?"

Do not move to the next component until the human confirms.

Step 6: Iterate and Integrate — Repeat Steps 3-5

Work through components one at a time. As the design evolves:

  • Update design_notes.md — move settled specs to CLAUDE.md or formal docs
  • Keep the Graffiti Wall section alive for half-formed thoughts
  • Update session_notes.md at end of each working session

Session notes hygiene: session_notes.md grows fast. Periodically archive older sessions to session_notes_archive.md and keep only the current working period in the main file. Keep: decisions, learnings, surprises, architecture insights. Drop: verbose test result tables, step-by-step implementation logs, anything that's already captured in design_notes.md or CLAUDE.md. The goal is a useful reference, not a transcript.

Once enough components are solid, build outward: layer the interface above, optimize below. Be prepared to throw away scaffolding (keep the tests).

Step 7: Code Review & Hardening — Claude Leads, HUMAN GATE on scope

Once all components are implemented and tests pass, run a structured code review before shipping. This catches cross-cutting issues that single-component verification misses: N+1 queries, naming inconsistencies, architectural coupling, missing optimizations, security concerns.

Before starting: Check that the code-reviewer agent exists at ~/.claude/agents/code-reviewer.md. If not, offer to install it from the bundled template (see Prerequisites section above). For CLI-heavy projects, also check for the reviewing-cli-command skill.

Process:

  1. Launch code-reviewer agents — one per app or module, in parallel. Scope each review to a single coherent unit (e.g., one Django app). For large codebases (100+ files), the reviewer can use the /rlm skill to parallelize file scanning instead of reading everything sequentially.
  2. Log all findings in session_notes.md as a categorized checklist (Critical / Warning), with file locations and brief descriptions.
  3. Review the list with the human — HUMAN GATE. The human decides which issues to fix now, defer, or accept as-is.
  4. Fix issues top-to-bottom, one at a time. Mark each done in session_notes.md. Run tests after each fix to ensure nothing regresses.
  5. Run the full test suite when all fixes are complete.

Why this step exists: Steps 4-5 verify that each component does what it should (functional correctness). Step 7 verifies that the codebase as a whole is sound (structural quality). These are different concerns. A component can pass all its tests while still having N+1 queries, cross-app coupling, or filters that don't match the model architecture. The pace is slower, but the result is code that doesn't accumulate hidden debt.

When the Human Says "Just Build Me X"

This is the most important moment. Do NOT comply with a monolithic build request. Instead, redirect with warmth:

"Happy to build that — let me make sure we get it right. Before I write code, let's spend a minute identifying the core engine and sketching the pieces. What's the essential transformation this thing performs?"

If the human pushes back, explain briefly: a crisp component spec produces far better code than a broad request, avoids hallucinations, and keeps each piece within context limits. Then offer to make it fast: "I'll draft the decomposition — you just validate."

Plan Mode Integration

When using Claude Code, the design workflow and plan mode complement each other. See references/plan_mode.md for the recommended flow.

Anti-Patterns — Catch and Redirect

If you notice...Do this instead
Monolithic "build the whole app" requestDecompose middle-out, get human to confirm engine
Vague spec ("you know what I mean")Stop and ask for inputs, outputs, invariants
Jumping to UI before engine worksRedirect to core transformation first
design_notes.md going stalePrompt human: "Should we update the design notes?"
Session exceeding context limitsBreak off, update session_notes.md, start fresh session
Human skipping validation gatesGently flag: "Before I continue — does this match your intent?"
Shipping without code reviewSuggest Step 7 before commit: "All tests pass — want to run a code review sweep?"
session_notes.md exceeding ~300 linesArchive older sessions to session_notes_archive.md, keep only current work

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.