agentleFS
LooseWireDevLooseWireDev/mealforge/.agents/skills/feature-development/SKILL.md

feature-development

Skill1 starsChanged 4 months agoMITView on GitHub

The required workflow for adding a feature to this monorepo — spec, generator scaffold, failing tests, then implementation. Use whenever adding a new feature, endpoint, screen, or capability. Never create feature directories by hand.

9 other projects use a version of this.

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, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    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:

    Every feature follows the same four-step flow.

    line 8
  2. Very specific:

    Write tests from the spec into the generated *.test.ts(x) files — never from reading implementation.

    line 42

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

Feature Development

Every feature follows the same four-step flow. Do not skip steps or reorder them.

1. Spec first

A feature starts from a written spec (usually in docs/) covering behavior, edge cases, and acceptance criteria. If no spec exists, stop and ask for one — do not improvise requirements.

2. Scaffold with the generator

npx nx generate @<project>/project-plugin:feature --name <name> --apps <apps>
  • <project> is this project's package scope (check the root package.json name or tools/project-plugin/package.json).
  • --name must be a camelCase identifier starting with a lowercase letter: userProfile, not user-profile or UserProfile. It becomes ${name}Router and directory names; the generator rejects anything else.
  • --apps is a comma-separated subset of api,web,mobile,desktop,static.

What the generator creates per app:

AppFiles
apiapps/api/src/features/<name>/ — router.ts, service.ts, service.test.ts, types.ts
webapps/web/src/features/<name>/ — <Name>List.tsx, use<Name>Actions.ts, <Name>List.test.tsx
mobileapps/mobile/src/features/<name>/ — same shape as web, React Native
desktopapps/desktop/src-tauri/src/commands/<name>.rs
staticapps/static/src/pages/<name>/index.astro + island component

Plus, always: a shared Zod schema stub at packages/shared/src/schemas/<name>.ts and an AGENTS.md stub in each feature directory.

Wiring (Hono backends): the generator automatically registers the feature router in apps/api/src/trpc.ts via the // forge:feature-imports and // forge:feature-routers anchor comments. Do not remove those anchors, and do not wire routers by hand.

Python backends: the generator scaffolds client-side features only. Create the apps/api feature module manually following apps/api/AGENTS.md and the fastapi-sqlalchemy-patterns skill.

3. Failing tests (separate session/agent from implementation)

Write tests from the spec into the generated *.test.ts(x) files — never from reading implementation. Run them; they must fail for the right reason (missing behavior, not syntax errors).

4. Implement

Minimum code to make the tests pass, in the generated files. Business logic goes in service.ts, not in the router. Fill in the feature's AGENTS.md stub (summary, business rules, schemas, relations) once behavior settles.

Verify

npx nx affected -t lint test typecheck must pass before the feature is done.

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.