space-architect 1.3.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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +103 -0
  3. data/README.md +248 -155
  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 +92 -132
  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 +81 -79
  23. data/lib/space_architect.rb +5 -20
  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 +1 -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 +42 -11
  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 +2 -2
  97. data/skill/architect/research.md +46 -37
  98. metadata +115 -67
  99. data/lib/space_architect/cli/config.rb +0 -61
  100. data/lib/space_architect/cli/current.rb +0 -22
  101. data/lib/space_architect/cli/helpers.rb +0 -117
  102. data/lib/space_architect/cli/init.rb +0 -35
  103. data/lib/space_architect/cli/list.rb +0 -30
  104. data/lib/space_architect/cli/new.rb +0 -43
  105. data/lib/space_architect/cli/options.rb +0 -12
  106. data/lib/space_architect/cli/path.rb +0 -22
  107. data/lib/space_architect/cli/repo.rb +0 -88
  108. data/lib/space_architect/cli/shell.rb +0 -137
  109. data/lib/space_architect/cli/show.rb +0 -27
  110. data/lib/space_architect/cli/status.rb +0 -39
  111. data/lib/space_architect/cli/use.rb +0 -23
  112. data/lib/space_architect/version.rb +0 -5
  113. data/vendor/repo-tender/lib/space_architect/pristine.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db24aa20a68fdf981176f7e51a46794a4fc2ec5cef9765c33de5832f0a314a9e
4
- data.tar.gz: 8912085239c76c1228e01d8986d789ba0fde42b4517459830c1f08cdb6e0fcfc
3
+ metadata.gz: 3022f9e726e74aa3edeca3004af6e3af1a7872bd709fb0da75fbeee5fcf33d30
4
+ data.tar.gz: f3f2aef35926a99ba14209c550fb0533da777561df7348d4e0bfce19ee240f86
5
5
  SHA512:
6
- metadata.gz: 06a4e3382403542421679272136d6c1f6a99ac5dece354b5175f5d895b1afb9cce902f9e11ea2cf64c940dd4a00f11d3dfa7390a0941f387ae4a28f47cdbc3fb
7
- data.tar.gz: 73c71c080f640540c4cfb57f347f12eae5a2486c45a373a525c44dc35ea54edf7b43ee415d979352f6569406f0f261e8d4a601af869eae5bd9f9055df02d9807
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,225 +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.
55
-
56
- ## Quick Start 🎀
63
+ The gem is `space-architect`; it installs three executables — `space`,
64
+ `architect`, and `src`. 🎀
57
65
 
58
- **Space management:**
66
+ ## Quick start 🎀
59
67
 
60
68
  ```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
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
67
87
  ```
68
88
 
69
- **Architect Loop (run from inside a space):**
89
+ ## `space` task-scoped workspaces 🌌
70
90
 
71
91
  ```sh
72
- architect install-skills # install skills for your harness (once per machine)
73
- architect init # scaffold ARCHITECT.md + architecture/
74
- architect new <iteration> # scaffold next iteration file
75
- architect dispatch <iteration> <lane> # dispatch a builder for a lane
76
- architect status # show mission state (read-only)
77
- architect freeze <iteration> # freeze Acceptance Criteria
78
- architect verify <iteration> # post-flight mechanical checks
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)
79
111
  ```
80
112
 
