space-architect 1.2.0 → 2.0.0.rc1

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +103 -0
  3. data/README.md +248 -146
  4. data/exe/architect +1 -1
  5. data/exe/space +2 -2
  6. data/exe/src +13 -0
  7. data/lib/space_architect/architect_mission.rb +84 -53
  8. data/lib/space_architect/cli/architect.rb +107 -121
  9. data/lib/space_architect/cli/research.rb +94 -0
  10. data/lib/space_architect/cli/space.rb +25 -31
  11. data/lib/space_architect/cli/src.rb +20 -14
  12. data/lib/space_architect/cli.rb +22 -22
  13. data/lib/space_architect/dispatcher.rb +5 -1
  14. data/lib/space_architect/harness.rb +123 -16
  15. data/lib/space_architect/research/mux.rb +127 -0
  16. data/lib/space_architect/research/registry.rb +70 -0
  17. data/lib/space_architect/research/renderer.rb +101 -0
  18. data/lib/space_architect/research/run.rb +7 -0
  19. data/lib/space_architect/research/supervisor.rb +108 -0
  20. data/lib/space_architect/research.rb +13 -0
  21. data/lib/space_architect/run_creator.rb +53 -0
  22. data/lib/space_architect/skill_installer.rb +109 -0
  23. data/lib/space_architect.rb +5 -19
  24. data/lib/{space_architect → space_core}/atomic_write.rb +1 -1
  25. data/lib/space_core/cli/base_command.rb +19 -0
  26. data/lib/space_core/cli/config.rb +49 -0
  27. data/lib/space_core/cli/current.rb +16 -0
  28. data/lib/space_core/cli/help.rb +110 -0
  29. data/lib/space_core/cli/helpers.rb +115 -0
  30. data/lib/space_core/cli/init.rb +29 -0
  31. data/lib/space_core/cli/list.rb +24 -0
  32. data/lib/space_core/cli/new.rb +38 -0
  33. data/lib/space_core/cli/path.rb +16 -0
  34. data/lib/space_core/cli/repeatable_options.rb +75 -0
  35. data/lib/space_core/cli/repo.rb +76 -0
  36. data/lib/space_core/cli/shell.rb +125 -0
  37. data/lib/space_core/cli/show.rb +21 -0
  38. data/lib/space_core/cli/status.rb +33 -0
  39. data/lib/space_core/cli/use.rb +17 -0
  40. data/lib/space_core/cli.rb +171 -0
  41. data/lib/{space_architect → space_core}/config.rb +1 -1
  42. data/lib/{space_architect → space_core}/errors.rb +1 -1
  43. data/lib/{space_architect → space_core}/git_client.rb +1 -1
  44. data/lib/{space_architect → space_core}/mise_client.rb +1 -1
  45. data/lib/{space_architect → space_core}/repo_reference.rb +1 -1
  46. data/lib/{space_architect → space_core}/repo_resolver.rb +1 -1
  47. data/lib/{space_architect → space_core}/shell_integration.rb +1 -1
  48. data/lib/{space_architect → space_core}/slugger.rb +1 -1
  49. data/lib/{space_architect → space_core}/space.rb +1 -1
  50. data/lib/{space_architect → space_core}/space_store.rb +12 -12
  51. data/lib/{space_architect → space_core}/state.rb +1 -1
  52. data/lib/{space_architect → space_core}/terminal.rb +16 -1
  53. data/lib/space_core/version.rb +7 -0
  54. data/lib/{space_architect → space_core}/warnings.rb +1 -1
  55. data/lib/{space_architect → space_core}/xdg.rb +1 -1
  56. data/lib/space_core.rb +24 -0
  57. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/clone.rb +5 -5
  58. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/config.rb +7 -7
  59. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/daemon.rb +46 -30
  60. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/options.rb +1 -1
  61. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/org.rb +9 -9
  62. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/repo.rb +9 -9
  63. data/lib/space_src/cli/shell.rb +122 -0
  64. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/status.rb +7 -7
  65. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli/sync.rb +17 -17
  66. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cli.rb +40 -18
  67. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/cloner.rb +3 -3
  68. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/config/contract.rb +1 -1
  69. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/config/duration.rb +1 -1
  70. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/config/model.rb +1 -1
  71. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/config/store.rb +5 -5
  72. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/forge/client.rb +2 -2
  73. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/forge/github.rb +4 -4
  74. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/launchd/agent.rb +5 -5
  75. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/launchd/plist.rb +3 -3
  76. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/log_rotator.rb +1 -1
  77. data/lib/space_src/migration.rb +43 -0
  78. data/lib/space_src/nav.rb +98 -0
  79. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/paths.rb +2 -2
  80. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/scm/client.rb +1 -1
  81. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/scm/git.rb +4 -4
  82. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/scm/status.rb +1 -1
  83. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/shell.rb +1 -1
  84. data/lib/space_src/shell_integration.rb +321 -0
  85. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/state/lock.rb +1 -1
  86. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/state/store.rb +2 -2
  87. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/sync/engine.rb +12 -12
  88. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/sync/repo_plan.rb +3 -3
  89. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/ui/interactive_reporter.rb +1 -1
  90. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/ui/json_reporter.rb +1 -1
  91. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/ui/mode.rb +1 -1
  92. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/ui/plain_reporter.rb +1 -1
  93. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/ui/reporter.rb +1 -1
  94. data/{vendor/repo-tender/lib/space_architect/pristine → lib/space_src}/version.rb +2 -2
  95. data/lib/space_src.rb +37 -0
  96. data/skill/architect/SKILL.md +329 -0
  97. data/skill/architect/dispatch.md +308 -0
  98. data/skill/architect/research.md +98 -0
  99. data/skill/architect-research/SKILL.md +165 -0
  100. data/skill/architect-research/lanes.md +191 -0
  101. data/skill/architect-vocabulary/SKILL.md +141 -0
  102. metadata +122 -67
  103. data/lib/space_architect/cli/config.rb +0 -61
  104. data/lib/space_architect/cli/current.rb +0 -22
  105. data/lib/space_architect/cli/helpers.rb +0 -117
  106. data/lib/space_architect/cli/init.rb +0 -35
  107. data/lib/space_architect/cli/list.rb +0 -30
  108. data/lib/space_architect/cli/new.rb +0 -43
  109. data/lib/space_architect/cli/options.rb +0 -12
  110. data/lib/space_architect/cli/path.rb +0 -22
  111. data/lib/space_architect/cli/repo.rb +0 -88
  112. data/lib/space_architect/cli/shell.rb +0 -137
  113. data/lib/space_architect/cli/show.rb +0 -27
  114. data/lib/space_architect/cli/status.rb +0 -39
  115. data/lib/space_architect/cli/use.rb +0 -23
  116. data/lib/space_architect/version.rb +0 -5
  117. data/vendor/repo-tender/lib/space_architect/pristine.rb +0 -37
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62235ba54045a8883eaaaced2fef7c231d45ad6cb363dda9256ec65692b6023b
4
- data.tar.gz: 7d90b91f3a247c20cc273c332807c65c8e500dc62bffaec1a35076263eb969a2
3
+ metadata.gz: 3022f9e726e74aa3edeca3004af6e3af1a7872bd709fb0da75fbeee5fcf33d30
4
+ data.tar.gz: f3f2aef35926a99ba14209c550fb0533da777561df7348d4e0bfce19ee240f86
5
5
  SHA512:
