- Replace BeliefFormatter with CotJsonFormatter (single-line JSON with ts, level, trace_id, src, marker, intent, payload, error, span_id) - Migrate belief_scope to use cot_log() for structured JSON output - Update monkey-patched reason/reflect/explore to pass extra= dict - Strip 200+ inline [REASON]/[REFLECT]/[EXPLORE] markers from 50+ files - Remove belief_scope from hot-path utilities (_parse_datetime, _json_load_if_needed) to eliminate startup log noise - Register TraceContextMiddleware in app.py (was implemented but unused) - Seed trace_id in startup_event/shutdown_event for background tasks - Fix broken relative imports in translate routes (3 dots → 4 dots) - Migrate 43 translate_routes log calls to logger.reason/explore - Fix SyntaxError (positional arg after extra=) in _repo_operations_routes - Fix IndentationError in rbac_permission_catalog except-block - Add smoke test tests/test_smoke_app.py (catches import errors before run)
59 lines
2.4 KiB
Markdown
59 lines
2.4 KiB
Markdown
---
|
|
description: Maintain semantic integrity by reindexing, auditing, and reviewing the ss-tools repository through AXIOM MCP tools.
|
|
---
|
|
|
|
## User Input
|
|
|
|
```text
|
|
$ARGUMENTS
|
|
```
|
|
|
|
You **MUST** consider the user input before proceeding (if not empty).
|
|
|
|
## Goal
|
|
|
|
Ensure the repository adheres to the active GRACE semantic protocol using AXIOM MCP as the primary execution engine: reindex, measure semantic health, audit contracts, audit decision-memory continuity, and optionally route contract-safe fixes.
|
|
|
|
## Operating Constraints
|
|
|
|
1. **ROLE: Orchestrator** — coordinate semantic maintenance at the workflow level.
|
|
2. **MCP-FIRST** — use AXIOM task-shaped tools for discovery, context, audit, impact analysis, and safe mutation planning.
|
|
3. **STRICT ADHERENCE** — follow the local semantic authorities:
|
|
MANDATORY USE `skill({name="semantics-core"})`,
|
|
`skill({name="semantics-contracts"})`,
|
|
`skill({name="semantics-belief"})`,
|
|
`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** — do not mechanically inject fake semantic boilerplate.
|
|
6. **ID NAMING** — use short domain-driven IDs, never full file paths or import paths as the semantic primary key.
|
|
7. **DECISION-MEMORY CONTINUITY** — audit ADRs, preventive task guardrails, and local `@RATIONALE` / `@REJECTED` as a single chain.
|
|
8. **LANGUAGE-AWARE** — Python uses `# #region` / `# #endregion`; Svelte HTML uses `<!-- #region -->` / `<!-- #endregion -->`; Svelte script uses `// #region` / `// #endregion`.
|
|
|
|
## Execution Steps
|
|
|
|
1. Reindex the semantic workspace.
|
|
2. Measure workspace semantic health.
|
|
3. Audit top issues:
|
|
- broken anchors or malformed regions
|
|
- missing complexity-required metadata
|
|
- unresolved relations
|
|
- isolated critical contracts
|
|
- missing ADR continuity
|
|
- restored rejected paths
|
|
- retained workaround logic lacking local decision-memory tags
|
|
4. Build remediation context for the top failing contracts.
|
|
5. If `$ARGUMENTS` contains `fix` or `apply`, route to an implementation/curation agent instead of applying naive text edits.
|
|
6. Re-run audit and report PASS/FAIL.
|
|
|
|
## Output
|
|
|
|
Return:
|
|
- health metrics
|
|
- PASS/FAIL status
|
|
- top issues
|
|
- decision-memory summary
|
|
- action taken or handoff initiated
|