codechart 0.9.0 → 1.0.1
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/CHANGELOG.md +65 -4
- package/LICENSE +1 -1
- package/README.md +25 -10
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/cli.js +4544 -2536
- package/dist/server.js +38 -16
- package/package.json +11 -11
- package/skills/codechart/SKILL.md +18 -8
- package/skills/codechart/business-guide.md +37 -0
- package/skills/codechart/example.md +6 -6
- package/skills/codechart/explain-guide.md +68 -0
- package/skills/codechart/flow-guide.md +3 -3
- package/skills/codechart/pr-maps.md +1 -1
- package/skills/codechart/release-guide.md +2 -2
- package/skills/codechart/spec-guide.md +12 -10
- package/templates/github-workflow.yml +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
What's new in each codechart release. Update with `codechart update`; the [releases page](https://github.com/
|
|
3
|
+
What's new in each codechart release. Update with `codechart update`; the [releases page](https://github.com/MiscomLab/codechart/releases) has the same notes.
|
|
4
|
+
|
|
5
|
+
## 1.0.1 (2026-11-19)
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- codechart moved to [github.com/MiscomLab/codechart](https://github.com/MiscomLab/codechart). Old links redirect. With the skills CLI, use `npx skills add MiscomLab/codechart`.
|
|
10
|
+
|
|
11
|
+
## 1.0.0 (2026-11-14)
|
|
12
|
+
|
|
13
|
+
1.0: stable. Change maps, flows, explain maps, business pages, release maps and PR maps, all checked against your code.
|
|
14
|
+
|
|
15
|
+
### New
|
|
16
|
+
|
|
17
|
+
- Explain map: ask your agent how an existing area works ("explain how billing works", "onboard me on checkout") and get a map of the code as it is, each box checked against your code.
|
|
18
|
+
- Explain maps have a *Flows* tab: up to five main behaviours of the area, step by step, each step on its line of code and linked to the box it happens in.
|
|
19
|
+
- *Side by side* on an explain map puts the components next to a flow: click a step and its box lights up, click a box and its steps light up. See [Explain map](https://github.com/MiscomLab/codechart/blob/main/docs/explain-map.md).
|
|
20
|
+
- Business page of how something works today, for a product owner, QA or support: who does what, every yes and no branch, rules, odd cases and saved data. Built from the area's explain map; read-only.
|
|
21
|
+
- Each kind of map box has its own outline and icon: an endpoint is a pill (⇄), a table has column ticks (▤), config is a tag (⚑), a file has a folded corner (≡). Colour still means only the status.
|
|
22
|
+
- Every map box and explain node has a short summary of what it does, at the top of its panel and inside the box.
|
|
23
|
+
- A *Not on map* entry that names paths and says why they are left out is drawn as a dashed *omitted* box in its area; its panel lists the changed files it covers.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- For a repo host other than github.com or gitlab.com, `gh` and `glab` get no token variables (`GH_TOKEN`, `GITLAB_TOKEN`…): log in once with `gh auth login --hostname` or `glab auth login --hostname`.
|
|
28
|
+
- Usage errors exit with code 2, other failures with 1: a bad flag value (unknown commit or agent), a flag on the wrong kind of map (`--git` on an explain map, `--pr` on a business map).
|
|
29
|
+
- Conflicting flags are refused with exit 2: `doctor --fix --last`, `update --check --skills-only`, `comment --side` without a line, `feedback --import --copy` without `--take`.
|
|
30
|
+
- `install-skill` outside a terminal without `--agent` installs only the skill and prints the flags that add the reminder line, Claude Code hook and OpenCode plugin; it used to add them all.
|
|
31
|
+
- `setup-pr-maps --pr` asks before it goes online or runs your git transport config. The GitHub workflow it writes pins `actions/checkout` and `actions/setup-node` to exact commits.
|
|
32
|
+
- The map check compares each new, changed and removed box with git's added, modified, deleted or renamed status, and warns, without failing, when a listed field or arrow isn't in the code.
|
|
33
|
+
- The check line in the terminal, the page header and PR or MR descriptions says how many boxes could not be checked: `✓ 10 nodes checked against the code · 2 not checkable`.
|
|
34
|
+
- Release maps say *Before* and *Now* with *New* and *Changed* badges; a feature of up to three cards moves to the next page whole; file names start with the version, like `v2-0-0--<title>`.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- On Windows, the `gh`, `glab`, `powershell` and `opencode` commands codechart runs are looked up on PATH first, so a file inside your repo can't stand in for one of them.
|
|
39
|
+
- `setup-pr-maps` won't write through a symlinked `.github` or `.github/workflows` or use a remote URL with escape characters; it and `doctor --last` strip control characters from repo text.
|
|
40
|
+
- Flow steps and map boxes that point at a secret-looking file (like `.env`) show "not shown: looks like a secret" instead of the line.
|
|
41
|
+
- The map section in a PR or MR description handles file names with blank lines or escape characters safely.
|
|
42
|
+
- `--md` output for business and release maps keeps the page title inside the code block, so image Markdown or HTML in a title no longer shows up in chat.
|
|
43
|
+
- A note of several lines keeps all of them after `codechart review`; a later line that looked like a diff row could move the note to another line.
|
|
44
|
+
- Saving a map no longer loses a note added with `codechart comment` at the same moment.
|
|
45
|
+
- Two hook runs at the same moment no longer lose a turn's snapshot, and the hook no longer hangs when the transcript path is a pipe.
|
|
46
|
+
- Importing page notes: a note on an item with a colon in its text keeps its own words, a line starting with `>` keeps its `>`, and a note on a long flow gap no longer marks the review damaged.
|
|
47
|
+
- The map check no longer warns about Terraform nested blocks, references like `module.vpc` or `var.x`, Go packages, `index` files or two boxes in one file, and accepts the other box's name.
|
|
48
|
+
- Plan vs built no longer says "built in another file" when only the path is spelled differently (`src\db.ts`, `./src/db.ts`, or relative to where you ran it).
|
|
49
|
+
- The "did you mean" hint for a flow step's missing file also offers files not yet added to git, and works for an anchor written Windows-style (`src\b.py:2`).
|
|
50
|
+
- The page's check line keeps each claim's colour: a green ✓ next to a red ✗, amber warnings, a muted `diff not checked`. A box whose path is outside the repo is labelled "outside the repo".
|
|
51
|
+
- `--git` sees renames even when your git config turns rename detection off.
|
|
52
|
+
- A path rule's `context: short` wins over `defaults.context: full` when it is the only rule that fired.
|
|
53
|
+
- `render --tech` no longer accepts an explain map for a business page of a change; it says a change map is needed.
|
|
54
|
+
- The map image in a PR or MR description no longer shows the page's review tick boxes.
|
|
55
|
+
- `setup-pr-maps --pr` run again before the setup request is merged links that request; on GitLab, a `stages:` list without `test` puts the job in your first stage, so the file stays valid.
|
|
56
|
+
- `release-context` keeps the PR text it read when a `(#N)` isn't a PR; after a timeout it stops and says which PRs were not read. On Windows a missing `gh` or `glab` is reported as not installed.
|
|
57
|
+
- `release-context` with no tag before the release commit lists every commit, for a first release. Tags not starting with `v` or a shallow clone get a message saying what to do.
|
|
58
|
+
- Clearer errors: a damaged review file says what to do; an unwritable output folder names the setting; `install-skill --dir` says why it can't create the folder; a failed push or fetch gives git's reason.
|
|
59
|
+
- Clearer input errors: a missing spec file says "no such file", an empty stdin says to pipe the spec in, `check --since`/`--head` say "is not a commit", a missing `release.browser` path is named.
|
|
60
|
+
- `feedback --import` reads the clipboard when stdin is an empty file or `/dev/null`, instead of failing with "No codechart review found".
|
|
61
|
+
- `uninstall` also removes copies installed with `install-skill --dir`; with `XDG_CONFIG_HOME` set, OpenCode's skill, reminder line and plugin stay together under `$XDG_CONFIG_HOME/opencode`.
|
|
62
|
+
- A stalled network connection no longer keeps codechart running for 10 seconds or more after the update check times out.
|
|
4
63
|
|
|
5
64
|
## 0.9.0 (2026-11-10)
|
|
6
65
|
|
|
@@ -29,7 +88,7 @@ What's new in each codechart release. Update with `codechart update`; the [relea
|
|
|
29
88
|
|
|
30
89
|
### Changed
|
|
31
90
|
|
|
32
|
-
- README is shorter, with a features table; details moved to pages under [docs](https://github.com/
|
|
91
|
+
- README is shorter, with a features table; details moved to pages under [docs](https://github.com/MiscomLab/codechart/tree/main/docs).
|
|
33
92
|
|
|
34
93
|
## 0.7.0 (2026-11-06)
|
|
35
94
|
|
|
@@ -72,7 +131,7 @@ What's new in each codechart release. Update with `codechart update`; the [relea
|
|
|
72
131
|
|
|
73
132
|
### New
|
|
74
133
|
|
|
75
|
-
- Maps in pull and merge requests: the map and its check overview in the description, re-rendered by CI on every push (GitHub and GitLab); set up with `setup-pr-maps`, see [PR maps](https://github.com/
|
|
134
|
+
- Maps in pull and merge requests: the map and its check overview in the description, re-rendered by CI on every push (GitHub and GitLab); set up with `setup-pr-maps`, see [PR maps](https://github.com/MiscomLab/codechart/blob/main/docs/pr-maps.md).
|
|
76
135
|
- `codechart update` installs the newest version and refreshes your skill copies and reminder lines; a once-a-day notice says when there is one (off with `updateCheck: false`).
|
|
77
136
|
- Summary maps flag changed files that no node covers, and say when the diff wasn't checked.
|
|
78
137
|
- HTML: browser Back/Forward and ← → buttons walk the nodes you opened; `#node=<id>` links open a node.
|
|
@@ -87,9 +146,11 @@ What's new in each codechart release. Update with `codechart update`; the [relea
|
|
|
87
146
|
|
|
88
147
|
## 0.3.1 (2026-11-03)
|
|
89
148
|
|
|
149
|
+
Not published to npm; these changes shipped in 0.4.0.
|
|
150
|
+
|
|
90
151
|
### Changed
|
|
91
152
|
|
|
92
|
-
- Security review fixes; see [security review](https://github.com/
|
|
153
|
+
- Security review fixes; see [security review](https://github.com/MiscomLab/codechart/blob/main/docs/security-review.md).
|
|
93
154
|
- Faster previews on big diffs (100 files: 1.8 s → 0.1 s) and shorter agent output (one error per missing file).
|
|
94
155
|
|
|
95
156
|
## 0.3.0 (2026-11-03)
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
9
|
<a href="https://www.npmjs.com/package/codechart"><img alt="npm" src="https://img.shields.io/npm/v/codechart"></a>
|
|
10
|
-
<a href="https://github.com/
|
|
11
|
-
<a href="https://skills.sh/
|
|
10
|
+
<a href="https://github.com/MiscomLab/codechart/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/MiscomLab/codechart/actions/workflows/ci.yml/badge.svg"></a>
|
|
11
|
+
<a href="https://skills.sh/MiscomLab/codechart"><img alt="skills.sh" src="https://skills.sh/b/MiscomLab/codechart"></a>
|
|
12
12
|
<img alt="Node 22.12+" src="https://img.shields.io/badge/node-%3E%3D22.12-339933">
|
|
13
13
|
<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-blue"></a>
|
|
14
14
|
</p>
|
|
@@ -52,18 +52,19 @@ backend
|
|
|
52
52
|
~ model PaymentMethod ─mirrors─▶ enum payment_method
|
|
53
53
|
|
|
54
54
|
config
|
|
55
|
-
+ migration: backfill invoi… ─
|
|
56
|
-
|
|
55
|
+
+ migration: backfill invoi… ─reads─────▶ INVOICE_PREFIX
|
|
56
|
+
─backfills─▶ invoices
|
|
57
|
+
◆ INVOICE_PREFIX
|
|
57
58
|
◆ feature flag refundsEnabl… ─gates─▶ endpoint POST /orders/{id}/refund
|
|
58
59
|
|
|
59
|
-
12 nodes · 4 new · 5 changed · 2 config · ✓ 10 checked
|
|
60
|
+
12 nodes · 4 new · 5 changed · 2 config · ✓ 10 checked · 2 not checkable
|
|
60
61
|
gaps: customers: columns besides id not read
|
|
61
62
|
not on map: tests: test_invoice_backfill.py · docs: CHANGELOG.md, .env.example
|
|
62
63
|
```
|
|
63
64
|
|
|
64
65
|
Open full map
|
|
65
66
|
|
|
66
|
-
New things are `+`, changed ones `~`, removed ones `-`, config `◆`; anything unmarked already existed. The block is a `diff` fence, so Claude Code, OpenCode, Codex, Gemini CLI, Cursor and GitHub colour the new and removed lines on their own. Layers are grouped, every relation is drawn, and `✓ 10 checked`
|
|
67
|
+
New things are `+`, changed ones `~`, removed ones `-`, config `◆`; anything unmarked already existed. The block is a `diff` fence, so Claude Code, OpenCode, Codex, Gemini CLI, Cursor and GitHub colour the new and removed lines on their own. Layers are grouped, every relation is drawn, and `✓ 10 checked` counts the claims checked against your files and the git diff; boxes without a file (the two enums here) are counted separately as *not checkable*. It takes ten seconds to read, and `gaps` tells you what the agent *didn't* look at.
|
|
67
68
|
|
|
68
69
|
**Open full map** opens an interactive page. Click any node for its summary, file, fields — and in a change summary, its diff, read straight from git:
|
|
69
70
|
|
|
@@ -77,6 +78,8 @@ You don't need to ask for any of this. The skill fires when the agent summarizes
|
|
|
77
78
|
npm i -g codechart && codechart install-skill
|
|
78
79
|
```
|
|
79
80
|
|
|
81
|
+
Install may edit global files (`~/.claude/CLAUDE.md`, your agents' `AGENTS.md`/`GEMINI.md`, `~/.claude/settings.json`) when you accept its extras; [Install and agents](docs/install.md) says what each adds.
|
|
82
|
+
|
|
80
83
|
That's it. Open your coding agent in any repo and try:
|
|
81
84
|
|
|
82
85
|
```text
|
|
@@ -177,9 +180,21 @@ More: [Maps in pull requests](docs/pr-maps.md)
|
|
|
177
180
|
<tr>
|
|
178
181
|
<td width="46%" valign="middle">
|
|
179
182
|
|
|
183
|
+
### Explain map
|
|
184
|
+
|
|
185
|
+
On request, a map of how an existing area works, for someone new to the project: one box per table, service or endpoint, what each is for, and the neighbours it talks to. A Flows tab walks through its main behaviours step by step, each step linked to its box and to the line of code. Nothing changed, so no diff.
|
|
186
|
+
|
|
187
|
+
More: [Explain map](docs/explain-map.md)
|
|
188
|
+
|
|
189
|
+
</td>
|
|
190
|
+
<td width="54%" valign="middle"><img src="docs/images/explain-map.png" alt="Explain map of refunds and invoices: boxes for the refund endpoint, flags, orders, invoices and payment methods in the area, and dashed faded boxes for the customer model and PayPal it talks to"></td>
|
|
191
|
+
</tr>
|
|
192
|
+
<tr>
|
|
193
|
+
<td width="46%" valign="middle">
|
|
194
|
+
|
|
180
195
|
### Business map
|
|
181
196
|
|
|
182
|
-
On request, a plain-words page for a product owner with no repo access: journeys, rules, saved data and questions. They answer, confirm and send it back.
|
|
197
|
+
On request, a plain-words page for a product owner with no repo access: journeys, rules, saved data and questions. They answer, confirm and send it back. It can also explain how an area works today, for a product owner, QA or support: one lane diagram of who does what, plus rules and odd cases (read-only).
|
|
183
198
|
|
|
184
199
|
More: [Business map](docs/business-map.md)
|
|
185
200
|
|
|
@@ -211,7 +226,7 @@ When the agent summarizes a change, writes a plan or explains how code behaves:
|
|
|
211
226
|
## Why you can trust the diagram
|
|
212
227
|
|
|
213
228
|
- **The agent writes data, codechart draws.** Layout is code, not hand-drawn ASCII.
|
|
214
|
-
- **Claims are checked** against your files and the git diff: `✓ 10 checked
|
|
229
|
+
- **Claims are checked** against your files and the git diff: each file exists, a quoted line is in it, and a new, changed or removed box matches git's added, modified, deleted or renamed status. A listed field or an arrow the code doesn't mention is a softer warning. Not checked: whether a label, summary or note is true, and boxes without a file (they show as *not checkable*). A `✓ 10 checked` or a `✗` says what matched or didn't.
|
|
215
230
|
- **Nothing left off quietly:** every changed file is on the map or listed as left out.
|
|
216
231
|
- **Flows are tied to real lines,** and whatever the agent didn't read is listed under `gaps`.
|
|
217
232
|
|
|
@@ -219,11 +234,11 @@ More: [Why you can trust the diagram](docs/trust.md).
|
|
|
219
234
|
|
|
220
235
|
## Cost
|
|
221
236
|
|
|
222
|
-
A diagram is about **2–3 extra API calls**, roughly 2–3% of a long session's usage, and nothing for trivial changes. The CLI is a
|
|
237
|
+
A diagram is about **2–3 extra API calls**, roughly 2–3% of a long session's usage, and nothing for trivial changes. That figure was measured on 2026-10-28 with a skill of 7.1k chars; the skill is now 17.0k chars (about 4.2k tokens), so a diagram costs more than that, and the benchmark has not been re-run. The CLI is a 208.5 kB package. Measured runs: [Efficiency](docs/efficiency.md).
|
|
223
238
|
|
|
224
239
|
## Safe to run
|
|
225
240
|
|
|
226
|
-
- No telemetry, no shell
|
|
241
|
+
- No telemetry, no shell except two fixed cases: `npm` on Windows during `codechart update`, and the editor you choose with `$VISUAL` or `$EDITOR` for `codechart review`. `git` is read-only, except the push of `setup-pr-maps --pr` and the [PR map](docs/pr-maps.md) CI job. Pages load nothing external and are saved to `~/.cache/codechart`, never to your repo. The only network calls: a daily version check, plus that version's changelog from GitHub when there's a newer one ([off with one setting](docs/install.md#updating)); `codechart update`; `release-context`, through your own `gh` or `glab`; and opt-in [PR maps](docs/pr-maps.md).
|
|
227
242
|
- Audited before release across 8 areas, including untrusted repos and prompt-injected specs: [SECURITY.md](SECURITY.md) and [docs/security-review.md](docs/security-review.md).
|
|
228
243
|
|
|
229
244
|
## Configure
|
package/THIRD_PARTY_NOTICES.md
CHANGED