Index of every page on this site: llms.txt
All skills
Run it yourself

The per-task discipline to apply INSIDE /speckit-implement (Spec Kit), once the spec is approved and /speckit-plan, /speckit-tasks and /speckit-analyze have run: check that tasks.md carries test tasks, then for each task write the failing test first, the minimum code to green, refactor, run ./gates/run-chain.sh, get review, and commit one concern with its Spec: trailer and the task ticked. Not an entry point and never before approval. Adapted from obra/superpowers writing-plans + test-driven-development (MIT).

  • 1 file
  • 5.5 KB
  • Updated 2 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/doxuta/ai-factory-kit/plan-and-tdd

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈132 tokens for metadata: the name and description. ≈1.3k when used: this file.

Description uses 6.6% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈530 characters, or 6.6%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

<!-- WHO READS ME: an agent implementing a feature whose spec is approved. I POINT TO (kit paths; factory/... once adopted): harness/skills/spec-first/SKILL.md (the discipline before approval) · gates/GATES.md (the chain every commit runs; §10 commit trailers) · model/SPEC-FLOW.md (the implement step, which I conduct) · harness/agents/task-orchestra.md (when the tasks split into parallel parcels). -->

Plan → TDD — from approved tasks to landed commits

Entry condition: specs/<id>/spec.md says status: approved with approved_by and approved_on, and plan.md, quickstart.md and tasks.md exist (spec-first gets you there). Anything missing → stop and run the Spec Kit command that makes it (/speckit-specify, /speckit-plan, /speckit-tasks). This is the constitution's HARD-GATE, not a preference. This skill writes no plan and no tasks of its own — one plan, one task list, both Spec Kit's — and when the tasks split into file-disjoint parcels, task-orchestra runs them in parallel, each worker following this loop. Work that is not a feature — a bug in accepted behaviour, a hotfix, a refactor, a chore — runs the same per-task loop under its own lane's entry condition instead (an accepted spec for a bug, no spec for a refactor): NON-FEATURE-WORK.

Check tasks.md before the first line of code

/speckit-tasks wrote it; you check it (the step of SPEC-FLOW that /speckit-analyze also reads):

  • Test tasks are there, each ahead of the code it proves. Spec Kit's /speckit-tasks generates tests only when asked; constitution Article VI asks. Missing? Re-run /speckit-tasks with "tests first for every behaviour change" as its argument.
  • Every task is independently verifiable and carries a measurable "done = …". One task ≈ one commit ≈ one concern; a task you cannot name in one clause is two tasks.
  • Risky tasks are flagged — anything on the surfaces the constitution's Development Workflow names (for a web product: data isolation, schema, authorization, money). Those get adversarial review before commit, not just the normal pass.
  • Tasks use Spec Kit's checklist format, - [ ] T001 …; a task deliberately moved out of this feature reads (deferred → <where>), so it does not hold the spec back.
  • Feature 001, the walking skeleton, ends by installing the kit's gate hook and CI job: python3 factory/bin/adopt.py --install-git-hook --ci github, then the toolchain steps in .github/workflows/factory-gates.yml (PHASE-0 §7). A task that writes its own pre-commit hook, hook installer or gate workflow is wrong: re-plan it onto those two commands.

The loop, per task

  1. Red — write the failing test first, and watch it fail. A test that passes before the code exists proves nothing. Vacuous-green check: confirm the test filter matches ≥1 real test name — a filter matching zero tests exits green (GATES §1).
  2. Green — the minimum code that passes. No gold-plating; the ponytail ladder applies inside the layer.
  3. Refactor — clean up with the tests staying green.
  4. Gates — ./gates/run-chain.sh. Red = fix, never proceed; a TODO slot is red too. The one exception is feature 001 wiring the chain: its commits may be red only at a TODO slot, with the spec gates run directly (GATES §1). A new route, command or exported surface needs its caller in the same task or a named task — the orphan-endpoints slot (gates/check-orphan-endpoints.sh, configured by gates/orphan-endpoints.conf; unconfigured it is red, "not wired") checks routes.
  5. Review — an independent reviewer; adversarial lenses (tech-lead-review) for the flagged tasks. Findings are fixed or refuted with evidence, never shelved (GATES §2).
  6. Commit — type(scope): description, one concern, with a Spec: <id> trailer (GATES §10). The task's checkbox (- [x] T00n) and any spec or plan correction land in the same commit — deferred sync is how maps start lying.

When every task is ticked, the chain is green and review has passed, the feature is built, not accepted: someone other than the builder runs quickstart.md and records specs/<id>/acceptance.md before the status moves to accepted (GATES §3).

Stop rules

  • The design turns out wrong mid-task → stop, return to the spec (spec-first); a changed requirement goes back to the owner for approval. Pushing through a broken design is how one correction commit becomes five.
  • A task still resists after two honest attempts → the task is mis-cut; re-plan it.
  • Never race a milestone by dropping tests or review — a green lie costs more than a red truth, because the lie compounds.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at ca7bcc9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago

README badge

README badge for doxuta/ai-factory-kit/plan-and-tdd