6
- metadata.gz: 042c966a4dbf2075abaeaffb23ad9e426a4421ffcd9621ff238d2f074771e5d65bc7030775fe1733dde40030dc0aff37b84c35e13a035ac29705e3e42667c96e
7
- data.tar.gz: f633823970cefde990131c1cce4a415bd8f767030120438ae7bd76220653ab0c42580352de48ab2c34b82f5fd4cc597c6ba14410603e66de6a3dd86f89e197ee
6
+ metadata.gz: 480cd0f4dbb96653f6c4db809755e8968cf4bb96311472dde9a2e5172d22526589d20ca522bd028180eac6d2c772e41e80236474da9f8ab2b4597128227be21b
7
+ data.tar.gz: 7089e119fe3a0b7bee92facd78dd691ddcf84daae4dc783dda80c2513042ab1d1e1767b5afd099012dd4029c9e0a126c8ea3f7c5b48fe3d056bc8a7b7c7a03a8
data/CHANGELOG.md ADDED
@@ -0,0 +1,103 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.0] - 2026-06-27
9
+
10
+ Re-architects the single `architect` gem into three composable binaries —
11
+ **`space` · `architect` · `src`** — over clean `Space::Core` / `Space::Architect`
12
+ / `Space::Src` library seams. End-user CLI behaviour is preserved byte-for-byte
13
+ except where called out under **Changed** below.
14
+
15
+ ### Added
16
+
17
+ - **`src` — standalone evergreen-engine binary** (`exe/src`). `repo`, `org`,
18
+ `sync`, `status`, `config`, `daemon`, and `clone`, plus single-token fuzzy
19
+ navigation (`src <query>` resolves to a repo and honours the `cd` contract)
20
+ and native fish shell integration with completions. Previously this engine was
21
+ reachable only as `architect src …`; it is now a first-class binary in its own
22
+ right (and still forwarded by `architect src …`).
23
+ - **`architect research dispatch | status | wait`** — first-class parallel,
24
+ read-only research lanes. Detached `claude -p` researchers (no Edit/Write/Bash)
25
+ run in the background; a socketry/async fiber mux tails each lane's `run.jsonl`
26
+ and extracts its report. The architect verifies claims and writes Grounds.
27
+ - **`architect dispatch --detach`** — detached builder launch that returns
28
+ immediately with a PID and survives the harness wall-clock reap; poll the
29
+ lane's report for completion.
30
+
31
+ ### Changed
32
+
33
+ - **BREAKING — three binaries over clean seams.** `space` now runs on
34
+ `Space::Core` alone (`exe/space`); `architect` forwards `space …` / `src …` to
35
+ their surfaces; `src` is its own executable (`exe/src`). The gem now installs
36
+ three executables (`architect`, `space`, `src`) where 1.3.0 installed two.
37
+ - **BREAKING — Ruby namespace overhaul (library embedders).** The single
38
+ `SpaceArchitect::*` module is retired and split into `Space::Core::*`
39
+ (foundation: config, state, XDG, terminal, git/mise clients, space store),
40
+ `Space::Architect::*` (mission, harness, dispatch, research), and
41
+ `Space::Src::*` (the evergreen engine). Update any `require`s and constant
42
+ references. The CLI surface is unaffected.
43
+ - **BREAKING — `repo-tender` absorbed into `space-src`.** The vendored
44
+ `repo-tender` engine is gone; its functionality now ships as `Space::Src`.
45
+ State migrates automatically from `$XDG_STATE_HOME/repo-tender/` to
46
+ `$XDG_STATE_HOME/space-src/` on first run (data-preserving).
47
+ - **BREAKING — `space new` takes repeatable `-r` flags.** Repos are now passed
48
+ as `space new "My Space" -r org/repo -r example/alpha` instead of as positional
49
+ arguments after the title. Repeated `-r` accumulate; the comma form still works.
50
+ - **Colourful global help** for `space` and `architect` (`--help` listing), with
51
+ global colour options (`--color` / `--colors`) inherited by every command via a
52
+ shared `BaseCommand`. The `src` binary keeps its own `--plain` / `--json`
53
+ output system.
54
+ - `space --version` now reports the space-surface (`Space::Core`) version
55
+ independently of the architect mission tooling.
56
+
57
+ ### Internal
58
+
59
+ - `Space::Core` carved out as a standalone, leak-free foundation (no
60
+ `SpaceArchitect` references); behaviour preserved byte-for-byte across the
61
+ carve, the module rename, and the binary split.
62
+ - CI: `softprops/action-gh-release` bumped to v3 (Node 24 runtime).
63
+ - Test suite: 762 runs, 0 failures.
64
+
65
+ ## [1.3.0] - 2026-06-25
66
+
67
+ ### Added
68
+
69
+ - `architect install-skills` — install the bundled skills (architect,
70
+ architect-research, architect-vocabulary) for claude / codex / opencode / pi,
71
+ globally or per-project, with `--dry-run` and `--force`.
72
+ - `architect-vocabulary` skill — a self-contained glossary of the Architect
73
+ system, loadable without running the loop.
74
+
75
+ ### Fixed
76
+
77
+ - Broke a circular `require` in the vendored `pristine/cli`; silenced stray git
78
+ worktree output in the test suite.
79
+
80
+ ## [1.2.0] - 2026-06-24
81
+
82
+ ### Added
83
+
84
+ - §-anchored mission **BRIEF** (`architect brief new`) cited as `BRIEF §N` across
85
+ iterations, and persistence absorbed into the CLI: `architect section`,
86
+ `evidence`, `merge`, `integrate`, and `gate` (the architect authors content;
87
+ the CLI owns the commit). `architect freeze` now prints the frozen Acceptance
88
+ Criteria back; `worktree add --touch` records a lane's touch set.
89
+
90
+ ### Changed
91
+
92
+ - Reduced Architect Loop ceremony; restored the § citation anchor.
93
+
94
+ ## [1.1.0] - 2026-06-21
95
+
96
+ - First tagged release: the Architect Loop CLI — spaces, missions, iterations,
97
+ lanes, worktrees, and headless `claude -p` dispatch, with variant sets and the
98
+ claude-code and opencode harnesses.
99
+
100
+ [2.0.0]: https://github.com/jetpks/space-architect/compare/v1.3.0...v2.0.0
101
+ [1.3.0]: https://github.com/jetpks/space-architect/compare/v1.2.0...v1.3.0
102
+ [1.2.0]: https://github.com/jetpks/space-architect/compare/v1.1.0...v1.2.0
103
+ [1.1.0]: https://github.com/jetpks/space-architect/releases/tag/v1.1.0
data/README.md CHANGED
@@ -4,10 +4,22 @@
4
4
 
