agentleFS
DoistDoist/todoist-cli/.agents/skills/build-feature/SKILL.md

build-feature

Skill331 starsChanged 8 days agoMITView on GitHub

Builds a new command, flag or behaviour in thin test-first slices, after settling the open decisions with the owner. Use when asked to "add", "build", "implement", "support" or "create" something, such as a new command, subcommand or flag.

14 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Write each behaviour as a command and the expected result, for example: "td label create --name work --json calls addLabel with { name: …

    line 18
  2. Very specific:

    Follow verify. If the feature needs restructuring first, do that as a separate change with refactor.

    line 40

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

Build a feature

1. Read the closest existing feature

Find the command most like the one you are building and read it with its test: src/commands/task/add.ts for a write that returns an entity, src/commands/today.ts for a list, src/commands/label/delete.ts for a destructive write behind --yes. For a new command or subcommand, add-command is the checklist of every file to touch. Read the rules in AGENTS.md. Done when you can name the file you will copy patterns from.

2. Settle decisions in one round

List what the request leaves open: command and flag names (consistent verbs and flags across entities; see docs/decisions/001-lenient-cli-ergonomics.md), positional argument or named flag, the human and --json output, error codes, --dry-run and --yes, behaviour under a read-only token. Ask the owner all of them at once, each with your recommendation. Don't ask what the code can answer. Done when every decision has an answer.

3. Write "done" as checkable behaviours

Write each behaviour as a command and the expected result, for example: "td label create --name work --json calls addLabel with { name: 'work' } and prints the label as JSON". Each becomes a test. Done when a test could pass or fail on every one.

4. Build in thin slices, test first

For each behaviour: write its test at the public interface (program.parseAsync(['node', 'td', ...])), see it fail, make it pass, run its test file. Follow write-tests. Done when every behaviour from step 3 has a passing test you saw fail.

5. Update everything the change touches

You changedAlso update
A command, subcommand or flagSKILL_CONTENT in src/lib/skills/content.ts, then npm run sync:skill
Called a new SDK methodcreateMockApi() in src/test-support/mock-api.ts, API_SPINNER_MESSAGES in src/lib/api/core.ts; a read-only one goes in KNOWN_SAFE_API_METHODS (src/lib/permissions.ts)
A mutation that returns an entity--json through formatJson(result, '<entity>'), and the list under "JSON Output for Mutating Commands" in AGENTS.md
A delete, complete or archive-style writeIts entry in src/lib/mutation-json.ts, so --json gets the success envelope
Output that uses colour or symbolsAn --accessible alternative (isAccessible() from src/lib/global-args.ts); in lists, the name first and (id:…) after
A new error codeThe ErrorCode type in src/lib/errors.ts
Structure (new folder or helper)CODEBASE.md, by its "Keeping CODEBASE.md accurate" rules

Done when each row that applies is handled.

6. Verify and report

Follow verify. If the feature needs restructuring first, do that as a separate change with refactor.

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.