@fro.bot/systematic 2.0.2 → 2.1.0

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.
Files changed (68) hide show
  1. package/agents/design/figma-design-sync.md +1 -1
  2. package/agents/document-review/coherence-reviewer.md +40 -0
  3. package/agents/document-review/design-lens-reviewer.md +46 -0
  4. package/agents/document-review/feasibility-reviewer.md +42 -0
  5. package/agents/document-review/product-lens-reviewer.md +50 -0
  6. package/agents/document-review/scope-guardian-reviewer.md +54 -0
  7. package/agents/document-review/security-lens-reviewer.md +38 -0
  8. package/agents/research/best-practices-researcher.md +2 -1
  9. package/agents/research/git-history-analyzer.md +1 -1
  10. package/agents/research/learnings-researcher.md +27 -26
  11. package/agents/research/repo-research-analyst.md +164 -9
  12. package/agents/review/api-contract-reviewer.md +49 -0
  13. package/agents/review/correctness-reviewer.md +49 -0
  14. package/agents/review/data-migrations-reviewer.md +53 -0
  15. package/agents/review/dhh-rails-reviewer.md +31 -52
  16. package/agents/review/julik-frontend-races-reviewer.md +27 -200
  17. package/agents/review/kieran-python-reviewer.md +29 -116
  18. package/agents/review/kieran-rails-reviewer.md +29 -98
  19. package/agents/review/kieran-typescript-reviewer.md +29 -107
  20. package/agents/review/maintainability-reviewer.md +49 -0
  21. package/agents/review/pattern-recognition-specialist.md +2 -1
  22. package/agents/review/performance-reviewer.md +51 -0
  23. package/agents/review/reliability-reviewer.md +49 -0
  24. package/agents/review/schema-drift-detector.md +12 -10
  25. package/agents/review/security-reviewer.md +51 -0
  26. package/agents/review/testing-reviewer.md +48 -0
  27. package/agents/workflow/pr-comment-resolver.md +99 -50
  28. package/agents/workflow/spec-flow-analyzer.md +60 -89
  29. package/dist/index.js +9 -0
  30. package/dist/lib/config-handler.d.ts +2 -0
  31. package/package.json +1 -1
  32. package/skills/agent-browser/SKILL.md +69 -48
  33. package/skills/ce-brainstorm/SKILL.md +2 -1
  34. package/skills/ce-compound/SKILL.md +126 -28
  35. package/skills/ce-compound-refresh/SKILL.md +181 -73
  36. package/skills/ce-ideate/SKILL.md +2 -1
  37. package/skills/ce-plan/SKILL.md +424 -414
  38. package/skills/ce-review/SKILL.md +379 -419
  39. package/skills/ce-review-beta/SKILL.md +506 -0
  40. package/skills/ce-review-beta/references/diff-scope.md +31 -0
  41. package/skills/ce-review-beta/references/findings-schema.json +128 -0
  42. package/skills/ce-review-beta/references/persona-catalog.md +50 -0
  43. package/skills/ce-review-beta/references/review-output-template.md +115 -0
  44. package/skills/ce-review-beta/references/subagent-template.md +56 -0
  45. package/skills/ce-work/SKILL.md +17 -8
  46. package/skills/ce-work-beta/SKILL.md +16 -9
  47. package/skills/claude-permissions-optimizer/SKILL.md +15 -14
  48. package/skills/claude-permissions-optimizer/scripts/extract-commands.mjs +9 -159
  49. package/skills/claude-permissions-optimizer/scripts/normalize.mjs +151 -0
  50. package/skills/deepen-plan/SKILL.md +348 -483
  51. package/skills/document-review/SKILL.md +160 -52
  52. package/skills/feature-video/SKILL.md +209 -178
  53. package/skills/file-todos/SKILL.md +72 -94
  54. package/skills/frontend-design/SKILL.md +243 -27
  55. package/skills/git-worktree/SKILL.md +37 -28
  56. package/skills/git-worktree/scripts/worktree-manager.sh +163 -0
  57. package/skills/lfg/SKILL.md +7 -7
  58. package/skills/orchestrating-swarms/SKILL.md +1 -1
  59. package/skills/reproduce-bug/SKILL.md +154 -60
  60. package/skills/resolve-pr-parallel/SKILL.md +19 -12
  61. package/skills/resolve-todo-parallel/SKILL.md +9 -6
  62. package/skills/setup/SKILL.md +8 -160
  63. package/skills/slfg/SKILL.md +11 -7
  64. package/skills/test-browser/SKILL.md +69 -145
  65. package/skills/test-xcode/SKILL.md +61 -183
  66. package/skills/triage/SKILL.md +10 -10
  67. package/skills/ce-plan-beta/SKILL.md +0 -571
  68. package/skills/deepen-plan-beta/SKILL.md +0 -323