5
5
  > **Task-scoped workspaces that double as Architect Loop missions — for humans and their agents!** ✨🛰️
6
6
 
7
- `space-architect` is a Ruby CLI for creating and managing **spaces** — task-scoped
8
- project workspaces that hold repos, notes, and artifacts under one obvious
9
- filesystem root — fused with the **Architect Loop**: a structured judgment-and-build
10
- cycle for you and a fleet of headless AI builders. 🌌
7
+ `space-architect` is a Ruby toolkit for **spaces** — task-scoped project
8
+ workspaces that hold repos, notes, and artifacts under one obvious filesystem
9
+ root — fused with the **Architect Loop**: a structured judgment-and-build cycle
10
+ for you and a fleet of headless AI builders. 🌌
11
+
12
+ The gem ships **three composable binaries** over clean library seams:
13
+
14
+ | Binary | What it does | Library |
15
+ |--------|--------------|---------|
16
+ | **`space`** 🪐 | Create and manage task-scoped workspaces | `Space::Core` |
17
+ | **`architect`** 🏗️ | Run the Architect Loop — judgment + headless builders | `Space::Architect` |
18
+ | **`src`** 🌲 | Tend evergreen repo checkouts for copy-on-write provisioning | `Space::Src` |
19
+
20
+ Each is a first-class executable. `architect` also forwards `architect space …`
21
+ and `architect src …` to the other two, so a mission can drive everything from
22
+ one command when that's handier. 🎀
11
23
 
