codechart 0.7.0 → 0.9.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/CHANGELOG.md +29 -0
- package/README.md +104 -70
- package/config.schema.json +47 -0
- package/dist/cli.js +4452 -928
- package/dist/server.js +5 -4
- package/package.json +1 -1
- package/skills/codechart/SKILL.md +29 -4
- package/skills/codechart/business-guide.md +59 -0
- package/skills/codechart/flow-guide.md +12 -0
- package/skills/codechart/release-guide.md +37 -0
- package/skills/codechart/spec-guide.md +12 -0
- package/templates/codechart.yaml +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
What's new in each codechart release. Update with `codechart update`; the [releases page](https://github.com/freeleex/codechart/releases) has the same notes.
|
|
4
4
|
|
|
5
|
+
## 0.9.0 (2026-11-10)
|
|
6
|
+
|
|
7
|
+
### New
|
|
8
|
+
|
|
9
|
+
- Release map: ask your agent for a PDF of what's new in a release, a plain-words section per feature for sales and stakeholders, with only facts checked in the code.
|
|
10
|
+
- The PDF is printed with the Chrome, Chromium, Edge or Brave you already have; without one you get the page to Save as PDF yourself.
|
|
11
|
+
- On a release branch (`v1.2.0`, `release-1.2.0`, `release/1.2`) the agent offers a release map. Set `release.auto: draw` to have it made once per version.
|
|
12
|
+
- Your product name and logo on the cover: `release.product` and `release.logo` in the config.
|
|
13
|
+
- `codechart release-context` lists what was merged since the last `v*` tag, with each PR's text and map, for the agent writing the release map.
|
|
14
|
+
|
|
15
|
+
## 0.8.0 (2026-11-08)
|
|
16
|
+
|
|
17
|
+
### New
|
|
18
|
+
|
|
19
|
+
- Business map: ask your agent for a plain-words page of a change for a product owner with no repo access: journeys today and after, rules before and after, saved data, questions.
|
|
20
|
+
- The owner answers, says Yes or No to the agent's guesses, adds notes and presses *Send back to developer*, even days later; paste the text to your agent.
|
|
21
|
+
- Review on the page: comment on any node, diff line or arrow, ask a question or ask for a deletion. *Finish review* copies your notes; paste them into your agent chat.
|
|
22
|
+
- Review in the terminal: `codechart review` opens the map in your editor as a diff. Write notes under any line, save, and tell your agent "review done".
|
|
23
|
+
- Plan vs built: when the work is done, the summary is compared with the saved plan. What was dropped, added or built differently is marked, each with the agent's reason.
|
|
24
|
+
- `codechart render --tech <spec.json>` names the technical map a business map links to; `codechart schema --business` prints the business map format.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- Plan vs built no longer compares an old plan with later, unrelated summaries on the same branch.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- README is shorter, with a features table; details moved to pages under [docs](https://github.com/freeleex/codechart/tree/main/docs).
|
|
33
|
+
|
|
5
34
|
## 0.7.0 (2026-11-06)
|
|
6
35
|
|
|
7
36
|
### New
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
|
-
<a href="#install">Install</a> · <a href="#
|
|
17
|
+
<a href="#install">Install</a> · <a href="#features">Features</a> · <a href="#why-you-can-trust-the-diagram">Trust</a> · <a href="#cost">Cost</a> · <a href="docs/configuration.md">Configure</a> · <a href="docs/README.md">Docs</a>
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<p align="center">
|
|
@@ -85,116 +85,150 @@ That's it. Open your coding agent in any repo and try:
|
|
|
85
85
|
> show me the flow of accepting an invite
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Works with Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor, OpenCode and any other agent that supports [Agent Skills](https://agentskills.io).
|
|
88
|
+
Works with Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor, OpenCode and any other agent that supports [Agent Skills](https://agentskills.io). Reminders that keep agents using it, updating, `codechart doctor` when no diagram appears, and uninstalling: [Install and agents](docs/install.md).
|
|
89
89
|
|
|
90
|
-
##
|
|
90
|
+
## Features
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
<table>
|
|
93
|
+
<tr>
|
|
94
|
+
<td width="46%" valign="middle">
|
|
93
95
|
|
|
94
|
-
|
|
96
|
+
### Flows
|
|
95
97
|
|
|
96
|
-
|
|
97
|
-
```text
|
|
98
|
-
Accept a team invite
|
|
99
|
-
────────────────────
|
|
100
|
-
+look up invite by token
|
|
101
|
-
◇ +invite found?
|
|
102
|
-
├─ no → +404 invite not found
|
|
103
|
-
└─ yes → ◇ +expired?
|
|
104
|
-
├─ yes → +410 invite expired
|
|
105
|
-
└─ no → ◇ +already a member?
|
|
106
|
-
├─ yes → +return already a member
|
|
107
|
-
└─ no → +save membership → +return joined
|
|
108
|
-
|
|
109
|
-
9 steps · 9 new · 0 changed · 0 planned · ✓ 15 anchors checked
|
|
110
|
-
gaps: did not check what happens when two requests accept the same invite at
|
|
111
|
-
once
|
|
112
|
-
```
|
|
98
|
+
Ask how something works and get its decisions, edge cases and outcomes as a flow. Every step is tied to a real line of code; click one on the page to see it.
|
|
113
99
|
|
|
114
|
-
|
|
100
|
+
More: [Flows](docs/flows.md)
|
|
115
101
|
|
|
116
|
-
|
|
102
|
+
</td>
|
|
103
|
+
<td width="54%" valign="middle"><img src="docs/images/flow.gif" alt="On the flow page, clicking a decision step shows its source line and the code behind each branch, then a second step is clicked"></td>
|
|
104
|
+
</tr>
|
|
105
|
+
<tr>
|
|
106
|
+
<td width="46%" valign="middle">
|
|
117
107
|
|
|
118
|
-
### Plans: Now and After
|
|
108
|
+
### Plans: Now and After
|
|
119
109
|
|
|
120
|
-
|
|
110
|
+
A plan that touches existing code opens as two panes side by side. What it removes is red in Now; what it adds is green in After.
|
|
121
111
|
|
|
122
|
-
|
|
112
|
+
More: [Plans](docs/plans.md)
|
|
123
113
|
|
|
124
|
-
|
|
114
|
+
</td>
|
|
115
|
+
<td width="54%" valign="middle"><img src="docs/images/plan-map.png" alt="Plan map: Now pane with the removed env var in red, After pane with the new table and migration in green"></td>
|
|
116
|
+
</tr>
|
|
117
|
+
<tr>
|
|
118
|
+
<td width="46%" valign="middle">
|
|
125
119
|
|
|
126
|
-
|
|
120
|
+
### Plan vs built
|
|
127
121
|
|
|
128
|
-
|
|
122
|
+
When the work is done, the summary is compared with the plan. What was dropped, added or built differently is marked, each with the agent's reason.
|
|
129
123
|
|
|
130
|
-
|
|
124
|
+
More: [Plan vs built](docs/plans.md#plan-vs-built)
|
|
131
125
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
─expiration.days─▶ var.log_retention_days
|
|
126
|
+
</td>
|
|
127
|
+
<td width="54%" valign="middle"><img src="docs/images/plan-vs-built.gif" alt="The header's differences-from-the-plan link opens the list; clicking an item shows its plan-vs-built box with the agent's reason, and a dashed NOT BUILT box marks what was planned but not built"></td>
|
|
128
|
+
</tr>
|
|
129
|
+
<tr>
|
|
130
|
+
<td width="46%" valign="middle">
|
|
138
131
|
|
|
139
|
-
|
|
140
|
-
~ aws_lb.api ─access_logs.bucket─▶ aws_s3_bucket.logs
|
|
141
|
-
─subnets────────────▶ module.vpc
|
|
132
|
+
### Infrastructure
|
|
142
133
|
|
|
143
|
-
|
|
144
|
-
◆ var.log_retention_days
|
|
134
|
+
Terraform, OpenTofu, Helm, Kustomize and Kubernetes changes get a map of resources and what they reference. Built in, no rule to write.
|
|
145
135
|
|
|
146
|
-
|
|
147
|
-
gaps: terraform plan not run · module.vpc internals not read
|
|
148
|
-
```
|
|
136
|
+
More: [Infrastructure maps](docs/infrastructure.md)
|
|
149
137
|
|
|
150
|
-
|
|
138
|
+
</td>
|
|
139
|
+
<td width="54%" valign="middle"><img src="docs/images/infra.png" alt="Infrastructure map in light theme: the changed load balancer shows its Terraform diff and new access_logs attributes"></td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr>
|
|
142
|
+
<td width="46%" valign="middle">
|
|
151
143
|
|
|
152
|
-
|
|
144
|
+
### Review on the page
|
|
153
145
|
|
|
154
|
-
|
|
146
|
+
Comment on any node, line or arrow, ask a question, or ask for a deletion. *Finish review* copies your notes; paste them into your agent chat.
|
|
155
147
|
|
|
156
|
-
|
|
148
|
+
More: [Review on the page](docs/review.md#on-the-page)
|
|
149
|
+
|
|
150
|
+
</td>
|
|
151
|
+
<td width="54%" valign="middle"><img src="docs/images/page-review.gif" alt="On the map page the user adds a comment under a new line and a delete note under a removed line, clicks Finish review, then Copy and close, and the sent notes turn dimmed"></td>
|
|
152
|
+
</tr>
|
|
153
|
+
<tr>
|
|
154
|
+
<td width="46%" valign="middle">
|
|
155
|
+
|
|
156
|
+
### Review in the terminal
|
|
157
|
+
|
|
158
|
+
`codechart review` opens the map in your editor as a diff. Write notes under any line, save, and tell your agent "review done".
|
|
159
|
+
|
|
160
|
+
More: [Review in the terminal](docs/review.md#in-the-terminal)
|
|
161
|
+
|
|
162
|
+
</td>
|
|
163
|
+
<td width="54%" valign="middle"><img src="docs/images/console-review-short.gif" alt="codechart review opens the map's diffs in vim, the user writes a comment and a question under diff lines, saves, and codechart feedback --take prints them"></td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td width="46%" valign="middle">
|
|
157
167
|
|
|
158
168
|
### Maps in pull requests
|
|
159
169
|
|
|
160
|
-
|
|
170
|
+
PR and MR descriptions end with a collapsed map, and CI redraws it on every push. No AI or tokens in CI. Turn it on once per repo.
|
|
161
171
|
|
|
162
|
-
|
|
172
|
+
More: [Maps in pull requests](docs/pr-maps.md)
|
|
163
173
|
|
|
164
|
-
|
|
174
|
+
</td>
|
|
175
|
+
<td width="54%" valign="middle"><img src="docs/images/pr-map.png" alt="PR description with the Map section open: check line, the map image, what was left out or not read, collapsed node details and the key"></td>
|
|
176
|
+
</tr>
|
|
177
|
+
<tr>
|
|
178
|
+
<td width="46%" valign="middle">
|
|
165
179
|
|
|
166
|
-
|
|
180
|
+
### Business map
|
|
167
181
|
|
|
168
|
-
|
|
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.
|
|
169
183
|
|
|
170
|
-
|
|
171
|
-
- **Map claims are checked.** Each node's file must exist, a quoted line must be in it, and in a change summary every new, changed or removed node must be in the git diff (`--git`, `--since <base>`, `--commit <sha>`). When everything matches, the footer says `✓ 10 checked`. When it doesn't, the output opens with the mismatch — straight from a render where the agent claimed an untouched table changed:
|
|
184
|
+
More: [Business map](docs/business-map.md)
|
|
172
185
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
186
|
+
</td>
|
|
187
|
+
<td width="54%" valign="middle"><img src="docs/images/business-map.png" alt="Business page: a journey with Now and After columns, rule cards, one dashed card asking for a yes or no, and a question with an answer box"></td>
|
|
188
|
+
</tr>
|
|
189
|
+
<tr>
|
|
190
|
+
<td width="46%" valign="middle">
|
|
176
191
|
|
|
177
|
-
|
|
178
|
-
- **Nothing left off quietly.** With a diff, every changed file must sit under a node's path or be named in *Not on map* (lockfiles and generated files excepted), else `✗ 1 changed file not on map: src/x.ts`. A summary rendered without a diff says `diff not checked` instead of looking verified.
|
|
179
|
-
- **Flows are anchored to real code.** Every step that exists in code names its `file:line` or quotes the line. If the line doesn't exist, the render fails and the agent has to fix it. For a commit that isn't checked out, `--at <rev>` reads anchors from that revision.
|
|
180
|
-
- **Gaps are explicit.** Whatever the agent didn't read is listed under `gaps`, not guessed.
|
|
181
|
-
- **Validated input.** Specs are checked against a schema, with clear errors the agent can act on.
|
|
192
|
+
### Release map
|
|
182
193
|
|
|
183
|
-
|
|
194
|
+
On request, a PDF of what's new in a release, in plain words, for sales: a cover, then a section per feature. It only holds what the agent checked in the code, so nobody has to review it.
|
|
195
|
+
|
|
196
|
+
More: [Release map](docs/release-map.md)
|
|
197
|
+
|
|
198
|
+
</td>
|
|
199
|
+
<td width="54%" valign="middle"><img src="docs/images/release-map.gif" alt="The PDF of a release map: a cover with the logo, product name, version and summary, then the features one after another"></td>
|
|
200
|
+
</tr>
|
|
201
|
+
</table>
|
|
202
|
+
|
|
203
|
+
## The full page
|
|
204
|
+
|
|
205
|
+
Big diagrams also get a self-contained HTML page: click a node for its summary and diff, read straight from git, tick nodes as reviewed, and move around with the keyboard. Nothing is loaded from the internet. More: [The full page](docs/page.md).
|
|
206
|
+
|
|
207
|
+
## When it fires
|
|
184
208
|
|
|
185
|
-
|
|
209
|
+
When the agent summarizes a change, writes a plan or explains how code behaves: migrations and models, infrastructure, 3+ related files (map), 2+ decisions or edge cases (flow). One-file text, comment, formatting or version-bump changes are skipped. Your own rules run first: [Configuration](docs/configuration.md).
|
|
210
|
+
|
|
211
|
+
## Why you can trust the diagram
|
|
212
|
+
|
|
213
|
+
- **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`, or a `✗` that says what doesn't match.
|
|
215
|
+
- **Nothing left off quietly:** every changed file is on the map or listed as left out.
|
|
216
|
+
- **Flows are tied to real lines,** and whatever the agent didn't read is listed under `gaps`.
|
|
217
|
+
|
|
218
|
+
More: [Why you can trust the diagram](docs/trust.md).
|
|
219
|
+
|
|
220
|
+
## Cost
|
|
186
221
|
|
|
187
|
-
|
|
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 170.0 kB package. Measured runs: [Efficiency](docs/efficiency.md).
|
|
188
223
|
|
|
189
224
|
## Safe to run
|
|
190
225
|
|
|
191
|
-
- No telemetry, no shell
|
|
192
|
-
- HTML pages load nothing external, all text is escaped, and they're saved to `~/.cache/codechart`, never to your repo. A summary page holds your diff: share it only where you'd share the diff.
|
|
226
|
+
- No telemetry, no shell, read-only `git`. 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)), and opt-in [PR maps](docs/pr-maps.md).
|
|
193
227
|
- 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).
|
|
194
228
|
|
|
195
229
|
## Configure
|
|
196
230
|
|
|
197
|
-
Works with zero config. `codechart init` writes a commented `.codechart.yaml` for your own rules
|
|
231
|
+
Works with zero config. `codechart init` writes a commented `.codechart.yaml` for your own rules, and `codechart config` shows what's in effect: [Configuration](docs/configuration.md), [CLI](docs/cli.md).
|
|
198
232
|
|
|
199
233
|
## FAQ
|
|
200
234
|
|
package/config.schema.json
CHANGED
|
@@ -78,6 +78,53 @@
|
|
|
78
78
|
},
|
|
79
79
|
"additionalProperties": false
|
|
80
80
|
},
|
|
81
|
+
"release": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"product": {
|
|
85
|
+
"description": "Product name on the cover of a release map (default: the repo name)",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"maxLength": 80,
|
|
89
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\u200b\\u200c\\u200e\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff]*$"
|
|
90
|
+
},
|
|
91
|
+
"logo": {
|
|
92
|
+
"description": "Repo-relative path to an .svg or .png of at most 200 KB, shown on the cover of a release map",
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1,
|
|
95
|
+
"maxLength": 300,
|
|
96
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\u200b\\u200c\\u200e\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff]*$"
|
|
97
|
+
},
|
|
98
|
+
"browser": {
|
|
99
|
+
"description": "Global only: absolute path of the Chromium-based browser that prints a release map to PDF (default: Chrome, Chromium, Edge or Brave where they are usually installed)",
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1,
|
|
102
|
+
"maxLength": 300,
|
|
103
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\u200b\\u200c\\u200e\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff]*$"
|
|
104
|
+
},
|
|
105
|
+
"branches": {
|
|
106
|
+
"description": "Branches that are release branches, as globs (default: v[0-9]*, release-*, release/*)",
|
|
107
|
+
"minItems": 1,
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1,
|
|
112
|
+
"maxLength": 200,
|
|
113
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\u200b\\u200c\\u200e\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff]*$"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"auto": {
|
|
117
|
+
"description": "On a release branch: suggest a release map, draw one, or do nothing (default: suggest)",
|
|
118
|
+
"type": "string",
|
|
119
|
+
"enum": [
|
|
120
|
+
"suggest",
|
|
121
|
+
"draw",
|
|
122
|
+
"off"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
},
|
|
81
128
|
"useBuiltinRules": {
|
|
82
129
|
"type": "boolean"
|
|
83
130
|
},
|