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
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"plugins": [
{
"name": "genie",
"version": "3.260317.14",
"version": "3.260317.16",
"source": "./plugins/genie",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
}
Expand Down
2 changes: 1 addition & 1 deletion openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "genie",
"name": "Genie",
"description": "Skills, agents, and hooks for the Genie CLI terminal orchestration toolkit",
"version": "3.260317.14",
"version": "3.260317.16",
"configSchema": {
"type": "object",
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automagik/genie",
"version": "3.260317.14",
"version": "3.260317.16",
"description": "Collaborative terminal toolkit for human + AI workflows",
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/genie/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genie",
"version": "3.260317.14",
"version": "3.260317.16",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
"author": {
"name": "Namastex Labs"
Expand Down
8 changes: 7 additions & 1 deletion plugins/genie/agents/engineer.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ After the implementation works:
Run the validation command from the wish. Record output. Confirm each acceptance criterion is met.

## 7. Report Completion
After completing all deliverables and validation, call `genie done <slug>#<group>` to report completion. The slug and group are in your initial prompt. This signals the orchestrator that your work is finished so it can advance to the next wave.
After completing all deliverables and validation:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This file appears to be a duplicate of plugins/genie/agents/engineer/AGENTS.md. I've noticed this pattern for other agents as well (e.g., fix, qa, reviewer, team-lead).

Having duplicate agent definition files increases maintenance overhead and creates a risk of them becoming out of sync. To improve maintainability, I recommend consolidating these into a single file for each agent and removing the duplicate. You'll need to verify which file path is being used by the agent loading logic.

1. Run validation commands from the wish
2. Commit and push your work
3. Call: `genie done <slug>#<group>` — marks the group complete in state (source of truth)
4. Call: `genie send 'Group <N> complete. <summary>' --to team-lead` — sends durable notification

The slug and group are in your initial prompt. Both commands are mandatory — state is how the orchestrator tracks progress, the message is how team-lead gets notified.
</process>

<success_criteria>
Expand Down
8 changes: 7 additions & 1 deletion plugins/genie/agents/engineer/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ After the implementation works:
Run the validation command from the wish. Record output. Confirm each acceptance criterion is met.

## 7. Report Completion
After completing all deliverables and validation, call `genie done <slug>#<group>` to report completion. The slug and group are in your initial prompt. This signals the orchestrator that your work is finished so it can advance to the next wave.
After completing all deliverables and validation:
1. Run validation commands from the wish
2. Commit and push your work
3. Call: `genie done <slug>#<group>` — marks the group complete in state (source of truth)
4. Call: `genie send 'Group <N> complete. <summary>' --to team-lead` — sends durable notification

The slug and group are in your initial prompt. Both commands are mandatory — state is how the orchestrator tracks progress, the message is how team-lead gets notified.
</process>

<success_criteria>
Expand Down
7 changes: 7 additions & 0 deletions plugins/genie/agents/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ Report when complete:
- Anything remaining or needing attention
</done_report>

<completion_reporting>
On completion, report to team-lead via durable message:
- Call: `genie send 'Fix applied — <summary>' --to team-lead`

This is mandatory. The message is how team-lead gets notified that the fix is done.
</completion_reporting>

<constraints>
- Minimal change surface — only affected files
- Intermediate worker — execute the task and report back. The orchestrator makes the ship/no-ship decision.
Expand Down
7 changes: 7 additions & 0 deletions plugins/genie/agents/fix/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ Report when complete:
- Anything remaining or needing attention
</done_report>

<completion_reporting>
On completion, report to team-lead via durable message:
- Call: `genie send 'Fix applied — <summary>' --to team-lead`

This is mandatory. The message is how team-lead gets notified that the fix is done.
</completion_reporting>

<constraints>
- Minimal change surface — only affected files
- Intermediate worker — execute the task and report back. The orchestrator makes the ship/no-ship decision.
Expand Down
7 changes: 7 additions & 0 deletions plugins/genie/agents/qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ New Tests Written: [N] ([list files])
```
</output_format>

<completion_reporting>
On completion, report your result to team-lead via durable message:
- Call: `genie send '<PASS|FAIL> — <summary>' --to team-lead`

This is mandatory. The message is how team-lead gets notified of your QA result.
</completion_reporting>

<constraints>
- Evidence required for every verdict — no "it looks fine"
- Never skip running tests
Expand Down
7 changes: 7 additions & 0 deletions plugins/genie/agents/qa/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ New Tests Written: [N] ([list files])
```
</output_format>

<completion_reporting>
On completion, report your result to team-lead via durable message:
- Call: `genie send '<PASS|FAIL> — <summary>' --to team-lead`

This is mandatory. The message is how team-lead gets notified of your QA result.
</completion_reporting>

<constraints>
- Evidence required for every verdict — no "it looks fine"
- Never skip running tests
Expand Down
7 changes: 7 additions & 0 deletions plugins/genie/agents/reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ Validation: <PASS|FAIL with output>
```
</output_format>

<completion_reporting>
On completion, report your verdict to team-lead via durable message:
- Call: `genie send '<SHIP|FIX-FIRST|BLOCKED> — <summary>' --to team-lead`

This is mandatory. The message is how team-lead gets notified of your verdict.
</completion_reporting>

<constraints>
- Binary verdict only — no "partial pass"
- Evidence required — don't assume, verify
Expand Down
7 changes: 7 additions & 0 deletions plugins/genie/agents/reviewer/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ Validation: <PASS|FAIL with output>
```
</output_format>

<completion_reporting>
On completion, report your verdict to team-lead via durable message:
- Call: `genie send '<SHIP|FIX-FIRST|BLOCKED> — <summary>' --to team-lead`

This is mandatory. The message is how team-lead gets notified of your verdict.
</completion_reporting>

<constraints>
- Binary verdict only — no "partial pass"
- Evidence required — don't assume, verify
Expand Down
11 changes: 11 additions & 0 deletions plugins/genie/agents/team-lead.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ genie team done <team>
```
</process>

<monitoring>
**State file is source of truth. Messages are notifications.**

When checking progress (after Phase 2 completes or if you need to diagnose):
1. **Primary:** `genie status <slug>` — reads the state file directly. Deterministic, instant, always accurate.
2. **Secondary:** `genie inbox` — durable messages from workers. May lag behind state.
3. **Bonus:** SendMessage from workers arrives between tool calls — use it but don't depend on it.

Never rely on messages alone to determine completion. Always check `genie status` first.
</monitoring>

<constraints>
- NEVER write code. `genie work` dispatches engineers.
- NEVER use `sleep`.
Expand Down
11 changes: 11 additions & 0 deletions plugins/genie/agents/team-lead/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ genie team done <team>
```
</process>

<monitoring>
**State file is source of truth. Messages are notifications.**

When checking progress (after Phase 2 completes or if you need to diagnose):
1. **Primary:** `genie status <slug>` — reads the state file directly. Deterministic, instant, always accurate.
2. **Secondary:** `genie inbox` — durable messages from workers. May lag behind state.
3. **Bonus:** SendMessage from workers arrives between tool calls — use it but don't depend on it.

Never rely on messages alone to determine completion. Always check `genie status` first.
</monitoring>

<constraints>
- NEVER write code. `genie work` dispatches engineers.
- NEVER use `sleep`.
Expand Down
2 changes: 1 addition & 1 deletion plugins/genie/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genie-plugin",
"version": "3.260317.14",
"version": "3.260317.16",
"private": true,
"description": "Runtime dependencies for genie bundled CLIs",
"type": "module",
Expand Down
9 changes: 9 additions & 0 deletions src/term-commands/dispatch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,15 @@ describe('parseWishGroups()', () => {
const groups = parseWishGroups(SAMPLE_WISH);
expect(groups[0].dependsOn).toEqual([]);
});

it('should strip parenthetical comments from depends-on values', () => {
const content =
'### Group 1: First\n**depends-on:** none (this is the start)\n\n### Group 2: Second\n**depends-on:** 1 (must be done first)\n\n### Group 3: Third\n**depends-on:** Group 1 (setup), Group 2 (core work)';
const groups = parseWishGroups(content);
expect(groups[0].dependsOn).toEqual([]);
expect(groups[1].dependsOn).toEqual(['1']);
expect(groups[2].dependsOn).toEqual(['1', '2']);
});
});

// ============================================================================
Expand Down
15 changes: 11 additions & 4 deletions src/term-commands/dispatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,17 @@ export function parseWishGroups(content: string): GroupDefinition[] {
let dependsOn: string[] = [];
if (depsMatch) {
const depsStr = depsMatch[1].trim();
if (depsStr.toLowerCase() !== 'none') {
const depsNormalized = depsStr.replace(/\s*\([^)]*\)/g, '').trim();
if (depsNormalized.toLowerCase() !== 'none') {
dependsOn = depsStr
.split(',')
Comment on lines 167 to 168

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Strip comments before splitting depends-on values

The new parsing path still splits on commas before removing parenthetical comments, so inputs like **depends-on:** Group 1 (setup, run first) are tokenized into two dependencies and can make state initialization fail with non-existent group references. This affects wishes that include natural-language parenthetical notes containing commas, which the surrounding changes are trying to support.

Useful? React with 👍 / 👎.

.map((d) => d.trim().replace(/^group\s*/i, ''))
.map((d) =>
d
.trim()
.replace(/^group\s*/i, '')
.replace(/\s*\(.*\)\s*$/, '')
.trim(),
)
.filter(Boolean);
Comment on lines 167 to 176

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The current logic for parsing depends-on has a potential bug and can be simplified.

If a parenthetical comment in the depends-on string contains a comma, the depsStr.split(',') call will incorrectly split the dependency. For example: depends-on: Group 1 (has a, comma), Group 2.

You are already creating depsNormalized which correctly strips all comments. You can simplify the logic and fix the bug by using depsNormalized for splitting and mapping, instead of the original depsStr. This also removes the need for the second regex to remove comments inside the map function.

        dependsOn = depsNormalized
          .split(',')
          .map((d) => d.trim().replace(/^group\s*/i, ''))
          .filter(Boolean);

}
}
Expand Down Expand Up @@ -543,7 +550,7 @@ export async function workDispatchCommand(agentName: string, ref: string): Promi
team: process.env.GENIE_TEAM ?? 'genie',
role: `${agentName}-${group}`,
extraArgs: ['--append-system-prompt-file', contextFile],
initialPrompt: `Execute Group ${group} of wish "${slug}". Your full context is in the system prompt. Read the wish at ${wishPath} if needed. Implement all deliverables, run validation, and report completion. When done, run: genie done ${slug}#${group}`,
initialPrompt: `Execute Group ${group} of wish "${slug}". Your full context is in the system prompt. Read the wish at ${wishPath} if needed. Implement all deliverables, run validation, and report completion.\n\nWhen done:\n1. Run: genie done ${slug}#${group}\n2. Run: genie send 'Group ${group} complete. <summary>' --to team-lead`,
});
}

Expand Down Expand Up @@ -598,7 +605,7 @@ export async function reviewCommand(agentName: string, ref: string): Promise<voi
provider: 'claude',
team: process.env.GENIE_TEAM ?? 'genie',
extraArgs: ['--append-system-prompt-file', contextFile],
initialPrompt: `Review "${ref}". Your context and diff are in the system prompt. Evaluate against acceptance criteria and return SHIP, FIX-FIRST, or BLOCKED with severity-tagged findings.`,
initialPrompt: `Review "${ref}". Your context and diff are in the system prompt. Evaluate against acceptance criteria and return SHIP, FIX-FIRST, or BLOCKED with severity-tagged findings.\n\nWhen done, report your verdict:\nRun: genie send '<SHIP|FIX-FIRST|BLOCKED> — <summary>' --to team-lead`,
});
}

Expand Down
Loading