12
24
  ## What's a space? 🪐
13
25
 
@@ -15,19 +27,20 @@ A space is just a regular directory with a tiny YAML identity file and room for
15
27
  everything a task needs:
16
28
 
17
29
  ```text
18
- ~/src/spaces/20260531-name-of-space/
30
+ ~/architect/spaces/20260531-name-of-space/
19
31
  space.yaml # identity: id, title, status, repos, notes, tags
20
32
  README.md
21
33
  repos/ # cloned (or copy-on-write'd) repositories
22
34
  notes/ # scratch, prompts, logs
23
- architecture/ # iteration files: I<NN>-<name>.md + ARCHITECT.md index
35
+ architecture/ # iteration files: I<NN>-<name>.md + ARCHITECT.md index + BRIEF.md
24
36
  build/ # lane worktrees + scratch (build/<id>-<lane>/)
25
37
  tmp/ # workspace-local temp — use this instead of /tmp
26
38
  ```
27
39
 
28
- Run a command from anywhere inside a space and it just works — `architect` walks
29
- up from `$PWD` until it finds the nearest `space.yaml`. No "current space" state to
30
- get out of sync; where you *are* is the space you mean. 🧭
40
+ Run a command from anywhere inside a space and it just works — `space` and
41
+ `architect` walk up from `$PWD` until they find the nearest `space.yaml`. No
42
+ "current space" state to get out of sync; where you *are* is the space you
43
+ mean. 🧭
31
44
 
32
45
  ## Installation 📦
33
46
 
@@ -37,8 +50,6 @@ Add it to your `Gemfile`:
37
50
  gem "space-architect"
38
51
  ```
39
52
 
40
- Then:
41
-
42
53
  ```bash
43
54
  bundle install
44
55
  ```
@@ -49,216 +60,307 @@ Or grab it yourself:
49
60
  gem install space-architect
50
61
  ```
51
62
 
52
- The primary executable is `architect`. The gem is `space-architect`. 🎀
53
- A `space` shim is also installed and forwards all arguments to `architect space …`
54
- for convenience.
63
+ The gem is `space-architect`; it installs three executables — `space`,
64
+ `architect`, and `src`. 🎀
55
65
 
56
- ## Quick Start 🎀
66
+ ## Quick start 🎀
57
67
 
58
- **Space management:**
68
+ ```sh
69
+ # Spaces
70
+ space init # create XDG config + state files
71
+ space new "Name of Space" # blast off a new space 🚀
72
+ space new "Name of Space" -r org/repo -r org/lib # …with repos cloned in (repeat -r)
73
+ space list # see all your spaces
74
+ space show # show the space you're standing in
75
+
76
+ # Evergreen checkouts (copy-on-write sources for fast provisioning)
77
+ src repo add github.com/example-org/example-app # tend it 🌲
78
+ src sync # one sync pass
79
+ src status # per-repo evergreen status
80
+
81
+ # Architect Loop (run from inside a space)
82
+ architect install-skills # install agent skills (once per machine)
83
+ architect init # scaffold ARCHITECT.md + architecture/
84
+ architect new my-feature # scaffold the next iteration file
85
+ architect freeze my-feature # lock the Acceptance Criteria ❄️
86
+ architect dispatch my-feature lane-a # send a headless builder to work
87
+ ```
88
+
89
+ ## `space` — task-scoped workspaces 🌌
59
90
 
60
91
  ```sh
61
- architect space init # create XDG config + state files
62
- architect space new "Name of Space" # blast off a new space 🚀
63
- architect space new "Name of Space" org/repo … # with repos cloned in (variadic)
64
- architect space list # see all your spaces
65
- architect space show # show the space you're standing in
66
- architect space status done # mark the current mission complete
92
+ space init
93
+ space new "Name of Space"
94
+ space new "Name of Space" -r org/repo -r example-tools/alpha -r example-tools/beta
95
+ space list # alias: space ls
96
+ space show 20260531-name-of-space
97
+ space path 20260531-name-of-space
98
+ space current # based on $PWD
99
+ space show # based on $PWD
100
+ space status done # based on $PWD
101
+ space status 20260531-name-of-space done
102
+ space config set default_provider github.com
103
+ space config set default_organization example-org
104
+ space repo add example-app # github.com/example-org/example-app
105
+ space repo add example-tools/alpha example-tools/beta
106
+ space repo add gitlab.com/example-org/api
107
+ space repo resolve example-app example-tools/async
108
+ space repo ls # alias: space repos ls
109
+ space use 20260531-name-of-space # records recent state, prints the path
110
+ space ls --color=always # auto | always | never (--colors also accepted)
67
111
  ```
68
112
 