@@ -1,25 +1,12 @@
1
1
  ---
2
2
  name: agent-browser
3
- description: Browser automation using Vercel's agent-browser CLI. Use when you need to interact with web pages, fill forms, take screenshots, or scrape data. Alternative to Playwright MCP - uses Bash commands with ref-based element selection. Triggers on "browse website", "fill form", "click button", "take screenshot", "scrape page", "web automation".
3
+ description: Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
4
+ allowed-tools: Bash(npx agent-browser:*), Bash(agent-browser:*)
4
5
  ---
5
6
 
6
7
  # Browser Automation with agent-browser
7
8
 
8
- The CLI uses Chrome/Chromium via CDP directly. Install via `npm i -g agent-browser`, `brew install agent-browser`, or `cargo install agent-browser`. Run `agent-browser install` to download Chrome.
9
-
10
- ## Setup Check
11
-
12
- ```bash
13
- # Check installation
14
- command -v agent-browser >/dev/null 2>&1 && echo "Installed" || echo "NOT INSTALLED - run: npm install -g agent-browser && agent-browser install"
15
- ```
16
-
17
- ### Install if needed
18
-
19
- ```bash
20
- npm install -g agent-browser
21
- agent-browser install # Downloads Chromium
22
- ```
9
+ The CLI uses Chrome/Chromium via CDP directly. Install via `npm i -g agent-browser`, `brew install agent-browser`, or `cargo install agent-browser`. Run `agent-browser install` to download Chrome. Run `agent-browser upgrade` to update to the latest version.
23
10
 
24
11
  ## Core Workflow
25
12
 
@@ -103,6 +90,8 @@ echo "$PASSWORD" | agent-browser auth save myapp --url https://app.example.com/l
103
90
  agent-browser auth login myapp
104
91
  ```
105
92
 
93
+ `auth login` navigates with `load` and then waits for login form selectors to appear before filling/clicking, which is more reliable on delayed SPA login screens.
94
+
106
95
  **Option 5: State file (manual save/load)**
107
96
 
108
97
  ```bash
@@ -160,6 +149,12 @@ agent-browser download @e1 ./file.pdf # Click element to trigger downlo
160
149
  agent-browser wait --download ./output.zip # Wait for any download to complete
161
150
  agent-browser --download-path ./downloads open <url> # Set default download directory
162
151
 
152
+ # Network
153
+ agent-browser network requests # Inspect tracked requests
154
+ agent-browser network route "**/api/*" --abort # Block matching requests
155
+ agent-browser network har start # Start HAR recording
156
+ agent-browser network har stop ./capture.har # Stop and save HAR file
157
+
163
158
  # Viewport & Device Emulation
164
159
  agent-browser set viewport 1920 1080 # Set viewport size (default: 1280x720)
165
160
  agent-browser set viewport 1920 1080 2 # 2x retina (same CSS size, higher res screenshots)
