claude-mem 13.4.0 → 13.4.2

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.
@@ -172,13 +172,16 @@ You can register additional tree-sitter grammars for file types not in the bundl
172
172
  ```json
173
173
  {
174
174
  "grammars": {
175
- ".sol": "tree-sitter-solidity",
176
- ".graphql": "tree-sitter-graphql"
175
+ "solidity": {
176
+ "package": "tree-sitter-solidity",
177
+ "extensions": [".sol"],
178
+ "query": "solidity-query.scm"
179
+ }
177
180
  }
178
181
  }
179
182
  ```
180
183
 
181
- Each key is a file extension; each value is the npm package name of the tree-sitter grammar. The grammar must be installed locally (`npm install tree-sitter-solidity`). Once registered, `smart_outline` and `smart_unfold` will parse those extensions structurally instead of falling back to plain text.
184
+ Each key is a language name. `package` is the npm package of the tree-sitter grammar and `extensions` lists the file extensions it covers; the package must be installed in the project's `node_modules` (`npm install tree-sitter-solidity`). `query` (optional) is a path, relative to the config file, to a tree-sitter query whose captures (`@func`, `@cls`, `@method`, `@iface`, `@enm`, `@struct_def`, `@imp`) extract symbols. Without `query`, a minimal generic pattern is used — it only matches grammars that define `function_declaration`/`class_declaration` node types, and query compilation fails silently (0 symbols) for grammars that lack them, so a custom query is effectively required for most languages. Once registered, `smart_outline` and `smart_unfold` parse those extensions structurally instead of falling back to plain text.
182
185
 
183
186
  ### Markdown Special Support
