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
@@ -0,0 +1,98 @@
1
+ # Research fan-out reference
2
+
3
+ Read this only when a research trigger fires (see SKILL.md step 3). The fan-out
4
+ uses `architect research dispatch` to launch parallel read-only `claude -p`
5
+ researchers (Sonnet 4.6, no Edit/Write/Bash) and `architect research wait` to
6
+ collect their results. The architect keeps all judgment: it verifies
7
+ load-bearing claims and writes the iteration's **Grounds** section itself.
8
+
9
+ **Note:** the `~/.claude/skills/architect-research/` copy of this skill is
10
+ synced separately and is NOT updated by this repo.
11
+
12
+ ## Fan out
13
+
14
+ Decompose the question into 3–5 narrow, NON-OVERLAPPING research questions.
15
+ Cover different angles, not the same angle five times — typical split:
16
+ official docs/reference, changelog/breaking changes, community failure reports,
17
+ alternatives/comparisons, security/operational constraints.
18
+
19
+ Write each research prompt to its own file, then dispatch and wait:
20
+
21
+ ```bash
22
+ # 1. Write one prompt file per research question (use Write tool — do NOT shell-redirect)
23
+ # Filenames: <NN>-<topic>.prompt.md e.g. 01-official-api.prompt.md
24
+
25
+ # 2. Dispatch all lanes at once (non-blocking — returns PIDs immediately)
26
+ architect research dispatch \
27
+ 01-official-api.prompt.md \
28
+ 02-changelog.prompt.md
29
+
30
+ # 3. Wait for all lanes to complete (tails run.jsonl streams; exits non-zero if any lane fails)
31
+ architect research wait
32
+
33
+ # 4. Read each report
34
+ cat build/research/01-official-api/report.md
35
+ cat build/research/02-changelog/report.md
36
+ ```
37
+
38
+ The id for each lane is derived from the prompt filename:
39
+ `01-official-api.prompt.md` → id `01-official-api` →
40
+ directory `build/research/01-official-api/`.
41
+
42
+ Verbosity flags for `wait`:
43
+ - default (L1): per-lane lifecycle + terminal outcome line
44
+ - `--level 2`: + assistant text
45
+ - `--level 3`: + tool call names
46
+ - `--level 4`: + tool call inputs and results
47
+ - `--quiet`: suppress all output; exit status alone signals outcome
48
+ - `--thinking`: reveal assistant thinking blocks
49
+ - `--jsonl`: emit raw lane-tagged JSONL instead of human text
50
+
51
+ The researchers are READ-ONLY by toolset (`Read,Grep,Glob,WebSearch,WebFetch`
52
+ with no Edit/Write/Bash) so they cannot touch the repo. Their final report
53
+ is extracted from the terminal `result` event in the stream-json log and
54
+ written to `build/research/<id>/report.md` automatically by `wait`.
55
+
56
+ ## Research-prompt template
57
+
58
+ ```
59
+ You are a web research agent. Answer ONE question. Do not write code, do not
60
+ make recommendations — judgment belongs to the architect who reads your output.
61
+
62
+ QUESTION: <one narrow question>
63
+
64
+ OUTPUT FORMAT — a markdown report:
65
+ - Findings as bullets. EVERY finding carries: source URL, source date (if
66
+ shown), the exact figure or a short direct quote, and a confidence tag
67
+ (high = primary source / med = reputable secondary / low = single blog or
68
+ forum post).
69
+ - Prefer primary sources (official docs, changelogs, release notes, source
70
+ code) over blog posts. Record exact version numbers and dates.
71
+ - When sources disagree, report the disagreement — do not resolve it.
72
+ - If you cannot find evidence for something, write NOT FOUND — never infer or
73
+ fill gaps from prior knowledge without flagging it as such.
74
+ - End with: the 2-3 findings most likely to change an implementation decision.
75
+ ```
76
+
77
+ Keep each researcher scoped to ≤5 subjects and put hard context rules in the
78
+ prompt (snippet over page; quote ≤2 sentences; stop the moment you can answer)
79
+ — a researcher that fills its context window dies without emitting its report.
80
+ Bisect and re-dispatch dead lanes; don't re-run as-is.
81
+
82
+ ## Gather (architect — this is your work, not another agent's)
83
+
84
+ 1. Read every `build/research/<id>/report.md`.
85
+ 2. Identify the **load-bearing claims** — facts the spec will depend on
86
+ (an API shape, a version constraint, a limit, a deprecation). Adversarially
87
+ verify each: cross-check against a second independent source or the live
88
+ dependency itself. Discard single-source low-confidence claims or mark them
89
+ as open questions.
90
+ 3. Write the iteration's **Grounds** section
91
+ (`architecture/I<NN>-<name>.md`): problem, decision + why, requirements,
92
+ non-goals, verified facts **with citations**, open questions for the human.
93
+ You write it — researchers gather, the architect judges and decides.
94
+ 4. Commit Grounds (`I<NN>: grounds`). Raw findings stay in `build/research/`
95
+ (gitignored) — only the distilled, cited Grounds section is repo memory.
96
+ 5. The iteration's Specification cites Grounds instead of restating it; the
97
+ builder's PHASE 0 is expected to challenge Grounds' claims like anything
98
+ else.
@@ -0,0 +1,165 @@
1
+ ---
2
+ name: architect-research
3
+ description: >
4
+ Discovery-scale research harness: a cheap scout researcher maps the topic,
5
+ the orchestrator designs topic-specific parallel researcher lanes from the
6
+ scout report (drawing on a source-class tactics library — academic, repos,
7
+ production patterns, web, experts), then verifies claims against sources and
8
+ synthesizes a decision-oriented report. Use when
9
+ brainstorming a project or feature, choosing a technology, or asked to
10
+ "research X", "what's the state of the art", "deep research". For narrow
11
+ slice-level fact checks inside the build loop, /architect handles those inline.
12
+ ---
13
+
14
+ # Architect Research
15
+
16
+ You are the research orchestrator. Researchers gather; **you** design the
17
+ decomposition, verify, and write — judgment never delegates. The source-class
18
+ tactics library (search mechanics + verified endpoints per source class) is in
19
+ `lanes.md` next to this file; read it when you design lanes.
20
+
21
+ ## Scale before anything
22
+
23
+ - **Simple fact-find** → answer directly or 1 researcher (3–10 searches).
24
+ Don't run a harness on a question one search answers.
25
+ - **Comparison / focused question** → 2–4 researchers on distinct
26
+ perspectives, no scout — you already know the terrain.
27
+ - **Brainstorm / SOTA survey / technology choice** → scout first, then a
28
+ designed fan-out of 4–6 researchers.
29
+
30
+ ## Procedure
31
+
32
+ ### 1. Scope → brief
33
+
34
+ If the question is ambiguous, ask at most 2–3 clarifying questions, then
35
+ compress everything into a **research brief**: the question, the decision it
36
+ informs, constraints, and what "answered" looks like. The brief is the north
37
+ star — every later step is checked against it, and it's restated at the top of
38
+ the final report so the reader can audit scope drift.
39
+
40
+ ### 2. Scout, then design the lanes
41
+
42
+ The surveyed production deep-research systems and 4/5 leading OSS frameworks
43
+ use LLM-designed, topic-specific decomposition rather than a fixed lane
44
+ taxonomy. Lanes are designed per topic, not taken from a template.
45
+
46
+ **Scout (brainstorm scale only):** dispatch ONE cheap researcher (~10
47
+ searches, same `claude -p` command as step 3) to map the terrain: canonical
48
+ terminology, the 5–10 load-bearing systems/papers/repos, the named people,
49
+ which source classes look rich vs empty, and the topic's natural fault lines.
50
+ The scout returns a map, not findings — discovering the topic's actual
51
+ perspectives from sources substantially increased source diversity in STORM's
52
+ ablations. Skip the scout when you already know the terrain (comparisons,
53
+ fact-finds) — an upfront pass that tells you nothing new is pure latency.
54
+
55
+ **Design (you, from the scout report):** decompose into 3–6 sub-questions
56
+ along the topic's own fault lines — distinct perspectives, never keyword
57
+ variants of one query. For each lane pick the source-class tactics it needs
58
+ from `lanes.md` (academic snowballing, dependents-not-stars repo evidence,
59
+ production-grade pattern mining, general web, expert tracking) — one lane may
60
+ mix tactics; most topics don't need every source class. Scope each lane to
61
+ ≤5 subjects and give every lane an explicit search budget. Reserve **expert
62
+ opinion** as a second-wave lane: its roster (survey authors, maintainers,
63
+ recurring names) comes from the first wave's findings.
64
+
65
+ Review the lane set for overlap AND for gaps against the brief before
66
+ dispatch. State the plan in a few lines; proceed unless the user redirects.
67
+
68
+ ### 3. Fan out
69
+
70
+ One fresh researcher per lane, each launched as its own **background Bash tool
71
+ call** (`run_in_background`) — one call per lane, not a shell `&` loop (a `&`
72
+ launcher orphans the lanes and the harness reaps them all at once). Read-only by
73
+ toolset (`Read,Grep,Glob`) plus the web tools (`WebSearch,WebFetch`); the
74
+ report is the redirected stdout:
75
+
76
+ ```bash
77
+ claude -p --model claude-sonnet-4-6 \
78
+ --allowedTools 'Read,Grep,Glob,WebSearch,WebFetch' \
79
+ --max-turns 40 \
80
+ < build/research/<NN>-<lane>.prompt.md \
81
+ > build/research/<NN>-<lane>.md
82
+ ```
83
+
84
+ Write each lane block to a `.prompt.md` file and feed it on stdin — never as a
85
+ shell argument; a quote-mangling shell will corrupt a big block, the stdin
86
+ redirect injects it verbatim.
87
+
88
+ (Web comes from the built-in `WebSearch` and `WebFetch` tools — no extension or
89
+ key. With only the read-only + web tools on the allow list, every write/bash
90
+ call is denied, so the researcher can't touch the repo. Launch ONE canary lane
91
+ and confirm it actually fetches live URLs before fanning out. These lane blocks
92
+ also run verbatim as read-only Claude subagents with web search if you'd rather
93
+ keep research inside the architect's own session.)
94
+
95
+ Every lane block carries the full contract — objective, output format, source
96
+ guidance, boundaries — plus:
97
+
98
+ - **Search budget** by tier: simple 5, standard 15, deep 25 searches.
99
+ - **Saturation rule**: two consecutive searches yielding no new load-bearing
100
+ facts → return what you have.
101
+ - **Findings discipline**: every finding has URL + date + exact figure or
102
+ short quote + confidence tag (high = primary source / med = reputable
103
+ secondary / low = single blog or forum). NOT FOUND beats inference.
104
+ Disagreements between sources are reported, never resolved. No
105
+ recommendations — judgment is the orchestrator's.
106
+
107
+ ### 4. Gap round (max 2 extra rounds, usually 1)
108
+
109
+ Read all findings. Score coverage against the brief: which sub-questions have
110
+ supported answers? Spawn targeted gap-fill researchers **only** for the
111
+ unanswered ones. This is also where the **expert-opinion lane** dispatches:
112
+ extract the expert roster from the first wave (survey authors, maintainers,
113
+ recurring names) and send the lane-6 researcher after them. Hard stop after
114
+ two refinement rounds — past that you're chasing nonexistent information.
115
+
116
+ ### 5. Verify (your work, against raw sources)
117
+
118
+ - Extract the **load-bearing claims** — the facts the decision depends on.
119
+ - Require **≥2 independent sources** per load-bearing claim. Independent means
120
+ independent *origin* — two articles rewriting the same press release are one
121
+ source.
122
+ - Tag each: **VERIFIED** (≥2 independent agree) / **UNVERIFIED** (<2, no
123
+ contradiction) / **DISPUTED** (sources disagree — report both positions and
124
+ *why* they differ: date, method, definition) / **SUSPICIOUS** (contradicts
125
+ available evidence).
126
+ - **Adversarial pass** on the top claims: search "<claim> criticism",
127
+ "<X> problems", "<X> vs <alternative>" — actively try to falsify.
128
+ - **Citations are only URLs fetched this session.** Never cite from memory —
129
+ even search-grounded agents fabricate 3–13% of URLs. Spot-check the
130
+ load-bearing ones by fetching them yourself.
131
+ - **Recency discipline**: every quantitative or current-state claim carries a
132
+ source date; prefer the most recent authoritative treatment; date-restrict
133
+ searches on fast-moving topics. Anything that smells like training-data
134
+ leakage gets re-verified or cut.
135
+ - **Source hierarchy**: primary (papers, official docs, changelogs, first-party
136
+ engineering blogs) > reputable secondary > SEO listicles (pointers only,
137
+ never citations).
138
+ - **Opinion ≠ fact.** Expert opinions are reported as positions — quoted,
139
+ dated, conflict-of-interest flagged — and never count toward the ≥2-source
140
+ rule for factual claims. Expert *disagreements* are first-class findings:
141
+ they mark the genuinely open questions.
142
+
143
+ ### 6. Synthesize (one pass, one author — you)
144
+
145
+ Parallelize gathering, never synthesis. Write `build/research/<topic>-report.md`:
146
+
147
+ - **Answer first** (BLUF), then evidence, then method.
148
+ - The brief, restated.
149
+ - Per major finding: the claim + confidence tag + **what it implies for the
150
+ decision** + **what evidence would change this conclusion**.
151
+ - Disputes surfaced with both positions — never silently averaged.
152
+ - **Expert positions map**: who believes what (quoted, dated,
153
+ conflict-of-interest flagged), and where credible experts disagree.
154
+ - **Open questions**: each UNVERIFIED/DISPUTED item with the specific search
155
+ or experiment that would resolve it (this doubles as the next round's input).
156
+ - Citations dated and tier-labeled: `[primary, 2026-04]`.
157
+
158
+ Commit the report. Raw findings stay in `build/research/` (gitignored).
159
+
160
+ ### 7. Hand off
161
+
162
+ If this feeds the build loop: distill the report into the iteration's **Grounds**
163
+ section (`architecture/I<NN>-<name>.md`) per `/architect`, or into
164
+ `architecture/BRIEF.md` §sections when it is mission-scope, and continue there.
165
+ The builder's PHASE 0 will challenge Grounds' claims — that's a feature.
@@ -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.