@@ -188,6 +183,24 @@ agent-browser diff url <url1> <url2> --wait-until networkidle # Custom wait str
188
183
  agent-browser diff url <url1> <url2> --selector "#main" # Scope to element
189
184
  ```
190
185
 
186
+ ## Batch Execution
187
+
188
+ Execute multiple commands in a single invocation by piping a JSON array of string arrays to `batch`. This avoids per-command process startup overhead when running multi-step workflows.
189
+
190
+ ```bash
191
+ echo '[
192
+ ["open", "https://example.com"],
193
+ ["snapshot", "-i"],
194
+ ["click", "@e1"],
195
+ ["screenshot", "result.png"]
196
+ ]' | agent-browser batch --json
197
+
198
+ # Stop on first error
199
+ agent-browser batch --bail < commands.json
200
+ ```
201
+
202
+ Use `batch` when you have a known sequence of commands that don't depend on intermediate output. Use separate commands or `&&` chaining when you need to parse output between steps (e.g., snapshot to discover refs, then interact).
203
+
191
204
  ## Common Patterns
192
205
 
193
206
  ### Form Submission
@@ -219,6 +232,8 @@ agent-browser auth show github
219
232
  agent-browser auth delete github
220
233
  ```
221
234
 
235
+ `auth login` waits for username/password/submit selectors before interacting, with a timeout tied to the default action timeout.
236
+
222
237
  ### Authentication with State Persistence
223
238
 
224
239
  ```bash
@@ -258,6 +273,30 @@ agent-browser state clear myapp
258
273
  agent-browser state clean --older-than 7
259
274
  ```
260
275
 
276
+ ### Working with Iframes
277
+
278
+ Iframe content is automatically inlined in snapshots. Refs inside iframes carry frame context, so you can interact with them directly.
279
+
280
+ ```bash
281
+ agent-browser open https://example.com/checkout
282
+ agent-browser snapshot -i
283
+ # @e1 [heading] "Checkout"
284
+ # @e2 [Iframe] "payment-frame"
285
+ # @e3 [input] "Card number"
286
+ # @e4 [input] "Expiry"
287
+ # @e5 [button] "Pay"
288
+
289
+ # Interact directly — no frame switch needed
290
+ agent-browser fill @e3 "4111111111111111"
291
+ agent-browser fill @e4 "12/28"
292
+ agent-browser click @e5
293
+
294
+ # To scope a snapshot to one iframe:
295
+ agent-browser frame @e2
296
+ agent-browser snapshot -i # Only iframe content
297
+ agent-browser frame main # Return to main frame
298
+ ```
299
+
261
300
  ### Data Extraction
262
301
 
263
302
  ```bash
@@ -294,6 +333,8 @@ agent-browser --auto-connect snapshot
294
333
  agent-browser --cdp 9222 snapshot
295
334
  ```
296
335
 
336
+ Auto-connect discovers Chrome via `DevToolsActivePort`, common debugging ports (9222, 9229), and falls back to a direct WebSocket connection if HTTP-based CDP discovery fails.
337
+
297
338
  ### Color Scheme (Dark Mode)
298
339
 
