--- name: crux-skill-memory-meditation-coordination description: File-based coordination primitives for meditation: artefact filename grammar (18 rows including `init-suggestions-{ts}.yml`, `finalisation-enhancements.yml`, per-tree ensemble variants, and 4 follow-up artefact types), placeholders, prefix-glob polling rule, never-hard-code invariant, retrospective template, Branch & Leaf Index template (single-model + ensemble variants). Use whenever the `crux-cursor-meditation-guide` agent reads, writes, or links a working-directory artefact. --- # CRUX Skill: Memory Meditation — Coordination Implements all file-based coordination primitives for the meditation system: artefact filename grammar (18 rows post-richness), placeholder definitions, prefix-glob polling rule, never-hard-code `report.{html,pdf}` invariant, process retrospective template, Branch & Leaf Index template (single-model and ensemble variants), and the ensemble working-directory structure. ## When to Use Load this skill whenever the `crux-cursor-meditation-guide` agent: - Reads, writes, or links any working-directory artefact - Needs to poll for branch outputs or report files - Needs to construct filenames from placeholders - Needs to append the Branch & Leaf Index to `facets.md` - Needs to write the process retrospective This is the **leaf utility skill** — all five other meditation skills reference it for filename grammar and polling rules. ## Artefact Filename Table (18 rows post-richness) All artefacts in the meditation working directory follow these filename patterns: | Artefact | Filename pattern | Notes | |----------|------------------|-------| | Top-level facets (initial, pre-confirmation) | `facets-pending-{ts}.yml` | Deleted after the user confirms via combined Pattern-B askQuestion; schema extended to carry all 4 blocks (facets + sections + visualisations + additional_focus_areas) | | Top-level facets (final, post-confirmation) | `facets.md` | Single navigational entry point; updated post-consolidation with the Branch & Leaf Index | | Init suggestions (confirmed payload) | `init-suggestions-{ts}.yml` | Written by depth-0 manager during step 4b resume (after combined Pattern-B askQuestion resolves); schema: `confirmed_sections` + `confirmed_visualisations` + `additional_focus_areas` blocks; read by report-generation contract and adversarial reviewer Dim 13; linked from `facets.md` Branch & Leaf Index `## Top-level artifacts` | | Branch (depth 1, 2, 3) | `branch-{N}-depth-{D}-sub-{S}-{slug}-{yyyymmddHHMMSS}.md` | `D` ∈ {1,2,3}; `S = 0` at depth 1, `S` ∈ {1,2,3} at depth 2, `S` ∈ {1,...,9} at depth 3 | | Branch (intermediate, Phase B working draft) | `branch-{N}-depth-{D}-sub-{S}-{slug}-{ts}-findings.md` | Research mode only; deleted after Phase G promotion | | Peer review (Research mode) | `branch-{N}-peer-review-{branchSlug}-{ts}.md` | One per branch | | Pending deep-facet confirmation request | `pending-facets-branch-{N}-depth-{D}-sub-{S}-{ts}.yml` | Only when `confirmDeepFacets ≠ none`; `D` is the **parent** agent's depth | | Confirmed deep-facet response | `confirmed-facets-branch-{N}-depth-{D}-sub-{S}-{ts}.yml` | Same path-id and `{ts}` as the pending file | | Adversarial review iteration | `review-pre-report-{ts}-iter-{N}.md` | `N` ∈ {1, 2, 3}; iteration cap | | Finalisation enhancements (single-model) | `finalisation-enhancements.yml` | Written by depth-0 manager during step 8 consolidation reflection (in-pass, no extra read); top-5 ranked candidates; calling agent updates in place with `accepted` / `treatment` / `decided_at_utc` after `Q-Finalisation-Enhancements` resolves; linked from `facets.md` Branch & Leaf Index `## Top-level artifacts` | | Finalisation enhancements (ensemble per-tree) | `{model-subdir}/finalisation-enhancements.yml` | Written by per-tree depth-0 consolidation manager before returning to ensemble aggregator; carries `source_tree:` + `surfaced_to_root: null` placeholder (aggregator fills); NO per-tree askQuestion fires | | Follow-up artefact: additional meditation | `follow-up-meditation-{ts}.yml` | Written by calling agent after `Q-Finalisation-Enhancements` resolves for `additional_meditation` items with `treatment ∈ {queue, spawn_now}`; `{ts}` is the calling-agent write timestamp | | Follow-up artefact: extracted spec | `follow-up-spec-{ts}.yml` | Written by calling agent for `extracted_spec` items with `treatment ∈ {queue, spawn_now}` | | Follow-up artefact: extracted memories | `follow-up-memories-{ts}.yml` | Written by calling agent for `extracted_memories` items with `treatment ∈ {queue, spawn_now}` | | Follow-up artefact: expanded branch | `follow-up-expansion-{ts}.yml` | Written by calling agent for `expanded_branch` items with `treatment ∈ {queue, spawn_now}` | | Process retrospective | `retrospective-{ts}.md` | One per meditation; process analysis separate from subject-matter outputs | | Report HTML | `report-{topic-slug}-{ts}.html` | Shares `{ts}` with PDF pair | | Report PDF | `report-{topic-slug}-{ts}.pdf` | Shares `{ts}` with HTML pair | **Research-mode-only files** (noted in table above): `branch-*-findings.md` (Phase B draft), peer-review files (`branch-{N}-peer-review-*.md`), `facet-registry.yml` (global facet allocation), `citations-index.yml` (append-only citation index), `.facet-registry.lock/` (transient mkdir-mutex). ## `facets.md` frontmatter — model strategy fields When the depth-0 manager writes the final `facets.md` (step 4b promotion) and refreshes it post-consolidation (step 9 Branch & Leaf Index update), include the following fields in the frontmatter to record the resolved model strategy: ```yaml --- # ... existing facets.md frontmatter fields (topic_slug, mode, confirmed_at_utc, etc.) ... model_strategy: mode: "none" | "random" | "per_branch" | "ensemble_max" resolved_model_slug: null | "" # set when mode == "random" resolved_model_label: null | "