---
satisfies: [R12, R13, R14, R15]
---

## Description

Rollup. Update fn-34's audit Phase 0 legacy-skip warning to point at the new skill. Add smoke for `list-legacy`. Amend the existing `[flow-next 0.37.0]` CHANGELOG block (don't add new release). Update README, CLAUDE.md, .flow/usage.md, mickel.tech website. Regen Codex mirror. **No version bump** — bundled into 0.37.0.

**Size:** S → M (mostly doc edits + small smoke addition)
**Files:**
- `plugins/flow-next/skills/flow-next-audit/workflow.md` (line 67 + others)
- `plugins/flow-next/skills/flow-next-audit/SKILL.md` (line 119)
- `plugins/flow-next/scripts/smoke_test.sh` (extend with `list-legacy` smoke)
- `CHANGELOG.md` (amend existing 0.37.0 block, line ~5+)
- `plugins/flow-next/README.md` (memory section + skills table)
- `CLAUDE.md` (lines 72, 74, 82, 143)
- `.flow/usage.md` (memory commands list)
- `~/work/mickel.tech/app/apps/flow-next/page.tsx:537` (memory feature card)
- `plugins/flow-next/codex/` (regenerated by `scripts/sync-codex.sh`)

## Approach

### Update fn-34 audit Phase 0 warning (R12)

`plugins/flow-next/skills/flow-next-audit/workflow.md:67`:
```diff
- Run `flowctl memory migrate` first to make these auditable.
+ Run `/flow-next:memory-migrate` first to make these auditable.
```

`plugins/flow-next/skills/flow-next-audit/SKILL.md:119`:
```diff
- Skipped legacy: M (run `flowctl memory migrate` first to make these auditable)
+ Skipped legacy: M (run `/flow-next:memory-migrate` first to make these auditable)
```

`plugins/flow-next/skills/flow-next-audit/SKILL.md:72` (if it has the same string per repo-scout):
```diff
- recommends `flowctl memory migrate` first
+ recommends `/flow-next:memory-migrate` first
```

Verify all instances via `grep -rn 'flowctl memory migrate' plugins/flow-next/skills/flow-next-audit/` before claiming done.

### Add `list-legacy` smoke (R13)

Append to `plugins/flow-next/scripts/smoke_test.sh` near the existing `--- memory migrate (fn-30.4) ---` block (line 1927-1997). Add a new section `--- memory list-legacy (fn-35) ---`:

Cases:
1. **Empty memory dir** — `flowctl memory list-legacy --json` returns `{files: []}`, rc=0
2. **Two entries in pitfalls.md** — seed file with two `---`-delimited entries, `list-legacy --json` returns `{files: [{filename: "pitfalls.md", entry_count: 2, entries: [...]}]}`
3. **Mechanical defaults present** — each entry in JSON output has `mechanical_track: "bug"` and `mechanical_category: "build-errors"` for pitfalls.md (matches `_DEPRECATED_TYPE_MAP` at flowctl.py:4918) <!-- Updated by plan-sync: fn-35.1 phases.md uses bug/build-errors per `_memory_classify_mechanical` source of truth, not the placeholder `bug/general` originally specced -->
4. **Text mode** — `flowctl memory list-legacy` (no flags) outputs human-readable list including filename + entry count

Run mode: subshell with isolated `TEST_DIR/list-legacy/`, `git init -q`, seed legacy files, assert.

Verify hint-string assertion at `smoke_test.sh:766` still passes after migrate's deprecation message landed. If the assertion targets a different string, update. (Note: line 766 asserts on `flowctl memory init`'s `hint` field, not migrate's deprecation stderr — orthogonal to fn-35.2's changes, so should already pass unchanged.) <!-- Updated by plan-sync: fn-35.2 confirmed line 766 targets init's hint, not migrate's deprecation hint -->

