space-architect 1.2.0 → 1.3.0

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.
@@ -0,0 +1,191 @@
1
+ # Source-class tactics library — researcher preamble, scout block, verified endpoints
2
+
3
+ Lanes are DESIGNED per topic by the orchestrator (SKILL.md step 2); the
4
+ sections below are search tactics and verified endpoints per source class —
5
+ draw on whichever a designed lane needs, mix freely. Endpoints verified
6
+ unauthenticated June 2026. Every researcher block starts with this preamble,
7
+ then the lane-specific objective:
8
+
9
+ ```
10
+ You are a web research agent. Answer ONE assigned objective. Do not write code,
11
+ do not make recommendations — judgment belongs to the orchestrator reading your
12
+ output. Budget: <N> searches; if two consecutive searches yield no new
13
+ load-bearing facts, stop and return. HARD CONTEXT RULES: never open a full
14
+ page when the search snippet answers the question; quote at most 2 sentences
15
+ per source; the moment you can answer, STOP and write your findings — partial
16
+ findings beat context exhaustion (researchers that fill their window die
17
+ without writing anything). OUTPUT: markdown findings — every finding
18
+ carries source URL, source date, the exact figure or a short direct quote, and
19
+ a confidence tag (high = primary source / med = reputable secondary / low =
20
+ single blog or forum post). Prefer primary sources. Record exact version
21
+ numbers and dates. When sources disagree, report the disagreement — do not
22
+ resolve it. If you cannot find evidence, write NOT FOUND — never fill gaps from
23
+ prior knowledge without flagging it. End with the 2-3 findings most likely to
24
+ change a design decision.
25
+ ```
26
+
27
+ **Lane scoping rule (learned 2026-06-12):** cap each researcher at ~5 subjects
28
+ (repos, vendors, people). Doc-heavy lanes burn the context window on fetched
29
+ pages — two of nine researchers in one session died of context exhaustion
30
+ before writing any findings. A researcher that dies returns NOTHING (`-o`
31
+ only materializes on a clean finish). If a lane dies this way, bisect it into
32
+ narrower lanes and re-dispatch; don't re-run it as-is.
33
+
34
+ ## Lane 0 — Scout (brainstorm scale; dispatches before lane design)
35
+
36
+ Objective template: map the terrain of <topic> — do NOT gather findings.
37
+ Return: (1) canonical terminology and the names the field itself uses;
38
+ (2) the 5–10 load-bearing systems/papers/repos/vendors, one line each on why
39
+ they matter; (3) the named people whose positions recur; (4) which source
40
+ classes look rich vs empty for this topic (papers? repos? vendor blogs?
41
+ forums?); (5) the topic's natural fault lines — the 3–6 sub-questions an
42
+ expert would split it into. Budget ~10 searches; breadth over depth; snippet
43
+ over page. Output is a MAP for the orchestrator to design lanes from —
44
+ structure matters more than completeness.
45
+
46
+ ## Lane 1 — Academic (latest papers)
47
+
48
+ Objective: the current academic state of <topic> — most recent survey, the
49
+ frontier preprints, and which papers the field treats as load-bearing.
50
+
51
+ Pipeline: **survey first → frontier sweep → snowball → score.**
52
+
53
+ - Recent survey: Semantic Scholar `publicationTypes=Review`, or arXiv
54
+ `ti:survey AND abs:<topic>` (last ~18 months). The survey supplies canonical
55
+ terminology and the seed bibliography.
56
+ - Frontier sweep (newest first):
57
+ `https://export.arxiv.org/api/query?search_query=cat:<cs.XX>+AND+abs:%22<topic>%22&sortBy=submittedDate&sortOrder=descending&max_results=25`
58
+ (Atom XML; uppercase AND/OR; ≥3s between calls) and
59
+ `https://api.semanticscholar.org/graph/v1/paper/search?query=<topic>&fields=title,year,citationCount,tldr,venue,externalIds&limit=20&year=2025-2026`
60
+ (expect 429s — back off and retry; the `tldr` field is gold for triage).
61
+ Community signal: `https://huggingface.co/api/daily_papers?limit=20` and
62
+ `https://huggingface.co/papers/trending`. **Papers With Code is dead**
63
+ (shut down July 2025; HF Papers is the successor) — never cite it.
64
+ - Snowball from the 2-3 most relevant seeds — a reliable "latest papers" method:
65
+ forward citations
66
+ `https://api.semanticscholar.org/graph/v1/paper/arXiv:<id>/citations?fields=title,year,isInfluential&limit=100`
67
+ and semantic neighbors
68
+ `https://api.semanticscholar.org/recommendations/v1/papers/forpaper/arXiv:<id>?limit=20`.
69
+ Fallback when S2 throttles: OpenAlex —
70
+ `https://api.openalex.org/works?search=<topic>&sort=publication_date:desc&per-page=25&mailto=research@example.com`.
71
+ - Score candidates: citations-per-month (not raw count — meaningless for 2026
72
+ papers), venue/OpenReview decision (`https://api2.openreview.net/notes/search?term=<topic>&limit=25`
73
+ has actual reviewer scores), code availability, HF traction. Red flags:
74
+ preprint-only after 18+ months, self-citation-heavy.
75
+
76
+ ## Lane 2 — Popular repos (what the ecosystem actually uses)
77
+
78
+ Objective: the 5-10 repos/libraries the ecosystem has actually adopted for
79
+ <topic>, with adoption evidence beyond stars.
80
+
81
+ - Discovery: GitHub search —
82
+ `topic:<topic> stars:>1000 archived:false sort:stars`,
83
+ `"<topic>" in:name,description,readme stars:>2000`, plus awesome-lists as
84
+ recall boosters (`awesome <topic> in:name stars:>1000`) — re-check `pushed:`
85
+ on every list entry; lists go stale.
86
+ - **Adoption evidence beats stars**: dependents count via
87
+ `https://api.deps.dev/v3/systems/<npm|pypi|...>/packages/<name>` or
88
+ `https://packages.ecosyste.ms` (keyless, 5k req/hr); registry download
89
+ *trends* (`https://pypistats.org/api/packages/<pkg>/recent`,
90
+ `https://api.npmjs.org/downloads/point/last-month/<pkg>`).
91
+ - **Fake-star check**: ~4.5M fake stars documented in the wild. Stars without
92
+ proportional forks/issues/dependents = flag it. Report stars AND dependents
93
+ AND last release for every repo.
94
+
95
+ ## Lane 3 — Cutting-edge repos (emerging, not hype)
96
+
97
+ Objective: what's emerging in <topic> in the last ~6 months that practitioners
98
+ are actually adopting — and which hyped repos are already abandoned.
99
+
100
+ - Where bleeding-edge surfaces first: HF daily/trending papers (code-linked);
101
+ Hacker News via Algolia —
102
+ `https://hn.algolia.com/api/v1/search_by_date?query=<topic>&tags=story&numericFilters=points>50`
103
+ (also `query=github.com` + topic for Show HNs); `https://lobste.rs/t/<tag>.json`;
104
+ GitHub `topic:<topic> created:>{90d ago} stars:>100 pushed:>{14d ago} sort:stars`;
105
+ OSS Insight (`https://ossinsight.io/collections/trending`) for transparent
106
+ velocity ranking.
107
+ - **Emerging-vs-hype gate** (report which side each repo lands on):
108
+ EMERGING = created recently AND pushed <14d AND star velocity sustained ≥2
109
+ weeks AND issues getting maintainer responses AND linked from a paper or a
110
+ track-record org AND forks/issues growing in proportion to stars.
111
+ HYPE = week-one star spike then stalled pushes, unanswered issues, README
112
+ promises >> code, single contributor, no tests/releases. Any single signal
113
+ is gameable; the conjunction is not.
114
+
115
+ ## Lane 4 — Production-grade design patterns
116
+
117
+ Objective: how 2-3 production libraries adjacent to <topic> design
118
+ the thing we're about to build — API ergonomics, error handling, extension
119
+ points, testing patterns — and where they differ.
120
+
121
+ - Select subjects with the production-grade gate: pushed <6mo (or explicitly
122
+ stable + responsive issues), tagged releases + changelog in last 12mo,
123
+ dependents >100 (ecosystem-adjusted), ≥2 active maintainers, CI runs tests
124
+ on PRs, OSI license, no unaddressed criticals on `https://osv.dev`.
125
+ Ignore raw stars and commit counts.
126
+ - Reading order — never start at file #1: README + manifest (entry points,
127
+ exports = the deliberate public surface) → trace ONE canonical happy-path
128
+ call end to end → tests for the relevant feature (executable documentation
129
+ of edge-case policy) → 3 closed issues + 2 merged PRs in the area (the
130
+ "why not" you can't get from code).
131
+ - Extract four categories per library: **API ergonomics** (cost of the 90%
132
+ case in lines, defaults, config layering), **error handling** (exception
133
+ hierarchy root, retried vs raised, boundary translation), **extension
134
+ points** (grep for hook/adapter/middleware/plugin/register/Protocol),
135
+ **testing patterns** (fixture strategy, how I/O is faked, regression-test-
136
+ per-bug convention).
137
+ - Then the **cross-library diff**: patterns all of them share are load-bearing;
138
+ where they differ is a trade-off to document.
139
+ - Tools: GitHub code search (`symbol:<Name>`, `/regex/`, `repo:`, `path:`),
140
+ `https://grep.app` (usage in the wild), `https://sourcegraph.com/search`.
141
+ For "what do people actually call", search downstream dependents' code, not
142
+ the library.
143
+
144
+ ## Lane 5 — General web
145
+
146
+ Objective: everything the other lanes structurally miss on <topic> — expert
147
+ blog posts, postmortems and failure reports, comparisons, official vendor
148
+ docs/changelogs, pricing/operational constraints.
149
+
150
+ - Standard multi-angle sweep: official docs/changelogs; named-expert posts;
151
+ "<X> postmortem" / "<X> at scale" / "<X> problems" for failure reports;
152
+ "<X> vs <Y>" for comparisons. Date-restrict queries on fast-moving topics.
153
+ - Source hierarchy applies hardest here: SEO listicles and AI-generated
154
+ aggregators are pointers, never citations — chase them to the primary
155
+ source or drop the claim.
156
+
157
+ ## Lane 6 — Expert opinion (second wave — dispatch after lanes 1-5 return)
158
+
159
+ Objective: what the named experts in <topic> are saying right now — positions,
160
+ warnings, predictions, and especially disagreements — from their blogs, talks,
161
+ and social posts.
162
+
163
+ - **Build the roster first** (why this lane runs second): survey and top-paper
164
+ authors (lane 1), maintainers of the leading repos (lanes 2-3), and names
165
+ that recur across lane 5 results. Pick 5-8; record each expert's affiliation
166
+ — you'll need it for conflict-of-interest tagging.
167
+ - Where to find their voice, in reliability order:
168
+ 1. **Personal blogs / newsletters** — the primary source for considered
169
+ positions; search `"<name>" <topic>` and `site:<their-domain> <topic>`.
170
+ 2. **HN comments** — keyless and reliable:
171
+ `https://hn.algolia.com/api/v1/search?tags=comment,author_<username>&query=<topic>`
172
+ (many experts comment under well-known usernames).
173
+ 3. **Conference talks / podcasts** — search `"<name>" talk <topic> 2026`;
174
+ prefer transcripts or the speaker's own writeup over third-party recaps.
175
+ 4. **X** — login-walled for agents. Use search-engine indexing
176
+ (`site:x.com "<name>" <topic>`) and direct profile URLs
177
+ (`x.com/<handle>`); don't rely on third-party viewers (flaky) and note
178
+ that Bluesky's public search API has been closed (403) since March 2025
179
+ — profile pages only.
180
+ 5. **Reddit / lobste.rs** threads and AMAs (via indexed search:
181
+ `site:reddit.com "<name>" <topic>`).
182
+ - **Opinion is its own evidence class.** An expert opinion is judgment —
183
+ datable, revisable, and sometimes conflicted. For every position report:
184
+ the exact quote or close paraphrase, where and when stated, and any conflict
185
+ of interest (vendor employee talking their book, author promoting their own
186
+ tool). An opinion NEVER counts toward the ≥2-source rule for factual claims
187
+ — facts get verified in the other lanes; this lane reports who believes
188
+ what and why.
189
+ - **The highest-value output is disagreement**: where credible experts
190
+ contradict each other is exactly where the genuinely open questions are.
191
+ Map who stands where and what evidence each side cites.
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: architect-vocabulary
3
+ description: >
4
+ Load the Architect system's vocabulary and a short "where you are"
5
+ orientation — space, mission, iteration, lane, brief, builder, architect,
6
+ gate, freeze, verdict, research, variant set — for when you're standing in a
7
+ space-architect workspace (or working on the skill itself) and need the terms
8
+ understood in conversation but do NOT want to run the loop. Reference only:
9
+ it does not dispatch builders, freeze, judge, or write iteration files.
10
+ Invoke as /architect-vocabulary.
11
+ ---
12
+
13
+ # Architect Vocabulary
14
+
15
+ This skill loads **terminology and orientation only**. It is the glossary, not
16
+ the loop.
17
+
18
+ ## What this skill is — and isn't
19
+
20
+ - **Is:** the shared vocabulary of `space-architect` plus a quick orientation to
21
+ where things live, so these terms are understood for the rest of the session.
22
+ - **Isn't:** the build loop. Do **not** run `architect new` / `freeze` /
23
+ `dispatch` / `integrate`, do **not** write or edit anything under
24
+ `architecture/`, and do **not** render verdicts on builder work. That is the
25
+ separate **`/architect`** skill — invoke it deliberately when you actually
26
+ want to run the loop. Read-only `architect` commands (`status`, `show`) are
27
+ fine here.
28
+
29
+ ## Vocabulary
30
+
31
+ **Roles**
32
+
33
+ - **architect** — the judgment role (a human, or Claude Opus 4.8 in judgment
34
+ mode): arbitrates disagreements, writes and freezes iteration files, calls
35
+ kill/continue, merges builder output. Never writes implementation code.
36
+ - **builder** — the implementation role: Claude Sonnet 4.6 run headless via
37
+ `architect dispatch` (`claude -p`), one per lane in its own worktree. Reports
38
+ raw evidence; never grades its own work; never edits `architecture/`.
39
+
40
+ **The workspace**
41
+
42
+ - **space** — a task-scoped workspace directory holding repos, notes, and
43
+ artifacts under one root. `architect` finds it by walking up from `$PWD` to the
44
+ nearest `space.yaml`.
45
+ - **space.yaml** — the space's identity file: id, title, status, repos, notes,
46
+ tags, plus the `architect:` block (mission state — iterations, freeze shas,
47
+ lanes).
48
+ - **mission** — an Architect Loop instance living inside a space; spans the
49
+ repos under `repos/`.
50
+
51
+ **The unit of work**
52
+
53
+ - **iteration** — one PR-sized unit of work, captured as a single self-contained
54
+ file `architecture/I<NN>-<name>.md`, grown section by section. Its sections:
55
+ - **Grounds** — *why*: research/brief distilled (optional).
56
+ - **Specification** — *what/how*: the full delegation contract.
57
+ - **Acceptance Criteria** — *proof*: exact gate commands + thresholds; this is
58
+ what gets frozen.
59
+ - **Builder Prompt** — the exact lane-prompt(s) dispatched.
60
+ - **Builder Report** — raw evidence, transcribed verbatim from build scratch.
61
+ - **Verdict** — rulings + per-AC PASS/FAIL/INVALID + KILL/CONTINUE.
62
+ - **lane** — a parallel slice of an iteration (1–4 per iteration), each
63
+ declaring a disjoint target repo + file-touch set. Lanes in different repos are
64
+ inherently disjoint; same-repo lanes that overlap files run as one. Each runs
65
+ in its own worktree under `build/<id>-<lane>/`.
66
+ - **worktree** — the isolated git worktree a lane builds in, off the target
67
+ repo's base commit, so lanes never collide.
68
+ - **dispatch** — launching a fresh headless builder for a lane (`architect
69
+ dispatch <iteration> <lane>`), streaming output to `build/<id>-<lane>/run.jsonl`.
70
+
71
+ **Contracts and checkpoints**
72
+
73
+ - **brief** (`architecture/BRIEF.md`) — the durable, §-numbered mission contract
74
+ that spans iterations; frozen at the mission level and cited as **BRIEF §N**.
75
+ - **ARCHITECT.md** (`architecture/ARCHITECT.md`) — the cross-iteration index /
76
+ table of contents and mission-wide state.
77
+ - **freeze** ❄️ — committing the frozen region (Grounds / Specification /
78
+ Acceptance Criteria) *before* dispatch (`architect freeze`). Records the
79
+ **freeze_sha** in `space.yaml`; any later change to those sections is an
80
+ automatic iteration FAIL.
81
+ - **gate** — a frozen verification command + threshold (test/lint/typecheck/
82
+ build). `architect gate` runs them and streams raw output — it is a runner,
83
+ never a judge.
84
+
85
+ **Outcomes**
86
+
87
+ - **verdict** — the architect's ruling on an iteration, written after evidence:
88
+ - per-criterion: **PASS** / **FAIL** / **INVALID** (INVALID = not measured the
89
+ way the gate specifies).
90
+ - iteration-level: **KILL** / **CONTINUE**.
91
+ - **variant set** — an iteration built as multiple `(harness, model)` lanes over
92
+ one frozen spec, judged head-to-head against the same Acceptance Criteria; the
93
+ winner is selected with the human in the loop, not unilaterally.
94
+
95
+ **Research**
96
+
97
+ - **research** — two scales:
98
+ - **discovery scale** (brainstorming, technology selection, state-of-the-art)
99
+ → the **`/architect-research`** skill: a scout maps the topic, the
100
+ orchestrator designs parallel researcher **lanes**, claims are verified
101
+ against sources, and the synthesis distills into a brief §section or an
102
+ iteration's Grounds.
103
+ - **iteration scale** → an inline fan-out run only when an iteration needs
104
+ facts the repo doesn't already have.
105
+
106
+ **Repos**
107
+
108
+ - **evergreen** / copy-on-write / **`src` engine** — repo provisioning: when an
109
+ up-to-date local copy exists under `evergreen_dir`, `architect` copies it into
110
+ the space (copy-on-write on APFS) instead of cloning over the network. The
111
+ vendored `src` engine keeps those evergreen checkouts tended.
112
+
113
+ ## Where you are
114
+
115
+ A space's directory layout:
116
+
117
+ ```text
118
+ space.yaml # identity + mission state (the architect: block)
119
+ README.md
120
+ repos/ # the repos the mission spans
121
+ notes/ # scratch, prompts, logs
122
+ architecture/ # ARCHITECT.md index + I<NN>-<name>.md iteration files (+ BRIEF.md)
123
+ build/ # lane worktrees + scratch: build/<id>-<lane>/
124
+ tmp/ # workspace-local temp — use instead of /tmp
125
+ ```
126
+
127
+ Safe **read-only** commands to orient yourself (these don't run the loop):
128
+
129
+ ```sh
130
+ architect status # mission state: iterations, freeze shas, lanes, verdicts
131
+ architect space show # the space you're standing in
132
+ architect space list # all your spaces
133
+ ```
134
+
135
+ ## Maintenance
136
+
137
+ This glossary is a **self-contained copy** of terms defined canonically in the
138
+ `architect` skill (`SKILL.md`) and the project `README.md`. It is installed as an
139
+ isolated skill, so it can't reference those at runtime — when the vocabulary
140
+ changes there, re-read this file against them and update it to keep the two from
141
+ drifting.
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "dry/cli"
4
- require "space_architect/pristine"
5
4
 
6
5
  module SpaceArchitect::Pristine
7
6
  # CLI surface — thin translation layer between argv and the
@@ -126,12 +125,4 @@ module SpaceArchitect::Pristine
126
125
  end
127
126
  end
128
127
 
129
- # Subcommand files — each defines its command classes and
130
- # registers them under their group prefix.
131
- require "space_architect/pristine/cli/repo"
132
- require "space_architect/pristine/cli/org"
133
- require "space_architect/pristine/cli/sync"
134
- require "space_architect/pristine/cli/status"
135
- require "space_architect/pristine/cli/config"
136
- require "space_architect/pristine/cli/daemon"
137
- require "space_architect/pristine/cli/clone"
128
+
@@ -35,3 +35,10 @@ require "space_architect/pristine/ui/mode"
35
35
  require "space_architect/pristine/ui/plain_reporter"
36
36
  require "space_architect/pristine/ui/json_reporter"
37
37
  require "space_architect/pristine/cli"
38
+ require "space_architect/pristine/cli/repo"
39
+ require "space_architect/pristine/cli/org"
40
+ require "space_architect/pristine/cli/sync"
41
+ require "space_architect/pristine/cli/status"
42
+ require "space_architect/pristine/cli/config"
43
+ require "space_architect/pristine/cli/daemon"
44
+ require "space_architect/pristine/cli/clone"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: space-architect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Jacobs
@@ -236,6 +236,7 @@ files:
236
236
  - lib/space_architect/repo_reference.rb
237
237
  - lib/space_architect/repo_resolver.rb
238
238
  - lib/space_architect/shell_integration.rb
239
+ - lib/space_architect/skill_installer.rb
239
240
  - lib/space_architect/slugger.rb
240
241
  - lib/space_architect/space.rb
241
242
  - lib/space_architect/space_store.rb
@@ -247,6 +248,12 @@ files:
247
248
  - lib/space_architect/version.rb
248
249
  - lib/space_architect/warnings.rb
249
250
  - lib/space_architect/xdg.rb
251
+ - skill/architect-research/SKILL.md
252
+ - skill/architect-research/lanes.md
253
+ - skill/architect-vocabulary/SKILL.md
254
+ - skill/architect/SKILL.md
255
+ - skill/architect/dispatch.md
256
+ - skill/architect/research.md
250
257
  - vendor/repo-tender/lib/space_architect/pristine.rb
251
258
  - vendor/repo-tender/lib/space_architect/pristine/cli.rb
252
259
  - vendor/repo-tender/lib/space_architect/pristine/cli/clone.rb