81
- `architect install-skills` installs the bundled `architect`, `architect-research`,
82
- and `architect-vocabulary` skills for a harness. (`architect-vocabulary` loads the
83
- system's terms and a short orientation when you're in a space but don't want to run
84
- the loop see [The Architect Loop](#the-architect-loop-).) Default is `claude`
85
- (`~/.claude/skills/`); use `--provider
86
- opencode|codex|pi` for other harnesses, and `--project` to install into the current
87
- directory instead of globally. See the [command reference](docs/reference.md) for details.
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.
88
120
 
89
- ## Usage 🛰️
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.
127
+
128
+ ```sh
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
135
+ ```
136
+
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:
90
140
 
91
141
  ```sh
92
- architect space init
93
- architect space new "Name of Space"
94
- architect space new "Name of Space" org/repo example-tools/alpha example-tools/beta
95
- architect space list
96
- architect space show 20260531-name-of-space
97
- architect space path 20260531-name-of-space
98
- architect space current # based on $PWD
99
- architect space show # based on $PWD
100
- architect space status done # based on $PWD
101
- architect space status 20260531-name-of-space done
102
- architect space config set default_provider github.com
103
- architect space config set default_organization example-org
104
- architect space repo add example-app # github.com/example-org/example-app
105
- architect space repo add example-tools/alpha example-tools/beta
106
- architect space repo add gitlab.com/example-org/api
107
- architect space repo resolve example-app example-tools/async
108
- architect space repo ls
109
- architect space use 20260531-name-of-space # records recent state and prints the path
110
- 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 ⚡
111
144
  ```
112
145
 
113
- Space ids are date-prefixed (`20260531-name-of-space`) so they sort naturally,
114
- 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`).
115
148
 
116
- ## The Architect Loop 🏗️
149
+ ## `architect` — the Architect Loop 🏗️
117
150
 
118
- Space Architect ships a structured build cycle for you and headless AI builders
119
- 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*.
120
153
 
121
154
  **Roles:**
122
155
 
123
- - **Architect** — you (or Claude Opus 4.8 in judgment mode): arbitrates disagreements,
124
- writes and freezes iteration files, calls kill/continue, merges builder output.
125
- - **Builder** Claude Sonnet 4.6 run headless via `architect dispatch`; reads the
126
- iteration's Builder Prompt from `architecture/`, does the work, writes its report
127
- 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/`.
128
163
 
129
164
  **Filesystem layout:**
130
165
 
131
166
  ```text
132
167
  architecture/
133
168
  ARCHITECT.md # cross-iteration index; mission-wide state
134
- I01-<iteration>.md # one file per iteration
135
- I02-<iteration>.md
169
+ BRIEF.md # durable §-numbered mission contract (optional)
170
+ I01-<iteration>.md # one self-contained file per iteration
136
171
  build/
137
172
  I01-<iteration>-<lane>/ # lane worktree + scratch per dispatch
138
173
  run.jsonl # streamed builder output
139
- report.md # builder report (transcribed to iteration file verbatim)
174
+ report.md # builder report (transcribed into the iteration file verbatim)
140
175
  ```
141
176
 
142
- **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):
143
180
 
144
- | Section | Who writes it | When |
145
- |---------|--------------|------|
146
- | `## Grounds` | Architect | Before dispatch research, PRD, decisions |
147
- | `## Specification` | Architect | Before dispatch — full delegation contract |
148
- | `## Acceptance Criteria` | Architect | Before `architect freeze` frozen, read-only after |
149
- | `## Builder Prompt` | Architect | Records the exact prompt dispatched |
150
- | `## Builder Report` | Architect | Transcribed verbatim from `build/…/report.md` |
151
- | `## Verdict` | Architect | After reviewing evidence KILL / CONTINUE |
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>` |
152
189
 
153
- **Acceptance Criteria freeze before results** — `architect freeze <iteration>` commits
154
- the frozen sections and records `freeze_sha`; any change to Grounds, Specification,
155
- or Acceptance Criteria after that point is an automatic iteration FAIL. The builder
156
- never edits the iteration file.
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.
157
195
 
158
- **Typical loop session:**
196
+ **Command surface:**
159
197
 
160
198
  ```sh
161
- # From inside your space:
162
- architect init # first time: scaffold ARCHITECT.md
163
- architect new my-feature # scaffold architecture/I01-my-feature.md
164
- # write Grounds + Specification + Acceptance Criteria
165
- architect freeze my-feature # lock it
166
- architect dispatch my-feature lane-A # send builder to work
167
- # builder runs, writes build/I01-my-feature-lane-A/report.md
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:
217
+
218
+ ```sh
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
168
224
  architect verify my-feature # mechanical post-flight checks
169
- architect status # review mission state
170
- # 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 …
171
228
  ```
172
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
263
+ ```
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
+
173
283
  ## Fish shell integration 🐟
174
284
 
175
- Shells can't let a child process change *their* working directory, so `architect`
176
- ships a small fish wrapper function. It also installs fish completions for commands,
177
- subcommands, spaces, statuses, config keys, and common config values. Install both
178
- 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:
179
289
 
180
290
  ```fish
181
- architect space shell fish install
291
+ space shell fish install
292
+ src shell fish install
182
293
  exec fish
183
294
  ```
184
295
 
185
- Restarting fish (or `exec fish`) lets the current terminal pick up the new autoloaded
186
- wrapper function. After that, `architect space new "Name of Space"` and
187
- `architect space use 20260531-name-of-space` will `cd` into the selected space once the
188
- CLI command succeeds. Every other command keeps normal CLI behavior. 🚪
189
-
190
- The function is written to `~/.config/fish/functions/space.fish` and completions to
191
- `~/.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`.
192
300
  For one-off testing without installing:
193
301
 
194
302
  ```fish
195
- architect space shell init fish | source
303
+ space shell init fish | source
196
304
  ```
197
305
 
198
306
  ## Configuration ⚙️
199
307
 
200
- Configuration follows the XDG base directory spec:
308
+ Config lives at `~/.config/space-architect/config.yml` (XDG-aware) and defaults to:
201
309
 
202
310
  ```yaml
203
311
  version: 1
204
- spaces_dir: ~/src/spaces
205
- evergreen_dir: ~/src/evergreen
312
+ base_dir: ~/architect # spaces_dir + src_dir hang off this by default
206
313
  default_provider: github.com
207
314
  default_organization:
208
- git_clone_protocol: ssh
315
+ git_clone_protocol: ssh # ssh | https
209
316
  ```
210
317
 
211
- 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`.
212
323
 
213
- ## Repos: evergreen, copy-on-write, concurrent 🌲
324
+ ## Repos: evergreen, copy-on-write, concurrent
214
325
 
215
326
  Repos are added to the current space under `repos/` and tracked in `space.yaml`.
216
- When an up-to-date local copy exists under `evergreen_dir` at
217
- `<evergreen_dir>/<provider>/<owner>/<name>` (e.g.
218
- `~/src/evergreen/github.com/example-org/example-app`), `architect` copies it into the
219
- space instead of cloning over the network — much faster, and a copy-on-write clone
220
- 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:
221
332
 
222
333
  ```sh
223
- architect space config set evergreen_dir ""
334
+ space config set src_dir ""
224
335
  ```
225
336
 
226
- When no evergreen copy is found, the repo is cloned over the network. Clone URLs
227
- 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`.
228
342
 
229
- ```sh
230
- architect space config set git_clone_protocol https
231
- ```
232
-
233
- When stdout/stderr are attached to a TTY, long-running repo operations show an
234
- interactive spinner. Multiple repos passed to `architect space repo add` are fetched
235
- **concurrently**, up to five at a time, on fibers — no threads, all cooperative. 🧵
236
- After each repo is in place, `architect` runs `mise trust` in it so local mise config
237
- is ready to go.
343
+ ## Embedding 📚
238
344
 
239
- Each space also gets a workspace-local `tmp/`. Use it instead of `/tmp` or
240
- `/var/tmp`; when using `mktemp`, point it at `tmp/`. 🗑️
345
+ The library is split into three namespaces you can require independently:
241
346
 
242
- ## 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).
243
352
 
244
- `architect src …` exposes the **vendored** evergreen engine (from
245
- [repo-tender](https://github.com/jetpks/repo-tender)) directly no separate
246
- installation needed. It keeps local clones under
247
- `~/src/evergreen/<host>/<owner>/<repo>` clean, on their default branch, and freshly
248
- fetched.
249
-
250
- ```sh
251
- architect src repo add github.com/example-org/example-app # tend it 🌲
252
- architect src sync # run one sync pass
253
- architect src status # per-repo evergreen status
254
- ```
255
-
256
- When `architect space repo add` sees a matching evergreen copy, it copy-on-writes
257
- from it instead of hitting the network — instant provisioning. ⚡
258
-
259
- The vendored engine and space management share the same layout by design — both use
260
- `<evergreen_dir>/<host>/<owner>/<repo>` — so they line up with zero configuration:
261
-
262
- ```sh
263
- architect src repo add github.com/example-org/example-app # tend it: keep it evergreen 🌲
264
- 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
265
357
  ```
266
358
 
267
359
  ## Documentation 📖
268
360
 
269
361
  - **[Command Reference](docs/reference.md)** — every command, flag, and behavior
270
- - **[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
271
364
 
272
365
  ## Development 🛠️
273
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)