agentleFS
aneja5aneja5/forge-skills/skills/incremental-implementation/SKILL.md

incremental-implementation

Skill3 starsChanged 7 months agoMITView on GitHub

Use when .forge/tasks.yaml exists and implementation is starting, when executing a planned task list one task at a time, when a feature must ship in independently-verifiable slices, or when contracts in .forge/contracts/ need to be implemented against acceptance criteria.

47 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use constraint-driven-development, deprecation-and-migration and 8 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.
  • vinvcnSkill

    constraint-driven-development

    把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。

    Also in 4 projects that use this

  • az9713Skill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 20 projects that use this

  • galandoSkill

    source-driven-development

    Version-aware, source-driven development — fetch official docs before writing framework code

    Also in 20 projects that use this

  • az9713Skill

    code-simplification

    Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

    Also in 24 projects that use this

  • borhen68Skill

    observability-and-instrumentation

    Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.

    Also in 9 projects that use this

  • mycelium-hqSkill

    doubt-driven-development

    Use when correctness matters more than speed: about to commit non-trivial code, make an architectural call under uncertainty, work in unfamiliar code, or assert what the compiler cannot check (''this is safe'', ''thread-safe'', ''this scales'', ''matches the spec''). Strongest on high-stakes surfaces (production deploys, security-sensitive logic, data migrations, irreversible operations) and when the user asks to sanity-check, red-team, double-check, or get a second opinion on a decision.

    Also in 13 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 2 are distinctive, and 10 are very specific to this project.

  • 0

    Common

    Most of the 46 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No task plan exists — run planning-and-task-breakdown first

    line 20
  2. Very specific:

    Read .forge/tasks.yaml. Find all tasks where status: pending (or unset) AND every task in depends_on has status: done.

    line 50
  3. Very specific:

    Write the file back. The mutation is per-task — do not rewrite the whole tasks.yaml.

    line 56
  4. Very specific:

    Read the task's acceptance criteria and verification steps.

    line 60
  5. Very specific:

    If .forge/testing-strategy.md exists, also read it — per-module coverage decisions there override TDD defaults.

    line 64
  6. Very specific:

    Follow the tdd skill. For this task's acceptance criteria:

    line 68
  7. Distinctive:

    Run the verification steps listed in the task.

    line 81
  8. Very specific:

    Update .forge/tasks.yaml in place:

    line 99
  9. Very specific:

    Check if any tasks whose depends_on is now fully satisfied.

    line 104
  10. Very specific:

    If during Steps 2-4 you discovered the task can't complete as-scoped, do NOT silently continue.

    line 108
  11. Very specific:

    After ≥3 such events in a sprint, forge-sync will flag TASKS_DIVERGED — at that point, run /plan to re-baseline before picking the next …

    line 115
  12. Distinctive:

    Before marking any task done:

    line 119

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

Incremental Implementation

Overview

Pick the next ready task from .forge/tasks.yaml, load its contracts from .forge/contracts/, implement using tdd discipline (red-green-refactor), verify against acceptance criteria, commit, and mark done. Repeat until all tasks are complete.

When to Use

  • .forge/tasks.yaml exists with at least one unstarted task
  • Dependencies for the next task are complete
  • Ready to write code (not planning, not designing)

When NOT to Use

  • No task plan exists — run planning-and-task-breakdown first
  • Architecture is unclear — run architecture-and-contracts first
  • Task is XL and not decomposed — spike first, then plan

Common Rationalizations

ThoughtReality
"I'll implement a few tasks together to go faster"Mixing tasks blurs acceptance criteria and commit history
"I don't need to read the contract — I know the interface"Contracts encode invariants and error types you'll miss
"I'll write tests after the implementation is working"Then you're testing implementation, not behavior
"This small extra thing is obviously correct to add"Scope creep is always "obviously correct" in the moment
"I'll commit everything at the end"Atomic commits per task make revert and review tractable

Red Flags

  • Implementing a task that has unsatisfied dependencies in tasks.yaml
  • Writing code that touches modules not listed in the task's files_likely_affected
  • Skipping the contract read — implementing to an assumed interface
  • Committing with a message that doesn't reference the task ID
  • Acceptance criteria not verifiable after implementation
  • Task marked done before verification step passes
  • .forge/tasks.yaml not updated mid-flight when a task is split or blocked (the plan diverges silently)
  • Editing .forge/contracts/<X>.md inline when build reveals the contract is wrong (file /feedback instead)
  • Skipping skills: tag reads — implementing UI without loading design-system, writing migrations without loading database-design