69
- **Architect Loop (run from inside a space):**
113
+ Repos are passed with a repeatable `-r` flag (`-r org/repo -r org/lib`); the
114
+ comma form (`-r a,b`) works too. Space ids are date-prefixed
115
+ (`20260531-name-of-space`) so they sort naturally, and duplicate names on the
116
+ same day get a counter (`…-name-of-space-2`). 📅
117
+
118
+ Everything `space` does is also reachable as `architect space …` from within a
119
+ mission.
120
+
121
+ ## `src` — the evergreen engine 🌲
122
+
123
+ `src` keeps local clones under `<src_dir>/<host>/<owner>/<repo>` (default
124
+ `~/architect/src/…`) clean, on their default branch, and freshly fetched — so
125
+ spaces can provision repos by **copy-on-write** instead of cloning over the
126
+ network.
70
127
 
71
128
  ```sh
72
- architect init # scaffold ARCHITECT.md + architecture/
73
- architect new <iteration> # scaffold next iteration file
74
- architect dispatch <iteration> <lane> # dispatch a builder for a lane
75
- architect status # show mission state (read-only)
76
- architect freeze <iteration> # freeze Acceptance Criteria
77
- architect verify <iteration> # post-flight mechanical checks
129
+ src repo add github.com/example-org/example-app # track + tend a repo
130
+ src org add github.com/example-org # track a whole org
131
+ src sync # run one sync pass (--repo to scope)
132
+ src status # per-repo evergreen status table
133
+ src clone example-app # APFS copy-on-write into $PWD
134
+ src daemon install # per-user launchd agent for background sync
78
135
  ```
79
136
 
80
- ## Usage 🛰️
137
+ When `space repo add` finds a matching evergreen checkout, it copy-on-writes
138
+ from it instead of hitting the network — instant provisioning. ⚡ The two
139
+ surfaces share one layout by design, so they line up with zero configuration:
81
140
 
82
141
  ```sh
83
- architect space init
84
- architect space new "Name of Space"
85
- architect space new "Name of Space" org/repo example-tools/alpha example-tools/beta
86
- architect space list
87
- architect space show 20260531-name-of-space
88
- architect space path 20260531-name-of-space
89
- architect space current # based on $PWD
90
- architect space show # based on $PWD
91
- architect space status done # based on $PWD
92
- architect space status 20260531-name-of-space done
93
- architect space config set default_provider github.com
94
- architect space config set default_organization example-org
95
- architect space repo add example-app # github.com/example-org/example-app
96
- architect space repo add example-tools/alpha example-tools/beta
97
- architect space repo add gitlab.com/example-org/api
98
- architect space repo resolve example-app example-tools/async
99
- architect space repo ls
100
- architect space use 20260531-name-of-space # records recent state and prints the path
101
- architect space ls --color=always # auto, always, or never; --colors is also accepted
142
+ src repo add github.com/example-org/example-app # tend it: keep it evergreen 🌲
143
+ space repo add example-app # copies it instantly ⚡
102
144
  ```
103
145
 
104
- Space ids are date-prefixed (`20260531-name-of-space`) so they sort naturally,
105
- and duplicate names on the same day get a counter (`...-name-of-space-2`). 📅
146
+ `src` has its own `--plain` / `--json` output modes for scripting, and its own
147
+ fish integration (`src shell fish install`).
106
148
 
107
- ## The Architect Loop 🏗️
149
+ ## `architect` — the Architect Loop 🏗️
108
150
 
109
- Space Architect ships a structured build cycle for you and headless AI builders
110
- called the **Architect Loop**. Each loop lives inside a space as a *mission*.
151
+ The **Architect Loop** is a structured build cycle for you and headless AI
152
+ builders. Each loop lives inside a space as a *mission*.
111
153
 
112
154
  **Roles:**
113
155
 
114
- - **Architect** — you (or Claude Opus 4.8 in judgment mode): arbitrates disagreements,
115
- writes and freezes iteration files, calls kill/continue, merges builder output.
116
- - **Builder** Claude Sonnet 4.6 run headless via `architect dispatch`; reads the
117
- iteration's Builder Prompt from `architecture/`, does the work, writes its report
118
- to `build/<id>-<lane>/`.
156
+ - **Architect** — you (or Claude Opus 4.8 in judgment mode): arbitrates
157
+ disagreements, writes and freezes iteration files, calls kill/continue, merges
158
+ builder output. Never writes implementation code.
159
+ - **Builder** Claude Sonnet 4.6 run headless via `architect dispatch`, one per
160
+ lane in its own git worktree: reads the iteration's Builder Prompt, does the
161
+ work, writes raw evidence to `build/<id>-<lane>/report.md`. Never grades its
162
+ own work; never edits `architecture/`.
119
163
 
120
164
  **Filesystem layout:**
121
165
 
122
166
  ```text
123
167
  architecture/
124
168
  ARCHITECT.md # cross-iteration index; mission-wide state
125
- I01-<iteration>.md # one file per iteration
126
- I02-<iteration>.md
169
+ BRIEF.md # durable §-numbered mission contract (optional)
170
+ I01-<iteration>.md # one self-contained file per iteration
127
171
  build/
128
172
  I01-<iteration>-<lane>/ # lane worktree + scratch per dispatch
129
173
  run.jsonl # streamed builder output
130
- report.md # builder report (transcribed to iteration file verbatim)
174
+ report.md # builder report (transcribed into the iteration file verbatim)
131
175
  ```
132
176
 
