@shawaze/agentspace 0.3.0 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +118 -48
  2. package/dist/cli.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -8,16 +8,13 @@
8
8
  above your sibling repositories and keeps them coherent for AI coding agents.
9
9
 
10
10
  ```bash
11
- npx @shawaze/agentspace init # interactive wizard → scaffold the workspace
11
+ npx @shawaze/agentspace init # interactive wizard → scaffold a workspace
12
12
  npx @shawaze/agentspace doctor # mechanical health checks on a workspace
13
13
  ```
14
14
 
15
- > Status: **v0.3.** Workspace reconstruction, the memory-bank wiki, the
16
- > enforcement pack, and the cross-repo contract layer all work today.
17
-
18
15
  ---
19
16
 
20
- ## Why this exists
17
+ ## Why agentspace
21
18
 
22
19
  If you run a product as **several separate repositories** (a backend, a web app, a
23
20
  mobile client, shared libraries) — a *polyrepo*, not a monorepo — AI coding agents
@@ -25,76 +22,149 @@ have a blind spot: an agent that changes an API in one repo can't see the consum
25
22
  it just broke in another, and every session re-derives the same cross-repo context
26
23
  from scratch.
27
24
 
28
- `agentspace` is **not** a monorepo tool (Nx, Turborepo, pnpm workspaces). Those
29
- unify repos under one build. agentspace does the opposite: it leaves your repos
25
+ agentspace is **not** a monorepo tool (Nx, Turborepo, pnpm workspaces). Those unify
26
+ repos under one build. agentspace does the opposite: it leaves your repos
30
27
  independent and adds a thin **coordination layer above them** — a declarative
31
28
  manifest, an LLM-curated knowledge wiki, cross-repo contracts, and
32
29
  boundary-enforced agents — so the *set* of repos stays coherent for an agent
33
30
  without a human babysitting drift.
34
31
 
35
- It is the generalization of a hand-built workspace methodology into a reusable tool.
32
+ ## What it gives you
33
+
34
+ | Pillar | What it does |
35
+ |---|---|
36
+ | **Workspace reconstruction** | A declarative `manifest.yaml` + an idempotent `clone-repos.sh` that rebuilds the whole workspace on any machine. |
37
+ | **LLM wiki** (`memory-bank/`) | A [Karpathy-pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) knowledge base the agent curates as it works — citation discipline, staleness/size budgets, and `/ingest` `/query` `/lint` operations. |
38
+ | **Cross-repo contracts** (`openspec/`) | A prescriptive contract layer with a propose → apply → archive lifecycle that fights contract drift across repos. |
39
+ | **Agents & enforcement** (`.claude/`) | Boundary-enforced per-repo agents, a read-only cross-app reviewer, and a Stop hook that nudges you to keep the wiki current. |
40
+
41
+ The value isn't any single pillar — it's the **integrated discipline** where they
42
+ reinforce each other. Pick the ones you want; the manifest is always included and
43
+ the wiki is on by default.
36
44
 
37
- ## The four pillars
45
+ ## Topology-aware
38
46
 
39
- | Pillar | What it gives you | Status |
40
- |---|---|---|
41
- | **Workspace reconstruction** | A declarative `manifest.yaml` + an idempotent `clone-repos.sh` that rebuilds the whole workspace on any machine. | ✅ v0.1 |
42
- | **LLM Wiki** (`memory-bank/`) | A [Karpathy-pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) knowledge base the agent curates as it works — citation discipline, staleness/size budgets, ingest/query/lint operations. | ✅ v0.1 (structure) |
43
- | **Cross-app contracts** (`openspec/`) | A prescriptive contract layer + propose/apply/archive lifecycle that fights contract drift across repos. | ✅ v0.3 |
44
- | **Agents + enforcement** | Boundary-enforced per-repo agents, a warm-until-warm Stop hook, a read-only cross-app reviewer. | ✅ v0.2 |
47
+ `init` asks your **workspace shape** and only emits artifacts that shape warrants.
48
+ A single repo, four peer microservices, a library + consumers, and a
49
+ backend-plus-clients product all get *different* output:
45
50
 
