Skip to content

Commit 10c47ae

Browse files
authored
docs: add agent operating memory (AGENTS.md, docs/agent/*, swarm commands) (#70)
1 parent 816a882 commit 10c47ae

8 files changed

Lines changed: 352 additions & 723 deletions

File tree

.opencode/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ All commands use the `opencode/big-pickle` model.
1515
|---------|-------------|
1616
| `/work <task>` | General implementation workflow. Creates a branch, implements, validates, PRs, observes CI, merges when green. |
1717
| `/docs <task>` | Documentation-only changes. No runtime/API changes, no version bumps, exact current APIs only. |
18+
| `/dispatch <plan>` | Turn a user-provided swarm plan into GitHub issues and `/oc` worker comments. Does not implement work. |
19+
| `/swarm-status` | Read-only report on active swarm issues, PRs, worker status, CI, conflicts, and merge order. |
1820
| `/review-pr <number>` | Read-only PR review. Checks correctness, scope, API fit, docs, changesets, packaging. Does not merge. |
1921
| `/observe-pr <number>` | Watch PR CI, merge when green. Skips risky changes without explicit approval. |
2022
| `/fix-ci <number>` | Diagnose and fix a failing CI run on a PR. Pushes minimal fix, re-observes CI, merges when safe. |

.opencode/commands/dispatch.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
model: opencode/big-pickle
3+
description: Dispatch a user-provided swarm plan as GitHub issues and /oc worker comments. Does not implement work itself.
4+
---
5+
6+
You are working on the Intent repository at `intent-framework/intent`.
7+
8+
## Task
9+
10+
Turn a user-provided swarm plan into GitHub issues and `/oc` worker comments.
11+
12+
## Workflow
13+
14+
1. Read `docs/agent/SWARM.md` to understand lane rules, allowed/forbidden files, and conflict rules.
15+
2. Read `docs/agent/RELEASE-STATE.md` to understand release serialization.
16+
3. Parse the user's plan into independent work items.
17+
4. For each item, identify the lane and file family.
18+
5. **Check for overlapping file families** across all items. If any overlap exists:
19+
- Warn the user about the conflict
20+
- Suggest sequencing instead of parallelizing
21+
- Do not create issues until the conflict is resolved
22+
6. For each non-conflicting item:
23+
- Create a GitHub issue with a clear title, lane tag, and task description
24+
- Post a comment on the issue with `/oc <task description>` to trigger the worker
25+
7. Report the list of created issues, their lanes, and the worker commands posted.
26+
27+
## Safety
28+
29+
- Do not invent unrelated tasks
30+
- Do not implement work yourself
31+
- Do not create issues for overlapping scopes
32+
- Do not dispatch release/version work as parallel swarm tasks
33+
- Stop after creating issues and posting worker comments. Do not merge, publish, or approve anything.

.opencode/commands/swarm-status.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
model: opencode/big-pickle
3+
description: Read-only report on active swarm issues, PRs, worker status, CI, conflicts, and recommended merge order. Does not edit, approve, merge, publish, or post comments.
4+
---
5+
6+
You are working on the Intent repository at `intent-framework/intent`.
7+
8+
## Task
9+
10+
Report on active swarm issues and PRs.
11+
12+
## Instructions
13+
14+
For each active PR related to swarm work, inspect and report:
15+
16+
- PR number and title
17+
- Worker status (open, draft, ready for review)
18+
- CI status (passing, failing, in progress)
19+
- Files changed and their file families
20+
- Likely conflicts with other open PRs (same file family)
21+
- Blockers (failing CI, merge conflicts, pending review)
22+
23+
For all active swarm issues, report:
24+
25+
- Issue number and title
26+
- Lane
27+
- Whether a worker has been triggered
28+
- PR link (if one exists)
29+
30+
Finally, provide a **recommended merge order** based on:
31+
32+
1. No overlapping file families (conflicting PRs must not merge simultaneously)
33+
2. Docs/tooling first (lowest risk)
34+
3. Runtime/API last (requires user review)
35+
4. Merge one PR at a time
36+
37+
## Safety
38+
39+
- Read-only. Do not edit, approve, merge, publish, or post any comments.
40+
- If a PR is risky (runtime/API/release), flag it and note that explicit user approval is required.
41+
- Do not suggest expanding scope or creating new issues.

0 commit comments

Comments
 (0)