Skip to content

Commit 5bc6f99

Browse files
committed
feat: add compact output layout with simple onboarding entry files
1 parent 6a732b6 commit 5bc6f99

File tree

8 files changed

+332
-33
lines changed

8 files changed

+332
-33
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ __pycache__/
55
# Skill local outputs
66
code-explainer/.out*/
77
code-explainer/.out-gh/
8+
code-explainer/.ci-out/
9+
code-explainer/code-explainer-output/
810

911
# OS/editor
1012
.DS_Store
1113
Thumbs.db
1214
.vscode/
1315
.idea/
14-

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

55
Outputs include:
66

7-
- Crisp top-level overview (`OVERVIEW.md`)
8-
- Linked deep explainers (architecture, modules, flows, dependencies, glossary)
9-
- Interactive HTML explainer (`html/ONBOARDING.html`)
7+
- Compact entry files by default:
8+
- `START_HERE.md`
9+
- `DEEP_DIVE.md`
10+
- `ONBOARDING.html`
11+
- Detailed artifacts under `_details/`:
12+
- overview/deep markdown docs
13+
- diagrams (`.mmd`, `svg`, `png`)
14+
- metadata reports (`meta/*.json`)
1015
- Mermaid source diagrams (`.mmd`)
1116
- Rendered SVG and PNG diagrams
1217
- Confidence, attribution, and quality reports (`meta/*.json`)
@@ -145,9 +150,10 @@ powershell -ExecutionPolicy Bypass -File .\install_to_codex.ps1
145150
cd code-explainer
146151
python scripts/analyze.py analyze \
147152
--source <local_path_or_github_url> \
148-
--output <output_dir> \
153+
--output <optional_output_dir> \
149154
--mode standard \
150155
--format both \
156+
--output-layout compact \
151157
--explainer-type onboarding \
152158
--audience nontech \
153159
--overview-length medium \
@@ -157,11 +163,17 @@ python scripts/analyze.py analyze \
157163
--enable-web-enrichment true
158164
```
159165

166+
Output path defaults:
167+
168+
- Local folder source: `<source>/code-explainer-output`
169+
- GitHub URL source: `<current-working-directory>/code-explainer-output`
170+
160171
Useful optional controls:
161172

162173
- `--include-glob "<pattern>"` (repeatable) to scope analysis to specific paths
163174
- `--exclude-glob "<pattern>"` (repeatable) to remove generated/irrelevant files
164175
- `--format markdown|html|both`
176+
- `--output-layout compact|full` (`compact` is default)
165177
- `--explainer-type onboarding|project-recap|plan-review|diff-review`
166178
- `--since "<window>"` for `project-recap`
167179
- `--plan-file <path>` for `plan-review`

code-explainer/SKILL.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ Builds onboarding-grade repository explainers from local or GitHub sources.
1515

1616
## Output Model
1717

18-
Two-tier docs + rendered diagrams:
18+
Compact-first output + detailed artifacts:
1919

20-
1. `overview/OVERVIEW.md` for non-technical orientation.
21-
2. `deep/*.md` explainers for architecture, modules, flows, dependencies, and glossary.
22-
3. `diagrams/*.mmd` + rendered `diagrams/svg/*.svg` and `diagrams/png/*.png`.
23-
4. `meta/*.json` quality, confidence, and attribution artifacts.
20+
1. Compact entry files (default): `START_HERE.md`, `DEEP_DIVE.md`, `ONBOARDING.html`.
21+
2. Detailed artifacts under `_details/` in compact layout.
22+
3. Optional full layout writes docs/diagrams/meta directly under output root.
23+
4. Detailed docs include `overview/OVERVIEW.md` and `deep/*.md`.
24+
5. Diagrams include `.mmd`, `.svg`, and `.png`.
25+
6. Metadata includes quality, confidence, attribution, verification, and fact-check reports.
2426

2527
See `references/output-contract.md` for exact files and semantics.
2628

@@ -31,9 +33,10 @@ Run from this skill directory:
3133
```bash
3234
python scripts/analyze.py analyze \
3335
--source <local_path_or_github_url> \
34-
--output <output_dir> \
36+
--output <optional_output_dir> \
3537
--mode <quick|standard|deep> \
3638
--format <markdown|html|both> \
39+
--output-layout <compact|full> \
3740
--explainer-type <onboarding|project-recap|plan-review|diff-review> \
3841
--audience <nontech|mixed|engineering> \
3942
--overview-length <short|medium|long> \
@@ -52,13 +55,17 @@ Defaults:
5255

5356
- `mode=standard`
5457
- `format=both`
58+
- `output-layout=compact`
5559
- `explainer-type=onboarding`
5660
- `audience=nontech`
5761
- `overview-length=medium`
5862
- `llm-mode=auto`
5963
- `ask-before-llm-use=true` (interactive terminals)
6064
- `prompt-for-llm-key=true` (interactive terminals)
6165
- `enable-web-enrichment=true`
66+
- `output` is optional:
67+
- local source -> `<source>/code-explainer-output`
68+
- GitHub URL -> `<current-working-directory>/code-explainer-output`
6269

6370
## Dependencies
6471

code-explainer/references/mode-behavior.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ Goal: Maximum fidelity and audit-ready onboarding.
6262
- `--format both`: generate markdown + interactive HTML.
6363
- Default format is `both`.
6464

65+
## Output Layout
66+
67+
- `--output-layout compact`: default. Produces a minimal root with `START_HERE.md`, `DEEP_DIVE.md`, `ONBOARDING.html`, and stores full artifacts in `_details/`.
68+
- `--output-layout full`: writes the full docs/diagrams/meta tree directly under output root.
69+
- If `--output` is omitted:
70+
- Local source: output goes to `<source>/code-explainer-output`.
71+
- GitHub URL source: output goes to `<current-working-directory>/code-explainer-output`.
72+
6573
## Explainer Type
6674

6775
- `--explainer-type onboarding`: default onboarding narrative.

code-explainer/references/output-contract.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Output Contract
22

3-
`code-explainer` writes the following deterministic output tree under `<output>/`:
3+
`code-explainer` supports two output layouts:
4+
5+
1. `compact` (default)
6+
2. `full`
7+
8+
## Compact Layout (Default)
9+
10+
Written under `<output>/`:
11+
12+
1. `START_HERE.md`
13+
2. `DEEP_DIVE.md`
14+
3. `ONBOARDING.html` (when `--format html|both`)
15+
4. `_details/` containing the full artifact tree listed below
16+
17+
## Full Layout
18+
19+
Written directly under `<output>/`:
420

521
1. `overview/OVERVIEW.md` (when `--format markdown|both`)
622
2. `deep/ARCHITECTURE_DEEP.md` (when `--format markdown|both`)
@@ -33,6 +49,7 @@
3349
29. `meta/fact_check_report.json`
3450
30. `meta/content_completeness.json`
3551
31. `meta/quality_report.json`
52+
32. `meta/compact_output.json` (when `--output-layout compact`)
3653

3754
## Manifest Schema
3855

@@ -51,9 +68,11 @@
5168
- `audience`
5269
- `overview_length`
5370
- `output_format`
71+
- `output_layout`
5472
- `analysis_type`
5573
- `include_globs[]`
5674
- `exclude_globs[]`
75+
- `compact_entry_files[]`
5776
- `docs_discovered`
5877
- `docs_parsed`
5978
- `llm_descriptions_enabled`

0 commit comments

Comments
 (0)