299
340
  ```bash
@@ -596,6 +637,18 @@ Create `agent-browser.json` in the project root for persistent settings:
596
637
 
597
638
  Priority (lowest to highest): `~/.agent-browser/config.json` < `./agent-browser.json` < env vars < CLI flags. Use `--config <path>` or `AGENT_BROWSER_CONFIG` env var for a custom config file (exits with error if missing/invalid). All CLI options map to camelCase keys (e.g., `--executable-path` -> `"executablePath"`). Boolean flags accept `true`/`false` values (e.g., `--headed false` overrides config). Extensions from user and project configs are merged, not replaced.
598
639
 
640
+ ## Deep-Dive Documentation
641
+
642
+ | Reference | When to Use |
643
+ | -------------------------------------------------------------------- | --------------------------------------------------------- |
644
+ | [references/commands.md](references/commands.md) | Full command reference with all options |
645
+ | [references/snapshot-refs.md](references/snapshot-refs.md) | Ref lifecycle, invalidation rules, troubleshooting |
646
+ | [references/session-management.md](references/session-management.md) | Parallel sessions, state persistence, concurrent scraping |
647
+ | [references/authentication.md](references/authentication.md) | Login flows, OAuth, 2FA handling, state reuse |
648
+ | [references/video-recording.md](references/video-recording.md) | Recording workflows for debugging and documentation |
649
+ | [references/profiling.md](references/profiling.md) | Chrome DevTools profiling for performance analysis |
650
+ | [references/proxy-support.md](references/proxy-support.md) | Proxy configuration, geo-testing, rotating proxies |
651
+
599
652
  ## Browser Engine Selection
600
653
 
601
654
  Use `--engine` to choose a local browser engine. The default is `chrome`.
@@ -618,18 +671,6 @@ Supported engines:
618
671
 
619
672
  Lightpanda does not support `--extension`, `--profile`, `--state`, or `--allow-file-access`. Install Lightpanda from https://lightpanda.io/docs/open-source/installation.
620
673
 
621
- ## Deep-Dive Documentation
622
-
623
- | Reference | When to Use |
624
- | -------------------------------------------------------------------- | --------------------------------------------------------- |
625
- | [references/commands.md](references/commands.md) | Full command reference with all options |
626
- | [references/snapshot-refs.md](references/snapshot-refs.md) | Ref lifecycle, invalidation rules, troubleshooting |
627
- | [references/session-management.md](references/session-management.md) | Parallel sessions, state persistence, concurrent scraping |
628
- | [references/authentication.md](references/authentication.md) | Login flows, OAuth, 2FA handling, state reuse |
629
- | [references/video-recording.md](references/video-recording.md) | Recording workflows for debugging and documentation |
630
- | [references/profiling.md](references/profiling.md) | Chrome DevTools profiling for performance analysis |
631
- | [references/proxy-support.md](references/proxy-support.md) | Proxy configuration, geo-testing, rotating proxies |
632
-
633
674
  ## Ready-to-Use Templates
634
675
 
635
676
  | Template | Description |
@@ -644,23 +685,3 @@ Lightpanda does not support `--extension`, `--profile`, `--state`, or `--allow-f
644
685
  ./templates/capture-workflow.sh https://example.com ./output
645
686
  ```
646
687
 
647
- ## vs Playwright MCP
648
-
649
- | Feature | agent-browser (CLI) | Playwright MCP |
650
- |---------|---------------------|----------------|
651
- | Interface | Bash commands | MCP tools |
652
- | Selection | Refs (@e1) | Refs (e1) |
653
- | Output | Text/JSON | Tool responses |
654
- | Parallel | Sessions | Tabs |
655
- | Best for | Quick automation | Tool integration |
656
-
657
- Use agent-browser when:
658
- - You prefer Bash-based workflows
659
- - You want simpler CLI commands
660
- - You need quick one-off automation
661
-
662
- Use Playwright MCP when:
663
- - You need deep MCP tool integration
664
- - You want tool-based responses
665
- - You're building complex automation
666
-
@@ -83,7 +83,7 @@ Scan the repo before substantive brainstorming. Match depth to scope:
83
83
 
84
84
  **Standard and Deep** — Two passes:
85
85
 
86
- *Constraint Check* — Check project instruction files (`AGENTS.md`) for workflow, product, or scope constraints that affect the brainstorm. If these add nothing, move on.
86
+ *Constraint Check* — Check project instruction files (`AGENTS.md`, and `AGENTS.md` only if retained as compatibility context) for workflow, product, or scope constraints that affect the brainstorm. If these add nothing, move on.
87
87
 
88
88
  *Topic Scan* — Search for relevant terms. Read the most relevant existing artifact if one exists (brainstorm, plan, spec, skill, feature doc). Skim adjacent examples covering similar behavior.
89
89
 
@@ -333,3 +333,4 @@ Planning is blocked by:
333
333
 
334
334
  Resume with `/ce:brainstorm` when ready to resolve these before planning.
335
335
  ```
