@chamba/claude-extras 0.6.0 → 0.6.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.
- package/README.md +23 -2
- package/assets/commands/map.md +41 -0
- package/dist/cli.js +16 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,12 +13,15 @@ slash commands, subagents and hooks on top of the chamba MCP server.
|
|
|
13
13
|
npx @chamba/claude-extras install # add commands, agents, hooks + register MCP
|
|
14
14
|
npx @chamba/claude-extras install --force # overwrite existing files
|
|
15
15
|
npx @chamba/claude-extras uninstall # remove them
|
|
16
|
+
npx @chamba/claude-extras --version # print the installed version
|
|
16
17
|
```
|
|
17
18
|
|
|
19
|
+
Check the MCP server's version the same way: `npx @chamba/mcp --version`.
|
|
20
|
+
|
|
18
21
|
It installs into `~/.claude/`:
|
|
19
22
|
|
|
20
|
-
- **Slash commands**: `/
|
|
21
|
-
- **Subagents**: `implementer`, `reviewer`, `tester`
|
|
23
|
+
- **Slash commands**: `/ticket`, `/workspace`, `/map`, `/worktrees`, `/orq`, `/recall`, `/vault`
|
|
24
|
+
- **Subagents**: `planner`, `implementer`, `reviewer`, `tester`
|
|
22
25
|
- **Hooks**: warn on destructive commands, validate worktree edits
|
|
23
26
|
|
|
24
27
|
…and registers the `chamba` MCP server in `~/.claude.json`. It never overwrites your
|
|
@@ -181,6 +184,24 @@ model + effort you configured above.
|
|
|
181
184
|
> `worktrees.root` (e.g. `WORKTREES/`) to `.gitignore` so they're never committed. It's
|
|
182
185
|
> off by default.
|
|
183
186
|
|
|
187
|
+
## Bootstrap the architecture map with `/map`
|
|
188
|
+
|
|
189
|
+
What makes `/ticket` precise is a vault that already describes how your repos fit
|
|
190
|
+
together. On a small or new project, seed that in one shot:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
/map # asks EN/ES, then maps every repo
|
|
194
|
+
/map es web # Spanish notes, scoped to the `web` repo
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
`/map` resolves the vault (`chamba_vault_status` — run `/workspace init` first if you
|
|
198
|
+
don't have one), asks which language to write in, reads the repos for their cross-repo
|
|
199
|
+
wiring (REST, async/events, shared data, build deps), and writes **living notes** with
|
|
200
|
+
stable names: `Topology.md`, `Data flows.md`, `Domain entities.md`, and `repos/<repo>.md`.
|
|
201
|
+
Re-run it as the project grows — it updates its own notes in place and **never touches a
|
|
202
|
+
note you edited by hand** (it only rewrites notes marked `source: chamba`). It's opt-in;
|
|
203
|
+
on a big monorepo, mapping everything is expensive.
|
|
204
|
+
|
|
184
205
|
## License
|
|
185
206
|
|
|
186
207
|
MIT
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Map the workspace architecture (cross-repo wiring) into living vault notes
|
|
3
|
+
argument-hint: "[en|es] [repo ...]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are mapping the architecture of this workspace into the Obsidian vault: **$ARGUMENTS**
|
|
7
|
+
|
|
8
|
+
This is an opt-in command for small or new projects — bootstrap the cross-repo
|
|
9
|
+
context the `/ticket` flow relies on. Stay grounded in the real code: cite the
|
|
10
|
+
files you read, never invent a connection, and mark anything you can't confirm as
|
|
11
|
+
unknown rather than guessing.
|
|
12
|
+
|
|
13
|
+
Parse the arguments: a leading `en` or `es` sets the notes' language; any other
|
|
14
|
+
tokens are repos to scope the map to (default: every repo in the workspace).
|
|
15
|
+
|
|
16
|
+
1. Resolve the vault with `chamba_vault_status`. If no vault is found, tell me to
|
|
17
|
+
run `/workspace init` first (it bootstraps one) and stop here.
|
|
18
|
+
2. **Language.** If I didn't pass `en`/`es`, ask me whether to write the notes in
|
|
19
|
+
English or Spanish, and wait for my answer. Write ALL notes in that language.
|
|
20
|
+
3. Call `chamba_load_context` with "map the workspace architecture" to pull the
|
|
21
|
+
repo map, coding rules, and any notes already in the vault.
|
|
22
|
+
4. Do cross-repo reconnaissance, grounded in real code (read the relevant files):
|
|
23
|
+
- **REST/HTTP** — clients, base URLs, route handlers → who calls whom.
|
|
24
|
+
- **Async** — pub/sub topics, queues, events, webhooks → producers and consumers.
|
|
25
|
+
- **Shared data** — databases, schemas, entities crossing repos.
|
|
26
|
+
- **Build/deploy** — workspace dependencies, shared packages.
|
|
27
|
+
5. Write **stable, named notes** into the vault root (use your file tools to write
|
|
28
|
+
directly under the resolved vault path). Each note gets YAML frontmatter with
|
|
29
|
+
`tags: [chamba, architecture]`, `source: chamba`, and the date:
|
|
30
|
+
- `Topology.md` — the service graph: which repos talk over REST and which events
|
|
31
|
+
connect them. A diagram (Mermaid) plus prose.
|
|
32
|
+
- `Data flows.md` — the key end-to-end flows across repos.
|
|
33
|
+
- `Domain entities.md` — the shared entities / domain model.
|
|
34
|
+
- `repos/<repo>.md` — one overview per repo: purpose, stack, entry points, and
|
|
35
|
+
what it talks to (in and out).
|
|
36
|
+
6. **Never clobber my edits.** Before writing a note that already exists, read it:
|
|
37
|
+
if it does NOT carry `source: chamba` in its frontmatter, I edited it by hand —
|
|
38
|
+
leave it untouched, report it as skipped, and move on. If it does, regenerate it
|
|
39
|
+
in place. The `source: chamba` marker is how you know which notes are yours.
|
|
40
|
+
7. Report what you wrote, updated and skipped, with the vault paths. Do NOT commit,
|
|
41
|
+
merge or push — these are notes, I'll review them.
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/cli.ts
|
|
2
|
+
import { readFileSync } from "fs";
|
|
2
3
|
import { homedir as homedir2 } from "os";
|
|
3
4
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
4
5
|
import { NodeFilesystem as NodeFilesystem2 } from "@chamba/adapters";
|
|
@@ -601,8 +602,22 @@ function summarize(result) {
|
|
|
601
602
|
function labelFor(dir) {
|
|
602
603
|
return CATEGORIES.find((c) => c.dir === dir)?.label ?? dir;
|
|
603
604
|
}
|
|
605
|
+
function readPackageVersion() {
|
|
606
|
+
try {
|
|
607
|
+
const pkgPath = fileURLToPath2(new URL("../package.json", import.meta.url));
|
|
608
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
609
|
+
return pkg.version ?? "unknown";
|
|
610
|
+
} catch {
|
|
611
|
+
return "unknown";
|
|
612
|
+
}
|
|
613
|
+
}
|
|
604
614
|
async function main() {
|
|
605
615
|
const [command, ...rest] = process.argv.slice(2);
|
|
616
|
+
if (command === "--version" || command === "-v" || command === "version") {
|
|
617
|
+
process.stdout.write(`${readPackageVersion()}
|
|
618
|
+
`);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
606
621
|
const installer = buildInstaller2();
|
|
607
622
|
if (command === "uninstall") {
|
|
608
623
|
const result = await installer.uninstall();
|
|
@@ -633,7 +648,7 @@ async function main() {
|
|
|
633
648
|
return;
|
|
634
649
|
}
|
|
635
650
|
process.stderr.write(
|
|
636
|
-
`Unknown command "${command}". Usage: chamba-install [install|uninstall|apply|config <sub>] [--force]
|
|
651
|
+
`Unknown command "${command}". Usage: chamba-install [install|uninstall|apply|config <sub>] [--force] [--version]
|
|
637
652
|
`
|
|
638
653
|
);
|
|
639
654
|
process.exitCode = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chamba/claude-extras",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Optional Claude Code extras for chamba: slash commands, subagents and hooks installer",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@inquirer/prompts": "^7.0.0",
|
|
34
|
-
"@chamba/adapters": "0.6.
|
|
35
|
-
"@chamba/core": "0.6.
|
|
34
|
+
"@chamba/adapters": "0.6.2",
|
|
35
|
+
"@chamba/core": "0.6.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.0.0",
|