$npx -y skills add AgamiAI/agami-core --skill agami-modelThe single dashboard for the active profile's semantic model — browse, curate, AND sign off the trust layer in one surface. Browse every subject area, table, field, metric, entity, and join with live search; edit descriptions/metrics/entities/joins; exclude tables/columns you don
| 1 | # agami model |
| 2 | |
| 3 | You are running the unified **model + trust** surface — one dashboard to browse the live semantic model, curate it (exclude / edit / add), AND sign off the trust layer (approve / reject metrics, entities, joins). It replaces the separate model-explorer and review-dashboard surfaces. |
| 4 | |
| 5 | This skill orchestrates: |
| 6 | |
| 7 | 1. **Render** — invoke `render_model_explorer.py` to walk every YAML and write a self-contained HTML artifact at `<artifacts_dir>/local/model/<profile>/<ts>.html`. The Python script does the YAML reading — **no LLM tokens spent on the walk**. The dashboard has tabs: **Organization · Review · Subject areas · Tables · Metrics · Entities · Joins · Examples · Queued**. The **Review** tab is the sign-off queue (the old `/agami-review`); pass `--initial-tab review` to open on it. |
| 8 | 2. **Open + wait** — auto-open the file, end the turn, wait for the user to come back with a "Generate feedback for Claude" block (exclude/include, approve/reject, edits, new metrics, org edit). |
| 9 | 3. **Apply** — for each batch, run `semantic_model.cli curate` with an ops JSON. The engine flips review_state / stamps sign-off, runs the validator, reverts via git on failure, appends to `curation_log.jsonl`, and commits. |
| 10 | 4. **Re-render** — render to a new timestamped file and re-open. Wait for the next batch. |
| 11 | |
| 12 | Trust-spine semantics — three actions on the same `review_state` field: |
| 13 | - **Exclude / Reject** → `rejected`. The loader drops rejected tables, columns, metrics, entities, and relationships entirely (`include_rejected=False` at runtime) — never in prompts, never joined, never aggregated. ("Exclude" is the verb for tables/columns; "Reject" for metrics/entities/joins — same op.) |
| 14 | - **Include** → back to `unreviewed`. |
| 15 | - **Approve** → `approved` + a sign-off stamp (`signed_off_by`/`_at`/`_role`). **Rule 1** (metrics) — a query that uses an unsigned metric still answers but carries a "not signed off" **warning** on its receipt until it's approved; **Rule 2** (entities, inferred joins) is usable while unreviewed and self-approves through use. Only `rejected` entries are dropped from the runtime entirely. Approving requires the curator's email + role (Phase 0) — the validator rejects an approved entry with no sign-off stamp. |
| 16 | |
| 17 | ## Conversation style |
| 18 | |
| 19 | - **Tight loops.** The dashboard is the surface; the chat is just the input channel. |
| 20 | - **Don't restate the dashboard in chat.** A successful apply gets a one-line ack with the count and the new file path. |
| 21 | - **Qualified names everywhere.** Tables are `<area>.<table>`. Columns are `<area>.<table>.<column>` (area = subject area). No bare names. |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## Phase 0: Preflight |
| 26 | |
| 27 | - **Plan-mode check** — this skill writes YAMLs. If plan mode is active, refuse: *"I can't apply model edits in plan mode — switch to **Auto** or **Edit Automatically** mode (Shift+Tab to cycle) and re-invoke. (You can still inspect a previously-rendered dashboard at `<artifacts_dir>/local/model/<profile>/<ts>.html`.)"* **Do NOT write a plan file. Do NOT call `ExitPlanMode`.** |
| 28 | - **Resolve `<profile>` and `<artifacts_dir>`** via the standard chain (`AGAMI_PROFILE` → `<artifacts_dir>/local/.config.active_profile` → `default`; `AGAMI_ARTIFACTS_DIR` → `.config.artifacts_dir` → `~/agami-artifacts`). |
| 29 | - **A pasted feedback block names its own target.** When applying a |