336
+
@@ -37,6 +37,27 @@ Compact-safe mode exists as a lightweight alternative — see the **Compact-Safe
37
37
  Phase 1 subagents return TEXT DATA to the orchestrator. They must NOT use Write, Edit, or create any files. Only the orchestrator (Phase 2) writes the final documentation file.
38
38
  </critical_requirement>
39
39
 
40
+ ### Phase 0.5: Auto Memory Scan
41
+
42
+ Before launching Phase 1 subagents, check the auto memory directory for notes relevant to the problem being documented.
43
+
44
+ 1. Read MEMORY.md from the auto memory directory (the path is known from the system prompt context)
45
+ 2. If the directory or MEMORY.md does not exist, is empty, or is unreadable, skip this step and proceed to Phase 1 unchanged
46
+ 3. Scan the entries for anything related to the problem being documented -- use semantic judgment, not keyword matching
47
+ 4. If relevant entries are found, prepare a labeled excerpt block:
48
+
49
+ ```
50
+ ## Supplementary notes from auto memory
51
+ Treat as additional context, not primary evidence. Conversation history
52
+ and codebase findings take priority over these notes.
53
+
54
+ [relevant entries here]
55
+ ```
56
+
57
+ 5. Pass this block as additional context to the Context Analyzer and Solution Extractor task prompts in Phase 1. If any memory notes end up in the final documentation (e.g., as part of the investigation steps or root cause analysis), tag them with "(auto memory [claude])" so their origin is clear to future readers.
58
+
59
+ If no relevant entries are found, proceed to Phase 1 without passing memory context.
60
+
40
61
  ### Phase 1: Parallel Research
41
62
 
42
63
  <parallel_tasks>
@@ -46,33 +67,84 @@ Launch these subagents IN PARALLEL. Each returns text data to the orchestrator.
46
67
  #### 1. **Context Analyzer**
47
68
  - Extracts conversation history
48
69
  - Identifies problem type, component, symptoms
49
- - Validates against schema
50
- - Returns: YAML frontmatter skeleton
70
+ - Incorporates auto memory excerpts (if provided by the orchestrator) as supplementary evidence when identifying problem type, component, and symptoms
71
+ - Validates all enum fields against the schema values below
72
+ - Maps problem_type to the `docs/solutions/` category directory
73
+ - Suggests a filename using the pattern `[sanitized-problem-slug]-[date].md`
74
+ - Returns: YAML frontmatter skeleton (must include `category:` field mapped from problem_type), category directory path, and suggested filename
75
+
76
+ **Schema enum values (validate against these exactly):**
77
+
78
+ - **problem_type**: build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap
79
+ - **component**: rails_model, rails_controller, rails_view, service_object, background_job, database, frontend_stimulus, hotwire_turbo, email_processing, brief_system, assistant, authentication, payments, development_workflow, testing_framework, documentation, tooling
80
+ - **root_cause**: missing_association, missing_include, missing_index, wrong_api, scope_issue, thread_violation, async_timing, memory_leak, config_error, logic_error, test_isolation, missing_validation, missing_permission, missing_workflow_step, inadequate_documentation, missing_tooling, incomplete_setup
81
+ - **resolution_type**: code_fix, migration, config_change, test_fix, dependency_update, environment_setup, workflow_improvement, documentation_update, tooling_addition, seed_data_update
82
+ - **severity**: critical, high, medium, low
83
+
84
+ **Category mapping (problem_type -> directory):**
85
+
86
+ | problem_type | Directory |
87
+ |---|---|
88
+ | build_error | build-errors/ |
89
+ | test_failure | test-failures/ |
90
+ | runtime_error | runtime-errors/ |
91
+ | performance_issue | performance-issues/ |
92
+ | database_issue | database-issues/ |
93
+ | security_issue | security-issues/ |
94
+ | ui_bug | ui-bugs/ |
95
+ | integration_issue | integration-issues/ |
96
+ | logic_error | logic-errors/ |
97
+ | developer_experience | developer-experience/ |
98
+ | workflow_issue | workflow-issues/ |
99
+ | best_practice | best-practices/ |
100
+ | documentation_gap | documentation-gaps/ |
51
101
 