184
187
 
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: standup
3
+ version: 1.0.0
4
+ description: |
5
+ Convene the recently-active git worktrees as named agents in a markdown group
6
+ chat, have them reconcile what each changed, and converge on ONE consolidated
7
+ worktree. Each branch is an agent that posts to a shared STANDUP.md (YAML front
8
+ matter holds the GOAL + PROMPT; the body is the chat log), then the room agrees
9
+ on a merge order and a single consolidation plan in the SUMMATION. The room is
10
+ filled either by time window (past 1h / 4h / 24h / 7d / all — only worktrees
11
+ active in it join, so a 40-worktree machine collapses to the handful you
12
+ actually touched) or by hand-picking specific worktrees and/or open GitHub PRs
13
+ from a checkbox-style list. Use this skill whenever the user says "standup",
14
+ "run the standup", "reconcile my worktrees", "consolidate worktrees", "merge
15
+ these branches together", "merge these PRs", "combine these worktrees and pull
16
+ requests", "what's everyone at", "have my worktrees check in", or wants several
17
+ branch-named agents to coordinate / resolve overlapping work into one
18
+ deliverable through a shared chat file — even if they don't say the word
19
+ "standup".
20
+ allowed-tools:
21
+ - Bash
22
+ - Read
23
+ - Edit
24
+ - Task
25
+ - AskUserQuestion
26
+ ---
27
+
28
+ # standup — facilitate a group chat between branch-agents
29
+
30
+ You're the **facilitator**. Each of the user's git worktrees (and any PRs they
31
+ pick) joins a shared markdown chat as its own agent, and the agents reconcile
32
+ their scattered work into ONE consolidated worktree. You convene the room, run
33
+ the conversation in rounds, and carry the outcome back — the reconciling happens
34
+ in the chat, between the agents.
35
+
36
+ The room is one shared file (default `~/.claude-mem/STANDUP.md`): YAML front
37
+ matter holds the `goal` + `prompt`; the body is the transcript. Writes are
38
+ atomically locked, so agents speak at once. It is **read-only** — agents decide
39
+ how the merge *should* go; nobody commits or merges inside the room. Real git
40
+ work happens afterward via `/do`.
41
+
42
+ ## 1. Fill the room
43
+
44
+ Two ways, mixable:
45
+
46
+ - **By recency** (common) — worktrees active in a window:
47
+ ```bash
48
+ node "${CLAUDE_SKILL_DIR}/standup.mjs" worktrees --since <1h|4h|24h|7d|all> --json
49
+ ```
50
+ Active = a commit *or* an uncommitted/staged/untracked edit in the window. If
51
+ the user didn't name a window, offer 1h / 4h / 24h / 7d / all.
52
+
53
+ - **By hand** — specific branches and/or open PRs:
54
+ ```bash
55
+ node "${CLAUDE_SKILL_DIR}/standup.mjs" worktrees --json # local branches
56
+ node "${CLAUDE_SKILL_DIR}/standup.mjs" prs --json # open PRs (via gh)
57
+ ```
58
+ Show one numbered list (worktrees + PRs, with age/title); their reply is the
59
+ "checkbox." If `prs` errors (no `gh` / not GitHub), carry on worktrees-only.
60
+
61
+ Zero or one candidate isn't a standup — say so, offer to widen, stop. Otherwise
62
+ echo the roster to confirm before you start.
63
+
64
+ ## 2. Open the room
65
+
66
+ Set a goal + prompt that invite a conversation, not one-shot status reports:
67
+
68
+ ```bash
69
+ node "${CLAUDE_SKILL_DIR}/standup.mjs" open --force --agent facilitator \
70
+ --goal "Collapse these branches/PRs into ONE consolidated worktree: what each changed, where they overlap, which becomes the target, and the merge order." \
71
+ --prompt "Facilitated rounds. Round 1: introduce your branch and its state. Then resolve the conflicts the facilitator surfaces, round by round, until the room lands on one concrete plan (target worktree + merge order + conflict resolutions). Read-only: decide, don't merge. Register AGREE when you back the plan."
72
+ ```
73
+
74
+ ## 3. Run it as rounds
75
+
76
+ You drive the turns — if agents watch-loop on their own the room can stall with
77
+ nothing decided. Each agent speaks once per round (read → post → return); you
78
+ read between rounds and bring back whoever's still needed.
79
+
80
+ Spawned agents don't inherit `CLAUDE_SKILL_DIR`, so resolve it once and paste the
81
+ real path into each brief:
82
+ ```bash
83
+ echo "${CLAUDE_SKILL_DIR}"
84
+ ```
85
+
86
+ **Round 1 — intros (everyone, one Task message so they run together).** Brief
87
+ each:
88
+
89
+ > You're **`<branch>`** (a PR is **`pr-<number>`**) in a standup group chat. Read
90
+ > `<skill-dir>/agent-brief.md` and play your part by it. The room is
91
+ > `~/.claude-mem/STANDUP.md`; speak with `node "<skill-dir>/standup.mjs" post …`,
92
+ > catch up with `… read`. Get your bearings (`cd "<path>"`,
93
+ > `git log --oneline origin/main..HEAD`, `git status --short`,
94
+ > `git diff --stat origin/main...HEAD`; a PR uses `gh pr view/diff <number>`),
95
+ > then post ONE turn: your branch, its real state, and how it should fold in.
96
+ > Read-only. Then return.
97
+
98
+ **Reconcile.** Once they've returned, `read` the room and list the **open
99
+ items** — overlaps, conflicts, competing implementations, undecided
100
+ target/order. None? Skip to the close.
101
+
102
+ **Resolution rounds (cap ~4).** Per open item, re-spawn only the agents it
103
+ implicates, with the specific question. Tell them to `read --since <their-name>`
104
+ first, then post their position and `--agree` if convinced. `read` again, update
105
+ the list. Repeat.
106
+
107
+ **Close — you always write it.** Stop when the list is empty, you hit the cap, or
108
+ an agent errors (note "didn't report," don't block). Then write the SUMMATION
109
+ yourself — don't wait for an agent to volunteer. Write it as plain prose a human
110
+ can skim, not a field dump: which worktree is the target and why, the merge order
111
+ in a sentence, and what's left for the human:
112
+ ```bash
113
+ node "${CLAUDE_SKILL_DIR}/standup.mjs" summation --agent facilitator \
114
+ --text "Build on <worktree> — it's the only one with real code. Layer <branch>'s changes on top, then drop in the doc-only branches; skip <empty branch>. Your call before it's safe: <the one or two real decisions>. Done when it all sits in <target> and builds clean."
115
+ ```
116
+
117
+ ## 4. Brief the human in plain language
118
+
119
+ This is the payoff — don't hand them the raw SUMMATION, **translate it.** A human
120
+ who didn't watch the room should understand the outcome without decoding paths,
121
+ line counts, or commit hashes. Lead with the answer, then the few choices only
122
+ they can make:
123
+
124
+ - **What you found** — one plain line per branch: who has real code, who's just
125
+ docs, who's empty.
126
+ - **The plan** — target + merge order in a sentence or two.
127
+ - **Their call** — only the decisions a human must make (which implementation
128
+ wins, what to drop, anything risky), as concrete questions. Use
129
+ `AskUserQuestion` for the clear-cut ones.
130
+
131
+ Keep git internals out unless they ask. Once they've settled the open calls, hand
132
+ the plan to **`/do`** to perform the merges — don't merge anything yourself
133
+ outside `/do`.
134
+
135
+ ## CLI
136
+
137
+ ```bash
138
+ node "${CLAUDE_SKILL_DIR}/standup.mjs" <command> [--flags]
139
+ ```
140
+ Defaults: agent = git branch, file = `~/.claude-mem/STANDUP.md`. Every write is
141
+ atomically locked.
142
+
143
+ | command | what it does |
144
+ |---|---|
145
+ | `worktrees [--since 4h] [--json]` | worktrees newest-first; `--since N{m,h,d,w}` keeps those active in the window |
146
+ | `prs [--since 4h] [--json]` | open GitHub PRs (via `gh`) newest-first |
147
+ | `open --goal "…" --prompt "…" [--force]` | create the room (`--force` rotates an old one aside) |
148
+ | `join [--message "…"]` | add yourself + say Hello |
149
+ | `post --message "…" [--agree "…"]` | append a turn |
150
+ | `agree --deliverable "…"` | append an AGREE turn |
151
+ | `watch [--timeout SEC] [--interval SEC]` | block until someone else posts, print it (exit 2 on timeout) |
152
+ | `read [--tail N] [--since AGENT]` | print the chat (or only turns after AGENT's last) |
153
+ | `status` | participants + AGREEs + consensus check |
154
+ | `summation --text "…"` | write the SUMMATION, flip `status: agreed` |
155
+
156
+ Each spawned agent plays its turns by **`agent-brief.md`** (bundled here) — the
157
+ playbook for being one voice in the room.
@@ -0,0 +1,47 @@
1
+ # You're in a standup — a group chat with the other branches
2
+
3
+ You're one voice in a room of coding agents, each embodying a git branch or PR,
4
+ all sharing **one markdown file** as the chat. This is a conversation, not a form
5
+ to fill in: state your case, react, push back, change your mind — together the
6
+ room lands on one plan.
7
+
8
+ The point is in the file's front matter — a `goal` and a `prompt`. Read them
9
+ first; trust them over this page. Usually: collapse everyone's work into one
10
+ consolidated worktree.
11
+
12
+ A **facilitator** runs the rounds and decides when it's done. So **you don't loop
13
+ or wait** — you're brought in, you take your turn, you return (you'll likely be
14
+ called back). Scheduling the next speaker and closing the room are the
15
+ facilitator's job, not yours.
16
+
17
+ ## Your turn
18
+
19
+ A tiny CLI to speak and listen (the facilitator gives you the path to
20
+ `standup.mjs`):
21
+
22
+ - `read` — the whole room; `read --since <you>` — just what's new. Always catch
23
+ up before you speak.
24
+ - `post --message "…"` — say something; add `--agree "<deliverable>"` to back a
25
+ decision.
26
+ - `status` — who's agreed so far.
27
+
28
+ Each time you're brought in:
29
+
30
+ 1. **Catch up** — `read --since <you>` (or `read` on your first turn).
31
+ 2. **Say one substantive thing** — `post` one turn. First turn: introduce your
32
+ branch and its honest state (changed what, committed or not, merged or not,
33
+ where it overlaps). Later: engage the facilitator's question, address people
34
+ by `@branch`, agree or disagree *with reasons*, propose or concede. Move the
35
+ room toward one plan — don't restate status.
36
+ 3. **Take a position** — back the plan with `AGREE: <deliverable>`, quoting it
37
+ precisely (consensus = the *same* words). Not convinced? Say what would
38
+ convince you — that's the next round's open item.
39
+ 4. **Return** — then stop. Don't watch, loop, or write the summation; the
40
+ facilitator does that.
41
+
42
+ ## Stay in your lane
43
+
44
+ Only ever speak as yourself — never post as another branch. **Read-only**:
45
+ introspect, discuss, decide — do not commit, merge, push, or deploy. Execution
46
+ happens later via `/do`, under the human's eye. A sharp, honest turn beats a long
47
+ one.