monomind 1.16.11 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/engineering/engineering-security-engineer.md +1 -1
- package/.claude/agents/github/code-review-swarm.md +19 -19
- package/.claude/agents/github/github-modes.md +4 -4
- package/.claude/agents/github/multi-repo-swarm.md +24 -24
- package/.claude/agents/github/project-board-sync.md +28 -28
- package/.claude/agents/github/swarm-issue.md +26 -26
- package/.claude/agents/github/swarm-pr.md +18 -18
- package/.claude/agents/github/workflow-automation.md +27 -27
- package/.claude/agents/reengineer-squad/git-manager.md +2 -2
- package/.claude/commands/mastermind/_repeat.md +4 -0
- package/.claude/commands/mastermind/master.md +61 -4
- package/.claude/commands/mastermind/references/antigravity-tools.md +60 -0
- package/.claude/commands/mastermind/references/claude-code-tools.md +50 -0
- package/.claude/commands/mastermind/references/codex-tools.md +64 -0
- package/.claude/commands/mastermind/references/copilot-tools.md +49 -0
- package/.claude/commands/mastermind/references/gemini-tools.md +63 -0
- package/.claude/commands/mastermind/references/pi-tools.md +28 -0
- package/.claude/helpers/mastermind-activate.cjs +53 -0
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/settings.json +4 -0
- package/.claude/skills/mastermind/_repeat.md +2 -0
- package/.claude/skills/mastermind/runorg.md +14 -0
- package/.claude/skills/mastermind/techport.md +5 -5
- package/README.md +1 -1
- package/package.json +6 -5
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-security-engineer.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +19 -19
- package/packages/@monomind/cli/.claude/agents/github/github-modes.md +4 -4
- package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +24 -24
- package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +28 -28
- package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +26 -26
- package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +18 -18
- package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +27 -27
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/git-manager.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +4 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/master.md +61 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/references/antigravity-tools.md +60 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/claude-code-tools.md +50 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/codex-tools.md +64 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/copilot-tools.md +49 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/gemini-tools.md +63 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/pi-tools.md +28 -0
- package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +53 -0
- package/packages/@monomind/cli/.claude/skills/mastermind/_repeat.md +2 -0
- package/packages/@monomind/cli/.claude/skills/mastermind/runorg.md +14 -0
- package/packages/@monomind/cli/.claude/skills/mastermind/techport.md +5 -5
- package/packages/@monomind/cli/README.md +1 -1
- package/packages/@monomind/cli/dist/src/__tests__/browse-analyzer.test.js +42 -59
- package/packages/@monomind/cli/dist/src/browser/dashboard/server.js +18 -0
- package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.d.ts +17 -0
- package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.js +320 -0
- package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/agent-ops.js +329 -0
- package/packages/@monomind/cli/dist/src/commands/agent.js +5 -907
- package/packages/@monomind/cli/dist/src/commands/analyze-ast.d.ts +26 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-ast.js +284 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.js +295 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +395 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-graph.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-graph.js +304 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-imports.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-imports.js +287 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-symbols.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-symbols.js +302 -0
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +38 -0
- package/packages/@monomind/cli/dist/src/commands/analyze.js +12 -1827
- package/packages/@monomind/cli/dist/src/commands/doctor-env-checks.d.ts +26 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-env-checks.js +189 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +19 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +388 -0
- package/packages/@monomind/cli/dist/src/commands/doctor.js +51 -942
- package/packages/@monomind/cli/dist/src/commands/hive-mind-comms.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-comms.js +242 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.d.ts +35 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +203 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +233 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-spawn.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-spawn.js +274 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +10 -1129
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +19 -819
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +334 -0
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +399 -0
- package/packages/@monomind/cli/dist/src/commands/index.js +0 -2
- package/packages/@monomind/cli/dist/src/commands/init-subcommands.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/init-subcommands.js +156 -0
- package/packages/@monomind/cli/dist/src/commands/init-upgrade.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/init-upgrade.js +203 -0
- package/packages/@monomind/cli/dist/src/commands/init-wizard.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/init-wizard.js +246 -0
- package/packages/@monomind/cli/dist/src/commands/init.js +6 -623
- package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +10 -0
- package/packages/@monomind/cli/dist/src/commands/memory-admin.js +433 -0
- package/packages/@monomind/cli/dist/src/commands/memory-crud.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/memory-crud.js +342 -0
- package/packages/@monomind/cli/dist/src/commands/memory-list.d.ts +10 -0
- package/packages/@monomind/cli/dist/src/commands/memory-list.js +321 -0
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +372 -0
- package/packages/@monomind/cli/dist/src/commands/memory.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/memory.js +10 -1441
- package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/neural-core.js +274 -0
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +332 -0
- package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/neural-registry.js +290 -0
- package/packages/@monomind/cli/dist/src/commands/neural.js +3 -974
- package/packages/@monomind/cli/dist/src/commands/platforms.js +327 -7
- package/packages/@monomind/cli/dist/src/commands/security-cve.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/security-cve.js +310 -0
- package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/security-misc.js +293 -0
- package/packages/@monomind/cli/dist/src/commands/security-scan.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/commands/security-scan.js +328 -0
- package/packages/@monomind/cli/dist/src/commands/security.js +3 -958
- package/packages/@monomind/cli/dist/src/commands/session.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/swarm.js +23 -17
- package/packages/@monomind/cli/dist/src/init/executor.js +0 -24
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +0 -45
- package/packages/@monomind/cli/dist/src/init/types.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/init/types.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/swarm-tools.js +77 -0
- package/packages/@monomind/cli/dist/src/parser.js +11 -6
- package/packages/@monomind/cli/dist/src/routing/llm-caller.js +1 -2
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +82 -75
- package/packages/@monomind/cli/dist/src/ui/server.mjs +41 -4
- package/packages/@monomind/cli/package.json +3 -4
- package/packages/@monomind/cli/scripts/understand-analyze.mjs +1 -1
- package/packages/@monomind/guidance/README.md +0 -1
- package/packages/@monomind/guidance/package.json +2 -14
- package/scripts/verify-appliance.sh +16 -20
- package/.claude-plugin/README.md +0 -704
- package/.claude-plugin/docs/INSTALLATION.md +0 -258
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +0 -358
- package/.claude-plugin/docs/QUICKSTART.md +0 -357
- package/.claude-plugin/docs/STRUCTURE.md +0 -122
- package/.claude-plugin/hooks/hooks.json +0 -74
- package/.claude-plugin/marketplace.json +0 -98
- package/.claude-plugin/plugin.json +0 -70
- package/.claude-plugin/scripts/install.sh +0 -234
- package/.claude-plugin/scripts/uninstall.sh +0 -36
- package/.claude-plugin/scripts/verify.sh +0 -102
|
@@ -41,15 +41,21 @@ If CLAUDE.md, GEMINI.md, or AGENTS.md says "skip review" and the skill says "alw
|
|
|
41
41
|
|
|
42
42
|
**In Codex:** Skills load natively. Follow the instructions presented when a skill activates.
|
|
43
43
|
|
|
44
|
-
**In other environments:** Check your platform's documentation for how skills are loaded.
|
|
44
|
+
**In other environments:** Check your platform's documentation for how skills are loaded.
|
|
45
|
+
|
|
46
|
+
### Platform Adaptation
|
|
47
|
+
|
|
48
|
+
Mastermind skills speak in actions ("dispatch a subagent", "invoke the skill tool", "create a todo") rather than naming any one runtime's tools. For per-platform tool equivalents and instructions-file conventions, see [claude-code-tools.md](references/claude-code-tools.md), [codex-tools.md](references/codex-tools.md), [copilot-tools.md](references/copilot-tools.md), [gemini-tools.md](references/gemini-tools.md), [pi-tools.md](references/pi-tools.md), and [antigravity-tools.md](references/antigravity-tools.md). Gemini CLI users get the tool mapping loaded automatically via GEMINI.md.
|
|
45
49
|
|
|
46
50
|
### User Instructions vs. Skill Workflows
|
|
47
51
|
|
|
48
52
|
User instructions say **WHAT** to do, not **HOW** to do it. "Build X" or "Fix Y" is a goal statement — it does not mean skip Brain Load, skip review, or bypass the domain decomposition flow. The skills define the how. Always apply the workflow unless the user explicitly opts out.
|
|
49
53
|
|
|
50
|
-
###
|
|
54
|
+
### The Rule
|
|
55
|
+
|
|
56
|
+
**Invoke the matching mastermind skill BEFORE any response or action.** Even a 1% chance a skill applies means you must check. If you invoke a skill and it turns out not to fit the situation, you don't need to follow it — but you must check first.
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
### Command-to-Skill Routing
|
|
53
59
|
|
|
54
60
|
```dot
|
|
55
61
|
digraph mastermind_routing {
|
|
@@ -341,6 +347,21 @@ curl -s -o /dev/null -X POST "${CTRL_URL}/api/mastermind/event" \
|
|
|
341
347
|
'{type:"session:start",session:$sid,prompt:$prompt,mode:$mode,project:$proj,ts:(now*1000|floor)}')" || true
|
|
342
348
|
```
|
|
343
349
|
|
|
350
|
+
### Step 3.5 — Design Gate
|
|
351
|
+
|
|
352
|
+
<HARD-GATE>
|
|
353
|
+
STOP before Step 4. If `domains_needed` includes `build` (or any code/feature/fix work):
|
|
354
|
+
|
|
355
|
+
1. Invoke `Skill("mastermind:design")` NOW — pass `resolved_prompt` as the task description
|
|
356
|
+
2. Do NOT write any code, do NOT spawn any domain managers, do NOT proceed to Step 4 until the design skill returns with an approved spec
|
|
357
|
+
3. When design returns: save the approved spec as `build_spec` in `current.json`
|
|
358
|
+
4. Only then continue to Step 4
|
|
359
|
+
|
|
360
|
+
If `domains_needed` contains ONLY non-build domains (marketing, sales, research, content, ops, finance, idea): skip this gate and go directly to Step 4.
|
|
361
|
+
|
|
362
|
+
Rationale: without a design gate, master spawns agents before the user has confirmed what to build. The design gate replicates the superpowers workflow: questions → approaches → spec approval → plan → execute.
|
|
363
|
+
</HARD-GATE>
|
|
364
|
+
|
|
344
365
|
### Step 4 — Decompose
|
|
345
366
|
|
|
346
367
|
For each domain in `domains_needed`, assess complexity:
|
|
@@ -417,7 +438,39 @@ If mode = confirm: show plan and wait for user response. Valid responses:
|
|
|
417
438
|
- Any modification (e.g. "add sales domain", "remove marketing") — apply the change, re-show the plan, wait again
|
|
418
439
|
- "cancel" or "stop" — emit `session:complete` with `status: blocked`, reason "cancelled by user", then STOP
|
|
419
440
|
|
|
420
|
-
|
|
441
|
+
After the user says "go" (and `build` is in `domains_needed`), ask once:
|
|
442
|
+
> "For the build work: **subagents** (recommended — fresh agent per task with 2-stage review, like mastermind:taskdev) or **inline** (direct execution, mastermind:execute)?"
|
|
443
|
+
|
|
444
|
+
- "subagents" → `build_exec_mode = "taskdev"`
|
|
445
|
+
- "inline" → `build_exec_mode = "execute"`
|
|
446
|
+
- No answer / skipped → `build_exec_mode = "taskdev"` (default)
|
|
447
|
+
|
|
448
|
+
If mode = auto: `build_exec_mode = "taskdev"` (default).
|
|
449
|
+
|
|
450
|
+
**Persist `build_exec_mode` to `current.json`** (required — Phase C reads it from there):
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
454
|
+
_get_mono_dir() {
|
|
455
|
+
local w="${1:-$(pwd)}"
|
|
456
|
+
if [ -d "$w/.git" ]; then echo "$w/.git/monomind"; return; fi
|
|
457
|
+
if [ -f "$w/.git" ]; then
|
|
458
|
+
local m; m=$(grep '^gitdir:' "$w/.git" | sed 's/gitdir: *//')
|
|
459
|
+
[ -z "$m" ] && { echo "$w/.monomind"; return; }
|
|
460
|
+
[[ "$m" != /* ]] && m="$w/$m"
|
|
461
|
+
echo "$(dirname "$(dirname "$m")")/monomind"; return
|
|
462
|
+
fi
|
|
463
|
+
echo "$w/.monomind"
|
|
464
|
+
}
|
|
465
|
+
MONO_DIR=$(_get_mono_dir "$REPO_ROOT")
|
|
466
|
+
SESSION_STATE="$MONO_DIR/sessions/current.json"
|
|
467
|
+
# LLM: replace EXEC_MODE_VALUE with the resolved value: taskdev or execute
|
|
468
|
+
build_exec_mode="EXEC_MODE_VALUE"
|
|
469
|
+
[ "$build_exec_mode" = "EXEC_MODE_VALUE" ] && build_exec_mode="taskdev"
|
|
470
|
+
jq --arg m "$build_exec_mode" '. + {build_exec_mode: $m}' \
|
|
471
|
+
"$SESSION_STATE" > "$SESSION_STATE.tmp" && mv "$SESSION_STATE.tmp" "$SESSION_STATE"
|
|
472
|
+
echo "build_exec_mode=$build_exec_mode written to current.json"
|
|
473
|
+
```
|
|
421
474
|
|
|
422
475
|
### Step 6 — Monotask Setup
|
|
423
476
|
|
|
@@ -672,12 +725,15 @@ for domain in $(jq -r '.domains_needed[]? // empty' "$SESSION_STATE" | grep -v '
|
|
|
672
725
|
if [ -z "$board_id" ]; then
|
|
673
726
|
echo "WARN: DOMAIN=$domain has no board_id — Step 6 may not have run or monotask is missing. Task agent will run without board tracking."
|
|
674
727
|
fi
|
|
728
|
+
exec_mode=""
|
|
729
|
+
[ "$domain" = "build" ] && exec_mode=$(jq -r '.build_exec_mode // "taskdev"' "$SESSION_STATE")
|
|
675
730
|
echo "DOMAIN=$domain \
|
|
676
731
|
MANAGER=$(jq -r --arg d "$domain" '.domain_managers[$d] // "coordinator"' "$SESSION_STATE") \
|
|
677
732
|
BOARD=$board_id \
|
|
678
733
|
TODO=$(jq -r --arg d "$domain" '.todo_cols[$d] // ""' "$SESSION_STATE") \
|
|
679
734
|
DOING=$(jq -r --arg d "$domain" '.doing_cols[$d] // ""' "$SESSION_STATE") \
|
|
680
735
|
DONE=$(jq -r --arg d "$domain" '.done_cols[$d] // ""' "$SESSION_STATE") \
|
|
736
|
+
EXEC_MODE=$exec_mode \
|
|
681
737
|
GOAL=$(jq -r --arg d "$domain" '.domain_goals[$d] // .prompt' "$SESSION_STATE" | tr -d '\n')"
|
|
682
738
|
done
|
|
683
739
|
```
|
|
@@ -692,6 +748,7 @@ Each Task call must include a complete briefing following the Monotask Task Brie
|
|
|
692
748
|
- Instruction to create monotask cards directly using `monotask card create $BOARD_ID $COL_TODO_ID "<title>" --json` for all sub-tasks
|
|
693
749
|
- Instruction to use `Skill("mastermind:do")` to execute tasks (Task agents have Skill tool access — do NOT use slash command syntax)
|
|
694
750
|
- Instruction to spawn specialized agents using the domain-appropriate swarm topology
|
|
751
|
+
- **For the `build` domain only:** include `build_exec_mode` (value: `"taskdev"` or `"execute"`) and instruct the manager: "Use `Skill("mastermind:taskdev")` if build_exec_mode is `taskdev`, or `Skill("mastermind:execute")` if `execute`. This was chosen by the user in Step 5."
|
|
695
752
|
- Instruction to return the unified output schema when done
|
|
696
753
|
|
|
697
754
|
Example Task call for Development Manager. Substitute all **pre-known** `<…>` placeholders (project_name, SESSION_ID, board/col IDs, goals, manager name) before calling Task. Placeholders like `<status>`, `<path1>`, `<action1>` are filled at runtime by the spawned agent — do not attempt to substitute them. `subagent_type` is the **string value** of `$domain_manager_build` (e.g. `"Backend Architect"`), not a variable reference.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Antigravity CLI (`agy`) Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On the Antigravity CLI (`agy`) these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Antigravity CLI equivalent |
|
|
6
|
+
|----------------------|----------------------|
|
|
7
|
+
| Read a file | `view_file` |
|
|
8
|
+
| Create a new file | `write_to_file` |
|
|
9
|
+
| Edit a file | `replace_file_content` |
|
|
10
|
+
| Edit a file in several places at once | `multi_replace_file_content` |
|
|
11
|
+
| Run a shell command | `run_command` |
|
|
12
|
+
| Search file contents | `grep_search` |
|
|
13
|
+
| Find files by name / list a directory | `list_dir` (no dedicated glob tool — combine `list_dir` with `grep_search`) |
|
|
14
|
+
| Fetch a URL | `read_url_content` |
|
|
15
|
+
| Search the web | `search_web` |
|
|
16
|
+
| Pose a structured question to your human partner | `ask_question` |
|
|
17
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | `invoke_subagent` with a built-in `TypeName` — `self` for full-capability work, `research` for read-only (see [Subagent support](#subagent-support)) |
|
|
18
|
+
| Multiple parallel dispatches | Multiple entries in one `invoke_subagent` call's `Subagents` array |
|
|
19
|
+
| Task tracking ("create a todo", "mark complete") | a **task artifact** — `write_to_file` with `IsArtifact: true` and `ArtifactType: "task"` (see [Task tracking](#task-tracking)). **Not** `manage_task`, which manages background processes. |
|
|
20
|
+
|
|
21
|
+
## Invoking a skill — read its `SKILL.md`
|
|
22
|
+
|
|
23
|
+
Antigravity surfaces every installed skill's `name` + `description` to you at the start of each session, but it has **no `Skill`/`activate_skill` tool**. To load a skill, **read its `SKILL.md` with `view_file`, setting `IsSkillFile: true`** when the skill applies — e.g. `view_file` on `.../mastermind/skills/<skill-name>/SKILL.md` with `IsSkillFile: true`.
|
|
24
|
+
|
|
25
|
+
(`IsSkillFile` is agy's own signal that you're reading a file to *execute its instructions*, not to edit or preview it — set it whenever you load a skill.)
|
|
26
|
+
|
|
27
|
+
This is the blessed skill-loading mechanism on this harness. The general rule "never read skill files manually" means "don't bypass your platform's skill-loading mechanism" — and on Antigravity, reading `SKILL.md` *is* that mechanism. Reading it honors the rule rather than breaking it.
|
|
28
|
+
|
|
29
|
+
You already know which skills exist and what they're for: their names and descriptions are in front of you at session start. When a description matches what you're about to do, read that skill's `SKILL.md` before acting.
|
|
30
|
+
|
|
31
|
+
## Subagent support
|
|
32
|
+
|
|
33
|
+
Antigravity dispatches subagents with `invoke_subagent`, passing each one a `TypeName` in the `Subagents` array. Two `TypeName`s are **built in** — use them directly, no `define_subagent` needed:
|
|
34
|
+
|
|
35
|
+
- **`self`** — a full clone of you, with every tool you have (including `write_to_file`/`replace_file_content`/`run_command`). The safe default for general-purpose work: implementing, fixing, anything that edits files or runs commands.
|
|
36
|
+
- **`research`** — read-only (file reading, `grep_search`, web/URL fetch; no write or command access). Use it when you specifically want a subagent that can't make changes — investigation and read-only review.
|
|
37
|
+
|
|
38
|
+
Call `define_subagent` only for a custom system prompt or capability mix: set `enable_write_tools: true` to grant file edits **and** `run_command`, `enable_subagent_tools` for nested dispatch, `enable_mcp_tools` for MCP. Then invoke it by the name you gave it.
|
|
39
|
+
|
|
40
|
+
Skills dispatch with `Subagent (general-purpose):` and either reference a prompt-template file or supply an inline prompt. On Antigravity:
|
|
41
|
+
|
|
42
|
+
| Skill dispatch form | Antigravity equivalent |
|
|
43
|
+
|---------------------|----------------------|
|
|
44
|
+
| An implementer-style template (writes code, runs tests) | Fill the template, then `invoke_subagent` with `TypeName: "self"` and the filled prompt |
|
|
45
|
+
| A read-only reviewer template (`mastermind:review`) | `invoke_subagent` with `TypeName: "research"` and the filled review template |
|
|
46
|
+
| Inline prompt (no template referenced) | `invoke_subagent` with `TypeName: "self"` (or `"research"` if the task only reads) and your inline prompt |
|
|
47
|
+
|
|
48
|
+
### Prompt filling
|
|
49
|
+
|
|
50
|
+
Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders before passing the complete prompt to `invoke_subagent`. The prompt template itself contains the agent's role, review criteria, and expected output format — the subagent will follow it.
|
|
51
|
+
|
|
52
|
+
### Parallel dispatch
|
|
53
|
+
|
|
54
|
+
Put multiple entries in a single `invoke_subagent` call's `Subagents` array to run independent subagent work in parallel. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
|
|
55
|
+
|
|
56
|
+
## Task tracking
|
|
57
|
+
|
|
58
|
+
Antigravity has **no todo / `TodoWrite` tool** (`manage_task` manages background processes — it is *not* a checklist). When a skill says to create a todo list or track tasks, maintain a **task artifact**: a markdown checklist saved with `write_to_file` (`IsArtifact: true`, `ArtifactMetadata.ArtifactType: "task"`), edited with `replace_file_content` / `multi_replace_file_content` as you go.
|
|
59
|
+
|
|
60
|
+
At the start of any multi-step task, create the task artifact listing every step of your plan. As you complete each step, edit the artifact to mark it done (`- [x]`). If the plan changes, update the checklist. Keep it current — it is your source of truth for what remains; once the conversation gets long, re-read it before starting each step.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Claude Code Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Claude Code these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
## Tools
|
|
6
|
+
|
|
7
|
+
| Action skills request | Claude Code tool |
|
|
8
|
+
|----------------------|------------------|
|
|
9
|
+
| Read a file | `Read` |
|
|
10
|
+
| Create a new file | `Write` |
|
|
11
|
+
| Edit a file | `Edit` |
|
|
12
|
+
| Run a shell command | `Bash` |
|
|
13
|
+
| Search file contents | `Grep` |
|
|
14
|
+
| Find files by name | `Glob` |
|
|
15
|
+
| Fetch a URL | `WebFetch` |
|
|
16
|
+
| Search the web | `WebSearch` |
|
|
17
|
+
| Invoke a skill | `Skill` |
|
|
18
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | `Agent` (older releases named this `Task`) |
|
|
19
|
+
| Multiple parallel dispatches | Multiple `Agent` calls in one response |
|
|
20
|
+
| Task tracking ("create a todo", "mark complete") | `TaskCreate`, `TaskUpdate`, `TaskList`, `TaskGet`; `TodoWrite` in `claude -p` / Agent SDK unless `CLAUDE_CODE_ENABLE_TASKS=1` is set |
|
|
21
|
+
| Background-process / subagent lifecycle (read output, cancel) | `TaskOutput`, `TaskStop` — these are distinct from the todo tools above and apply to running shells, agents, and remote sessions |
|
|
22
|
+
|
|
23
|
+
## Instructions file
|
|
24
|
+
|
|
25
|
+
When a skill mentions "your instructions file", on Claude Code this is **`CLAUDE.md`**. Claude Code walks up the directory tree from the current working directory and concatenates every `CLAUDE.md` and `CLAUDE.local.md` it finds along the way. Standard locations:
|
|
26
|
+
|
|
27
|
+
| Scope | Location |
|
|
28
|
+
|-------|----------|
|
|
29
|
+
| Project (team-shared) | `./CLAUDE.md` or `./.claude/CLAUDE.md` |
|
|
30
|
+
| User global | `~/.claude/CLAUDE.md` |
|
|
31
|
+
| Local-private (gitignored) | `./CLAUDE.local.md` |
|
|
32
|
+
| Managed policy (org-wide) | `/Library/Application Support/ClaudeCode/CLAUDE.md` (macOS), `/etc/claude-code/CLAUDE.md` (Linux/WSL), `C:\Program Files\ClaudeCode\CLAUDE.md` (Windows) |
|
|
33
|
+
|
|
34
|
+
CLAUDE.md files can pull in additional content with `@path/to/file` imports (relative or absolute, max five hops deep). Subdirectory `CLAUDE.md` files are also discovered automatically and loaded on-demand when Claude Code reads files in those subdirectories.
|
|
35
|
+
|
|
36
|
+
Claude Code does **not** read `AGENTS.md` directly. If a project already maintains `AGENTS.md` for other agents, import it from `CLAUDE.md` so both runtimes share the same instructions:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
@AGENTS.md
|
|
40
|
+
|
|
41
|
+
## Claude Code
|
|
42
|
+
|
|
43
|
+
(Claude-Code-specific instructions go here.)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For path-scoped rules and larger-project organization, see `.claude/rules/` (rules can be scoped to specific files via `paths` frontmatter and load on demand).
|
|
47
|
+
|
|
48
|
+
## Personal skills directory
|
|
49
|
+
|
|
50
|
+
User-level skills live at **`~/.claude/skills/`**. Each skill is a subdirectory containing a `SKILL.md` (with `name` and `description` frontmatter) plus any supporting files. Claude Code does not currently recognize the cross-runtime `~/.agents/skills/` path that Codex, Copilot CLI, and Gemini CLI read; if you're relying on cross-runtime support in the future, verify against the official skills docs.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Codex Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Codex these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Codex equivalent |
|
|
6
|
+
|----------------------|------------------|
|
|
7
|
+
| Read a file | `shell` (e.g., `cat`, `head`, `tail`) — Codex reads files via shell |
|
|
8
|
+
| Create / edit / delete a file | `apply_patch` (structured diff for create, update, delete) |
|
|
9
|
+
| Run a shell command | `shell` |
|
|
10
|
+
| Search file contents | `shell` (e.g., `grep`, `rg`) |
|
|
11
|
+
| Find files by name | `shell` (e.g., `find`, `ls`) |
|
|
12
|
+
| Fetch a URL | `shell` with `curl` / `wget` — Codex has no native fetch tool |
|
|
13
|
+
| Search the web | `web_search` (enabled by default; configurable in `config.toml` via the top-level `web_search` setting — `live`, `cached`, or `disabled`) |
|
|
14
|
+
| Invoke a skill | Skills load natively — just follow the instructions |
|
|
15
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | `spawn_agent` (see [Subagent dispatch requires multi-agent support](#subagent-dispatch-requires-multi-agent-support)) |
|
|
16
|
+
| Multiple parallel dispatches | Multiple `spawn_agent` calls in one response |
|
|
17
|
+
| Wait for subagent result | `wait_agent` |
|
|
18
|
+
| Free up subagent slot when done | `close_agent` |
|
|
19
|
+
| Task tracking ("create a todo", "mark complete") | `update_plan` |
|
|
20
|
+
|
|
21
|
+
## Instructions file
|
|
22
|
+
|
|
23
|
+
When a skill mentions "your instructions file", on Codex this is **`AGENTS.md`** at the project root. Codex also reads `~/.codex/AGENTS.md` for global context, and an `AGENTS.override.md` (in the project tree or `~/.codex/`) takes precedence when present. Codex walks from the project root down to the current working directory, concatenating `AGENTS.md` files it finds along the way, up to `project_doc_max_bytes` (32 KiB by default).
|
|
24
|
+
|
|
25
|
+
## Personal skills directory
|
|
26
|
+
|
|
27
|
+
User-level skills live at **`$CODEX_HOME/skills/`** (default `~/.codex/skills/`). Codex also reads the cross-runtime path **`~/.agents/skills/`** (shared with Copilot CLI and Gemini CLI). When both directories exist at the same scope, Codex loads them both as separate skill catalogs. Each skill is a subdirectory containing a `SKILL.md` (with `name` and `description` frontmatter).
|
|
28
|
+
|
|
29
|
+
## Subagent dispatch requires multi-agent support
|
|
30
|
+
|
|
31
|
+
Add to your Codex config (`~/.codex/config.toml`):
|
|
32
|
+
|
|
33
|
+
```toml
|
|
34
|
+
[features]
|
|
35
|
+
multi_agent = true
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This enables `spawn_agent`, `wait_agent`, and `close_agent` for skills like `mastermind:taskdev` and `mastermind:review`.
|
|
39
|
+
|
|
40
|
+
Legacy note: Codex builds before `rust-v0.115.0` exposed spawned-agent waiting as `wait`. Current Codex uses `wait_agent` for spawned agents. The `wait` name now belongs to code-mode `exec/wait`, which resumes a yielded exec cell by `cell_id`; it is not the spawned-agent result tool.
|
|
41
|
+
|
|
42
|
+
## Environment Detection
|
|
43
|
+
|
|
44
|
+
Skills that create worktrees or finish branches should detect their environment with read-only git commands before proceeding:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
|
|
48
|
+
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
|
|
49
|
+
BRANCH=$(git branch --show-current)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- `GIT_DIR != GIT_COMMON` → already in a linked worktree (skip creation)
|
|
53
|
+
- `BRANCH` empty → detached HEAD (cannot branch/push/PR from sandbox)
|
|
54
|
+
|
|
55
|
+
See `mastermind:worktree` Step 0 and `mastermind:finish` Step 1 for how each skill uses these signals.
|
|
56
|
+
|
|
57
|
+
## Codex App Finishing
|
|
58
|
+
|
|
59
|
+
When the sandbox blocks branch/push operations (detached HEAD in an externally managed worktree), the agent commits all work and informs the user to use the App's native controls:
|
|
60
|
+
|
|
61
|
+
- **"Create branch"** — names the branch, then commit/push/PR via App UI
|
|
62
|
+
- **"Hand off to local"** — transfers work to the user's local checkout
|
|
63
|
+
|
|
64
|
+
The agent can still run tests, stage files, and output suggested branch names, commit messages, and PR descriptions for the user to copy.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Copilot CLI Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Copilot CLI these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Copilot CLI equivalent |
|
|
6
|
+
|----------------------|----------------------|
|
|
7
|
+
| Read a file | `view` |
|
|
8
|
+
| Create / edit / delete a file | `apply_patch` (Copilot CLI has no separate create/edit/write tools) |
|
|
9
|
+
| Run a shell command | `bash` |
|
|
10
|
+
| Search file contents | `rg` (ripgrep; Copilot CLI does not expose a `grep` tool) |
|
|
11
|
+
| Find files by name | `glob` |
|
|
12
|
+
| Fetch a URL | `web_fetch` |
|
|
13
|
+
| Search the web | `web_search` |
|
|
14
|
+
| Invoke a skill | `skill` |
|
|
15
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | `task` with `agent_type: "general-purpose"` (other accepted types: `explore`, `task`, `code-review`, `research`, `configure-copilot`) |
|
|
16
|
+
| Multiple parallel dispatches | Multiple `task` calls in one response |
|
|
17
|
+
| Subagent status/output/control | `read_agent`, `list_agents`, `write_agent` |
|
|
18
|
+
| Task tracking ("create a todo", "mark complete") | `update_todo` |
|
|
19
|
+
| Enter / exit plan mode | No equivalent — stay in the main session |
|
|
20
|
+
|
|
21
|
+
## Instructions file
|
|
22
|
+
|
|
23
|
+
When a skill mentions "your instructions file", on Copilot CLI this is **`AGENTS.md`** at the repository root. If both `AGENTS.md` and `.github/copilot-instructions.md` are present, Copilot reads both.
|
|
24
|
+
|
|
25
|
+
## Personal skills directory
|
|
26
|
+
|
|
27
|
+
User-level skills live at **`~/.copilot/skills/`**. Copilot CLI also recognizes the cross-runtime alias **`~/.agents/skills/`**, which is shared with Codex and Gemini CLI. Each skill is a subdirectory containing a `SKILL.md` (with `name` and `description` frontmatter).
|
|
28
|
+
|
|
29
|
+
## Async shell sessions
|
|
30
|
+
|
|
31
|
+
Copilot CLI supports persistent async shell sessions:
|
|
32
|
+
|
|
33
|
+
| Tool | Purpose |
|
|
34
|
+
|------|---------|
|
|
35
|
+
| `bash` with `mode: "async"` (and optionally `detach: true`) | Start a long-running command in the background; returns a `shellId` |
|
|
36
|
+
| `write_bash` | Send input to a running async session |
|
|
37
|
+
| `read_bash` | Read output from an async session |
|
|
38
|
+
| `stop_bash` | Terminate an async session |
|
|
39
|
+
| `list_bash` | List all active shell sessions |
|
|
40
|
+
|
|
41
|
+
## Additional Copilot CLI tools
|
|
42
|
+
|
|
43
|
+
| Tool | Purpose |
|
|
44
|
+
|------|---------|
|
|
45
|
+
| `store_memory` | Persist facts about the codebase for future sessions |
|
|
46
|
+
| `report_intent` | Update the UI status line with current intent |
|
|
47
|
+
| `sql` | Query the session's SQLite database (todos, metadata) |
|
|
48
|
+
| `fetch_copilot_cli_documentation` | Look up Copilot CLI documentation |
|
|
49
|
+
| GitHub MCP tools (`github-mcp-server-*`) | Native GitHub API access (issues, PRs, code search) |
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Gemini CLI Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Gemini CLI these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Gemini CLI equivalent |
|
|
6
|
+
|----------------------|----------------------|
|
|
7
|
+
| Read a file | `read_file` |
|
|
8
|
+
| Read multiple files at once | `read_many_files` |
|
|
9
|
+
| Create a new file | `write_file` |
|
|
10
|
+
| Edit a file | `replace` |
|
|
11
|
+
| Run a shell command | `run_shell_command` |
|
|
12
|
+
| Search file contents | `grep_search` |
|
|
13
|
+
| Find files by name | `glob` |
|
|
14
|
+
| List files and subdirectories | `list_directory` |
|
|
15
|
+
| Fetch a URL | `web_fetch` |
|
|
16
|
+
| Search the web | `google_web_search` |
|
|
17
|
+
| Invoke a skill | `activate_skill` |
|
|
18
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | `invoke_agent` with `agent_name: "generalist"` (invocable via `@generalist` chat syntax — see [Subagent support](#subagent-support)) |
|
|
19
|
+
| Multiple parallel dispatches | Multiple `invoke_agent` calls in the same response |
|
|
20
|
+
| Task tracking ("create a todo", "mark complete") | `write_todos` (statuses: pending, in_progress, completed, cancelled, blocked) |
|
|
21
|
+
|
|
22
|
+
## Instructions file
|
|
23
|
+
|
|
24
|
+
When a skill mentions "your instructions file", on Gemini CLI this is **`GEMINI.md`**. Gemini CLI loads `GEMINI.md` hierarchically: global at `~/.gemini/GEMINI.md`, project-level files in workspace directories and their ancestors, and sub-directory `GEMINI.md` files when a tool accesses files in those directories.
|
|
25
|
+
|
|
26
|
+
## Personal skills directory
|
|
27
|
+
|
|
28
|
+
User-level skills live at **`~/.gemini/skills/`**, with **`~/.agents/skills/`** as a cross-runtime alias (shared with Codex and Copilot CLI). When both directories exist at the same scope, `.agents/skills/` takes precedence. Each skill is a subdirectory containing a `SKILL.md` (with `name` and `description` frontmatter).
|
|
29
|
+
|
|
30
|
+
## Subagent support
|
|
31
|
+
|
|
32
|
+
Gemini CLI dispatches subagents through the `invoke_agent` tool, which takes `agent_name` and `prompt` parameters. The same dispatch is also surfaced as a chat-syntax shortcut: typing `@generalist <prompt>` is equivalent to calling `invoke_agent` with `agent_name: "generalist"`. Built-in agent names include `generalist`, `cli_help`, `codebase_investigator`, and (with browser tooling enabled) `browser_agent`.
|
|
33
|
+
|
|
34
|
+
Skills dispatch with `Subagent (general-purpose):` and either reference a prompt-template file or supply an inline prompt. On Gemini CLI:
|
|
35
|
+
|
|
36
|
+
| Skill dispatch form | Gemini CLI equivalent |
|
|
37
|
+
|---------------------|----------------------|
|
|
38
|
+
| References an implementer template (writes code, runs tests) | Fill the template, then `invoke_agent` with `agent_name: "generalist"` and the filled prompt |
|
|
39
|
+
| References a code-reviewer template (`mastermind:review`) | `invoke_agent` with `agent_name: "generalist"` and the filled review template |
|
|
40
|
+
| Inline prompt (no template referenced) | `invoke_agent` with `agent_name: "generalist"` and your inline prompt |
|
|
41
|
+
|
|
42
|
+
### Prompt filling
|
|
43
|
+
|
|
44
|
+
Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders before passing the complete prompt to `invoke_agent`. The prompt template itself contains the agent's role, review criteria, and expected output format — the subagent will follow it.
|
|
45
|
+
|
|
46
|
+
### Parallel dispatch
|
|
47
|
+
|
|
48
|
+
Gemini CLI supports parallel subagent dispatch. Issue multiple `invoke_agent` calls in the same response to run independent subagent work in parallel. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
|
|
49
|
+
|
|
50
|
+
## Additional Gemini CLI tools
|
|
51
|
+
|
|
52
|
+
These tools are unique to Gemini CLI:
|
|
53
|
+
|
|
54
|
+
| Tool | Purpose |
|
|
55
|
+
|------|---------|
|
|
56
|
+
| `save_memory` (legacy) | Persist facts across sessions when `experimental.memoryV2 = false` |
|
|
57
|
+
| `get_internal_docs` | Look up Gemini CLI's bundled documentation |
|
|
58
|
+
| `ask_user` | Pose structured questions to the user (text / single-select / multi-select) |
|
|
59
|
+
| `enter_plan_mode` / `exit_plan_mode` | Switch into and out of read-only plan mode |
|
|
60
|
+
| `update_topic` | Update the current conversation's topic / strategic-intent metadata |
|
|
61
|
+
| `complete_task` | Signal that a Gemini subagent has completed and return its result to the parent agent |
|
|
62
|
+
| `tracker_create_task`, `tracker_update_task`, `tracker_get_task`, `tracker_list_tasks`, `tracker_add_dependency`, `tracker_visualize` | Rich task tracker with dependency and visualization support |
|
|
63
|
+
| `read_mcp_resource`, `list_mcp_resources` | MCP resource access |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Pi Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Pi these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Pi equivalent |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| Invoke a skill | Pi native skills: load the relevant `SKILL.md` with `read`, or let the human use `/skill:name` |
|
|
8
|
+
| Read a file | `read` |
|
|
9
|
+
| Create a file | `write` |
|
|
10
|
+
| Edit a file | `edit` |
|
|
11
|
+
| Run a shell command | `bash` |
|
|
12
|
+
| Search file contents | `grep` when active; otherwise `bash` with `rg`/`grep` |
|
|
13
|
+
| Find files by name | `find` or `bash` with shell globs |
|
|
14
|
+
| List files and subdirectories | `ls` when active; otherwise `bash` with `ls` |
|
|
15
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | Use an installed subagent tool such as `subagent` from `pi-subagents` if available |
|
|
16
|
+
| Task tracking ("create a todo", "mark complete") | Use an installed todo/task tool if available, otherwise track tasks in the plan or `TODO.md` |
|
|
17
|
+
|
|
18
|
+
## Skills
|
|
19
|
+
|
|
20
|
+
Pi discovers skills from configured skill directories and installed Pi packages. A Mastermind Pi package should expose `skills/` through its `pi.skills` manifest entry. Pi does not expose Claude Code's `Skill` tool, but the agent should still follow the Mastermind rule: when a skill applies, load and follow it before responding.
|
|
21
|
+
|
|
22
|
+
## Subagents
|
|
23
|
+
|
|
24
|
+
Pi core does not ship a standard subagent tool. The `pi-subagents` package is a strong optional companion and provides a `subagent` tool with single-agent, chain, parallel, async, forked-context, and resume/status workflows. If no subagent tool is available, do not fabricate `Task` calls; execute sequentially in the current session or explain that the optional subagent capability is not installed.
|
|
25
|
+
|
|
26
|
+
## Task lists
|
|
27
|
+
|
|
28
|
+
Pi core does not ship a standard task-list tool. If a todo/task extension is installed, use its documented tool. Otherwise use Mastermind plan files, checklists in Markdown, or a repo-local `TODO.md` for task tracking. Older docs may refer to `TodoWrite`; treat that as the task-tracking action above.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
// Walk up from cwd to find the project root containing master.md
|
|
6
|
+
function findMasterPath() {
|
|
7
|
+
const candidates = [];
|
|
8
|
+
if (process.env.CLAUDE_PROJECT_DIR) candidates.push(process.env.CLAUDE_PROJECT_DIR);
|
|
9
|
+
let dir = process.cwd();
|
|
10
|
+
for (let i = 0; i < 12; i++) {
|
|
11
|
+
candidates.push(dir);
|
|
12
|
+
const parent = path.dirname(dir);
|
|
13
|
+
if (parent === dir) break;
|
|
14
|
+
dir = parent;
|
|
15
|
+
}
|
|
16
|
+
for (const base of candidates) {
|
|
17
|
+
const p = path.join(base, '.claude', 'commands', 'mastermind', 'master.md');
|
|
18
|
+
if (fs.existsSync(p)) return p;
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Extract only the MASTERMIND PROTOCOL section (before the capability menu / execution flow).
|
|
24
|
+
// The protocol section ends at the separator before "**If $ARGUMENTS is empty:**"
|
|
25
|
+
function extractProtocol(content) {
|
|
26
|
+
const marker = '\n---\n\n**If $ARGUMENTS is empty:**';
|
|
27
|
+
const idx = content.indexOf(marker);
|
|
28
|
+
if (idx !== -1) return content.slice(0, idx).trim();
|
|
29
|
+
// Fallback: everything before the capability menu header
|
|
30
|
+
const fallback = content.indexOf('\n**MASTERMIND** —');
|
|
31
|
+
if (fallback !== -1) return content.slice(0, fallback).trim();
|
|
32
|
+
return content.trim();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const masterPath = findMasterPath();
|
|
36
|
+
if (!masterPath) {
|
|
37
|
+
process.stderr.write('[mastermind-activate] master.md not found — skipping injection\n');
|
|
38
|
+
process.exit(0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let raw;
|
|
42
|
+
try {
|
|
43
|
+
raw = fs.readFileSync(masterPath, 'utf8');
|
|
44
|
+
} catch (e) {
|
|
45
|
+
process.stderr.write('[mastermind-activate] Could not read master.md: ' + e.message + '\n');
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Strip YAML frontmatter
|
|
50
|
+
const body = raw.replace(/^---[\s\S]*?---\s*/, '');
|
|
51
|
+
const protocol = extractProtocol(body);
|
|
52
|
+
|
|
53
|
+
process.stdout.write(protocol + '\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sessionId":"
|
|
1
|
+
{"sessionId":"361cc64c-bfbe-4774-a739-e3b982e26b21","pid":85888,"procStart":"Thu Jul 2 11:48:13 2026","acquiredAt":1782999721096}
|
package/.claude/settings.json
CHANGED
|
@@ -185,6 +185,10 @@
|
|
|
185
185
|
}
|
|
186
186
|
],
|
|
187
187
|
"SessionStart": [
|
|
188
|
+
{
|
|
189
|
+
"matcher": "",
|
|
190
|
+
"hooks": [{ "type": "command", "command": "node \"$CLAUDE_PROJECT_DIR/.claude/helpers/mastermind-activate.cjs\"", "timeout": 5000 }]
|
|
191
|
+
},
|
|
188
192
|
{
|
|
189
193
|
"matcher": "",
|
|
190
194
|
"hooks": [{ "type": "command", "command": "node \"$CLAUDE_PROJECT_DIR/.claude/helpers/monolean-activate.cjs\"", "timeout": 5000 }]
|
|
@@ -27,6 +27,8 @@ If the stop file exists:
|
|
|
27
27
|
|
|
28
28
|
## Step 2 — Tillend termination check (tillend mode only — skip for fixed-count)
|
|
29
29
|
|
|
30
|
+
**`LOOP_ASYNC_PENDING` escape hatch:** If the calling skill set `LOOP_ASYNC_PENDING=true` before invoking this postamble (because it spawned background agents whose results have not yet arrived), skip the empty-round check and go directly to Step 4 to schedule the next run. Output: `[tillend] Async work in flight — deferring empty-round check to run <next_rep>.`
|
|
31
|
+
|
|
30
32
|
Evaluate now whether this run produced **zero findings AND zero actions**:
|
|
31
33
|
|
|
32
34
|
- **Findings**: issues found, problems detected, items flagged, security vulnerabilities, tasks discovered, errors reported
|
|
@@ -477,6 +477,20 @@ If the file exists: write run:complete to run file, emit org:complete via curl,
|
|
|
477
477
|
OPERATING LOOP:
|
|
478
478
|
1. Check for stop signal (above). Exit with run:complete + org:complete events if found.
|
|
479
479
|
|
|
480
|
+
1b. Check user mailbox for pending messages:
|
|
481
|
+
_threads="${REPO_ROOT}/.monomind/orgs/${orgName}-threads.json"
|
|
482
|
+
if [ -f "$_threads" ]; then
|
|
483
|
+
_pending=$(jq '[.[] | select(.status == "pending")]' "$_threads" 2>/dev/null || echo "[]")
|
|
484
|
+
if [ "$(echo "$_pending" | jq 'length')" -gt 0 ]; then
|
|
485
|
+
echo "$_pending" | jq -r '.[] | .text // .msg // ""'
|
|
486
|
+
jq '[.[] | if .status == "pending" then .status = "processed" else . end]' "$_threads" > "${_threads}.tmp" && mv "${_threads}.tmp" "$_threads" || true
|
|
487
|
+
curl -s -X POST "${CTRL_URL}/api/mastermind/event" -H "Content-Type: application/json" \
|
|
488
|
+
-d "$(jq -cn --arg s "${sessionId}" --arg o "${orgName}" --arg rid "${runId}" \
|
|
489
|
+
--arg msg "Received user message — adjusting plan if needed" \
|
|
490
|
+
'{type:"org:comms",session:$s,org:$o,runId:$rid,from:"boss",to:"user",msg:$msg,ts:(now*1000|floor)}')" || true
|
|
491
|
+
fi
|
|
492
|
+
fi
|
|
493
|
+
|
|
480
494
|
2. List unclaimed Todo cards:
|
|
481
495
|
monotask card list ${board_id} --col ${todo_col} --json | jq '[.[] | select(.labels | index("claimed") | not)]'
|
|
482
496
|
|
|
@@ -27,7 +27,7 @@ If invoked directly (not by `mastermind:master`):
|
|
|
27
27
|
- `focus_hint`: optional — what to look for ("CLI commands", "animation", "hooks", "skills"); default: `"core architecture skills commands hooks agents"`
|
|
28
28
|
- `mode`: confirm | auto
|
|
29
29
|
- `partial`: boolean — if true, skip strategy (a) Copy-As-Is; force (b) Adapt or (c) Extract only
|
|
30
|
-
- `source_brand`: derived in Phase 1A — PascalCase brand name of the source project (e.g. `
|
|
30
|
+
- `source_brand`: derived in Phase 1A — PascalCase brand name of the source project (e.g. `Monomind`, `ClaudeFlow`); used in all `rg -i "{source_brand}"` brand contamination checks
|
|
31
31
|
- `candidate_file`: derived during Phase 1E–1F — absolute path to a specific source file under analysis; substituted before running per-candidate coupling checks
|
|
32
32
|
|
|
33
33
|
---
|
|
@@ -192,11 +192,11 @@ head -80 "{source_path}/README.md" 2>/dev/null
|
|
|
192
192
|
**BRAND EXTRACTION — required before Phase 2B collision detection:**
|
|
193
193
|
|
|
194
194
|
Extract `source_brand` from three signals, pick the most specific:
|
|
195
|
-
1. `package.json` `name` field: strip `@scope/` prefix, convert to PascalCase (e.g., `claude-flow` → `ClaudeFlow`, `
|
|
195
|
+
1. `package.json` `name` field: strip `@scope/` prefix, convert to PascalCase (e.g., `claude-flow` → `ClaudeFlow`, `monomind` → `Monomind`)
|
|
196
196
|
2. README H1 title: extract the project name word(s) before any tagline
|
|
197
|
-
3. Class name prefixes: run `grep -rhn "^export class\|^export abstract class" "{source_path}/src" --include="*.ts" 2>/dev/null | grep -oE "(class) [A-Z][A-Za-z0-9]+" | awk '{print $2}' | grep -oE "^[A-Z][a-z]+" | sort | uniq -c | sort -rn | head -5` — the most frequent leading word (e.g., `
|
|
197
|
+
3. Class name prefixes: run `grep -rhn "^export class\|^export abstract class" "{source_path}/src" --include="*.ts" 2>/dev/null | grep -oE "(class) [A-Z][A-Za-z0-9]+" | awk '{print $2}' | grep -oE "^[A-Z][a-z]+" | sort | uniq -c | sort -rn | head -5` — the most frequent leading word (e.g., `Mono` from `Monomind`, `Claude` from `ClaudeFlow`) is the brand prefix; convert to PascalCase compound if needed
|
|
198
198
|
|
|
199
|
-
Set `source_brand` to the PascalCase result (e.g., `
|
|
199
|
+
Set `source_brand` to the PascalCase result (e.g., `Monomind`, `ClaudeFlow`, `SourceProject`). This variable is used verbatim in all subsequent `rg -i "{source_brand}"` calls and the collision-detection Python script.
|
|
200
200
|
|
|
201
201
|
### 1B — Repo-Map (Structural Index)
|
|
202
202
|
|
|
@@ -359,7 +359,7 @@ grep -rhn "^export" "{source_path}/src" --include="*.ts" 2>/dev/null | \
|
|
|
359
359
|
grep -oE "(class|interface|function|const|type|enum) [A-Z][A-Za-z0-9]+" | awk '{print $2}' | \
|
|
360
360
|
python3 -c "
|
|
361
361
|
import sys, re
|
|
362
|
-
source_brand = '{source_brand}' # LLM substitutes the PascalCase value from Phase 1A before running (e.g. '
|
|
362
|
+
source_brand = '{source_brand}' # LLM substitutes the PascalCase value from Phase 1A before running (e.g. 'Monomind', 'ClaudeFlow')
|
|
363
363
|
# Mono prefix: the domain prefix used in monomind for this context (e.g. 'Mono', 'Agent', 'Graph')
|
|
364
364
|
# LLM: substitute the actual mono prefix from Phase 0B's MNS before running
|
|
365
365
|
mono_prefix = '{mono_prefix}'
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monomind",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.1",
|
|
4
4
|
"description": "Monomind - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"semver": "^7.6.0",
|
|
65
65
|
"zod": "^3.22.0",
|
|
66
|
-
"@monoes/monograph": "^1.2.
|
|
66
|
+
"@monoes/monograph": "^1.2.2",
|
|
67
67
|
"@monoes/monobrowse": "^1.0.0"
|
|
68
68
|
},
|
|
69
69
|
"overrides": {
|
|
@@ -123,7 +123,6 @@
|
|
|
123
123
|
"url": "https://github.com/monoes/monomind.git"
|
|
124
124
|
},
|
|
125
125
|
"keywords": [
|
|
126
|
-
"ruvflow",
|
|
127
126
|
"claude",
|
|
128
127
|
"claude-code",
|
|
129
128
|
"anthropic",
|
|
@@ -152,10 +151,12 @@
|
|
|
152
151
|
"embeddings",
|
|
153
152
|
"machine-learning",
|
|
154
153
|
"neural-network",
|
|
155
|
-
"
|
|
154
|
+
"monomind",
|
|
156
155
|
"distributed-systems",
|
|
157
156
|
"consensus",
|
|
158
|
-
"self-learning"
|
|
157
|
+
"self-learning",
|
|
158
|
+
"harness",
|
|
159
|
+
"organizations"
|
|
159
160
|
],
|
|
160
161
|
"author": {
|
|
161
162
|
"name": "nokhodian",
|
|
@@ -24,7 +24,7 @@ capability:
|
|
|
24
24
|
model_preference: opus
|
|
25
25
|
termination: All identified vulnerabilities have remediation steps documented
|
|
26
26
|
triggers:
|
|
27
|
-
- pattern: "\\b(
|
|
27
|
+
- pattern: "\\b(jwt|oauth|saml|oidc|csrf|xss|sql.injection|ssrf|rce|lfi|session\\W{0,3}(hijack|fixation|token\\W{0,3}theft)\\w*|auth\\w*\\W{0,3}(bypass|bug|vuln|flaw|exploit)\\w*)\\b"
|
|
28
28
|
mode: "inject"
|
|
29
29
|
- pattern: "CVE-\\d{4}-\\d+"
|
|
30
30
|
mode: "inject"
|