tech-lead-stack 1.1.0 → 1.2.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.
- package/.agents/workflows/show-it-deep.md +40 -0
- package/.agents/workflows/show-it.md +38 -0
- package/.ai/agent-surfaces.json +43 -1
- package/.ai/cursor-skills.manifest +4 -0
- package/.ai/skills/planning-expert.md +1 -1
- package/.ai/skills/show-it-deep.md +204 -0
- package/.ai/skills/show-it.md +194 -0
- package/.ai/skills.graph.json +162 -385
- package/dist/mcp-server.mjs +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: show-it-deep
|
|
3
|
+
description: Interactive, explorable diagrams of the codebase using archify (optional, installed separately). Higher token cost; IDE only.
|
|
4
|
+
modes:
|
|
5
|
+
- read-only
|
|
6
|
+
- write
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
// turbo
|
|
10
|
+
|
|
11
|
+
> [!CAUTION] **CRITICAL: VISUAL-ONLY WORKFLOW & SKILL**
|
|
12
|
+
> This workflow never edits, deletes, or refactors code, and never touches git or packages.
|
|
13
|
+
> The ONLY permitted write is creating new files under `.ai/output/visuals/`.
|
|
14
|
+
> The ONLY permitted commands are the skill's archify guard check, `node -v`, and archify's `doctor`, `guide`, and `finalize` (the last three prefixed with `ARCHIFY_UPDATE_CHECK_DISABLED=1`).
|
|
15
|
+
> The agent never installs or updates archify. If archify or a shell is missing, it STOPS immediately and explains why, with a link to https://github.com/tt-a1i/archify.
|
|
16
|
+
|
|
17
|
+
**CRITICAL: PHASE 0 - SKILL ACQUISITION IS NON-NEGOTIABLE.**
|
|
18
|
+
**YOU MUST CALL THE GET_SKILLS TOOL EVEN IF YOU ALREADY HAVE THE CONTEXT. FAILURE TO DO SO BYPASSES MISSION TELEMETRY.**
|
|
19
|
+
|
|
20
|
+
> [!IMPORTANT]
|
|
21
|
+
> **ANTI-CONFLATION DIRECTIVE:**
|
|
22
|
+
> This file (`.agents/workflows/show-it-deep.md`) is a workflow launcher stub, NOT the skill definition.
|
|
23
|
+
> Viewing this file via `view_file` does NOT satisfy Phase 0. You MUST call the MCP `get_skills` or `get_skill` tool FIRST with all 4 required fields before executing any other steps.
|
|
24
|
+
|
|
25
|
+
- **Skill Usage Enforcement (NON-NEGOTIABLE):**
|
|
26
|
+
- **FORBIDDEN:** Direct file access via `view_file` or `run_command` is strictly prohibited for skill reading.
|
|
27
|
+
- **IDE / MCP-enabled Agent:** You MUST call the MCP `get_skills` tool (which may be prefixed as `mcp_tech-lead-stack_get_skills` or `tech-lead-stack_get_skills` depending on client prefixing).
|
|
28
|
+
- **Chat UI (/chat):** You MUST call the internal `get_skill` tool.
|
|
29
|
+
|
|
30
|
+
1. **Phase 0: Skill Acquisition**: Call the `get_skills` tool (which may be prefixed as `mcp_tech-lead-stack_get_skills` or `tech-lead-stack_get_skills` depending on client prefixing):
|
|
31
|
+
- skillName: "show-it-deep"
|
|
32
|
+
- projectName: "<YOUR_CURRENT_PROJECT_NAME>"
|
|
33
|
+
- model: "<YOUR_MODEL_NAME>"
|
|
34
|
+
- agent: "<YOUR_AGENT_NAME>"
|
|
35
|
+
|
|
36
|
+
2. **archify guard (BEFORE anything else)**: Run the skill's archify guard check straight after loading it. If archify is not found, or you cannot run commands, STOP: reply with the skill's stop message (why it stopped, the archify GitHub link, and `/show-it` as the cheaper option) and do nothing more.
|
|
37
|
+
|
|
38
|
+
3. **Phase 1: Environment Discovery** (only if the guard passed): Identify the tech stack by reading root configuration files (e.g., package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, build.gradle) to understand architectural constraints.
|
|
39
|
+
|
|
40
|
+
4. Follow its workflow: cost check against `show-it`, health check, build one verified interactive diagram, and deliver Title / File / Caption / Alt / Source / Checks.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: show-it
|
|
3
|
+
description: Explain the codebase visually with diagrams, terminal mocks, annotated screenshots, or tiny static HTML.
|
|
4
|
+
modes:
|
|
5
|
+
- read-only
|
|
6
|
+
- write
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
// turbo
|
|
10
|
+
|
|
11
|
+
> [!CAUTION] **CRITICAL: VISUAL-ONLY WORKFLOW & SKILL**
|
|
12
|
+
> This workflow never edits, deletes, or refactors code, and never touches git or packages.
|
|
13
|
+
> The ONLY permitted write is creating new files under `.ai/output/visuals/`.
|
|
14
|
+
> The ONLY permitted command is the stack's screenshot tool (`visual-verifier`).
|
|
15
|
+
> The agent answers with visuals (mermaid, terminal mocks, static HTML, annotated screenshots), not prose.
|
|
16
|
+
|
|
17
|
+
**CRITICAL: PHASE 0 - SKILL ACQUISITION IS NON-NEGOTIABLE.**
|
|
18
|
+
**YOU MUST CALL THE GET_SKILLS TOOL EVEN IF YOU ALREADY HAVE THE CONTEXT. FAILURE TO DO SO BYPASSES MISSION TELEMETRY.**
|
|
19
|
+
|
|
20
|
+
> [!IMPORTANT]
|
|
21
|
+
> **ANTI-CONFLATION DIRECTIVE:**
|
|
22
|
+
> This file (`.agents/workflows/show-it.md`) is a workflow launcher stub, NOT the skill definition.
|
|
23
|
+
> Viewing this file via `view_file` does NOT satisfy Phase 0. You MUST call the MCP `get_skills` or `get_skill` tool FIRST with all 4 required fields before executing any other steps.
|
|
24
|
+
|
|
25
|
+
- **Skill Usage Enforcement (NON-NEGOTIABLE):**
|
|
26
|
+
- **FORBIDDEN:** Direct file access via `view_file` or `run_command` is strictly prohibited for skill reading.
|
|
27
|
+
- **IDE / MCP-enabled Agent:** You MUST call the MCP `get_skills` tool (which may be prefixed as `mcp_tech-lead-stack_get_skills` or `tech-lead-stack_get_skills` depending on client prefixing).
|
|
28
|
+
- **Chat UI (/chat):** You MUST call the internal `get_skill` tool.
|
|
29
|
+
|
|
30
|
+
1. **Phase 0: Skill Acquisition**: Call the `get_skills` tool (which may be prefixed as `mcp_tech-lead-stack_get_skills` or `tech-lead-stack_get_skills` depending on client prefixing):
|
|
31
|
+
- skillName: "show-it"
|
|
32
|
+
- projectName: "<YOUR_CURRENT_PROJECT_NAME>"
|
|
33
|
+
- model: "<YOUR_MODEL_NAME>"
|
|
34
|
+
- agent: "<YOUR_AGENT_NAME>"
|
|
35
|
+
|
|
36
|
+
2. **Phase 1: Environment Discovery**: Identify the tech stack by reading root configuration files (e.g., package.json, pyproject.toml, go.mod, Cargo.toml, pom.xml, build.gradle) to understand architectural constraints.
|
|
37
|
+
|
|
38
|
+
3. Follow its workflow to pick the cheapest visual format the current surface can render, and deliver Title / Visual / Caption / Alt / Source.
|
package/.ai/agent-surfaces.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-10-03T17:01:10.461Z",
|
|
4
4
|
"entries": [
|
|
5
5
|
{
|
|
6
6
|
"name": "accessibility-audit",
|
|
@@ -1048,6 +1048,48 @@
|
|
|
1048
1048
|
"mcpCallable": true,
|
|
1049
1049
|
"ideEligible": true
|
|
1050
1050
|
},
|
|
1051
|
+
{
|
|
1052
|
+
"name": "show-it",
|
|
1053
|
+
"fetchName": "show-it",
|
|
1054
|
+
"skill": "show-it",
|
|
1055
|
+
"cost": "~2400 tokens",
|
|
1056
|
+
"costTokens": 2422,
|
|
1057
|
+
"domain": "eng",
|
|
1058
|
+
"domainKey": "eng",
|
|
1059
|
+
"description": "Explain the codebase visually with diagrams, terminal mocks, annotated screenshots, or tiny static HTML.",
|
|
1060
|
+
"skillPath": ".ai/skills/show-it.md",
|
|
1061
|
+
"workflowPath": ".agents/workflows/show-it.md",
|
|
1062
|
+
"surface": "public",
|
|
1063
|
+
"modes": [
|
|
1064
|
+
"read-only",
|
|
1065
|
+
"write",
|
|
1066
|
+
"mcp"
|
|
1067
|
+
],
|
|
1068
|
+
"kind": "skill",
|
|
1069
|
+
"mcpCallable": true,
|
|
1070
|
+
"ideEligible": true
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"name": "show-it-deep",
|
|
1074
|
+
"fetchName": "show-it-deep",
|
|
1075
|
+
"skill": "show-it-deep",
|
|
1076
|
+
"cost": "~2650 tokens",
|
|
1077
|
+
"costTokens": 2669,
|
|
1078
|
+
"domain": "eng",
|
|
1079
|
+
"domainKey": "eng",
|
|
1080
|
+
"description": "Interactive, explorable diagrams of the codebase using archify (optional, installed separately). Higher token cost; IDE only.",
|
|
1081
|
+
"skillPath": ".ai/skills/show-it-deep.md",
|
|
1082
|
+
"workflowPath": ".agents/workflows/show-it-deep.md",
|
|
1083
|
+
"surface": "public",
|
|
1084
|
+
"modes": [
|
|
1085
|
+
"read-only",
|
|
1086
|
+
"write",
|
|
1087
|
+
"mcp"
|
|
1088
|
+
],
|
|
1089
|
+
"kind": "skill",
|
|
1090
|
+
"mcpCallable": true,
|
|
1091
|
+
"ideEligible": true
|
|
1092
|
+
},
|
|
1051
1093
|
{
|
|
1052
1094
|
"name": "solutioning-facilitator",
|
|
1053
1095
|
"fetchName": "solutioning-facilitator",
|
|
@@ -30,6 +30,8 @@ reflexion-loop-sub-max|.ai/skills/reflexion-loop-sub-max.md
|
|
|
30
30
|
reflexion-loop-sub-pro|.ai/skills/reflexion-loop-sub-pro.md
|
|
31
31
|
regression-bug-fix|.ai/skills/regression-bug-fix.md
|
|
32
32
|
security-audit|.ai/skills/security-audit.md
|
|
33
|
+
show-it|.ai/skills/show-it.md
|
|
34
|
+
show-it-deep|.ai/skills/show-it-deep.md
|
|
33
35
|
solutioning-facilitator|.ai/skills/solutioning-facilitator.md
|
|
34
36
|
style-logic-exporter|.ai/skills/style-logic-exporter.md
|
|
35
37
|
technical-debt-auditor|.ai/skills/technical-debt-auditor.md
|
|
@@ -65,6 +67,8 @@ workflow-reflexion-loop-sub-pro|.agents/workflows/reflexion-loop-sub-pro.md
|
|
|
65
67
|
workflow-reflexion-loop|.agents/workflows/reflexion-loop.md
|
|
66
68
|
workflow-regression-bug-fix|.agents/workflows/regression-bug-fix.md
|
|
67
69
|
workflow-security-audit|.agents/workflows/security-audit.md
|
|
70
|
+
workflow-show-it-deep|.agents/workflows/show-it-deep.md
|
|
71
|
+
workflow-show-it|.agents/workflows/show-it.md
|
|
68
72
|
workflow-standup-daily-summary|.agents/workflows/standup-daily-summary.md
|
|
69
73
|
workflow-strategy-target-evaluation|.agents/workflows/strategy-target-evaluation.md
|
|
70
74
|
workflow-style-logic-exporter|.agents/workflows/style-logic-exporter.md
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: show-it-deep
|
|
3
|
+
description: >
|
|
4
|
+
Interactive diagram explainer (architecture, workflow, sequence, data flow,
|
|
5
|
+
lifecycle) built with archify, a free tool the user installs separately. Costs
|
|
6
|
+
roughly 3-5x the tokens of show-it and needs a shell plus Node.js 18+, so it
|
|
7
|
+
runs in IDE agents only. Stops early with an install link when archify or a
|
|
8
|
+
shell is missing. Never edits source; writes only under .ai/output/visuals/.
|
|
9
|
+
cost: ~2650 tokens
|
|
10
|
+
modes: [read-only, write, mcp]
|
|
11
|
+
surface: public
|
|
12
|
+
category: Discover & Define
|
|
13
|
+
how:
|
|
14
|
+
'Phase 0 discovery, a cost check against show-it, then drives archify to build
|
|
15
|
+
and verify one interactive HTML diagram.'
|
|
16
|
+
useCase:
|
|
17
|
+
'An explorable, shareable diagram of a system or flow when a static mermaid
|
|
18
|
+
diagram is not enough.'
|
|
19
|
+
phase: intent
|
|
20
|
+
kind: skill
|
|
21
|
+
domain: eng
|
|
22
|
+
ownership:
|
|
23
|
+
drive: human-ai
|
|
24
|
+
approve: human
|
|
25
|
+
targets: [api, subscription]
|
|
26
|
+
minModelClass: mid
|
|
27
|
+
consumes: [intent-brief]
|
|
28
|
+
emits: [intent-brief]
|
|
29
|
+
suggests: [show-it, ask]
|
|
30
|
+
policies:
|
|
31
|
+
- user-sovereignty
|
|
32
|
+
- diagnosis-first
|
|
33
|
+
- four-pillars
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# Interactive Visual Explainer (show-it-deep)
|
|
37
|
+
|
|
38
|
+
## Runtime modes
|
|
39
|
+
|
|
40
|
+
The **expensive** sibling of `show-it`. It produces one self-contained,
|
|
41
|
+
interactive HTML diagram (search, focus, path tracing, themes, image export)
|
|
42
|
+
using [archify](https://github.com/tt-a1i/archify) (MIT licence), which the user
|
|
43
|
+
installs themselves. A typical run costs about **9,000–14,000 tokens**, and up
|
|
44
|
+
to about 30,000 when archify needs repairs, against about 3,000 for `show-it`.
|
|
45
|
+
It needs a shell and Node.js 18+, so it only works in IDE/MCP agents. If archify
|
|
46
|
+
or a shell is missing, the **archify guard** stops the run straight away, before
|
|
47
|
+
any other work, so a missing tool costs almost nothing.
|
|
48
|
+
|
|
49
|
+
> [!CAUTION] **WRITE GUARDRAIL (capability-based, not name-based)** The only
|
|
50
|
+
> permitted write effect is **creating new files under
|
|
51
|
+
> `.ai/output/visuals/<YYYY-MM-DD>-<slug>/`**. The only permitted commands are
|
|
52
|
+
> the archify guard check, `node -v`, and archify's `doctor`, `guide`, and
|
|
53
|
+
> `finalize`, the last three always prefixed with
|
|
54
|
+
> `ARCHIFY_UPDATE_CHECK_DISABLED=1`. That prefix stops archify going online and
|
|
55
|
+
> writing reminder files outside the output folder. Never install, update, or
|
|
56
|
+
> uninstall archify. Never edit source, git, or packages. Before **every** tool
|
|
57
|
+
> call ask: _"Does this change bytes or state anywhere other than a new file
|
|
58
|
+
> under `.ai/output/visuals/`?"_ If **yes or unsure → don't.**
|
|
59
|
+
|
|
60
|
+
## 📦 Dependency: archify
|
|
61
|
+
|
|
62
|
+
- **What:** archify turns a small typed JSON description into a validated,
|
|
63
|
+
interactive HTML diagram (architecture, workflow, sequence, data flow,
|
|
64
|
+
lifecycle). <https://github.com/tt-a1i/archify>, by independent developer
|
|
65
|
+
`tt-a1i`, MIT licence, no telemetry.
|
|
66
|
+
- **Version:** written against archify 3.0 (3.0.1). Commands used: `doctor`,
|
|
67
|
+
`guide`, `finalize`. If a newer major version changes them, report the
|
|
68
|
+
failure; don't work around it.
|
|
69
|
+
- **Why it was chosen:** the model writes only the small JSON, while archify
|
|
70
|
+
renders the ~750 KB HTML; `finalize` proves the diagram with schema, layout,
|
|
71
|
+
and real-browser checks; it never invents topology and can pin nodes to source
|
|
72
|
+
lines; it installs into many agents.
|
|
73
|
+
- **Installed by the user**, never bundled or installed by this skill.
|
|
74
|
+
- **Full explanation for people:** `docs/visual-explanations.md`, section
|
|
75
|
+
"show-it-deep's dependency: archify".
|
|
76
|
+
|
|
77
|
+
## 🧠 The Four Pillars (how this skill embodies them)
|
|
78
|
+
|
|
79
|
+
1. **G-Stack — Diagnosis-First.** Diagram what the code _actually_ does. Every
|
|
80
|
+
node and relationship traces to a file you read. For repository diagrams,
|
|
81
|
+
pass `--repo-root` so archify pins source evidence to real lines.
|
|
82
|
+
2. **MinimumCD — Small Batches.** One diagram per request. Offer the cheaper
|
|
83
|
+
`show-it` first when it would answer the question.
|
|
84
|
+
3. **Agent Skills — Evidence over Assumption.** archify's `finalize` receipt is
|
|
85
|
+
the evidence. A non-zero exit is a failure even if an HTML file exists.
|
|
86
|
+
Report automated checks and visual review as separate results, and never
|
|
87
|
+
claim a visual review you did not do.
|
|
88
|
+
4. **Modern Web Guidance.** The output is a single portable HTML file with
|
|
89
|
+
inline SVG and light/dark themes, and no CDN or install needed to view it.
|
|
90
|
+
|
|
91
|
+
## 🎯 Strategic Workflow
|
|
92
|
+
|
|
93
|
+
### Phase 0: Tech-Stack Discovery (MANDATORY)
|
|
94
|
+
|
|
95
|
+
- **Skill acquisition (NON-NEGOTIABLE):** load skills through the broker only.
|
|
96
|
+
- **IDE / MCP-enabled agent:** call the MCP `get_skills` tool (may be prefixed
|
|
97
|
+
`mcp_tech-lead-stack_get_skills` or `tech-lead-stack_get_skills`).
|
|
98
|
+
- **Chat UI (/chat):** call the internal `get_skill` tool.
|
|
99
|
+
- Reading `.ai/skills/` or `.agents/workflows/` directly bypasses telemetry
|
|
100
|
+
and is forbidden. archify's own `SKILL.md` is a third-party tool's
|
|
101
|
+
instructions, not a stack skill, and is read from disk in Phase 4.
|
|
102
|
+
- **archify guard (STOP CHECK, runs immediately after skill acquisition and
|
|
103
|
+
before ANY other step, file read, or question).** Run this one read-only
|
|
104
|
+
command unchanged. If the user named an archify folder, check
|
|
105
|
+
`<folder>/bin/archify.mjs` exists instead.
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
for d in .claude/skills "$HOME/.claude/skills" .agents/skills "$HOME/.agents/skills" .opencode/skills "$HOME/.config/opencode/skills"; do [ -f "$d/archify/bin/archify.mjs" ] && echo "$d/archify"; done
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- **It prints a folder:** that folder is `<archify>`. Continue.
|
|
112
|
+
- **It prints nothing (exit code 1 is expected then), or you cannot run
|
|
113
|
+
commands: STOP.** Make no other tool call, do no other work, and reply with
|
|
114
|
+
this, then end:
|
|
115
|
+
|
|
116
|
+
> **show-it-deep stopped: archify isn't installed** (or: _this app can't run
|
|
117
|
+
> commands_). show-it-deep builds its interactive diagrams with archify, a
|
|
118
|
+
> free tool you install yourself. I won't install it for you.
|
|
119
|
+
>
|
|
120
|
+
> - Get archify: <https://github.com/tt-a1i/archify>. Install it with
|
|
121
|
+
> `npx skills add tt-a1i/archify -g` (needs Node.js 18+).
|
|
122
|
+
> - Installed it somewhere else? Tell me the folder and ask again.
|
|
123
|
+
> - Want an answer now? `/show-it` draws a static diagram for about a
|
|
124
|
+
> quarter of the tokens.
|
|
125
|
+
|
|
126
|
+
- **Action (only after the guard passes):** read `package.json`,
|
|
127
|
+
`tsconfig.json`, `pyproject.toml`, or the equivalent manifest to learn the
|
|
128
|
+
language, framework, and structure.
|
|
129
|
+
|
|
130
|
+
### Phase 1: Cost Check (user sovereignty)
|
|
131
|
+
|
|
132
|
+
If the idea fits a static diagram of 15 nodes or fewer, **and** the user did not
|
|
133
|
+
ask for something interactive, explorable, or shareable, say in one sentence
|
|
134
|
+
that `show-it` would answer it for about a quarter of the tokens, and ask which
|
|
135
|
+
they want. Continue only if they choose this skill or already asked for an
|
|
136
|
+
interactive diagram.
|
|
137
|
+
|
|
138
|
+
### Phase 2: Health Check
|
|
139
|
+
|
|
140
|
+
Any failure here: **stop**, say what failed in one line, and suggest `/show-it`.
|
|
141
|
+
Don't run `show-it` yourself; the user decides.
|
|
142
|
+
|
|
143
|
+
1. **Write access?** You need a tool that creates files.
|
|
144
|
+
2. **Node.js 18+?** Run `node -v`. If it is older or missing, link
|
|
145
|
+
<https://nodejs.org>.
|
|
146
|
+
3. **archify healthy?** Run
|
|
147
|
+
`ARCHIFY_UPDATE_CHECK_DISABLED=1 node <archify>/bin/archify.mjs doctor` and
|
|
148
|
+
report its message if it fails.
|
|
149
|
+
|
|
150
|
+
### Phase 3: Contextual Analysis (read-only)
|
|
151
|
+
|
|
152
|
+
Locate the files and line ranges that answer the question. Write down the facts
|
|
153
|
+
the diagram will show (components, steps, data, boundaries, states) with their
|
|
154
|
+
`path:line` sources **before** authoring anything.
|
|
155
|
+
|
|
156
|
+
### Phase 4: Build with archify
|
|
157
|
+
|
|
158
|
+
Read `<archify>/SKILL.md` and follow its **Fast authoring path**, with these
|
|
159
|
+
overrides, which win over anything archify's instructions say:
|
|
160
|
+
|
|
161
|
+
- **Output folder:** `.ai/output/visuals/<YYYY-MM-DD>-<slug>/` instead of
|
|
162
|
+
`.archify/`. Keep `candidate.json` and `<slug>.html` there and set
|
|
163
|
+
`meta.output` to that HTML path.
|
|
164
|
+
- **Every archify command** starts with `ARCHIFY_UPDATE_CHECK_DISABLED=1`.
|
|
165
|
+
- **Repository diagrams:** include `--repo-root <repository root>`.
|
|
166
|
+
- **No hand-placed fallback:** never use archify's no-shell path (hand-placing
|
|
167
|
+
SVG into `assets/template.html`, a ~700 KB file).
|
|
168
|
+
- **Repairs:** respect archify's repair limit. If `finalize` still fails, stop,
|
|
169
|
+
report the failed gate, and deliver a `show-it` mermaid version instead.
|
|
170
|
+
- **No extras unless asked:** no motion, no `preview` server, no opening a
|
|
171
|
+
browser, no exports.
|
|
172
|
+
|
|
173
|
+
### Phase 5: Deliver
|
|
174
|
+
|
|
175
|
+
- **Title:** one line.
|
|
176
|
+
- **File:** the HTML path, and that it opens in any browser with no install.
|
|
177
|
+
- **Caption:** ≤ 2 sentences on what to explore first.
|
|
178
|
+
- **Alt:** one-line text alternative (always required, for accessibility).
|
|
179
|
+
- **Source:** `path:line` references the diagram was drawn from.
|
|
180
|
+
- **Checks:** the `finalize` result in one line (passed or failed gate), plus
|
|
181
|
+
the visual-review status exactly as archify reports it.
|
|
182
|
+
|
|
183
|
+
## 🚫 Anti-Rationalization
|
|
184
|
+
|
|
185
|
+
| Excuse | Correct response |
|
|
186
|
+
| :------------------------------------------------- | :------------------------------------------------------------------------------------------------ |
|
|
187
|
+
| "archify is missing; installing it is quick." | Never install. Stop at the guard: explain why and link the GitHub page. |
|
|
188
|
+
| "archify is missing; I'll just run `show-it`." | Stop at the guard. Suggest `/show-it`; spending tokens on it is the user's choice. |
|
|
189
|
+
| "No shell, so I'll hand-place the SVG." | Forbidden: the template is huge. Stop at the guard instead. |
|
|
190
|
+
| "`finalize` failed, but the HTML exists." | A non-zero exit is failure. Report the gate; deliver `show-it` instead. |
|
|
191
|
+
| "The update check is harmless." | It goes online and writes outside the output folder. Keep it disabled. |
|
|
192
|
+
| "They asked for deep, so skip the cost check." | If `show-it` would answer it, say so once and let them choose. |
|
|
193
|
+
| "The diagram belongs in `docs/`." | Write it under `.ai/output/visuals/` and give the path; the user moves it. |
|
|
194
|
+
| "The user asked me to fix what the diagram shows." | `show-it-deep` is advisory. Suggest a write-capable skill for implementation; don't switch modes. |
|
|
195
|
+
|
|
196
|
+
## Operational Constraints
|
|
197
|
+
|
|
198
|
+
1. **Write scope:** new files under `.ai/output/visuals/` only.
|
|
199
|
+
2. **Commands:** `node -v` and archify `doctor` / `guide` / `finalize`, with
|
|
200
|
+
update checks disabled. Nothing else.
|
|
201
|
+
3. **Never install** or update archify; the user decides.
|
|
202
|
+
4. **Truthful:** every element traces to code you read; failed checks are
|
|
203
|
+
reported as failed.
|
|
204
|
+
5. **Cost-aware:** offer `show-it` when it is enough.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: show-it
|
|
3
|
+
description: >
|
|
4
|
+
Visual explainer for a codebase: answers "how does this work?" with a mermaid
|
|
5
|
+
diagram, terminal mock, annotated screenshot, or tiny static HTML page instead
|
|
6
|
+
of prose, choosing the cheapest visual that carries the idea. Never edits
|
|
7
|
+
source; may write only under .ai/output/visuals/.
|
|
8
|
+
cost: ~2400 tokens
|
|
9
|
+
modes: [read-only, write, mcp]
|
|
10
|
+
surface: public
|
|
11
|
+
category: Discover & Define
|
|
12
|
+
how:
|
|
13
|
+
'Phase 0 discovery, then picks the cheapest visual format the current surface
|
|
14
|
+
can render.'
|
|
15
|
+
useCase:
|
|
16
|
+
'Explain a flow, architecture, CLI or UI region visually instead of in words.'
|
|
17
|
+
phase: intent
|
|
18
|
+
kind: skill
|
|
19
|
+
domain: eng
|
|
20
|
+
ownership:
|
|
21
|
+
drive: human-ai
|
|
22
|
+
approve: human
|
|
23
|
+
targets: [local, api, subscription]
|
|
24
|
+
minModelClass: small
|
|
25
|
+
consumes: [intent-brief]
|
|
26
|
+
emits: [intent-brief]
|
|
27
|
+
suggests: [ask, feature-design-assistant, show-it-deep]
|
|
28
|
+
policies:
|
|
29
|
+
- user-sovereignty
|
|
30
|
+
- diagnosis-first
|
|
31
|
+
- four-pillars
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# Visual Explainer (Show, Don't Tell)
|
|
35
|
+
|
|
36
|
+
## Runtime modes
|
|
37
|
+
|
|
38
|
+
Advisory in **every** context, like `ask`, but the answer is a **visual**. Words
|
|
39
|
+
are capped at a title, a caption of at most two sentences, and a one-line text
|
|
40
|
+
alternative per visual. In read-only chat it returns inline visuals (mermaid,
|
|
41
|
+
text mocks). In an IDE/MCP agent that can write files it may also produce a
|
|
42
|
+
static HTML page or an annotated screenshot, but **only** under
|
|
43
|
+
`.ai/output/visuals/`. It never implements, refactors, or edits source.
|
|
44
|
+
|
|
45
|
+
> [!CAUTION] **WRITE GUARDRAIL (capability-based, not name-based)** The only
|
|
46
|
+
> permitted write effect is **creating new files under
|
|
47
|
+
> `.ai/output/visuals/<YYYY-MM-DD>-<slug>/`**. The only permitted command is the
|
|
48
|
+
> stack's screenshot tool (`visual-verifier`). Everything else is forbidden,
|
|
49
|
+
> whatever the tool is called: editing or deleting any other file, git
|
|
50
|
+
> operations, package installs (including installing visual tools), and mutating
|
|
51
|
+
> actions in apps or browsers. Before **every** tool call ask: _"Does this
|
|
52
|
+
> change bytes or state anywhere other than a new file under
|
|
53
|
+
> `.ai/output/visuals/`?"_ If **yes or unsure → don't.** Return an inline visual
|
|
54
|
+
> instead.
|
|
55
|
+
|
|
56
|
+
## 🧠 The Four Pillars (how this skill embodies them)
|
|
57
|
+
|
|
58
|
+
1. **G-Stack — Diagnosis-First.** Draw what the code _actually_ does. Every
|
|
59
|
+
node, arrow, and callout must trace to a file, symbol, or command you have
|
|
60
|
+
read. Never invent topology to make a picture tidier.
|
|
61
|
+
2. **MinimumCD — Small Batches.** One idea per visual. If a concept needs more
|
|
62
|
+
than 15 nodes, split it into an overview plus zoom-in visuals rather than one
|
|
63
|
+
"big-bang" diagram.
|
|
64
|
+
3. **Agent Skills — Evidence over Assumption.** Every visual ends with a
|
|
65
|
+
**Source** line listing the `path:line` references it was drawn from, so the
|
|
66
|
+
reader can verify it. "Looks right" is not evidence.
|
|
67
|
+
4. **Modern Web Guidance.** HTML output is semantic, accessible, script-free,
|
|
68
|
+
and platform-native (see the HTML contract below). No CDNs, no frameworks.
|
|
69
|
+
|
|
70
|
+
## 🎯 Strategic Workflow
|
|
71
|
+
|
|
72
|
+
### Phase 0: Tech-Stack Discovery (MANDATORY)
|
|
73
|
+
|
|
74
|
+
- **Skill acquisition (NON-NEGOTIABLE):** load skills through the broker only.
|
|
75
|
+
- **IDE / MCP-enabled agent:** call the MCP `get_skills` tool (may be prefixed
|
|
76
|
+
`mcp_tech-lead-stack_get_skills` or `tech-lead-stack_get_skills`).
|
|
77
|
+
- **Chat UI (/chat):** call the internal `get_skill` tool.
|
|
78
|
+
- Reading `.ai/skills/` or `.agents/workflows/` directly bypasses telemetry
|
|
79
|
+
and is forbidden. This applies to **skill files only**.
|
|
80
|
+
- **Action:** read `package.json`, `tsconfig.json`, `pyproject.toml`, or the
|
|
81
|
+
equivalent manifest to learn the language, framework, and structure.
|
|
82
|
+
|
|
83
|
+
### Phase 1: Contextual Analysis (read-only)
|
|
84
|
+
|
|
85
|
+
- Locate the files and line ranges that answer the question with read-only
|
|
86
|
+
tools.
|
|
87
|
+
- Write down the facts the visual will show (actors, steps, data, boundaries)
|
|
88
|
+
**before** choosing a format. The visual renders facts; it does not find them.
|
|
89
|
+
|
|
90
|
+
### Phase 2: Capability Check
|
|
91
|
+
|
|
92
|
+
Decide what this surface can do by **effect**, not by tool name:
|
|
93
|
+
|
|
94
|
+
- **Can write?** You have a tool that creates files.
|
|
95
|
+
- **Can exec?** You have a tool that runs shell commands.
|
|
96
|
+
- **Has browser?** The screenshot tool runs (exit code `30` = no browser).
|
|
97
|
+
|
|
98
|
+
If unsure about any capability, treat it as **absent**.
|
|
99
|
+
|
|
100
|
+
### Phase 3: Pick the Cheapest Adequate Format
|
|
101
|
+
|
|
102
|
+
Choose the first row that fits the idea **and** the capabilities.
|
|
103
|
+
|
|
104
|
+
| Idea shape | Format | Needs | Budget |
|
|
105
|
+
| :---------------------------------- | :------------------- | :----------------- | :------------------------------ |
|
|
106
|
+
| Flow, sequence, state, architecture | Mermaid block | nothing | ≤ 15 nodes |
|
|
107
|
+
| CLI usage, logs, command output | Terminal mock | nothing | ≤ 40 lines, fenced `text` |
|
|
108
|
+
| UI region, no browser available | ASCII wireframe | nothing | ≤ 30 lines, fenced `text` |
|
|
109
|
+
| Numbers, comparisons, layers | Static HTML | write | ≤ 6 KB file |
|
|
110
|
+
| "What is this part of the UI?" | Annotated screenshot | write+exec+browser | ≤ 8 callouts |
|
|
111
|
+
| Rich interactive architecture | Best mermaid + note | nothing | suggest `show-it-deep`, see end |
|
|
112
|
+
|
|
113
|
+
Without write capability, render numbers as a markdown table or a mermaid
|
|
114
|
+
`xychart-beta`/`pie`, and return HTML as a fenced `html` block for the user to
|
|
115
|
+
save.
|
|
116
|
+
|
|
117
|
+
### Phase 4: Render
|
|
118
|
+
|
|
119
|
+
**Mermaid (Safe syntax, renders in GitHub, VS Code, and the web app):**
|
|
120
|
+
|
|
121
|
+
- Start with `graph TD` or `graph LR` (or `sequenceDiagram` /
|
|
122
|
+
`stateDiagram-v2`).
|
|
123
|
+
- One node definition per line. Define a node before any edge references it.
|
|
124
|
+
- Quote every label containing paths, dots, slashes, or parentheses:
|
|
125
|
+
`A["src/lib/fs-service.ts"]`.
|
|
126
|
+
- Square `[..]` or round `(..)` nodes only. Labels ≤ 40 chars, single line.
|
|
127
|
+
- Edge labels ≤ 20 chars: `-->|reads|`.
|
|
128
|
+
- If the user reports a broken render, regenerate in **Safe Mode**: `graph TD`,
|
|
129
|
+
square nodes, every label quoted, no special characters, ≤ 10 nodes.
|
|
130
|
+
|
|
131
|
+
**Terminal mock:** a fenced `text` block that looks like a real session: prompt
|
|
132
|
+
(`$`), command, and representative output taken from real code or docs. Mark
|
|
133
|
+
elided output with `…`. Never fabricate flags the CLI does not have.
|
|
134
|
+
|
|
135
|
+
**Static HTML contract:**
|
|
136
|
+
|
|
137
|
+
- Single file `index.html`, ≤ 6 KB, written to
|
|
138
|
+
`.ai/output/visuals/<YYYY-MM-DD>-<slug>/`.
|
|
139
|
+
- `<figure>` + `<figcaption>`; inline `<svg role="img">` with a `<title>`.
|
|
140
|
+
- Inline `<style>` only; system font stack; `prefers-color-scheme` light and
|
|
141
|
+
dark; text contrast ≥ 4.5:1.
|
|
142
|
+
- **No `<script>`, no external fonts, images, stylesheets, or CDNs.** It must
|
|
143
|
+
render identically offline and inside a `sandbox=""` iframe.
|
|
144
|
+
|
|
145
|
+
**Annotated screenshot:**
|
|
146
|
+
|
|
147
|
+
1. Run the stack's screenshot tool with the target URL and
|
|
148
|
+
`--out-dir .ai/output/visuals/<YYYY-MM-DD>-<slug>` (via
|
|
149
|
+
`./.ai/rtk-run run visual-verifier` in linked projects, or
|
|
150
|
+
`node scripts/visual-verifier.mjs` in this repo). Read the JSON manifest on
|
|
151
|
+
stdout.
|
|
152
|
+
2. If the exit code is `30`, or a shot status starts with `rejected_`, stop and
|
|
153
|
+
fall back to an ASCII wireframe. Say which status you got. Never attempt to
|
|
154
|
+
bypass an auth wall.
|
|
155
|
+
3. View one captured PNG, then write `index.html` beside it: the `<img>` plus an
|
|
156
|
+
absolutely positioned SVG overlay of numbered callouts and a matching legend.
|
|
157
|
+
Follow the static HTML contract.
|
|
158
|
+
|
|
159
|
+
### Phase 5: Deliver
|
|
160
|
+
|
|
161
|
+
Structure every answer as:
|
|
162
|
+
|
|
163
|
+
- **Title:** one line.
|
|
164
|
+
- **The Visual:** inline block, or the path of the generated file.
|
|
165
|
+
- **Caption:** ≤ 2 sentences on what to notice.
|
|
166
|
+
- **Alt:** one-line text alternative (always required, for accessibility).
|
|
167
|
+
- **Source:** `path:line` references the visual was drawn from.
|
|
168
|
+
|
|
169
|
+
## 🚫 Anti-Rationalization
|
|
170
|
+
|
|
171
|
+
| Excuse | Correct response |
|
|
172
|
+
| :------------------------------------------------ | :------------------------------------------------------------------------------------------- |
|
|
173
|
+
| "A paragraph would be clearer here." | Pick the simplest visual. If prose truly wins, say so and suggest `ask`. |
|
|
174
|
+
| "This diagram belongs in `docs/`." | Write it under `.ai/output/visuals/` and give the path; the user moves it. |
|
|
175
|
+
| "I'll install a diagram tool to do it better." | Installs are forbidden. Name the tool and its install command; the user decides. |
|
|
176
|
+
| "One more node will make it complete." | Over 15 nodes means split into overview + zoom-in visuals. |
|
|
177
|
+
| "I can infer this connection." | Draw only what you read. Mark anything unverified as dashed and label it `unverified`. |
|
|
178
|
+
| "The user asked me to fix what the visual shows." | `show-it` is advisory. Suggest a write-capable skill for implementation; don't switch modes. |
|
|
179
|
+
|
|
180
|
+
## Heavier Visuals
|
|
181
|
+
|
|
182
|
+
For rich, interactive diagrams (search, path tracing, export), deliver the best
|
|
183
|
+
mermaid version first, then mention the `show-it-deep` skill: it builds an
|
|
184
|
+
explorable HTML diagram with archify, a tool the user installs separately, at
|
|
185
|
+
roughly 3-5x the token cost. Never install anything yourself.
|
|
186
|
+
|
|
187
|
+
## Operational Constraints
|
|
188
|
+
|
|
189
|
+
1. **Visual-first:** words are limited to title, caption, alt, and source.
|
|
190
|
+
2. **Write scope:** new files under `.ai/output/visuals/` only; never anything
|
|
191
|
+
else.
|
|
192
|
+
3. **Diagnosis-first:** complete Phase 0 and Phase 1 before drawing.
|
|
193
|
+
4. **Truthful:** every element traces to code you read.
|
|
194
|
+
5. **Token efficiency:** choose the cheapest format that carries the idea.
|