133
- **Iteration file anatomy** (in `architecture/I<NN>-<name>.md`):
177
+ **Iteration file anatomy** one file, grown section by section. You author the
178
+ *content*; the CLI owns the *persistence* (each command writes the section,
179
+ commits it with the canonical message, and prints back what changed):
180
+
181
+ | Section | Holds | How you persist it |
182
+ |---------|-------|--------------------|
183
+ | `## Grounds` | why — research / brief distilled (optional) | `architect section <it> grounds --from <f>` |
184
+ | `## Specification` | what/how — the full delegation contract | `architect section <it> specification --from <f>` |
185
+ | `## Acceptance Criteria` | proof — exact gate commands + thresholds | `architect freeze <it>` ❄️ |
186
+ | `## Builder Prompt` | the exact lane-prompt(s) dispatched | `architect section <it> prompt --append --lane <l> --from <f>` |
187
+ | `## Builder Report` | raw evidence, transcribed verbatim | `architect evidence <it> --lane <l>` |
188
+ | `## Verdict` | rulings + per-AC PASS/FAIL + KILL/CONTINUE | `architect section <it> verdict --from <f>` |
134
189
 
135
- | Section | Who writes it | When |
136
- |---------|--------------|------|
137
- | `## Grounds` | Architect | Before dispatch research, PRD, decisions |
138
- | `## Specification` | Architect | Before dispatch full delegation contract |
139
- | `## Acceptance Criteria` | Architect | Before `architect freeze` — frozen, read-only after |
140
- | `## Builder Prompt` | Architect | Records the exact prompt dispatched |
141
- | `## Builder Report` | Architect | Transcribed verbatim from `build/…/report.md` |
142
- | `## Verdict` | Architect | After reviewing evidence — KILL / CONTINUE |
190
+ **The freeze ❄️** `architect freeze <iteration>` commits the frozen region
191
+ (Grounds / Specification / Acceptance Criteria), records the `freeze_sha`, and
192
+ prints the frozen Acceptance Criteria back. Any change to those sections
193
+ afterward is an automatic iteration FAIL. The builder never edits the iteration
194
+ file.
143
195
 
144
- **Acceptance Criteria freeze before results** — `architect freeze <iteration>` commits
145
- the frozen sections and records `freeze_sha`; any change to Grounds, Specification,
146
- or Acceptance Criteria after that point is an automatic iteration FAIL. The builder
147
- never edits the iteration file.
196
+ **Command surface:**
148
197
 
149
- **Typical loop session:**
198
+ ```sh
199
+ architect init # scaffold ARCHITECT.md + the space.yaml architect: block
200
+ architect brief new # scaffold the durable mission BRIEF.md
201
+ architect new <iteration> # scaffold architecture/I<NN>-<iteration>.md
202
+ architect section <it> <section> --from <f> # write + commit a section
203
+ architect freeze <iteration> # freeze the Acceptance Criteria ❄️
204
+ architect worktree add <repo> <it> <lane> # isolated worktree per lane (2–4 lanes)
205
+ architect dispatch <it> <lane> # dispatch a builder (add --detach to survive long runs)
206
+ architect verify <iteration> # post-flight mechanical checks (reports only)
207
+ architect evidence <it> --lane <lane> # transcribe the builder's report verbatim
208
+ architect gate <iteration> # run the frozen gate commands, stream raw output
209
+ architect merge <it> <lane> # integrate ONE judged-passing lane (--no-ff)
210
+ architect integrate <it> --lanes a,b # integrate a set of passing lanes, in order
211
+ architect status # mission state (read-only)
212
+ architect variant add|compare|promote … # competing (harness, model) lanes over one frozen spec
213
+ architect research dispatch|status|wait … # parallel read-only research lanes (see below)
214
+ ```
215
+
216
+ A typical session:
150
217
 
151
218
  ```sh
152
- # From inside your space:
153
- architect init # first time: scaffold ARCHITECT.md
154
- architect new my-feature # scaffold architecture/I01-my-feature.md
155
- # write Grounds + Specification + Acceptance Criteria …
156
- architect freeze my-feature # lock it
157
- architect dispatch my-feature lane-A # send builder to work
158
- # … builder runs, writes build/I01-my-feature-lane-A/report.md …
219
+ architect init # first time
220
+ architect new my-feature # scaffold I01-my-feature.md
221
+ architect section my-feature specification --from spec.md
222
+ architect freeze my-feature # lock it ❄️
223
+ architect dispatch my-feature lane-a --detach # send a builder; poll the report
159
224
  architect verify my-feature # mechanical post-flight checks
160
- architect status # review mission state
161
- # architect reads evidence and writes Verdict …
225
+ architect evidence my-feature --lane lane-a # transcribe raw evidence
226
+ architect gate my-feature # run the frozen gates yourself
227
+ # … read the diff against the spec, then write the Verdict …
228
+ ```
229
+
230
+ ### Streaming builder output 📡
231
+
232
+ `architect dispatch` can push the builder's stream-json to an ingest server for
233
+ live viewing:
234
+
235
+ ```sh
236
+ # Push to an already-created run (you supply the full ingest URL):
237
+ architect dispatch my-feature lane-a \
238
+ --push-url $HOST/runs/<id>/ingest \
239
+ --push-token $INGEST_TOKEN
240
+
241
+ # Create a run and push in one step (requires --push-token = server's INGEST_TOKEN):
242
+ architect dispatch my-feature lane-a \
243
+ --push-host $HOST \
244
+ --push-token $INGEST_TOKEN
245
+ ```
246
+
247
+ `--push-host` POSTs to `<HOST>/runs`, parses the new run id from the `201`
248
+ response, derives `<HOST>/runs/<id>/ingest`, and streams there; the created run
249
+ id and ingest URL are printed after dispatch starts. `--push-url` and
250
+ `--push-host` are mutually exclusive, both require `--push-token`, and neither
251
+ can be combined with `--detach` (the push tees the live pipe in-process).
252
+
253
+ ### Research lanes 🔭
254
+
255
+ When an iteration needs facts the repo doesn't already have, fan out parallel
256
+ **read-only** research lanes — detached `claude -p` researchers (no
257
+ Edit/Write/Bash) that you supervise:
258
+
259
+ ```sh
260
+ architect research dispatch 01-official-api.prompt.md 02-changelog.prompt.md
261
+ architect research wait # tails each lane's run.jsonl; --level 1-4, --quiet, --thinking
262
+ architect research status # status of dispatched runs
162
263
  ```
