agentleFS
jmylchreestjmylchreest/aide/skills/implement/SKILL.md

implement

Skill19 starsChanged 3 months agoMITView on GitHub

TDD implementation - make failing tests pass

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, ask-matt 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.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 43 projects that use this

  • GoogleSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 91 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 50 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 88 projects that use this

  • ryotaroh180105Skill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 42 projects that use this

  • GoogleSkill

    to-spec

    Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.

    Also in 168 projects that use this

  • +3 more from google

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 20 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 171 edited versions we read keep these.

  • 20

    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. Very specific:

    Use mcp__plugin_aide_aide__decision_get with the feature topic to review decisions from DESIGN stage.

    line 71
  2. Very specific:

    Use mcp__plugin_aide_aide__decision_list to see all project decisions.

    line 72
  3. Distinctive:

    Write code to make tests pass one at a time:

    line 76
  4. Distinctive:

    Write minimal code to pass it

    line 79
  5. Distinctive:

    If passing, move to next test

    line 81
  6. Distinctive:

    If failing, fix before proceeding

    line 82
  7. Distinctive:

    BLOCKING RULE: If any test fails:

    line 102
  8. Distinctive:

    Tests First: Never write code without a failing test

    line 129
  9. Distinctive:

    Minimal Code: Only write what's needed to pass tests

    line 130
  10. Distinctive:

    No Gold Plating: Don't add features not covered by tests

    line 131
  11. Distinctive:

    No Skipping: Every test must pass

    line 134
  12. Distinctive:

    Check if test has a bug (it happens)

    line 197
  13. Distinctive:

    Check design decisions - is implementation matching spec?

    line 198
  14. Distinctive:

    If stuck after 3 attempts, ask for help

    line 209
  15. Distinctive:

    Read error message carefully

    line 213
  16. Distinctive:

    Check for missing imports

    line 214
  17. Distinctive:

    Check for type mismatches

    line 215
  18. Distinctive:

    If tests pass, the contract is met

    line 221
  19. Distinctive:

    Don't refactor during implement stage

    line 222
  20. Distinctive:

    When all tests pass:

    line 242
  21. Distinctive:

    When storing memories from this skill (blockers, issues, abandoned approaches), always:

    line 256
  22. Very specific:

    Verify codebase claims: before storing — If a memory references a file, function, or path, confirm it exists first.

    line 260
  23. Distinctive:

    Next: VERIFY stage runs full validation

    line 275

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

Implement Mode

Recommended model tier: smart (opus) - this skill requires complex reasoning

Focused TDD implementation: make failing tests pass with minimal code.

Purpose

This is the DEV stage of the SDLC pipeline. Tests already exist from the TEST stage. Your job is to write the minimal implementation that makes them pass.

Prerequisites

Before starting:

  • Tests exist and are failing (from TEST stage)
  • Design/spec is available (from DESIGN stage)
  • You know which files to create/modify

Workflow

Step 1: Verify Tests Exist and Fail

# Run the tests - they MUST fail initially
npm test -- path/to/feature.test.ts
# or
go test ./pkg/feature/...

If tests pass: The work is already done. Mark complete and move on.

If tests don't exist: This is wrong - go back to TEST stage.

Step 2: Read the Tests

Understand what the tests expect:

  • What functions/methods need to exist?
  • What are the expected inputs and outputs?
  • What edge cases are covered?
# If a large test file is unfamiliar, an outline can help locate relevant tests
mcp__plugin_aide_aide__code_outline file="path/to/feature.test.ts"

# Read relevant test sections directly when their ranges are known
Read path/to/feature.test.ts offset=<start> limit=<count>

# Read the full file when it is small or most tests are relevant
Read path/to/feature.test.ts

For related source, read known ranges or symbols directly. Use code_outline when unfamiliar large-file structure would help select relevant code; read the full file when most contents are needed. Batch known symbols with code_read_symbol (symbols, up to 10) when useful. Extra retrieval rounds can outweigh smaller responses, so an outline is not a prerequisite to reading or editing.

Step 3: Check Design Decisions

Use mcp__plugin_aide_aide__decision_get with the feature topic to review decisions from DESIGN stage. Use mcp__plugin_aide_aide__decision_list to see all project decisions.

Step 4: Implement Incrementally

Write code to make tests pass one at a time:

  1. Pick the simplest failing test
  2. Write minimal code to pass it
  3. Run tests
  4. If passing, move to next test
  5. If failing, fix before proceeding
# Run specific test
npm test -- --grep "should create user"
# or
go test -run TestCreateUser ./pkg/...

Step 5: Backpressure Checkpoint (REQUIRED)

You CANNOT proceed until ALL tests pass.