46
- The point isn't any single pillar it's the **integrated discipline** where they
47
- reinforce each other.
51
+ - A **one-product** workspace gets the cross-repo contract layer, a cross-app
52
+ reviewer, and a blocking Stop hook.
53
+ - A **single repo** or set of **unrelated repos** does **not** — because none of
54
+ that applies.
48
55
 
49
- ## Topology-aware by design
56
+ You never get a pile of scaffolding that doesn't fit your project.
50
57
 
51
- `agentspace init` asks your **workspace shape** and only emits artifacts that shape
52
- warrants. A single repo, four peer microservices, a library + consumers, and a
53
- one-product/backend+clients workspace all get *different* output:
58
+ ## Requirements
54
59
 
55
- - A **one-product** workspace gets cross-app contract scaffolding and a
56
- product-scoped wiki.
57
- - A **single repo** or set of **unrelated repos** does **not** get a cross-app
58
- contract layer, a cross-app reviewer, or a blocking hook — because none of that
59
- applies.
60
+ - **Node.js 18+** (to run the CLI).
61
+ - **[Claude Code](https://claude.ai/code)** — to use the generated `.claude/`
62
+ enforcement pack (agents, hook, slash commands). The other pillars are plain
63
+ files usable with any agent or none.
64
+ - **[OpenSpec CLI](https://github.com/Fission-AI/OpenSpec)** *(optional)* — only
65
+ if you enable the contracts pillar and want the `/opsx:*` slash commands and
66
+ validation. agentspace scaffolds the `openspec/` structure either way.
60
67
 
61
- You never get a pile of cork-shaped scaffolding that doesn't fit your project.
68
+ ## Usage
62
69
 
63
- ## What `init` generates today (v0.3)
70
+ ### `agentspace init`
64
71
 
65
- - `manifest.yaml` + a resilient `clone-repos.sh`
66
- - a `.gitignore` (sub-repos are independent git repos, ignored by the workspace)
67
- - a root `CLAUDE.md` router + `README.md`
68
- - a shape-aware `memory-bank/` wiki: numbered priority folders, a conventions
69
- README, and seeded overview/contract stubs appropriate to your shape
70
- - (enforcement pillar, opt-in) a `.claude/` pack: per-repo boundary-enforced
71
- agents, `/ingest` `/query` `/lint` commands, a warm-until-warm Stop hook, and
72
- a cross-app reviewer (contract-linked shapes).
73
- - (contracts pillar, opt-in) an `openspec/` cross-repo contract layer — a
74
- shape-aware `project.md` + `specs/`/`changes/`; the `/opsx:*` commands come
75
- from the external `openspec` CLI (`openspec update`).
72
+ Runs an interactive wizard, then writes the workspace into the current directory.
73
+ It asks:
76
74
 
77
- ## Quick start
75
+ 1. **Workspace name**
76
+ 2. **Shape** — single-repo · one product (backend + clients) · peer services ·
77
+ library + consumers · unrelated
78
+ 3. **Per repo** — directory name, git remote (or local-only), stack, and role
79
+ 4. **Dependency order** — for ordered shapes (which repo defines contracts others
80
+ consume)
81
+ 5. **Pillars** — the wiki, the enforcement pack, and the contract layer are each
82
+ opt-in (the manifest is always written)
78
83
 
79
84
  ```bash
80
85
  npx @shawaze/agentspace init
81
- # answer: workspace name shape repos (name, remote, stack, role) → pillars
82
- ./clone-repos.sh # pull any sub-repos that aren't on disk yet
83
- npx @shawaze/agentspace doctor # check workspace health (size budgets, staleness, manifest)
86
+ ./clone-repos.sh # clone any sub-repos not yet on disk (idempotent)
87
+ ```
88
+
89
+ It refuses to write into a non-empty directory unless you pass `--force`, and
90
+ `--dry-run` prints what it would write without touching disk.
91
+
92
+ ### `agentspace doctor`
93
+
94
+ Mechanical health checks on a generated workspace — manifest validity,
95
+ memory-bank size budgets, `_Last verified:_` staleness, and (when the contracts
96
+ pillar is present) whether the `openspec` CLI is installed.
97
+
98
+ ```bash
99
+ npx @shawaze/agentspace doctor # human-readable
100
+ npx @shawaze/agentspace doctor --lint # machine-readable JSON (used by /lint)
84
101
  ```
85
102
 
86
- ## Roadmap
103
+ ## What gets generated
87
104
 
88
- - More tool adapters (Cursor, Windsurf, …) via the same intent seam.
105
+ A full-featured workspace looks like this:
106
+
107
+ ```
108
+ my-workspace/
109
+ ├── manifest.yaml # source of truth for the repos
110
+ ├── clone-repos.sh # rebuild the workspace anywhere
111
+ ├── CLAUDE.md · README.md # routers/overview
112
+ ├── .gitignore # sub-repos are independent git repos, ignored here
113
+ ├── memory-bank/ # the LLM wiki (numbered priority folders + conventions)
114
+ ├── openspec/ # contracts pillar — project.md + specs/ + changes/
115
+ └── .claude/ # enforcement pillar
116
+ ├── agents/ # one <repo>-engineer per repo + cross-app-reviewer
117
+ ├── commands/ # /ingest /query /lint
118
+ ├── hooks/ # the Stop hook
119
+ └── settings.json
120
+ ```
121
+
122
+ Each generated `<repo>-engineer` agent has a **hard path boundary** (it may only
123
+ edit its own repo) and stack-tailored guidance, with a "project specifics" section
124
+ for you to fill in. The cross-app reviewer is read-only.
125
+
126
+ ## Configuring the Stop hook
127
+
128
+ When the enforcement pillar is on, the Stop hook keeps your wiki current on
129
+ genuine cross-repo work. It is configured in `manifest.yaml`:
130
+
131
+ ```yaml
132
+ enforcement:
133
+ mode: auto # auto | warn | block
134
+ warmPages: 5 # "warm" once the wiki has more than N real pages …
135
+ warmSessions: 10 # … OR after M sessions
136
+ ```
137
+
138
+ It only acts when a session edits **two or more** contract-linked repos **without**
139
+ updating `memory-bank/`. In `auto` mode it **warns** until the workspace is "warm"
140
+ (you've invested in the wiki), then **blocks**. `warn` always warns; `block`
141
+ always blocks. It fails open — a misconfigured or missing setup never blocks you.
142
+
143
+ ## The contract layer
144
+
145
+ If you enable the contracts pillar, agentspace writes a shape-aware
146
+ `openspec/project.md` (scope rules, your repo table, the contract lifecycle, and a
147
+ dependency order when one applies) plus empty `specs/` and `changes/`. The
148
+ `/opsx:*` slash commands and validation come from the external `openspec` CLI:
149
+
150
+ ```bash
151
+ openspec update # installs the /opsx:* commands into .claude/
152
+ openspec validate # check specs/changes
153
+ ```
89
154
 
90
- ## Contributing
155
+ ## The stack-agent library
91
156
 
92
- See [CONTRIBUTING.md](./CONTRIBUTING.md). The per-stack agent library is designed
93
- so adding support for a new stack is a single markdown file issues and PRs welcome.
157
+ Generated engineer agents are built from a library of stack templates
158
+ (`stack-agents/`): Rails, Next.js, Expo, Go, Django, Spring Boot, plus a generic
159
+ fallback for anything else. Adding support for a new stack is **one markdown file +
160
+ one registry row** — see [CONTRIBUTING.md](./CONTRIBUTING.md). Issues and PRs
161
+ welcome.
94
162
 
95
163
  ## Development
96
164
 
97
165
  ```bash
166
+ git clone https://github.com/irucsS-9/agentspace.git
167
+ cd agentspace
98
168
  npm install
99
169
  npm test # vitest
100
170
  npm run typecheck
package/dist/cli.js CHANGED
@@ -1030,7 +1030,7 @@ async function doctorCommand(workspaceDir, today, opts = {}) {
1030
1030
  }
1031
1031
 
1032
1032
  // src/version.ts
1033
- var VERSION = "0.3.0";
1033
+ var VERSION = "0.3.1";
1034
1034
 
1035
1035
  // src/cli.ts
1036
1036
  function parseArgs(argv) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shawaze/agentspace",
3
3
  "publishConfig": { "access": "public" },
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "Scaffold an agent-native multi-repo workspace — keep sibling repos coherent for AI coding agents",
6
6
  "type": "module",
7
7
  "bin": { "agentspace": "dist/cli.js" },