58 lines
2.8 KiB
Markdown
58 lines
2.8 KiB
Markdown
---
|
|
description: Maintain semantic integrity — Axiom MCP when connected, otherwise grep/outline (zombie mode).
|
|
---
|
|
|
|
## User Input
|
|
|
|
```text
|
|
$ARGUMENTS
|
|
```
|
|
|
|
You **MUST** consider the user input before proceeding (if not empty).
|
|
|
|
## Goal
|
|
|
|
Ensure the repository adheres to GRACE-Poly (`semantics-core`). Prefer Axiom MCP `search`/`audit` when those tools exist in the session. If they do not (Grok TUI), use zombie-mode grep from `semantics-core` §VIII and, when present, `scripts/semantic_health.py`. Never invent Axiom calls or hardcoded health numbers.
|
|
|
|
## Operating Constraints
|
|
|
|
1. **ROLE: Orchestrator** — coordinate semantic maintenance at the workflow level.
|
|
2. **RUNTIME** — Axiom when connected; grep/outline otherwise. Both are valid.
|
|
3. **STRICT ADHERENCE** — follow:
|
|
MANDATORY USE `skill({name="semantics-core"})`,
|
|
`skill({name="semantics-contracts"})`,
|
|
`skill({name="semantics-python"})`,
|
|
`skill({name="semantics-svelte"})`,
|
|
`skill({name="molecular-cot-logging"})`
|
|
- relevant `docs/adr/*`
|
|
4. **NON-DESTRUCTIVE** — do not remove business logic; only add or correct semantic markup unless the user requested implementation changes.
|
|
5. **NO PSEUDO-CONTRACTS / INV_9** — do not inject boilerplate. Missing `@`-tags are not failures. Synthetic tags are defects — delete, do not fill.
|
|
6. **ID NAMING** — short domain-driven IDs, never file paths as the primary key.
|
|
7. **DECISION-MEMORY CONTINUITY** — audit real `@RATIONALE` / `@REJECTED` and ADRs. Do not write decision tags to close an audit list.
|
|
8. **LANGUAGE-AWARE** — Python `# #region` / `# #endregion`; Svelte HTML `<!-- #region -->`; Svelte script `// #region`.
|
|
|
|
## Execution Steps
|
|
|
|
1. If Axiom is connected: rebuild/reindex. Else: skip.
|
|
2. Measure health (Axiom `workspace_health` or grep pair counts / `scripts/semantic_health.py`).
|
|
3. Audit top issues, in this order:
|
|
- broken `#region`/`#endregion` pairs
|
|
- dual `[C:N]` on one line
|
|
- unresolved `@RELATION` targets (dead edge — delete or fix only with a verified ID)
|
|
- synthetic / copy-pasted `@`-tags (delete)
|
|
- restored `@REJECTED` paths
|
|
4. Missing typical tags (PRE/POST/RATIONALE/…) are a thought list, not a fill list.
|
|
5. If `$ARGUMENTS` contains `fix` or `apply`, route to a curator. Curator may delete garbage and fix pairs; it may not stamp templates.
|
|
6. Re-measure. PASS = 0 mismatched pairs in production src and no new synthetic tags. FAIL ≠ "tags missing".
|
|
7. If the user asked for docs/nav: `make docs-nav` and walk `docs/api/nav/root.map` (modules) then module maps (functions). Do not grep `docs/api/html/axiom_*.html` as the index.
|
|
|
|
## Output
|
|
|
|
Return:
|
|
- runtime used (Axiom | zombie)
|
|
- health metrics (live, never from this prompt)
|
|
- PASS/FAIL against pair/synthetic criteria
|
|
- top issues
|
|
- decision-memory notes (real tags only)
|
|
- action taken or handoff initiated
|