Core Process

Step 1: Select the next task

Read .forge/tasks.yaml. Find all tasks where status: pending (or unset) AND every task in depends_on has status: done. Pick the highest-priority unblocked task (or ask the user if multiple are ready).

Immediately mark the selected task in place:

  • status: in_progress
  • started_at: <ISO 8601 UTC with Z>

Write the file back. The mutation is per-task — do not rewrite the whole tasks.yaml. Re-emit only the forge:meta generated_at/content_hash if the file as a whole was touched (status flips count); the depends_on set does not change.

Step 2: Load context

Read the task's acceptance criteria and verification steps. Read each contract listed in the task's contracts field from .forge/contracts/. Load only the files_likely_affected — don't read the whole codebase.

Skill-tagged context load (#41): if the task has a skills: field (e.g., [design-system, accessibility, api-design]), read skills/<each>/SKILL.md BEFORE writing the first test. These tags exist precisely because the task touches a domain whose rules are encoded in another skill. Skipping them means the implementation will recreate problems those skills exist to prevent.

If .forge/testing-strategy.md exists, also read it — per-module coverage decisions there override TDD defaults.

Step 3: Implement with TDD

Follow the tdd skill. For this task's acceptance criteria:

RED:   Write a failing test for the first acceptance criterion
GREEN: Write minimum code to make it pass
REPEAT for each acceptance criterion
REFACTOR: Clean up while keeping all tests green

Stay within the task's scope. Do not add features not in the acceptance criteria. Do not touch files outside files_likely_affected without explicit reason.

Step 4: Verify

Run the verification steps listed in the task. All must pass:

  • Unit tests green
  • Integration tests green (if listed)
  • Manual verification step confirmed (if listed)

Step 5: Commit

git add <files>
git commit -m "[T001] <task title>

- Implements: <acceptance criterion 1>
- Implements: <acceptance criterion 2>
- Tests: <what the tests verify>"

Step 6: Mark done

Update .forge/tasks.yaml in place:

  • status: done
  • completed_at: <ISO 8601 UTC with Z>
  • commit: <short sha of the commit from Step 5>

Check if any tasks whose depends_on is now fully satisfied. Report progress to user.

Step 7: Mid-task discoveries — split, block, or feedback

If during Steps 2-4 you discovered the task can't complete as-scoped, do NOT silently continue. Update .forge/tasks.yaml and (if upstream is wrong) file a feedback entry:

  • Scope creep discovered → split the task. Mark the original status: split. Append new task IDs into the notes array describing the split. Add new task entries for the carved-out work. Do not implement the carved-out work in this run.
  • Unmet dependency surfaced → set status: blocked. Append the blocker to notes. Stop work on this task. Pick the next ready task.
  • The CONTRACT is wrong (refund endpoint missing, wrong type, missing error case) → run /feedback to file .forge/feedback/<timestamp>-build.md targeting the broken contract. Do NOT edit the contract inline. Mark the task status: blocked with notes referencing the feedback entry path. The contract update happens via /architect re-run.
  • The TEST STRATEGY contradicts what you need to write → file /feedback targeting .forge/testing-strategy.md. Continue per the strategy's current text for now.

After ≥3 such events in a sprint, forge-sync will flag TASKS_DIVERGED — at that point, run /plan to re-baseline before picking the next task.

Verification

Before marking any task done:

  • Task started: status: in_progress + started_at set when work began
  • All skills: tags read (if any listed) BEFORE first test was written
  • .forge/testing-strategy.md consulted if it exists
  • All acceptance criteria in tasks.yaml satisfied
  • All verification steps in tasks.yaml passed
  • No files touched outside the task's scope (or explicitly justified)
  • Contract invariants not violated (check against .forge/contracts/)
  • Tests verify behavior through public interface, not implementation details
  • Commit message references task ID
  • .forge/tasks.yaml updated: status: done, completed_at, commit (short sha)
  • If mid-flight discoveries occurred: split tasks were added, OR a feedback entry was filed, OR the task was marked blocked with a reason — never silently absorbed

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.