52
102
  #### 2. **Solution Extractor**
53
103
  - Analyzes all investigation steps
54
104
  - Identifies root cause
55
105
  - Extracts working solution with code examples
56
- - Returns: Solution content block
106
+ - Incorporates auto memory excerpts (if provided by the orchestrator) as supplementary evidence -- conversation history and the verified fix take priority; if memory notes contradict the conversation, note the contradiction as cautionary context
107
+ - Develops prevention strategies and best practices guidance
108
+ - Generates test cases if applicable
109
+ - Returns: Solution content block including prevention section
110
+
111
+ **Expected output sections (follow this structure):**
112
+
113
+ - **Problem**: 1-2 sentence description of the issue
114
+ - **Symptoms**: Observable symptoms (error messages, behavior)
115
+ - **What Didn't Work**: Failed investigation attempts and why they failed
116
+ - **Solution**: The actual fix with code examples (before/after when applicable)
117
+ - **Why This Works**: Root cause explanation and why the solution addresses it
118
+ - **Prevention**: Strategies to avoid recurrence, best practices, and test cases. Include concrete code examples where applicable (e.g., gem configurations, test assertions, linting rules)
57
119
 
58
120
  #### 3. **Related Docs Finder**
59
121
  - Searches `docs/solutions/` for related documentation
60
122
  - Identifies cross-references and links
61
123
  - Finds related GitHub issues
62
124
  - Flags any related learning or pattern docs that may now be stale, contradicted, or overly broad
63
- - Returns: Links, relationships, and any refresh candidates
64
-
65
- #### 4. **Prevention Strategist**
66
- - Develops prevention strategies
67
- - Creates best practices guidance
68
- - Generates test cases if applicable
69
- - Returns: Prevention/testing content
70
-
71
- #### 5. **Category Classifier**
72
- - Determines optimal `docs/solutions/` category
73
- - Validates category against schema
74
- - Suggests filename based on slug
75
- - Returns: Final path and filename
125
+ - **Assesses overlap** with the new doc being created across five dimensions: problem statement, root cause, solution approach, referenced files, and prevention rules. Score as:
126
+ - **High**: 4-5 dimensions match — essentially the same problem solved again
127
+ - **Moderate**: 2-3 dimensions match — same area but different angle or solution
128
+ - **Low**: 0-1 dimensions match — related but distinct
129
+ - Returns: Links, relationships, refresh candidates, and overlap assessment (score + which dimensions matched)
130
+
131
+ **Search strategy (grep-first filtering for efficiency):**
132
+
133
+ 1. Extract keywords from the problem context: module names, technical terms, error messages, component types
134
+ 2. If the problem category is clear, narrow search to the matching `docs/solutions/<category>/` directory
135
+ 3. Use the native content-search tool (e.g., Grep in OpenCode) to pre-filter candidate files BEFORE reading any content. Run multiple searches in parallel, case-insensitive, targeting frontmatter fields. These are template patterns -- substitute actual keywords:
136
+ - `title:.*<keyword>`
137
+ - `tags:.*(<keyword1>|<keyword2>)`
138
+ - `module:.*<module name>`
139
+ - `component:.*<component>`
140
+ 4. If search returns >25 candidates, re-run with more specific patterns. If <3, broaden to full content search
141
+ 5. Read only frontmatter (first 30 lines) of candidate files to score relevance
142
+ 6. Fully read only strong/moderate matches
143
+ 7. Return distilled links and relationships, not raw file contents
144
+
145
+ **GitHub issue search:**
146
+
147
+ Prefer the `gh` CLI for searching related issues: `gh issue list --search "<keywords>" --state all --limit 5`. If `gh` is not installed, fall back to the GitHub MCP tools (e.g., `unblocked` data_retrieval) if available. If neither is available, skip GitHub issue search and note it was skipped in the output.
76
148
 
