agentleFS
tddworkstddworks/claude-skills/skills/feature-lifecycle/SKILL.md

feature-lifecycle

Skill39 starsChanged 10 months agoApache-2.0View on GitHub

Full-lifecycle guide for implementing a feature end-to-end in a London-school DDD Swift/iOS codebase (or any layered Domain/Infrastructure/App project that uses protocol + concrete impl aggregates, narrow infrastructure ports, and Chicago-school state-based TDD). Use this skill whenever the user asks to **build**, **implement**, **add**, **ship**, or **develop** a feature — including vague asks like "let's add X", "build me Y", "implement Z", or "wire up the W flow". Strongly prefer this skill over jumping straight to code whenever a new domain concept is in play. Each lifecycle phase has its own focused sub-guide so the agent loads only the instructions for the current task, not a 600-line monolith.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. CodyAMaughan/agent-first-engineering★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    The phases are sequential. Don't skip ahead: If a phase's gate isn't met, go back.

    line 22
  2. Very specific:

    Every phase assumes this shape.

    line 66
  3. Distinctive:

    Names feel clunky?: Read them out loud. If a non-engineer wouldn't say it, rename.

    line 72

≈ “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

Feature Lifecycle

One skill, eight focused phases. Each phase tells the agent exactly what to do for that step — inputs, steps, outputs, and a gate to know it's done.

1. Discovery        → what already exists, what the user means
2. Domain design    → ASCII architecture + naming + user approval
3. Domain TDD       → value tests + aggregate tests + protocol + impl class (Red → Green)
4. Composition      → plug the aggregate onto parent + facade forwarders
5. Infrastructure   → port conformance + push routing + wire format
6. Views            → SwiftUI bind to the facade; no ViewModel layer
7. Docs             → feature doc + aggregate audit + visual artifacts
8. Verify           → pre-commit checklist + tests + build

The phases are sequential. Don't skip ahead. If a phase's gate isn't met, go back.


Which sub-guide to load

Load only the reference for the phase you're in. Don't read the full set up front.

PhaseLoadOutput when you're done
1. Discoveryreferences/01-discovery.mdA short "discovery note" listing existing docs, drift, user's words
2. Domain designreferences/02-domain-design.mdApproved ASCII architecture + component table + file map
3. Domain TDDreferences/03-domain-tdd.mdProtocol + <NounImpl> + port + tests all green
4. Compositionreferences/04-composition.mdAggregate plugged into parent entity + facade forwarders on the composition root
5. Infrastructurereferences/05-infrastructure.mdPort conformance + push routing wired; infra layer green
6. Viewsreferences/06-views.mdViews binding to the facade; UI builds
7. Docsreferences/07-docs.mdFeature doc + audit update + visual artifacts
8. Verifyreferences/08-verify.mdChecklist green, tests green, release build green

The core pattern (the thing every phase serves)

// 1. Domain noun — protocol
@MainActor @Mockable
public protocol <Aggregate>: Observable {
    var items: [<Value>] { get }
    // ... rich computed queries + business-intent commands + apply/upsert/remove
}

// 2. Concrete implementation class
@Observable @MainActor
public final class <AggregateImpl>: <Aggregate> {
    public init(port: (any <AggregatePort>)? = nil) { … }
}

// 3. Narrow internal port (infra seam)
@Mockable
public protocol <AggregatePort>: Sendable {
    // async throws methods the infra client / DB / API implements
}

Every phase assumes this shape. Deviations (protocol-less classes, legacy xxxBackend glue, role protocols named as collections) are smells — see references/02-domain-design.md for the naming playbook.


When in doubt

  • Names feel clunky? Read them out loud. If a non-engineer wouldn't say it, rename.
  • Tests hard to write? The aggregate is coupled to too much. Pull dependencies behind a narrow port.
  • Composition root keeps growing methods? Push them down to the owning aggregate. The root is a facade, not a coordinator.
  • Views casting as? <concrete impl>? Protocol surface too minimal. Grow it.
  • User pushes back on a name? Pushback is signal. Re-derive from first principles — don't patch with another loaded word.

The anti-patterns (from most-costly, in order)

  1. Jumping to code without Phase 1–2. You'll build the wrong shape and have to undo it.
  2. Domain as setters only — no rich behavior. Logic ends up scattered across views and infra.
  3. XxxBackend, XxxRegistry, XxxManager, XxxService. Infrastructure words in the domain.
  4. Coordinator methods on the composition root. Cross-aggregate orchestration lives on the aggregate that owns the triggering state, or propagates via @Observable reactions.
  5. Views touching @Observable indirection (e.g. root.something?.child?.more). Expose a facade on the root; never leak composition detail to views.
  6. Interaction-based tests (verify(mock).method.called(...)). This skill uses Chicago-school state/return-value tests only.
  7. Ship-first, doc-after. The feature doc (Phase 7) captures why; write it before memory decays.

Load the next sub-guide when you're ready for the phase. One at a time.

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.