163
264
 
265
+ Researchers gather; the architect verifies the load-bearing claims against
266
+ sources and writes the iteration's **Grounds** section.
267
+
268
+ ### Skills 🧠
269
+
270
+ `architect install-skills` installs the bundled `architect`,
271
+ `architect-research`, and `architect-vocabulary` skills for your harness:
272
+
273
+ ```sh
274
+ architect install-skills # default: claude (~/.claude/skills/)
275
+ architect install-skills --provider opencode # or codex | pi
276
+ architect install-skills --project # into ./… instead of globally
277
+ architect install-skills --dry-run # show what would change
278
+ ```
279
+
280
+ `architect-vocabulary` loads the system's terms and a short orientation when
281
+ you're in a space but don't want to run the loop.
282
+
164
283
  ## Fish shell integration 🐟
165
284
 
166
- Shells can't let a child process change *their* working directory, so `architect`
167
- ships a small fish wrapper function. It also installs fish completions for commands,
168
- subcommands, spaces, statuses, config keys, and common config values. Install both
169
- into fish's autoloaded directories:
285
+ Shells can't let a child process change *their* working directory, so `space`
286
+ and `src` each ship a small fish wrapper function plus completions (commands,
287
+ subcommands, spaces, statuses, config keys, repo refs). Install into fish's
288
+ autoloaded directories:
170
289
 
171
290
  ```fish
172
- architect space shell fish install
291
+ space shell fish install
292
+ src shell fish install
173
293
  exec fish
174
294
  ```
175
295
 
176
- Restarting fish (or `exec fish`) lets the current terminal pick up the new autoloaded
177
- wrapper function. After that, `architect space new "Name of Space"` and
178
- `architect space use 20260531-name-of-space` will `cd` into the selected space once the
179
- CLI command succeeds. Every other command keeps normal CLI behavior. 🚪
180
-
181
- The function is written to `~/.config/fish/functions/space.fish` and completions to
182
- `~/.config/fish/completions/space.fish`, so there's no need to edit `config.fish`.
296
+ After restarting fish (or `exec fish`), `space new "…"` and
297
+ `space use <id>` will `cd` into the selected space once the command succeeds;
298
+ every other command keeps normal CLI behavior. 🚪 The functions and completions
299
+ are written under `~/.config/fish/`, so there's no need to edit `config.fish`.
183
300
  For one-off testing without installing:
184
301
 
185
302
  ```fish
186
- architect space shell init fish | source
303
+ space shell init fish | source
187
304
  ```
188
305
 
189
306
  ## Configuration ⚙️
190
307
 
191
- Configuration follows the XDG base directory spec:
308
+ Config lives at `~/.config/space-architect/config.yml` (XDG-aware) and defaults to:
192
309
 
193
310
  ```yaml
194
311
  version: 1
195
- spaces_dir: ~/src/spaces
196
- evergreen_dir: ~/src/evergreen
312
+ base_dir: ~/architect # spaces_dir + src_dir hang off this by default
197
313
  default_provider: github.com
198
314
  default_organization:
199
- git_clone_protocol: ssh
315
+ git_clone_protocol: ssh # ssh | https
200
316
  ```
201
317
 
202
- View current values: `architect space config show`. Set a value: `architect space config set KEY VALUE`.
318
+ Derived defaults: `spaces_dir` `<base_dir>/spaces`, `src_dir` (evergreen
319
+ checkout root) → `<base_dir>/src`. Override either explicitly. View values with
320
+ `space config show`; set one with `space config set KEY VALUE`. Editable keys:
321
+ `base_dir`, `spaces_dir`, `src_dir`, `default_provider`, `default_organization`,
322
+ `git_clone_protocol`.
203
323
 
204
- ## Repos: evergreen, copy-on-write, concurrent 🌲
324
+ ## Repos: evergreen, copy-on-write, concurrent
205
325
 
206
326
  Repos are added to the current space under `repos/` and tracked in `space.yaml`.