# Full test run
npm test -- path/to/feature.test.ts
# or
go test -v ./pkg/feature/...

BLOCKING RULE: If any test fails:

  1. Analyze the failure
  2. Fix the issue
  3. Re-run tests
  4. Repeat until ALL pass

DO NOT skip failing tests. DO NOT proceed with red tests.

Step 6: Verify Build

# Ensure it compiles
npm run build
# or
go build ./...

Step 7: Commit

git add -A
git commit -m "feat: implement <feature> - tests passing"

Rules

  1. Tests First: Never write code without a failing test
  2. Minimal Code: Only write what's needed to pass tests
  3. No Gold Plating: Don't add features not covered by tests
  4. Red → Green: Tests must fail before they pass
  5. Atomic Commits: One logical change per commit
  6. No Skipping: Every test must pass

Common Patterns

TypeScript/JavaScript

// Read test expectations
describe("UserService", () => {
  it("should create user with email and name", async () => {
    const user = await service.createUser({
      email: "test@example.com",
      name: "Test",
    });
    expect(user.id).toBeDefined();
    expect(user.email).toBe("test@example.com");
  });
});

// Implement to match
export class UserService {
  async createUser(input: CreateUserInput): Promise<User> {
    return {
      id: crypto.randomUUID(),
      email: input.email,
      name: input.name,
      createdAt: new Date(),
    };
  }
}

Go

// Read test expectations
func TestCreateUser(t *testing.T) {
    svc := NewUserService()
    user, err := svc.CreateUser(context.Background(), CreateUserInput{
        Email: "test@example.com",
        Name:  "Test",
    })
    require.NoError(t, err)
    assert.NotEmpty(t, user.ID)
    assert.Equal(t, "test@example.com", user.Email)
}

// Implement to match
func (s *UserService) CreateUser(ctx context.Context, input CreateUserInput) (*User, error) {
    return &User{
        ID:        uuid.New().String(),
        Email:     input.Email,
        Name:      input.Name,
        CreatedAt: time.Now(),
    }, nil
}

Failure Handling

Test Won't Pass After Multiple Attempts

  1. Re-read the test - is the expectation correct?
  2. Check if test has a bug (it happens)
  3. Check design decisions - is implementation matching spec?
  4. Record blocker:
    ./.aide/bin/aide memory add --category=blocker --tags=project:<name>,session:<id>,source:discovered "Cannot pass test X: <reason>"
  5. If you abandon the approach, record it so future sessions don't repeat it:
    ./.aide/bin/aide memory add --category=abandoned \
      --tags=reason:<why>,approach:<what>,project:<name>,session:<id>,source:discovered \
      "ABANDONED: <what was tried>. REASON: <why>. ALTERNATIVE: <new direction>. CONTEXT: <details>"
  6. If stuck after 3 attempts, ask for help

Build Fails

  1. Read error message carefully
  2. Check for missing imports
  3. Check for type mismatches
  4. Fix and re-run build
  5. Then re-run tests

Test Passes But Implementation Feels Wrong

  1. If tests pass, the contract is met
  2. Don't refactor during implement stage
  3. Note concerns for future:
    ./.aide/bin/aide memory add --category=issue --tags=project:<name>,session:<id>,source:discovered "Implementation of X could be improved: <how>"
  4. Proceed - refactoring is a separate concern

Binary location: The aide binary is at .aide/bin/aide. If it's on your $PATH, you can use aide directly.

Verification Checklist

Before completing:

  • All tests pass (not just some)
  • Build succeeds
  • Changes are committed
  • No debug code left (console.log, fmt.Println for debugging)

Completion

When all tests pass:

# Final verification
npm test -- path/to/feature.test.ts && npm run build

# Or Go
go test -v ./pkg/feature/... && go build ./...

Output: "Implementation complete. All tests passing. Ready for VERIFY stage."

Memory Hygiene

When storing memories from this skill (blockers, issues, abandoned approaches), always:

  1. Include source: tag — Use source:discovered for things you found, source:inferred for deductions
  2. Include scope tags — Add project:<name>,session:<id> (get project name from git remote or directory; session ID from $AIDE_SESSION_ID or $CLAUDE_SESSION_ID)
  3. Verify codebase claims before storing — If a memory references a file, function, or path, confirm it exists first. See the memorise skill for the full verification workflow.
  4. Never use scope:global unless storing a user preference

Integration with SDLC Pipeline

This skill is designed for the DEV stage:

[DESIGN] → [TEST] → [DEV/IMPLEMENT] → [VERIFY] → [DOCS]
                         ↑
                    YOU ARE HERE
  • Input: Failing tests from TEST stage
  • Output: Passing tests, working implementation
  • Next: VERIFY stage runs full validation

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.