moflo 4.9.15 → 4.9.17
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.
|
@@ -90,9 +90,13 @@ Count `.md` files under `.claude/guidance/` (recursive). Severity table:
|
|
|
90
90
|
| 3–10 | info |
|
|
91
91
|
| 11+ | info |
|
|
92
92
|
|
|
93
|
-
### 1g. Guidance Structure
|
|
93
|
+
### 1g. Guidance Structure — MANDATORY when guidance docs exist
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
**This step is not optional.** If 1f found ≥1 guidance file, you MUST invoke `/guidance -a` via the `Skill` tool *inline, during this audit run, before rendering the report.* Do not defer it ("rerun separately if you want"), do not skip it because the corpus is large, do not substitute a hand-rolled grep pass — that defeats the single-source-of-truth contract.
|
|
96
|
+
|
|
97
|
+
The /guidance skill enforces the universal rules from `.claude/guidance/shipped/moflo-guidance-rules.md` (Purpose lines, See Also, generic H2s, hedged language, 500-line cap, RAG chunking) and is the single source of truth for those checks — never re-implement them here.
|
|
98
|
+
|
|
99
|
+
If `/guidance -a` is genuinely too expensive (50+ files AND user explicitly asks for a fast read), skip it only after asking and surface the skip explicitly in the report (`Guidance structure | skipped at user request | warn`). Default behaviour is always to run it.
|
|
96
100
|
|
|
97
101
|
Fold the result into the Eldar report under the "Guidance structure" row:
|
|
98
102
|
|
|
@@ -153,21 +157,13 @@ Glob — { pattern: ".claude/agents/**/*.md" }
|
|
|
153
157
|
|
|
154
158
|
Count the result. `info` if 0 (no project-specific subagents — user is relying entirely on built-ins).
|
|
155
159
|
|
|
156
|
-
### 1m. Stack → Guidance Cross-Reference (
|
|
157
|
-
|
|
158
|
-
Detect the project's stack from manifests:
|
|
160
|
+
### 1m. Stack → Guidance Cross-Reference (delegated to /guidance)
|
|
159
161
|
|
|
160
|
-
|
|
161
|
-
|----------|----------------|
|
|
162
|
-
| `package.json` deps | Node — inspect for React, Next, Drizzle, Prisma, Express, NestJS, Vite, etc. |
|
|
163
|
-
| `pyproject.toml` / `requirements.txt` | Python — Django, FastAPI, SQLAlchemy, etc. |
|
|
164
|
-
| `Cargo.toml` | Rust — axum, tokio, sqlx, etc. |
|
|
165
|
-
| `go.mod` | Go — gin, sqlc, gorm, etc. |
|
|
166
|
-
| `Gemfile` | Ruby — Rails, Sidekiq, etc. |
|
|
162
|
+
Gap analysis (which codebase concerns lack a guidance doc) is the **/guidance skill's** responsibility — step 3b of `/guidance -a`. Since 1g already runs `/guidance -a` inline, do **not** re-implement gap detection here. Instead, fold the gap findings from /guidance's output into the Eldar report under the same "Stack → guidance" category.
|
|
167
163
|
|
|
168
|
-
|
|
164
|
+
Each gap finding from /guidance becomes one row in the Eldar report. Severity carries through from /guidance (warn/info per its severity table).
|
|
169
165
|
|
|
170
|
-
|
|
166
|
+
**Why delegated:** keeping a single source of truth — /guidance owns both the structural rule audit and the gap analysis, /eldar surfaces the results in its broader project audit. If /eldar duplicated gap detection, the two would drift.
|
|
171
167
|
|
|
172
168
|
### 1n. Anti-Pattern from History (best-effort, optional)
|
|
173
169
|
|
|
@@ -300,6 +296,7 @@ Never leave the user without a clear next step.
|
|
|
300
296
|
- **Portable only.** This skill ships to consumers via `.claude/skills/**/*.md` in the package files array. Never assume moflo source paths or moflo-internal state.
|
|
301
297
|
- **No kitchen sink.** The audit checklist is locked at the categories above. New checks require a specific portable benefit and an issue to discuss them.
|
|
302
298
|
- **Read-only by default.** `/eldar` (no flag) never writes. Only `--fix` writes, and only with per-finding confirmation.
|
|
299
|
+
- **Step 1g is mandatory, not optional.** Whenever `.claude/guidance/` has at least one file, `/guidance -a` runs inline as part of every audit. Saying "rerun /guidance -a separately if you want a structural pass" is a defect, not a feature — the user already asked for the structural pass by typing /eldar.
|
|
303
300
|
- **Hand off to specialists.** `/guidance` for guidance authoring, `flo healer --fix` for setup repair, `flo init --upgrade` for wiring. The Eldar route, they don't reimplement.
|
|
304
301
|
|
|
305
302
|
## See Also
|
|
@@ -15,7 +15,7 @@ Help the user write, edit, or audit guidance files in their `.claude/guidance/`
|
|
|
15
15
|
| Mode | Trigger | What it does |
|
|
16
16
|
|------|---------|--------------|
|
|
17
17
|
| Single-doc | no flag, optional `<topic-or-path>` arg | Walk the user through creating one new doc OR improving one existing doc |
|
|
18
|
-
| Audit | `-a` flag |
|
|
18
|
+
| Audit | `-a` flag | Two passes over `.claude/guidance/`: (1) **structural audit** scoring each existing doc against the universal rules, (2) **gap analysis** scanning the codebase to identify high-leverage topics that *should* have a guidance doc but don't. Both feed one combined triage report. |
|
|
19
19
|
|
|
20
20
|
## Step 0 — Memory First
|
|
21
21
|
|
|
@@ -101,7 +101,11 @@ Then propose edits as concrete diffs — never rewrite the whole file unless the
|
|
|
101
101
|
|
|
102
102
|
## Step 3 — Audit Mode (`-a`)
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
Audit mode runs **two passes**, then merges them into one triage report. Both passes are mandatory — never skip one to save tokens. The user typed `-a` because they want both signals.
|
|
105
|
+
|
|
106
|
+
### 3a. Structural audit (existing-doc rule conformance)
|
|
107
|
+
|
|
108
|
+
Scan the guidance directory and score each `.md` against the universal rules. Walk the directory yourself with `Glob` and `Read`; do not delegate to a subagent for the audit itself unless the user has 30+ files.
|
|
105
109
|
|
|
106
110
|
For each `.md` file:
|
|
107
111
|
|
|
@@ -112,11 +116,49 @@ For each `.md` file:
|
|
|
112
116
|
5. Look for hedged language: `\b(should|might|consider|may want to)\b` in rule contexts
|
|
113
117
|
6. Detect prose preambles (>3 paragraphs between H1 and first H2 rule)
|
|
114
118
|
|
|
115
|
-
Render
|
|
119
|
+
Render a sortable table with one row per file, columns: file, lines, has-purpose, has-see-also, generic-headings count, hedged count. Highlight the worst offenders first.
|
|
120
|
+
|
|
121
|
+
**Note on `**Purpose:**` and `## See Also` regex:** ripgrep / Grep tool treats `**` as a glob escape and may return zero matches even when the markers are present. Use a plain string check (`Select-String` on Windows, `grep -F` elsewhere) or read the file and string-match in JS — never trust a zero count from a wildcard-ambiguous pattern without spot-checking one file.
|
|
122
|
+
|
|
123
|
+
### 3b. Gap analysis (what topics are missing)
|
|
124
|
+
|
|
125
|
+
Now look at *what isn't there*. Scan the codebase for high-leverage areas that lack a corresponding guidance doc, so Claude has nothing to follow when working in those areas.
|
|
126
|
+
|
|
127
|
+
**Detection sources** (read each that exists):
|
|
128
|
+
|
|
129
|
+
| Signal | What to learn |
|
|
130
|
+
|--------|---------------|
|
|
131
|
+
| `package.json` deps + devDeps | Frameworks/libraries the project relies on (React, Drizzle, Vitest, etc.) |
|
|
132
|
+
| `pyproject.toml` / `requirements.txt` / `Cargo.toml` / `go.mod` / `Gemfile` | Same idea, other ecosystems |
|
|
133
|
+
| Top-level source layout (`src/**`, `bin/**`, `scripts/**`, etc.) | Architectural concerns (e.g. a `daemon/` directory implies daemon architecture is a concern) |
|
|
134
|
+
| `.claude/helpers/`, `.claude/scripts/`, `.claude/hooks/` | Hook + helper authoring is in scope |
|
|
135
|
+
| MCP tool source (`mcp-tools/**`, `mcp-server/**`) | MCP tool authoring |
|
|
136
|
+
| Test directories | Testing conventions (load-bearing if specific patterns exist — e.g. golden-file tests, snapshot conventions) |
|
|
137
|
+
| `.github/workflows/` | CI/CD conventions |
|
|
138
|
+
| Recent `git log` for files repeatedly edited together | Cross-cutting concerns that need explicit guidance |
|
|
139
|
+
|
|
140
|
+
**Cross-reference:** for each detected concern, grep the existing `.claude/guidance/` corpus for keyword coverage. A topic is a **gap** if (a) the concern shows up in code (not just transitive deps) and (b) no existing guidance doc names it in the title or first H2.
|
|
141
|
+
|
|
142
|
+
**Severity table:**
|
|
143
|
+
|
|
144
|
+
| Concern type | Severity if unmatched |
|
|
145
|
+
|--------------|------------------------|
|
|
146
|
+
| Direct dep used pervasively (>10 files import it) | warn |
|
|
147
|
+
| Architectural directory with >5 files | warn |
|
|
148
|
+
| Direct dep used in 1–10 files | info |
|
|
149
|
+
| Helper/hook/MCP authoring surface with custom code | warn |
|
|
150
|
+
| CI/CD workflows beyond the standard ones | info |
|
|
151
|
+
| Cross-cutting concern from git-history co-change | info |
|
|
152
|
+
|
|
153
|
+
**Render gaps as a separate table** with columns: detected concern, evidence (file count or representative path), suggested doc filename, severity. Lead with the warns.
|
|
154
|
+
|
|
155
|
+
**Don't auto-write any new doc.** Surface the gap, name the concern, propose a filename — then ask the user which gaps (if any) they want to fill. The single-doc mode (Step 2) handles authoring once they pick.
|
|
156
|
+
|
|
157
|
+
### 3c. Combined triage and fixes
|
|
116
158
|
|
|
117
|
-
After
|
|
159
|
+
After both 3a and 3b, list the **top 3–5 priority items** across both passes in plain English. Mix them — a structural fix to an existing doc and a missing-doc gap can both make the top list. For each, explain WHY (rule citation for structural; concern + evidence for gaps) and propose either a per-file fix (3a) or a per-doc authoring flow (3b).
|
|
118
160
|
|
|
119
|
-
Ask the user which to apply, then walk through
|
|
161
|
+
Ask the user which to apply, then walk through chosen items one at a time. **Never apply audit fixes without explicit per-file confirmation** — guidance is high-leverage; silent edits are dangerous. **Never auto-create gap docs** — every new doc starts as a single-doc mode session with the user.
|
|
120
162
|
|
|
121
163
|
## Step 4 — After Editing
|
|
122
164
|
|
package/dist/src/cli/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moflo",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.17",
|
|
4
4
|
"description": "MoFlo — AI agent orchestration for Claude Code. A standalone, opinionated toolkit with semantic memory, learned routing, gates, spells, and the /flo issue-execution skill.",
|
|
5
5
|
"main": "dist/src/cli/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
82
82
|
"@typescript-eslint/parser": "^7.18.0",
|
|
83
83
|
"eslint": "^8.0.0",
|
|
84
|
-
"moflo": "^4.9.
|
|
84
|
+
"moflo": "^4.9.16",
|
|
85
85
|
"tsx": "^4.21.0",
|
|
86
86
|
"typescript": "^5.9.3",
|
|
87
87
|
"vitest": "^4.0.0"
|