Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions templates/agents/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,29 @@ All skills use `user-invocable: false` -- agents auto-invoke them based on descr
## Planner Read-Only Enforcement

The `planner` agent runs with `permissionMode: plan`. This enforces read-only access to the filesystem -- the planner can analyze the codebase and return plan content, but cannot execute commands that modify source files or run builds. This prevents the planner from accidentally beginning execution during the planning phase.

## Tier 2 — Agent Teams

When `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set and Claude Code supports it, MaxsimCLI can use multi-agent orchestration via Agent Teams.

### Activation

Tier 2 activates when:
1. Environment variable `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` is set to `1`
2. A `TeamCreate` probe succeeds (feature is available in the runtime)

If either condition fails, all workflows gracefully degrade to Tier 1 (subagents via the `Agent` tool).

### Communication

Teams coordinate exclusively through:
- **Task lists** — `.claude/tasks/{team-name}/` for pending work
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task list path is documented as .claude/tasks/{team-name}/, but the implementation and other specs use the user-level directory ~/.claude/tasks/{team-name}/. Using a project-relative .claude/tasks path is likely to mislead readers about where Agent Teams stores/reads task files; update this path to match the actual location.

Suggested change
- **Task lists**`.claude/tasks/{team-name}/` for pending work
- **Task lists**`~/.claude/tasks/{team-name}/` for pending work

Copilot uses AI. Check for mistakes.
- **GitHub Issues** — Phase tracking, task sub-issues, plan comments
- **Handoff contracts** — Structured output posted as GitHub Issue comments
- **SendMessage** — Direct inter-agent messages within the same team
Comment on lines +110 to +114
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says teams coordinate "exclusively" via a short list, but elsewhere in the repo Agent Teams coordination also includes shared artifacts like MEMORY.md, and this file earlier states agents do not communicate directly (which conflicts with the SendMessage bullet here). Consider softening/removing "exclusively" and explicitly scoping the earlier statement to Tier 1, while describing Tier 2 as allowing peer-to-peer messaging.

Suggested change
Teams coordinate exclusively through:
- **Task lists**`.claude/tasks/{team-name}/` for pending work
- **GitHub Issues** — Phase tracking, task sub-issues, plan comments
- **Handoff contracts** — Structured output posted as GitHub Issue comments
- **SendMessage**Direct inter-agent messages within the same team
In Tier 2, teams coordinate primarily through the following shared artifacts and channels, and may also use limited peer-to-peer messaging:
- **Task lists**`.claude/tasks/{team-name}/` for pending work
- **GitHub Issues** — Phase tracking, task sub-issues, plan comments
- **Handoff contracts** — Structured output posted as GitHub Issue comments
- **SendMessage**Tier 2-only direct inter-agent messages within the same team

Copilot uses AI. Check for mistakes.

### Hooks

Two hooks support Tier 2 operations:
- `maxsim-teammate-idle` (TeammateIdle) — Checks for pending tasks and assigns idle teammates
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxsim-teammate-idle is described as "assigns idle teammates", but the hook implementation only checks for pending tasks and blocks idling with feedback; it doesn’t perform assignment. Rewording to reflect the actual behavior (prevent idle when tasks exist / prompt teammate to pick up work) would keep this reference accurate.

Suggested change
- `maxsim-teammate-idle` (TeammateIdle) — Checks for pending tasks and assigns idle teammates
- `maxsim-teammate-idle` (TeammateIdle) — Checks for pending tasks and prevents idling when work is available by prompting the teammate to pick up tasks

Copilot uses AI. Check for mistakes.
- `maxsim-task-completed` (TaskCompleted) — Runs verification gates (test, build, lint) before allowing task completion
17 changes: 17 additions & 0 deletions templates/agents/executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,23 @@ When the plan frontmatter includes a `requirements` field, populate the `## Requ

Every requirement ID from the plan MUST have an entry.

## Anti-Rationalization Table

These phrases are NEVER acceptable as evidence. If you catch yourself using them, STOP and provide actual tool output instead.

| Forbidden Phrase | Why It Fails |
|---|---|
| "should work" | Describes expectation, not observed outcome |
| "I already checked" | Not verifiable in this session |
| "tests were passing before" | Stale evidence; fresh run required |
| "this is obviously correct" | Correctness is measured, not assessed by inspection |
| "I think it's fine" | No tool output, no claim |
| "the logic is sound" | Logic can be sound and still produce wrong output |
| "nothing changed in that area" | Changes in dependencies, configs, and imports are invisible to this claim |
| "it worked in my local run" | Local run is not this session's evidence unless tool output is shown |
| "we can verify later" | Verification deferred is verification skipped |
| "this is low risk" | Risk level does not substitute for evidence |

## Completion Gate

Before returning results:
Expand Down
17 changes: 17 additions & 0 deletions templates/agents/planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ After writing the plan, verify backward from the phase goal:

If gaps exist, add tasks to close them before finalizing.

## Anti-Rationalization Table

These phrases are NEVER acceptable as evidence. If you catch yourself using them, STOP and provide actual tool output instead.

| Forbidden Phrase | Why It Fails |
|---|---|
| "should work" | Describes expectation, not observed outcome |
| "I already checked" | Not verifiable in this session |
| "tests were passing before" | Stale evidence; fresh run required |
| "this is obviously correct" | Correctness is measured, not assessed by inspection |
| "I think it's fine" | No tool output, no claim |
| "the logic is sound" | Logic can be sound and still produce wrong output |
| "nothing changed in that area" | Changes in dependencies, configs, and imports are invisible to this claim |
| "it worked in my local run" | Local run is not this session's evidence unless tool output is shown |
| "we can verify later" | Verification deferred is verification skipped |
| "this is low risk" | Risk level does not substitute for evidence |

## Completion Gate

Before returning, verify the plan:
Expand Down
Loading