207
- When an up-to-date local copy exists under `evergreen_dir` at
208
- `<evergreen_dir>/<provider>/<owner>/<name>` (e.g.
209
- `~/src/evergreen/github.com/example-org/example-app`), `architect` copies it into the
210
- space instead of cloning over the network — much faster, and a copy-on-write clone
211
- on APFS. ⚡ Set `evergreen_dir` to empty to always clone:
327
+ When an up-to-date evergreen checkout exists at
328
+ `<src_dir>/<host>/<owner>/<name>` (e.g.
329
+ `~/architect/src/github.com/example-org/example-app`), `space` copies it into the
330
+ space instead of cloning over the network — a copy-on-write clone on APFS. ⚡
331
+ Set `src_dir` empty to always clone:
212
332
 
213
333
  ```sh
214
- architect space config set evergreen_dir ""
334
+ space config set src_dir ""
215
335
  ```
216
336
 
217
- When no evergreen copy is found, the repo is cloned over the network. Clone URLs
218
- default to SSH (`git@github.com:example-org/example-app.git`). Prefer HTTPS?
337
+ Clone URLs default to SSH (`git@github.com:example-org/example-app.git`); switch
338
+ with `space config set git_clone_protocol https`. Multiple repos passed to
339
+ `space repo add` are fetched **concurrently**, up to five at a time, on fibers —
340
+ no threads, all cooperative. 🧵 After each repo lands, `space` runs `mise trust`
341
+ in it. Each space also gets a workspace-local `tmp/` — use it instead of `/tmp`.
219
342
 
220
- ```sh
221
- architect space config set git_clone_protocol https
222
- ```
223
-
224
- When stdout/stderr are attached to a TTY, long-running repo operations show an
225
- interactive spinner. Multiple repos passed to `architect space repo add` are fetched
226
- **concurrently**, up to five at a time, on fibers — no threads, all cooperative. 🧵
227
- After each repo is in place, `architect` runs `mise trust` in it so local mise config
228
- is ready to go.
343
+ ## Embedding 📚
229
344
 
230
- Each space also gets a workspace-local `tmp/`. Use it instead of `/tmp` or
231
- `/var/tmp`; when using `mktemp`, point it at `tmp/`. 🗑️
345
+ The library is split into three namespaces you can require independently:
232
346
 
233
- ## The `src` engine: evergreen checkouts 🌿
347
+ - **`Space::Core`** the foundation: config, state, XDG, terminal, git/mise
348
+ clients, the space store. The `space` CLI runs on this alone.
349
+ - **`Space::Architect`** — mission state, the builder harness, dispatch, and the
350
+ research supervisor.
351
+ - **`Space::Src`** — the evergreen engine (tracking, sync, copy-on-write clone).
234
352
 
235
- `architect src …` exposes the **vendored** evergreen engine (from
236
- [repo-tender](https://github.com/jetpks/repo-tender)) directly no separate
237
- installation needed. It keeps local clones under
238
- `~/src/evergreen/<host>/<owner>/<repo>` clean, on their default branch, and freshly
239
- fetched.
240
-
241
- ```sh
242
- architect src repo add github.com/example-org/example-app # tend it 🌲
243
- architect src sync # run one sync pass
244
- architect src status # per-repo evergreen status
245
- ```
246
-
247
- When `architect space repo add` sees a matching evergreen copy, it copy-on-writes
248
- from it instead of hitting the network — instant provisioning. ⚡
249
-
250
- The vendored engine and space management share the same layout by design — both use
251
- `<evergreen_dir>/<host>/<owner>/<repo>` — so they line up with zero configuration:
252
-
253
- ```sh
254
- architect src repo add github.com/example-org/example-app # tend it: keep it evergreen 🌲
255
- architect space repo add example-app # copies it instantly ⚡
353
+ ```ruby
354
+ require "space_core" # just spaces
355
+ require "space_architect" # the full loop (pulls in core + src)
356
+ require "space_src" # just the evergreen engine
256
357
  ```
257
358
 
258
359
  ## Documentation 📖
259
360
 
260
361
  - **[Command Reference](docs/reference.md)** — every command, flag, and behavior
261
- - **[Design](docs/design.md)** — why spaces and the Architect Loop exist and how they're shaped
362
+ - **[Design](docs/design.md)** — why spaces and the Architect Loop exist, and how they're shaped
363
+ - **[Changelog](CHANGELOG.md)** — release history
262
364
 
263
365
  ## Development 🛠️
264
366
 
data/exe/architect CHANGED
@@ -10,4 +10,4 @@ end
10
10
 
11
11
  require "space_architect"
12
12
 
13
- SpaceArchitect::CLI.run(ARGV, $stdout, $stderr)
13
+ Space::Architect::CLI.run(ARGV, $stdout, $stderr)
data/exe/space CHANGED
@@ -8,6 +8,6 @@ if File.exist?(source_gemfile)
8
8
  $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
9
9
  end
10
10
 
11
- require "space_architect"
11
+ require "space_core"
12
12
 
13
- SpaceArchitect::CLI.run(["space", *ARGV], $stdout, $stderr)
13
+ Space::Core::CLI.run(ARGV, $stdout, $stderr)