77
149
  </parallel_tasks>
78
150
 
@@ -85,10 +157,22 @@ Launch these subagents IN PARALLEL. Each returns text data to the orchestrator.
85
157
  The orchestrating agent (main conversation) performs these steps:
86
158
 
87
159
  1. Collect all text results from Phase 1 subagents
88
- 2. Assemble complete markdown file from the collected pieces
89
- 3. Validate YAML frontmatter against schema
90
- 4. Create directory if needed: `mkdir -p docs/solutions/[category]/`
91
- 5. Write the SINGLE final file: `docs/solutions/[category]/[filename].md`
160
+ 2. **Check the overlap assessment** from the Related Docs Finder before deciding what to write:
161
+
162
+ | Overlap | Action |
163
+ |---------|--------|
164
+ | **High** — existing doc covers the same problem, root cause, and solution | **Update the existing doc** with fresher context (new code examples, updated references, additional prevention tips) rather than creating a duplicate. The existing doc's path and structure stay the same. |
165
+ | **Moderate** — same problem area but different angle, root cause, or solution | **Create the new doc** normally. Flag the overlap for Phase 2.5 to recommend consolidation review. |
166
+ | **Low or none** | **Create the new doc** normally. |
167
+
168
+ The reason to update rather than create: two docs describing the same problem and solution will inevitably drift apart. The newer context is fresher and more trustworthy, so fold it into the existing doc rather than creating a second one that immediately needs consolidation.
169
+
170
+ When updating an existing doc, preserve its file path and frontmatter structure. Update the solution, code examples, prevention tips, and any stale references. Add a `last_updated: YYYY-MM-DD` field to the frontmatter. Do not change the title unless the problem framing has materially shifted.
171
+
172
+ 3. Assemble complete markdown file from the collected pieces
173
+ 4. Validate YAML frontmatter against schema
174
+ 5. Create directory if needed: `mkdir -p docs/solutions/[category]/`
175
+ 6. Write the file: either the updated existing doc or the new `docs/solutions/[category]/[filename].md`
92
176
 
93
177
  </sequential_tasks>
94
178
 
@@ -105,6 +189,7 @@ It makes sense to invoke `ce:compound-refresh` when one or more of these are tru
105
189
  3. The current work involved a refactor, migration, rename, or dependency upgrade that likely invalidated references in older docs
106
190
  4. A pattern doc now looks overly broad, outdated, or no longer supported by the refreshed reality
107
191
  5. The Related Docs Finder surfaced high-confidence refresh candidates in the same problem space
192
+ 6. The Related Docs Finder reported **moderate overlap** with an existing doc — there may be consolidation opportunities that benefit from a focused review
108
193
 
109
194
  It does **not** make sense to invoke `ce:compound-refresh` when:
110
195
 
@@ -167,7 +252,7 @@ When context budget is tight, this mode skips parallel subagents entirely. The o
167
252
 
168
253
  The orchestrator (main conversation) performs ALL of the following in one sequential pass:
169
254
 
170
- 1. **Extract from conversation**: Identify the problem, root cause, and solution from conversation history
255
+ 1. **Extract from conversation**: Identify the problem, root cause, and solution from conversation history. Also read MEMORY.md from the auto memory directory if it exists -- use any relevant notes as supplementary context alongside conversation history. Tag any memory-sourced content incorporated into the final doc with "(auto memory [claude])"
171
256
  2. **Classify**: Determine category and filename (same categories as full mode)
