moflo 4.9.20 → 4.9.21
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/commands/{simplify.md → flo-simplify.md} +4 -4
- package/.claude/guidance/shipped/moflo-agent-rules.md +172 -0
- package/.claude/guidance/shipped/moflo-claude-swarm-cohesion.md +73 -265
- package/.claude/guidance/shipped/moflo-cli-reference.md +6 -6
- package/.claude/guidance/shipped/moflo-core-guidance.md +66 -184
- package/.claude/guidance/shipped/moflo-cross-platform.md +1 -1
- package/.claude/guidance/shipped/moflo-error-handling.md +3 -3
- package/.claude/guidance/shipped/moflo-guidance-rules.md +17 -7
- package/.claude/guidance/shipped/moflo-memory-strategy.md +76 -182
- package/.claude/guidance/shipped/moflo-memorydb-maintenance.md +6 -8
- package/.claude/guidance/shipped/moflo-settings-injection.md +7 -9
- package/.claude/guidance/shipped/moflo-source-hygiene.md +5 -5
- package/.claude/guidance/shipped/moflo-spell-connectors.md +3 -4
- package/.claude/guidance/shipped/moflo-spell-custom-steps.md +3 -4
- package/.claude/guidance/shipped/moflo-spell-engine.md +40 -162
- package/.claude/guidance/shipped/moflo-spell-runner.md +134 -0
- package/.claude/guidance/shipped/moflo-spell-sandboxing.md +10 -57
- package/.claude/guidance/shipped/moflo-spell-troubleshooting.md +149 -0
- package/.claude/guidance/shipped/moflo-subagents.md +43 -114
- package/.claude/guidance/shipped/moflo-task-icons.md +4 -4
- package/.claude/guidance/shipped/moflo-user-facing-language.md +3 -3
- package/.claude/guidance/shipped/moflo-verbose-command-filtering.md +3 -3
- package/.claude/guidance/shipped/moflo-yaml-reference.md +4 -5
- package/.claude/helpers/gate.cjs +124 -14
- package/.claude/helpers/prompt-hook.mjs +4 -38
- package/.claude/helpers/simplify-classify.cjs +32 -11
- package/.claude/helpers/subagent-bootstrap.json +1 -1
- package/.claude/helpers/subagent-start.cjs +1 -1
- package/.claude/skills/connector-builder/SKILL.md +42 -429
- package/.claude/skills/connector-builder/templates/connector.md +189 -0
- package/.claude/skills/connector-builder/templates/step-command.md +176 -0
- package/.claude/skills/eldar/SKILL.md +7 -7
- package/.claude/skills/fl/SKILL.md +3 -3
- package/.claude/skills/fl/execution-modes.md +3 -3
- package/.claude/skills/fl/phases.md +3 -3
- package/.claude/skills/{simplify → flo-simplify}/SKILL.md +11 -11
- package/.claude/skills/guidance/SKILL.md +17 -9
- package/.claude/skills/memory-patterns/SKILL.md +1 -1
- package/.claude/skills/publish/SKILL.md +121 -36
- package/.claude/skills/reset-epic/SKILL.md +2 -2
- package/.claude/skills/spell-builder/SKILL.md +39 -226
- package/.claude/skills/spell-builder/architecture.md +1 -1
- package/.claude/skills/spell-builder/permissions.md +107 -0
- package/.claude/skills/spell-builder/preflight.md +101 -0
- package/.claude/skills/spell-schedule/SKILL.md +2 -3
- package/bin/gate.cjs +124 -14
- package/bin/prompt-hook.mjs +4 -38
- package/bin/session-start-launcher.mjs +19 -1
- package/bin/setup-project.mjs +63 -69
- package/bin/simplify-classify.cjs +32 -11
- package/dist/src/cli/commands/doctor-checks-deep.js +4 -0
- package/dist/src/cli/init/claudemd-generator.js +30 -33
- package/dist/src/cli/init/executor.js +28 -16
- package/dist/src/cli/init/helpers-generator.js +101 -51
- package/dist/src/cli/init/moflo-init.js +41 -114
- package/dist/src/cli/init/settings-generator.js +32 -14
- package/dist/src/cli/services/hook-block-hash.js +7 -2
- package/dist/src/cli/services/hook-wiring.js +86 -3
- package/dist/src/cli/services/subagent-bootstrap.js +1 -1
- package/dist/src/cli/version.js +1 -1
- package/package.json +2 -2
- package/scripts/post-install-bootstrap.mjs +19 -0
- package/.claude/guidance/shipped/moflo-session-start.md +0 -154
- package/.claude/guidance/shipped/moflo-spell-engine-architecture.md +0 -145
- package/.claude/skills/browser/SKILL.md +0 -204
- package/.claude/skills/github-code-review/SKILL.md +0 -1140
- package/.claude/skills/github-multi-repo/SKILL.md +0 -866
- package/.claude/skills/github-project-management/SKILL.md +0 -1272
- package/.claude/skills/github-release-management/SKILL.md +0 -1074
- package/.claude/skills/github-workflow-automation/SKILL.md +0 -1060
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
- package/.claude/skills/hooks-automation/SKILL.md +0 -1193
- package/.claude/skills/pair-programming/SKILL.md +0 -1202
- package/.claude/skills/performance-analysis/SKILL.md +0 -563
- package/.claude/skills/skill-builder/SKILL.md +0 -910
- package/.claude/skills/sparc-methodology/SKILL.md +0 -904
- package/.claude/skills/stream-chain/SKILL.md +0 -563
- package/.claude/skills/swarm-advanced/SKILL.md +0 -811
- package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
- package/.claude/skills/verification-quality/SKILL.md +0 -649
- package/.claude/skills/worker-benchmarks/skill.md +0 -135
- package/.claude/skills/worker-integration/skill.md +0 -154
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Review changed code for reuse, quality, and efficiency, then fix any issues found. Sizes review effort to the diff and routes the cheapest model that fits.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# /simplify — Adaptive Gate-Compliant Code Review
|
|
5
|
+
# /flo-simplify — Adaptive Gate-Compliant Code Review
|
|
6
6
|
|
|
7
7
|
Review changed code for reuse, quality, and efficiency. **Effort scales with diff size; model is routed for cost.** A 5-line comment trim does not get 3 Opus agents.
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@ git diff HEAD # working tree
|
|
|
20
20
|
git diff main...HEAD # committed since branch base
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Treat the union as the diff. Note whether `/simplify` already ran on this branch in this session — if so, you are in a **validation pass** (Phase 4 below).
|
|
23
|
+
Treat the union as the diff. Note whether `/flo-simplify` already ran on this branch in this session — if so, you are in a **validation pass** (Phase 4 below).
|
|
24
24
|
|
|
25
25
|
## Phase 2: Classify the diff
|
|
26
26
|
|
|
@@ -46,7 +46,7 @@ Pass the classifier's `model` field verbatim to Agent's `model` parameter. If yo
|
|
|
46
46
|
|
|
47
47
|
## Phase 4: Validation pass (re-run after fixes from a prior simplify)
|
|
48
48
|
|
|
49
|
-
If `/simplify` already ran on this branch in this session AND the only edits since are fixes the prior pass surfaced, **default to TRIVIAL self-review** regardless of LOC count. The fan-out happened; the fix is small relative to the already-reviewed diff.
|
|
49
|
+
If `/flo-simplify` already ran on this branch in this session AND the only edits since are fixes the prior pass surfaced, **default to TRIVIAL self-review** regardless of LOC count. The fan-out happened; the fix is small relative to the already-reviewed diff.
|
|
50
50
|
|
|
51
51
|
Escalate one tier (self-review → SMALL agent) only if the fix introduced a new file, a new exported symbol, a new dependency, or a control-flow change not covered by the original findings. Never escalate a validation pass to NORMAL.
|
|
52
52
|
|
|
@@ -84,7 +84,7 @@ Aggregate findings. Fix each issue directly that's worth fixing. False positives
|
|
|
84
84
|
|
|
85
85
|
If fixes were made, re-run tests to confirm nothing broke. If tests fail after a fix, revert it.
|
|
86
86
|
|
|
87
|
-
After fixes: the next `/simplify` invocation is a **validation pass** (Phase 4). Bundle related fixes into one batch so a single validation pass covers them — don't re-fan-out for cosmetic micro-corrections.
|
|
87
|
+
After fixes: the next `/flo-simplify` invocation is a **validation pass** (Phase 4). Bundle related fixes into one batch so a single validation pass covers them — don't re-fan-out for cosmetic micro-corrections.
|
|
88
88
|
|
|
89
89
|
## Phase 7: Optional — record routing outcome
|
|
90
90
|
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# MoFlo Agent Rules — Universal Coordination & Coding Discipline
|
|
2
|
+
|
|
3
|
+
**Purpose:** Universal rules every moflo agent — coordinator OR subagent — must follow. The coordinator's CLAUDE.md injection enforces the trigger rules inline (memory-first, TaskCreate-first, icons); this doc is the canonical reference for *all* shared behavior. Subagents reach these rules through `.claude/guidance/moflo-subagents.md` § Universal Agent Rules.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Memory-First Protocol
|
|
8
|
+
|
|
9
|
+
**Before reading any files or exploring code, search memory.** Memory search is faster than Glob/Grep and returns domain-aware, semantically scored results that file-system tools cannot provide.
|
|
10
|
+
|
|
11
|
+
### Namespaces
|
|
12
|
+
|
|
13
|
+
| Namespace | When to search | What it returns |
|
|
14
|
+
|-----------|---------------|-----------------|
|
|
15
|
+
| `guidance` | always | Guidance docs, coding rules, domain context |
|
|
16
|
+
| `patterns` | always | Learned patterns from previous task execution |
|
|
17
|
+
| `learnings` | always | User-directed decisions + distilled insights (post-mortems, gotchas, lessons learned) |
|
|
18
|
+
| `code-map` | navigating code | Project overviews, directory contents, type-to-file mappings |
|
|
19
|
+
| `tests` | test/coverage queries | Indexed test inventory — pinpoint specs and coverage for a given function/module |
|
|
20
|
+
|
|
21
|
+
**Always search `patterns` and `learnings` alongside `guidance`.** Patterns hold solutions to already-solved problems; learnings hold incident insights and standing decisions. Skipping either repeats past mistakes or violates user-stated decisions.
|
|
22
|
+
|
|
23
|
+
**Search `code-map` BEFORE Glob/Grep** for navigation — it's faster and returns structured results including file-level type mappings.
|
|
24
|
+
|
|
25
|
+
**Search `tests` when looking for test coverage** of a function, module, or behavior — it indexes the test tree separately so you can pinpoint specs without grepping the whole repo.
|
|
26
|
+
|
|
27
|
+
### Tool Selection (MCP-first)
|
|
28
|
+
|
|
29
|
+
| Tool | Purpose |
|
|
30
|
+
|------|---------|
|
|
31
|
+
| `mcp__moflo__memory_search` | Semantic search with domain-aware embeddings (preferred) |
|
|
32
|
+
| `mcp__moflo__memory_store` | Store patterns with auto-vectorization |
|
|
33
|
+
| `mcp__moflo__hooks_route` | Get agent routing suggestions |
|
|
34
|
+
|
|
35
|
+
**CLI fallback** when MCP is unavailable:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx flo memory search --query "[describe your task]" --namespace guidance --limit 5
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use results with score > 0.3. If no good results, fall back to reading project guidance docs directly.
|
|
42
|
+
|
|
43
|
+
### Query Examples
|
|
44
|
+
|
|
45
|
+
| Your task involves... | Namespace(s) | Example query |
|
|
46
|
+
|-----------------------|--------------|---------------|
|
|
47
|
+
| Database/entities | `guidance` + `patterns` + `learnings` | `"database entity migration"` |
|
|
48
|
+
| Frontend components | `guidance` + `patterns` + `learnings` | `"React frontend component"` |
|
|
49
|
+
| API endpoints | `guidance` + `patterns` + `learnings` | `"API route endpoint pattern"` |
|
|
50
|
+
| Authentication | `guidance` + `patterns` + `learnings` | `"auth middleware JWT"` |
|
|
51
|
+
| Prior solutions/gotchas | `patterns` + `learnings` | `"audit log service pattern"` |
|
|
52
|
+
| Past incident/lesson | `learnings` | `"windows postinstall file locks"` |
|
|
53
|
+
| Where is a file/type? | `code-map` | `"CompanyEntity file location"` |
|
|
54
|
+
| What's in a directory? | `code-map` | `"back-office api routes"` |
|
|
55
|
+
| Tests for a function | `tests` | `"audit log service tests"` |
|
|
56
|
+
| Coverage for a module | `tests` | `"auth middleware test cases"` |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## MCP Over CLI
|
|
61
|
+
|
|
62
|
+
**Prefer `mcp__moflo__*` tools over `npx flo` CLI commands.** MCP tools coordinate strategy directly without subprocess overhead, return structured results, and respect the same auth/config as the rest of the moflo stack.
|
|
63
|
+
|
|
64
|
+
| Layer | Examples |
|
|
65
|
+
|-------|----------|
|
|
66
|
+
| MCP (preferred) | `mcp__moflo__swarm_init`, `mcp__moflo__agent_spawn`, `mcp__moflo__memory_store`, `mcp__moflo__hooks_*` |
|
|
67
|
+
| CLI (fallback) | `npx flo swarm init …`, `npx flo memory store …` |
|
|
68
|
+
|
|
69
|
+
CLI is the fallback when MCP is unavailable (`.mcp.json` missing, MCP server stopped). See `.claude/guidance/moflo-core-guidance.md` for the full MCP catalog.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Task Icons — Mandatory ICON + [Role] Format
|
|
74
|
+
|
|
75
|
+
**Every `TaskCreate` and `Agent` description MUST use `ICON + [Role]` prefix** so the user can visually identify which specialist is working.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
TaskCreate({ subject: "🧪 [Tester] Run unit tests", activeForm: "🧪 Running unit tests" })
|
|
79
|
+
Task({ ..., description: "🔍 [Researcher] Investigate failing test" })
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The full icon map (researcher 🔍, coder 💻, tester 🧪, reviewer 👀, etc.) lives in `.claude/guidance/moflo-task-icons.md`. The format itself is enforced by the `tests/guidance/lint-guidance.test.ts` linter — guidance examples missing icons fail CI.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Git & Branch Conventions
|
|
87
|
+
|
|
88
|
+
| Element | Convention |
|
|
89
|
+
|---------|-----------|
|
|
90
|
+
| Commit message prefix | `feat:`, `fix:`, `refactor:`, `test:`, `chore:` |
|
|
91
|
+
| Branch prefix | `feature/`, `fix/`, `refactor/` |
|
|
92
|
+
| Branch case | kebab-case (`feature/add-billing-export`, not `feature/AddBillingExport`) |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Pull Requests — CRITICAL: Always Target the Correct Repo
|
|
97
|
+
|
|
98
|
+
**NEVER run bare `gh pr create` in a forked repository.** The `gh` CLI defaults to the upstream parent repo, not your fork's origin. This has caused PRs to be accidentally opened against upstream projects.
|
|
99
|
+
|
|
100
|
+
**Required workflow:**
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# 1. Determine the correct repo from the origin remote
|
|
104
|
+
REPO=$(git remote get-url origin | sed 's|.*github.com[:/]||;s|\.git$||')
|
|
105
|
+
|
|
106
|
+
# 2. ALWAYS pass --repo to gh pr create
|
|
107
|
+
gh pr create --repo "$REPO" --title "..." --body "..."
|
|
108
|
+
|
|
109
|
+
# 3. For merge: also pass --repo
|
|
110
|
+
gh pr merge <number> --repo "$REPO" --squash
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
This applies to ALL `gh` commands that target a repo: `pr create`, `pr merge`, `pr list`, `issue create`, `issue comment`, etc.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## File Organization
|
|
118
|
+
|
|
119
|
+
| Rule | Detail |
|
|
120
|
+
|------|--------|
|
|
121
|
+
| Never save working files to repository root | Use `tmp/`, `scratch/`, or a feature-specific directory |
|
|
122
|
+
| Keep changes focused (3–10 files per PR) | Larger churn loses reviewer attention and increases revert blast-radius |
|
|
123
|
+
| Stay within feature scope | Drive-by refactors belong in their own PR; bundling them dilutes review and risk-shares unrelated changes |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Build & Test Discipline
|
|
128
|
+
|
|
129
|
+
| Rule | Detail |
|
|
130
|
+
|------|--------|
|
|
131
|
+
| Build and test after code changes | `npm run build && npm test` — surface breakage at the change boundary, not at PR review |
|
|
132
|
+
| Never leave failing tests | "Probably flaky" without re-verification is banned. Fix every red signal at the source |
|
|
133
|
+
| Per-test timeout bumps are not a fix | Slow tests are bugs in the test or the code under test — never bump timeout >30 s as a workaround |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Storing Discoveries
|
|
138
|
+
|
|
139
|
+
When you discover something new during work — a pattern that worked, a gotcha you hit, a workaround for a limitation — store it so future agents don't repeat the discovery cost:
|
|
140
|
+
|
|
141
|
+
**MCP (preferred):**
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
mcp__moflo__memory_store
|
|
145
|
+
namespace: "patterns"
|
|
146
|
+
key: "brief-descriptive-key"
|
|
147
|
+
value: "1–2 sentence insight"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**CLI fallback:**
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npx flo memory store --namespace patterns --key "brief-descriptive-key" --value "1–2 sentence insight"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
| Namespace | What to store |
|
|
157
|
+
|-----------|---------------|
|
|
158
|
+
| `patterns` | Solutions to tricky bugs, patterns that worked, gotchas, workarounds |
|
|
159
|
+
| `learnings` | Architectural choices, user-stated decisions, post-mortem insights (`knowledge` is a deprecated alias — writes auto-redirect) |
|
|
160
|
+
|
|
161
|
+
**Skip** generic summaries of retrieved guidance, restated rules, and trivial file-location notes — those waste retrieval bandwidth on every future search.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## See Also
|
|
166
|
+
|
|
167
|
+
- `.claude/guidance/moflo-subagents.md` — Spawn protocol that consumes these universal rules
|
|
168
|
+
- `.claude/guidance/moflo-task-icons.md` — Full ICON + [Role] format and icon map
|
|
169
|
+
- `.claude/guidance/moflo-claude-swarm-cohesion.md` — How `TaskCreate` and swarm coordination layer on top of these rules
|
|
170
|
+
- `.claude/guidance/moflo-memory-strategy.md` — How memory search works under the hood (embeddings, RAG indexing, namespaces)
|
|
171
|
+
- `.claude/guidance/moflo-core-guidance.md` — CLI/MCP reference and Auto-Learning protocol
|
|
172
|
+
- `.claude/guidance/moflo-guidance-rules.md` — Rules for *writing* guidance docs (different audience: doc authors, not agents)
|