You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4.`install_to_codex.ps1` installs the current package cleanly.
18
+
4.`install_to_codex.ps1` copies the current package cleanly, including `package.json` and `package-lock.json`.
19
+
5.`meta/excalidraw_report.json` is part of the output contract and the self-audit proves editable scene generation.
20
20
21
21
Recommended:
22
22
23
23
```bash
24
24
cd code-explainer
25
+
pwsh ./scripts/install_runtime.ps1
25
26
python scripts/self_audit.py
26
27
```
27
28
@@ -49,11 +50,13 @@ Users need:
49
50
- Node.js `18+` and npm
50
51
- Git
51
52
52
-
Recommended for full diagram rendering:
53
+
Recommended for higher-fidelity diagram rendering:
53
54
54
55
- Mermaid CLI (`@mermaid-js/mermaid-cli`)
55
56
56
-
Even without live LLM access, the proof path still works through `CODE_EXPLAINER_MOCK_LLM=true`.
57
+
The repo also ships a local Excalidraw bridge dependency through `package.json`.
58
+
59
+
Even without live LLM access, the proof path still works through `CODE_EXPLAINER_MOCK_LLM=true`. Even if the official Excalidraw bridge is browser-dependent in the local environment, the shipped deterministic fallback scene generator keeps the editable-diagram proof path working and records the downgrade in `meta/excalidraw_report.json`.
57
60
58
61
## GitHub Distribution
59
62
@@ -82,11 +85,13 @@ Suggested GitHub topics:
82
85
-`codebase-analysis`
83
86
-`onboarding`
84
87
-`mermaid`
88
+
-`excalidraw`
85
89
-`developer-tools`
86
90
87
91
Useful publishing assets:
88
92
89
93
1. A short README section showing `overview/OVERVIEW.md`
90
-
2. One example diagram image
94
+
2. One example Mermaid diagram and one example Excalidraw scene screenshot
91
95
3. The self-audit result summary
92
-
4. A release note that explains the rebuild from generic output to proof-backed output
96
+
4. The latest `audit-skill` report
97
+
5. A release note that explains the shift from generic output to proof-backed explanation plus editable diagrams
Copy file name to clipboardExpand all lines: README.md
+35-9Lines changed: 35 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# code-explainer
2
2
3
-
`code-explainer` is a Codex skill for explaining a local repository or GitHub repository in simple, concrete language. The rebuilt version is explanation-first: it creates a grounded narrative plan, generates onboarding docs and focused diagrams from that plan, and scores the output for clarity, specificity, grounding, usefulness, and honesty.
3
+
`code-explainer` is a Codex skill for turning a local repository or GitHub repository URL into grounded onboarding material. It is explanation-first: it builds a narrative plan from real repo evidence, generates docs and diagrams from that plan, and proves output quality with a shipped self-audit.
4
4
5
5
## What It Produces
6
6
@@ -15,6 +15,9 @@ A standard run writes:
15
15
-`diagrams/*.mmd`
16
16
-`diagrams/svg/*.svg`
17
17
-`diagrams/png/*.png`
18
+
-`diagrams/excalidraw/*.excalidraw.json`
19
+
-`diagrams/excalidraw/svg/*.svg`
20
+
-`diagrams/excalidraw/png/*.png`
18
21
-`meta/*.json`
19
22
20
23
Important proof artifacts:
@@ -23,22 +26,27 @@ Important proof artifacts:
23
26
-`meta/explanation_quality.json`
24
27
-`meta/verification_checkpoint.json`
25
28
-`meta/fact_check_report.json`
29
+
-`meta/excalidraw_report.json`
26
30
-`meta/quality_report.json`
27
31
28
32
## Why This Version Is Better
29
33
30
-
The older build overpromised and produced generic output. This rebuild changes the contract:
34
+
The older build looked polished but produced weak output. The current contract is stricter:
31
35
32
-
- the explanation is planned before docs are written
33
-
- diagrams are tied to onboarding questions
34
-
- the quality gate can fail generic or weakly grounded output
35
-
- the repo ships fixture repos plus a self-audit path
36
+
- explanation planning happens before doc generation
37
+
- every diagram has an onboarding purpose
38
+
- Mermaid is the canonical diagram source
39
+
- editable Excalidraw scenes are generated from the same diagram set
40
+
- quality gates fail generic, weakly grounded, or incomplete output
41
+
- the repo ships fixture repos and a self-audit path
36
42
37
43
## Repository Layout
38
44
39
45
```text
40
46
code-explainer/
41
47
SKILL.md
48
+
package.json
49
+
package-lock.json
42
50
agents/openai.yaml
43
51
assets/
44
52
fixtures/
@@ -50,7 +58,7 @@ PUBLISHING.md
50
58
install_to_codex.ps1
51
59
```
52
60
53
-
## Install Runtime Dependencies
61
+
## Runtime Dependencies
54
62
55
63
Required:
56
64
@@ -62,6 +70,10 @@ Recommended:
62
70
63
71
- Mermaid CLI (`mmdc`) from `@mermaid-js/mermaid-cli`
This copies the skill into `~/.codex/skills/code-explainer`. Restart Codex after installation.
97
+
This copies the current skill package into `~/.codex/skills/code-explainer`. Restart Codex after installation, then run the skill runtime installer inside the installed copy if you need the local Node dependencies there.
- The skill exports editable Excalidraw scenes from that Mermaid set.
132
+
- If the official Excalidraw bridge works in the local runtime, it is used directly.
133
+
- If the official bridge is browser-dependent or unavailable, the skill falls back to a deterministic local scene generator for the Mermaid subset it emits and records that downgrade in `meta/excalidraw_report.json`.
113
134
114
135
## LLM Behavior
115
136
@@ -132,7 +153,12 @@ This runs the skill against fixture repositories in `assets/fixtures/` and write
132
153
133
154
## Current Status
134
155
135
-
The rebuilt skill audited at `97.1/100` and is currently `production-grade` under the local `audit-skill` rubric.
156
+
The current build audits at `98.8/100` and is `production-grade` under the local `audit-skill` rubric. The self-audit currently proves:
- This skill does not mutate the analyzed repository.
124
130
- If the explanation-quality score is below the rubric threshold, treat the output as failed even if files were produced.
131
+
- If Excalidraw export is enabled, treat missing or partial editable scene generation as a real quality issue, not a cosmetic extra.
132
+
- When the official Excalidraw bridge is unavailable or browser-dependent in the local runtime, the skill falls back to a deterministic local scene generator for the Mermaid subset it emits and records that downgrade in `meta/excalidraw_report.json`.
125
133
- Use include/exclude globs to narrow analysis when the repository is very large or noisy.
0 commit comments