You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 KiB
16 KiB
AGENTS
Scope
- This file defines project-specific rules and configuration for agents working in this repository.
Session Workflow
- Keep entries concise and timestamped in UTC.
- Stage newly created files explicitly:
git add <new-file>
Validation Commands
- Run formatting after every code change:
go fmt ./...
- Prefer targeted validation while iterating; run broader validation before finishing:
- Format:
go fmt ./... - Vet:
go vet ./... - Test:
go test ./...
- Format:
Language Rules
- Use English for code comments, log/output messages,
README.md.
PR Policy
- Feature PRs use
aide pr. aide prwrites the Summary, Breaking Changes, Included Commits, and Test Plan sections for feature PRs.- A PR to
mainremains mandatory for user-reviewed changes.
Git Rules
- Work in the current branch.
Documentation Rules
- Every change to behavior, interfaces, workflows, or configuration must include corresponding updates to affected documentation and code comments in the same commit.
- Documentation accuracy is part of implementation scope, not a follow-up task.
- The planner must include documentation update scope explicitly in the plan whenever behavior, interfaces, workflows, or configuration change. Documentation updates are implementation scope, not a follow-up task.
Hard Rules
- Never include
Co-Authored-Bytrailers in commit messages.
AI Workflow Rules
- Plan Mode:
- waits for explicit user start signal
- writes
.ai/PLAN.md - updates
.ai/TASKS.mdstatus toready_for_implement - appends a handoff entry to
.ai/HANDOFF.md - never edits code
- Review Mode:
- waits for explicit user start signal
- writes
.ai/REVIEW.md - updates
.ai/TASKS.mdstatus toready_to_commitorchanges_requested - appends a handoff entry to
.ai/HANDOFF.md - performs review plus verification, including E2E and exploratory checks when appropriate
- never edits code
- Implement Mode (
next_task):- waits for explicit user start signal
- implements
.ai/PLAN.md - writes or updates tests for each changed behaviour before writing implementation code
- updates affected documentation and code comments whenever behavior, interfaces, or workflows change
- writes the final Conventional Commit message into the HANDOFF entry
Commitfield - does not
git commit - updates
.ai/TASKS.mdstatus toready_for_review - appends a handoff entry to
.ai/HANDOFF.md - must not invent requirements
- Implement Mode (
commit_taskafter review):- only for tasks in
ready_to_commit - reads the commit message from the task's
next_taskHANDOFF entry - updates
.ai/TASKS.mdstatus todone - appends a handoff entry to
.ai/HANDOFF.md - runs
git add -A && git commit -m "<message>"
- only for tasks in
- Implement Mode (rework after rejection):
- reads
.ai/REVIEW.mdfindings as a checklist - addresses every finding marked as required fix
- re-runs validations
- does not
git commit - updates
.ai/TASKS.mdstatus fromchanges_requestedtoready_for_review - appends a handoff entry to
.ai/HANDOFF.md
- reads
AI Operating Mode
- Mode is selected by the launcher prompt/context:
- Cycle bootstrap:
aide cycle start <branch-name>
- Convenience wrappers:
aide plan [agent] [agent-options...](default agent from.ai/config.json, fallback:claude)aide implement [agent] [agent-options...](default agent from.ai/config.json, fallback:codex)aide review [agent] [agent-options...](default agent from.ai/config.json, fallback:claude)aide po [agent] [agent-options...](launcher for the PO orchestration session)
- Cycle bootstrap:
- No
.ai/MODEfile is used.
Modes
profilein.ai/config.jsonselects the workflow shape:fullis the default profile.litereplaces separate implementer/reviewer sessions with oneaide devsession.
fullprofile:- launch
aide plan,aide implement, andaide reviewyourself in manual mode - optionally launch
aide pofor auto mode orchestration - keep the usual implementer -> reviewer -> implementer commit handoff
- launch
liteprofile:- launch
aide planandaide dev - implementation, review, and commit happen inside the dev session
- Human approval still happens at
ready_for_reviewin lite mode. - PO orchestration is not available
- launch
- Lite-mode status ownership:
- planner still owns planning states
- the dev session owns
in_implementation,in_review,ready_to_commit, anddone ready_for_reviewremains the explicit human checkpoint beforecommit_task
- Lite-mode test guardrail:
- During the review hat, if a test fails you may either change implementation code to make it pass, or add new assertions. You must not weaken or delete existing assertions to make a test pass.
- If you believe a test is genuinely wrong for the new behavior, halt to
changes_requested, do not retry, and write your proposed test change toREVIEW.mdfor human approval — even if you have retries remaining.
- Refusal policy:
aide implement,aide review, andaide porefuse in lite mode and point you ataide devoraide profile full.aide devrefuses in full mode and points you back toaide implementandaide review.
all_taskcommit policy:all_taskmay commit multiple tasks, but it still creates one real Conventional Commit per task with no batching or squashing.
Runtime Modes
fullprofile:- Manual mode:
- you start planner, implementer, and reviewer sessions yourself in separate terminals
- you drive task progress by sending the documented text commands directly to each session
- Auto mode:
- you start the PO session with
aide po - the PO session uses the
aideMCP server to run the post-planning loop by coordinating implementer and reviewer sessions for the same task flow
- you start the PO session with
- Manual mode:
liteprofile:- manual only
- you start the planner and dev sessions yourself in separate terminals
- you drive task progress by sending the documented text commands directly to those sessions
- Both profiles use the same
.ai/TASKS.mdboard,.ai/PLAN.mdplan, review artifacts, and status transitions.
Persistent Session Workflow
- In manual mode, no role autostarts another role.
- In auto mode, the PO session may start or reconnect to the role sessions it coordinates.
- Start a new development cycle with
aide cycle start <branch-name>. - Start the planner, implementer, and reviewer once in
full, or start the planner and dev sessions once inlite, then keep those sessions open for the rest of the cycle. - When using auto mode, let the PO session manage the
fullprofile role sessions instead of driving them directly yourself. litehas no PO/session-orchestration path; driveaide devdirectly.- Every role waits in
WAIT_FOR_USER_STARTstate until you explicitly tell it to begin. - After launch, steer the existing sessions with text commands instead of relaunching scripts for each step.
- Agent choice is manual when you launch each role (
claudeorcodex) and can vary by session. - Handoff log policy:
- runtime log:
.ai/HANDOFF.md(tracked cycle log) - tracked template:
.ai/HANDOFF.template.md
- runtime log:
- Handoffs are file-based:
- planner -> implementer uses
.ai/PLAN.md+.ai/TASKS.md+.ai/HANDOFF.md - implementer -> reviewer uses commit +
.ai/TASKS.md+.ai/HANDOFF.md
- planner -> implementer uses
- Recommended status flow in
.ai/TASKS.md:in_planning->ready_for_implement->in_implementation->ready_for_review->in_review->ready_to_commit->done- Rework loop:
changes_requested->in_implementation->ready_for_review->in_review->done
- In
lite, the dev session performs the implement and review hops internally, halts for the human atready_for_review, then resumes withcommit_task. - Every role must re-read
.ai/TASKS.mdbefore executing any command. Additional files depend on the role and command — see each role's prompt for specifics. - Role-specific files to reload as needed:
- planner:
ROADMAP.md,.ai/PLAN.md - implementer:
.ai/PLAN.md,.ai/REVIEW.mdwhen reworking review findings - dev:
.ai/PLAN.md,.ai/REVIEW.mdwhen reworking review findings - reviewer:
.ai/PLAN.md,.ai/REVIEW.md
- planner:
- Files are the source of truth. No role should rely on hidden session memory when file state disagrees.
Session Commands
Use these text commands inside the already-running role sessions.
- PO session:
- launched with
aide po [agent](default agent:claude) - full profile only; lite mode refuses because the dev session is driven directly instead
- uses MCP tools internally (
session_start,session_run,session_wait,session_get_output,session_get_result,session_status,session_list,session_stop,session_reset,session_delete) to coordinate role sessions codexPO runs use inline-c mcp_servers.aide.*overrides, so no global Codex MCP registration is required- never starts a planner session; if no tasks are in
ready_for_implementor later, tells the user to run the planner first work_task [TASK_ID]- no task ID: pick the first task that is not
done, regardless of status (supports in-flight recovery) - with task ID: target that specific task
- drive through full implement -> review -> commit cycle, then stop and report
- if no eligible task exists, report that the board has no work remaining
- no task ID: pick the first task that is not
work_all- run
work_taskrepeatedly until all tasks aredoneor a blocker requires human intervention - stop at the first blocker and report
- run
- launched with
- Planner session:
- before
start_plan, conversation with the planner is the roadmap-refinement phase:- tighten scope, acceptance criteria, constraints, and decision points directly in
ROADMAP.md - surface ambiguities and trade-offs for the user to resolve instead of inventing requirements
- tighten scope, acceptance criteria, constraints, and decision points directly in
start_planis the gate to formal planning; once invoked, write the plan without asking for another readiness confirmationstart_plan- read
ROADMAP.mdand current planning artifacts - create or restructure tasks in
.ai/TASKS.mdas needed - write or rewrite
.ai/PLAN.md - when planning is complete, move all newly planned tasks to
ready_for_implement
- read
rework_plan [TASK_ID]- revisit an existing plan when scope, constraints, or approach change
- update
.ai/PLAN.md,.ai/TASKS.md, and.ai/HANDOFF.mdas needed without modifying code - when no task ID is supplied, replan the overall roadmap/task breakdown
- when a task ID is supplied and it does not exist or is not appropriate for replanning, report the current status and abort
- before
- Implementer session:
- full profile only; lite mode refuses and points you at
aide dev next_task [TASK_ID]- select the first task in
ready_for_implementorin_implementationwhen no task ID is supplied - if the supplied task is not valid for implementer work, report its current status and abort
- when work begins, update the task to
in_implementation
- select the first task in
rework_task [TASK_ID]- implementer only
- target a task in
changes_requested - load
.ai/REVIEW.mdas the required-fix checklist for review rework - if no task matches, report that no tasks are pending rework
commit_task [TASK_ID]- implementer only
- target a task in
ready_to_commit - read the commit message from the task's
next_taskHANDOFF entryCommitfield - update
.ai/TASKS.mdtodone - append a
commit_taskHANDOFF entry - run
git add -A && git commit -m "<message>" - if the supplied task is not ready to commit, report its current status and abort
aide cycle end [VERSION]- verify all tasks are
done - if the completion condition is not met, report the blocking task states and abort
- if no version is supplied, ask the user for it before proceeding
- append a closing entry to
.ai/HANDOFF.md(### Cycle closed — <version> — <UTC timestamp>) - stage and commit with
chore(ai): close cycleand aRelease-As: x.y.zfooter - then run
aide prto update the PR
- verify all tasks are
status_cycle [TASK_ID]- return deterministic task status, current owner role, and next recommended action
- when no task ID is supplied, summarize tasks relevant to the caller and the overall board state
- if no task matches the caller's role, say so explicitly and summarize the board
- full profile only; lite mode refuses and points you at
- Reviewer session:
- full profile only; lite mode refuses because review runs inside the dev session
next_task [TASK_ID]- select the first task in
ready_for_revieworin_reviewwhen no task ID is supplied - if the supplied task is not valid for reviewer work, report its current status and abort
- when review begins, update the task to
in_review - when review and verification pass, move the task to
ready_to_commit
- select the first task in
status_cycle [TASK_ID]- return deterministic task status, current owner role, and next recommended action
- when no task ID is supplied, summarize tasks relevant to the caller and the overall board state
- if no task matches the caller's role, say so explicitly and summarize the board
- dev session:
- launched with
aide dev [agent](default agent:codex) - lite profile only; full mode refuses and points you back to
aide implementandaide review next_task [TASK_ID]- pick one
ready_for_implementtask (or the supplied task), move it toin_implementation, run the implement hat, run the review hat, and halt atready_for_reviewfor the human
- pick one
all_task- process every remaining non-
donetask without per-task human review, committing each completed task before moving to the next one - halt only if a semantic concern appears or the 3-attempt mechanical retry cap is exhausted
- process every remaining non-
rework_task [TASK_ID] [feedback]- resume a task from
ready_for_revieworchanges_requested, apply feedback when provided, move it toin_implementation, and run the implement/review loop again
- resume a task from
commit_task [TASK_ID]- valid only when the task is
ready_for_review; this is the human approval step - move the task through
ready_to_committodone, then rungit add -A && git commit -m "<message>"using the commit message already written in.ai/HANDOFF.md
- valid only when the task is
status_cycle [TASK_ID]- return deterministic task status, current owner role, and next recommended action
- launched with
Commit Conventions
- Commit behavior by role:
planrole never commits.reviewrole never commits.implementrole does not commit duringnext_taskorrework_task. The single task commit is created bycommit_taskafter review approval.aide cycle endcommits the cycle-close artifacts with aRelease-As: x.y.zfooter and can be followed byaide pr.
- Conventional Commit subjects must be release-note ready: describe the user-visible change or outcome, not just the implementation mechanism.
- Prefer subjects in the form
<type>(<scope>): <user-facing change>; if the subject alone would be too vague in release notes, add a short body summarizing the key changes.
Tool Preferences
- For shell-based JSON parsing or filtering, prefer
jq. - For shell-based repository search, prefer
rgovergrep. - For shell-based file discovery, prefer
fdoverfind. - For shell-based file previews, prefer
batovercat. - When available, use
ast-grep(sg) for structural code search using AST patterns (for example, matching function signatures or type definitions). - When available, use
fzffor interactive fuzzy file and symbol selection in the shell. - Respect
.gitignorein all search operations. - Exclude build artifacts (
dist,build,node_modules,vendor,target) by default.
Tool Selection
| Task | Preferred | Instead of |
|---|---|---|
| Code search | rg (ripgrep) |
grep, grep -r |
| File discovery | fd |
find |
| File preview | bat |
cat, head, tail |
| JSON processing | jq |
manual parsing, python -c |
Search Rules
- Always respect
.gitignore(rg and fd do this by default). - Exclude build artifacts:
dist,build,node_modules,vendor,target. - Use glob filters to narrow scope before broad scans.
- Prefer exact match (
-w) or fixed-string (-F) when searching for identifiers.
Example Commands
- Search for an identifier:
rg -n -w "Task ID" . - List tracked files in a subtree:
fd . .ai/prompts - Preview a file with line numbers:
bat -n AGENTS.md