172
257
  3. **Write minimal doc**: Create `docs/solutions/[category]/[filename].md` with:
173
258
  - YAML frontmatter (title, category, date, tags)
@@ -191,7 +276,7 @@ re-run /compound in a fresh session.
191
276
 
192
277
  **No subagents are launched. No parallel tasks. One file written.**
193
278
 
194
- In compact-safe mode, only suggest `ce:compound-refresh` if there is an obvious narrow refresh target. Do not broaden into a large refresh sweep from a compact-safe session.
279
+ In compact-safe mode, the overlap check is skipped (no Related Docs Finder subagent). This means compact-safe mode may create a doc that overlaps with an existing one. That is acceptable — `ce:compound-refresh` will catch it later. Only suggest `ce:compound-refresh` if there is an obvious narrow refresh target. Do not broaden into a large refresh sweep from a compact-safe session.
195
280
 
196
281
  ---
197
282
 
@@ -242,19 +327,20 @@ In compact-safe mode, only suggest `ce:compound-refresh` if there is an obvious
242
327
  |----------|-----------|
243
328
  | Subagents write files like `context-analysis.md`, `solution-draft.md` | Subagents return text data; orchestrator writes one final file |
244
329
  | Research and assembly run in parallel | Research completes → then assembly runs |
245
- | Multiple files created during workflow | Single file: `docs/solutions/[category]/[filename].md` |
330
+ | Multiple files created during workflow | One file written or updated: `docs/solutions/[category]/[filename].md` |
331
+ | Creating a new doc when an existing doc covers the same problem | Check overlap assessment; update the existing doc when overlap is high |
246
332
 
247
333
  ## Success Output
248
334
 
249
335
  ```
250
336
  ✓ Documentation complete
251
337
 
338
+ Auto memory: 2 relevant entries used as supplementary evidence
339
+
252
340
  Subagent Results:
253
- ✓ Context Analyzer: Identified performance_issue in brief_system
254
- ✓ Solution Extractor: 3 code fixes
341
+ ✓ Context Analyzer: Identified performance_issue in brief_system, category: performance-issues/
342
+ ✓ Solution Extractor: 3 code fixes, prevention strategies
255
343
  ✓ Related Docs Finder: 2 related issues
256
- ✓ Prevention Strategist: Prevention strategies, test suggestions
257
- ✓ Category Classifier: `performance-issues`
258
344
 
259
345
  Specialized Agent Reviews (Auto-Triggered):
260
346
  ✓ performance-oracle: Validated query optimization approach
@@ -276,6 +362,19 @@ What's next?
276
362
  5. Other
277
363
  ```
278
364
 
365
+ **Alternate output (when updating an existing doc due to high overlap):**
366
+
367
+ ```
368
+ ✓ Documentation updated (existing doc refreshed with current context)
369
+
370
+ Overlap detected: docs/solutions/performance-issues/n-plus-one-queries.md
371
+ Matched dimensions: problem statement, root cause, solution, referenced files
372
+ Action: Updated existing doc with fresher code examples and prevention tips
373
+
374
+ File updated:
375
+ - docs/solutions/performance-issues/n-plus-one-queries.md (added last_updated: 2026-03-24)
376
+ ```
377
+
279
378
  ## The Compounding Philosophy
280
379
 
281
380
  This creates a compounding knowledge system:
@@ -328,7 +427,6 @@ Based on problem type, these agents can enhance documentation:
328
427
  ### When to Invoke
329
428
  - **Auto-triggered** (optional): Agents can run post-documentation for enhancement
330
429
  - **Manual trigger**: User can invoke agents after /ce:compound completes for deeper review
331
- - **Customize agents**: Edit `systematic.local.md` or invoke the `setup` skill to configure which review agents are used across all workflows
332
430
 
333
431
  ## Related Commands
334
432