<!-- Updated by plan-sync: fn-35.2 also gates the migrate deprecation hint + dead-env-var warning on `FLOW_NO_DEPRECATION=1` (in addition to the spec'd TTY check). No smoke-side action required — CI is non-TTY anyway — but worth noting for any future smoke that tries to assert the hint *did* fire. -->

### Amend `[flow-next 0.37.0]` CHANGELOG (R14)

`CHANGELOG.md` already has a `[flow-next 0.37.0]` block from fn-34.3. Find it (~line 5) and EXPAND the existing `### Added` block with new bullets covering fn-35:

```markdown
### Added (fn-35 additions to 0.37.0)
- `/flow-next:memory-migrate` — agent-native skill for converting legacy flat-file memory entries (`.flow/memory/pitfalls.md` etc.) into the categorized schema. Host agent classifies each entry directly using its own intelligence + repo context — no codex/copilot subprocess. Interactive (asks via blocking-question tool on ambiguous entries) or autofix (picks mechanical default + logs as needs-review). Inspired by fn-34's audit skill — same architectural fix applied to legacy migration.
- `flowctl memory list-legacy [--json]` — emits parsed legacy entries with mechanical default `(track, category)` per entry. Used by `/flow-next:memory-migrate` skill; also useful for ad-hoc inspection.

### Changed
- `flowctl memory migrate` is now **deterministic-only** (mechanical filename → `(track, category)` mapping). The codex/copilot subprocess dispatch chain has been removed (~225 LoC across six functions: `_memory_classify_run_codex`, `_run_copilot`, `_select_backend`, `_build_prompt`, `_parse_response`, `_classify_entry`). For agent-native classification, use the new `/flow-next:memory-migrate` skill. JSON receipt shape preserved (`method` + `model` keys present; `method: "mechanical"` always, `model: null` always).
- `flowctl memory migrate` emits a stderr deprecation hint when run interactively (TTY only) pointing at `/flow-next:memory-migrate`.
- `--no-llm` flag preserved as accepted-but-noop (avoids breaking scripted callers).

### Removed
- `FLOW_MEMORY_CLASSIFIER_BACKEND`, `FLOW_MEMORY_CLASSIFIER_MODEL`, `FLOW_MEMORY_CLASSIFIER_EFFORT` env vars (no longer consumed; codex/copilot subprocess dispatch removed). Setting them now triggers a one-time stderr warning.

### Notes
- `/flow-next:audit` (fn-34) Phase 0 legacy-skip warning updated to recommend `/flow-next:memory-migrate` instead of `flowctl memory migrate`.
- Both fn-34 and fn-35 ship together as 0.37.0 — the same architectural correction applied to two parallel features (audit + migrate). Future Ralph hooks / receipts / triage-skip stay subprocess-based per the new agentic vs deterministic guidance in CLAUDE.md.
```

Adjust formatting to match existing style (no separate fn-35 sub-heading; just expand the existing Added/Changed/Notes blocks). The above is illustrative; the worker should integrate into the existing block cleanly.

### Update README (R14)

`plugins/flow-next/README.md`:

**Memory subsection (~line 1565-1581):**
- Replace the `flowctl memory migrate` block describing classifier auto-selection / `FLOW_MEMORY_CLASSIFIER_*` env vars
- Lead with `/flow-next:memory-migrate` skill (agent-native, recommended)
- Demote `flowctl memory migrate` to "automation/CI" subhead (mechanical-only fallback)
- Add `flowctl memory list-legacy [--json]` subcommand entry

**Skills table (~line 1626):** Add row for `/flow-next:memory-migrate` after `/flow-next:audit` row. Format matches existing rows (skill name, description, link).

**Upgrading section (~line 1604-1605):** Currently says `flowctl memory migrate --dry-run` / `--yes`. Update to lead with `/flow-next:memory-migrate` for new users; keep mechanical commands as the alternative for automation contexts.

### Update CLAUDE.md (R14)

- **Line 72** (migrate bullet): replace with `/flow-next:memory-migrate` (agent-native default) + `flowctl memory migrate --yes` (mechanical, automation-only).
- **Line 74** (audit prereq mention): change `(run \`memory migrate\` first)` → `(run \`/flow-next:memory-migrate\` first)`.
- **Line 82** (legacy persistence): change `until \`memory migrate\` runs` → `until \`/flow-next:memory-migrate\` runs (or \`flowctl memory migrate --yes\` for automation)`.
- **Line 143** (fn-35 self-reference in agentic-vs-deterministic section): change `tracked as fn-35` → `shipped in 0.37.0`.

### Update `.flow/usage.md` (R14)

Append to memory commands listing (~line 76-83):
- `flowctl memory list-legacy [--json]` — list legacy entries with mechanical defaults (used by `/flow-next:memory-migrate` skill)
- `flowctl memory migrate [--yes] [--json]` — deterministic-only legacy migration (for automation; use `/flow-next:memory-migrate` skill for agent-native classification)

### Update website (R14)

`~/work/mickel.tech/app/apps/flow-next/page.tsx:537` — memory feature card description currently mentions `flowctl memory migrate lifts legacy flat files into the new schema via a fast-model classifier`. Replace with:
```
flowctl memory migrate lifts legacy flat files into the new schema deterministically. /flow-next:memory-migrate runs agent-native LLM classification with full repo context.
```

(Or split into separate sentences if the existing card has fn-34's audit content already inline — read the current text first.)

This is a separate repo; commit + push independently after the main PR merges.

### Codex mirror regen (R15)

```bash
./scripts/sync-codex.sh
```

Verify post-sync:
- `plugins/flow-next/codex/skills/flow-next-memory-migrate/{SKILL,workflow,phases}.md` exists with mirrored content
- `plugins/flow-next/codex/prompts/flow-next-memory-migrate.md` (or wherever Codex slots commands) exists
- `plugins/flow-next/codex/skills/flow-next-audit/workflow.md` and `SKILL.md` reflect the updated Phase 0 warning strings
- No diff in unrelated codex files

## Investigation targets

**Required:**
- `plugins/flow-next/skills/flow-next-audit/workflow.md` — Phase 0 warning location (line ~67)
- `plugins/flow-next/skills/flow-next-audit/SKILL.md` — Phase 0 warning location(s) (lines ~72, ~119)
- `plugins/flow-next/scripts/smoke_test.sh:1927-1997` — migrate smoke shape to mirror for `list-legacy` smoke
- `plugins/flow-next/scripts/smoke_test.sh:766` — hint-string assertion that may need update
- `CHANGELOG.md:1-50` — existing 0.37.0 block from fn-34.3 (amend, don't replace)
- `plugins/flow-next/README.md:1565-1581` — memory subsection
- `plugins/flow-next/README.md:1604-1605` — Upgrading from 0.32.x section
- `plugins/flow-next/README.md:1626` — skills table
- `CLAUDE.md:72, 74, 82, 143` — memory bullets + fn-35 self-reference
- `.flow/usage.md:76-83` — memory commands listing
- `~/work/mickel.tech/app/apps/flow-next/page.tsx:537` — memory feature card

**Optional:**
- `scripts/sync-codex.sh` — codex mirror regen (read for confidence; do not edit)

## Key context

- **No version bump.** fn-34's `bump.sh` already landed 0.37.0. fn-35 piggybacks. Don't run `bump.sh`.
- **Amend, don't replace** the CHANGELOG block. fn-34's bullets stay.
- Mickel.tech website is a separate repo. Commit + push there independently.
- `sync-codex.sh` is idempotent — re-running is safe.
- Smoke at line 766 is the only place that asserts on hint string content; verify after Task 2's deprecation hint changes the migrate behavior.
- All audit Phase 0 warning string changes must be verified via `grep -rn 'flowctl memory migrate' plugins/flow-next/skills/flow-next-audit/` after edit — easy to miss instances.

## Acceptance

- [ ] `plugins/flow-next/skills/flow-next-audit/workflow.md:67` updated to recommend `/flow-next:memory-migrate`. (R12)
- [ ] All other instances of `flowctl memory migrate` in `flow-next-audit/` skill files updated. Verify via grep. (R12)
- [ ] `plugins/flow-next/scripts/smoke_test.sh` extended with `list-legacy` smoke section (4+ cases: empty dir, two-entry parse, mechanical defaults present, text mode). All green. (R13)
- [ ] `smoke_test.sh:766` hint-string assertion still passes after Task 2's deprecation hint changes. Update if needed. (R13)
- [ ] `CHANGELOG.md` `[flow-next 0.37.0]` block amended with fn-35 bullets covering: skill, list-legacy, deterministic-only migrate, removed env vars, audit Phase 0 warning update. (R14)
- [ ] `plugins/flow-next/README.md` memory subsection rewritten: `/flow-next:memory-migrate` skill leads, `flowctl memory migrate` demoted to automation subhead, `list-legacy` documented. (R14)
- [ ] `plugins/flow-next/README.md` skills table includes new memory-migrate row. (R14)
- [ ] `CLAUDE.md` lines 72, 74, 82, 143 updated. (R14)
- [ ] `.flow/usage.md` memory commands listing extended. (R14)
- [ ] `~/work/mickel.tech/app/apps/flow-next/page.tsx:537` memory feature card updated. (R14)
- [ ] `scripts/sync-codex.sh` regenerated; `plugins/flow-next/codex/skills/flow-next-memory-migrate/` materialized. (R15)
- [ ] All existing smoke tests still green after rollup: `audit_smoke_test.sh`, `smoke_test.sh`, `prospect_smoke_test.sh`, `ralph_smoke_test.sh`. (R13)
- [ ] No version bump — manifests still show 0.37.0 from fn-34's bump.


## Done summary
Rolled up fn-35 (memory-migrate agent-native): updated fn-34 audit Phase 0 warnings to recommend `/flow-next:memory-migrate` (4 instances), added 4-case `memory list-legacy` smoke (smoke_test.sh now 127/0), amended `[flow-next 0.37.0]` CHANGELOG with skill + list-legacy + deterministic-only migrate + removed env vars, rewrote README memory section (skill leads, deterministic demoted to automation), updated CLAUDE.md (4 lines) and `.flow/usage.md`, regenerated codex mirror (20 skills now), and updated mickel.tech website memory feature card in a separate commit. No version bump — 0.37.0 stays.
## Evidence
- Commits: b04de3efdc4c3bed668c61325386c98aa6eb571b, d777fb8 (mickel.tech)
- Tests: plugins/flow-next/scripts/smoke_test.sh (127/0), plugins/flow-next/scripts/audit_smoke_test.sh (41/0), plugins/flow-next/scripts/prospect_smoke_test.sh (94/0), plugins/flow-next/scripts/ralph_smoke_test.sh (15/0), python3 -m unittest discover -s plugins/flow-next/tests (341 passed)
- PRs: