Instruction file imported from Marsouino/roblox_test (
.cursor/rules/agentic-workflow.mdc). Copyright stays with the author.
Agentic Workflow
The project uses a strict agentic TDD workflow.
Entry points (skills)
/onboard-session-- fresh session briefing/plan-- shape a scoped idea into TDD-ready steps (architect-agent; product brainstorming happens upstream with the human)/tdd-step <plan> <ID>//tdd-step <plan> <START>..<END>-- run one Red-Green-Refactor-Commit cycle on a slice, or chain the slices of a range (majordome orchestrates red/green/refactor/commit).scripts/governance/autopilot_scope.pyis the single reading of the line; nothing about plan or range is inferred. Every role runs on the engine its charter pins (harness: cursor | claudein.cursor/agents/<role>.md), throughscripts/governance/role_runner.py(brief, record, measure) on both engines, with no per-run override (same charter, same status vocabulary; seenorme_orchestration"Execution harnesses")/commit-- finalize a validated step into a high-signal commit (commit-agent)
Specialized subagents
architect-agent-- architecture and TDD slicing; writes the plan filedocs/backlog/<PREFIX>_*.md(its only write)majordome-- lightweight orchestrator of the red-green-refactor-commit sequencered-agent-- writes or updates tests, confirms GOOD_RED for the right reasongreen-agent-- smallest honest implementation change to pass targeted testsrefactor-agent-- improves design without changing behaviorcommit-agent-- synthesizes a high-signal commit message and executive summary
Discipline
- One step per cycle. No silent multi-step enchainment in manual mode.
- Tests are only written or changed by
red-agent. - Production code is only changed by
green-agentandrefactor-agent. - The human validates plans before execution. A plan is a committed
file in
docs/backlog/(Statut : plan validé humain), written by architect-agent; slice definitions never live only in a chat or an agent's memory, so any session can resume the arc from git. - The human validates commit content before it is recorded in manual mode. In autopilot mode, the slice spec from the plan IS the pre-validated contract; commit content is recorded without per-cycle human approval.
- Pushing to the remote is always a human action, in both modes.
- Never bypass pre-commit hooks. Never use
--no-verify. (Applies in both modes; autopilot does NOT relax this.) - Stable project facts live in the typed registry (
src/registry/+docs/specs/project_registry.yaml). No agent — main agent included — plans, briefs, or implements a parallel config store for them. - Autopilot is the only opt-in exception to per-cycle human pause
points. Activated explicitly by a range,
/tdd-step <plan> <START>..<END>; the range on that line is the scope of the run. Seedocs/agent/norme_autopilot.mdfor the full contract.
Doctrine to apply during the cycle
docs/agent/norme_coding.md-- code constraints (fail-fast, no silent fallback, explicit imports, Pydantic BaseSettings, timeouts, no legacy naming)docs/agent/norme_testing.md-- test discipline (behavior over implementation, specific assertions, error path coverage, no hollow tests)docs/agent/norme_commit.md-- commit format (type(scope) summary, Context / Decided / Remains)docs/agent/norme_autopilot.md-- autopilot contract (hard stops, soft stops, override, push behavior); applied only when/tdd-stepcarries a range<START>..<END>
Each execution agent loads the relevant document(s) before acting.
Inter-agent communication
- No persistent handoff files are required between phases. The plan file is not a handoff file: it is the arc's contract, written once by architect-agent, validated by the human, committed, and read by every phase of every slice.
- Subagents return structured textual responses with an explicit
statusfield. - The orchestrating agent reads that
statusand routes the next prompt. - Durable state lives in git: diff, tests, and commit messages.
Expected status vocabulary
architect-agent: DISCUSS_MORE, HANDOFF_TO_MAJORDOMEred-agent: GOOD_RED, BAD_RED, BLOCKED (TESTS_REPAIRED in repair mode: a test a gate demanded, the pre-gate flagged or GREEN named as wrong exists and passes)green-agent: GREEN_CONFIRMED, STILL_FAILING, BLOCKEDrefactor-agent: REFACTOR_DONE, REFACTOR_PARTIAL, BLOCKEDcommit-agent: READY_TO_COMMIT, NEEDS_MORE_EVIDENCE, BLOCKED If a subagent returns a status outside this vocabulary, treat it as a protocol violation and require correction before continuing.