@cogit/cli 0.24.0 → 0.25.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cogit/cli",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Git remembers what changed. cogit remembers why.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -45,6 +45,7 @@
45
45
  "devDependencies": {
46
46
  "@inquirer/prompts": "^8.7.4",
47
47
  "commander": "^15.0.0",
48
+ "mermaid": "^11.17.2",
48
49
  "tsup": "^9.0.0",
49
50
  "zod": "^4.6.7"
50
51
  }
@@ -78,6 +78,27 @@ Every message grows from an earlier one; a thread that starts something new is a
78
78
  - Hints, not rules: `gapMinutes`, `resumed`, `commitBetween` (a real commit landed in this
79
79
  repo between them), `lastMessages`, and for a first message `candidates`/`continuesHint`.
80
80
 
81
+ ## Shape
82
+
83
+ A message that landed commits gets a `shape`: a small representation of what the change does,
84
+ between its Intent (the decision and reason above) and its Code (the diff). Add it on that
85
+ message's node, with the node's commit hashes:
86
+
87
+ ```json
88
+ "shape": { "tools": [{ "kind": "pseudo", "text": "1. ...\n2. ..." }], "commits": ["abc1234"] }
89
+ ```
90
+
91
+ Two tools:
92
+
93
+ - `pseudo`: numbered plain-language steps of the new logic, naming the functions and files.
94
+ - `mermaid`: a Mermaid `flowchart TD` (or `LR`) of the new path between files or functions,
95
+ at most 15 nodes. Quote labels that hold spaces or punctuation.
96
+
97
+ Pick one, both, or none (`{ "tools": [] }` means nothing worth showing). Skip messages whose
98
+ commits are only release/version bumps, lockfiles or CHANGELOG, or change fewer than 5 lines
99
+ in total. Write it in the conversation's language; the CLI validates each output and keeps an
100
+ invalid diagram as text.
101
+
81
102
  ## Branch summary
82
103
 
83
104
  A branch starts at a root or where a message gets a second child. Its first message carries a