Skip to content

Commit 32a1535

Browse files
montfortclaude
andauthored
feat(cli): A1.5 — architecture track A1 release (core 0.5.0 / cli 3.25.0) (#255)
Closes track A1 of CHARTER-01-loom-server (Architecture Plan view, Spec 002): the textual + authoring half of Loom's "you are here" map. A1.5 is the track's single release — it dogfoods the generator, records the spec §11 (A1 subset) acceptance, ships the EN/ES/zh-CN docs, and carries the one version bump covering A1.0–A1.4 (all merged tagless by design). - Bump: straymark-core 0.4.1→0.5.0 (new `architecture` module surface + `ailog::parse_modified_files`), straymark-cli 3.24.0→3.25.0 (architecture command + status --where); core dep pins in cli + experimento bumped; Cargo.lock refreshed. - Dogfood (T5.1): `architecture generate --out experimento/architecture` hand-refined to a legible first plan (9 stage layers → 3 real layers, components reassigned, 2 dependency links); ids kept stable so `architecture validate` is exit 0. - Acceptance (T5.2): §11.1 + §11.5 textual half + generator-usefulness recorded in experimento/AILOG-2026-06-15-001. - Docs (T5.3): `architecture` section + `status --where` subsection in CLI-REFERENCE EN/ES/zh-CN; versioning tables → cli-3.25.0 (3 CLI-REFERENCE + 3 README). - CHANGELOG `## CLI 3.25.0 / Core 0.5.0`; spec §14 open questions resolved; tasks.md A1.5 DONE. crates.io publish of straymark-core 0.5.0 rides the cli-3.25.0 release (release-cli.yml). 707 tests green; `--no-default-features` clean. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e8ef02a commit 32a1535

16 files changed

Lines changed: 558 additions & 38 deletions

File tree

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,46 @@ and this project uses [independent versioning](README.md#versioning) for Framewo
77

88
---
99

10+
## CLI 3.25.0 / Core 0.5.0 — Architecture Plan track A1 (EXPERIMENTAL)
11+
12+
The textual + authoring half of Loom's Architecture Plan view (Spec 002) — the operator's "where are we?" answered from the terminal, ahead of the visual overlay (A2). All surfaces are **EXPERIMENTAL (Loom v0)** and may change without a deprecation cycle.
13+
14+
### Added (CLI)
15+
16+
- `straymark architecture generate [path] [--force] [--out <dir>]` — write a first-draft
17+
`architecture/model.yml` + `plan.drawio` by mining codebase structure (one component per
18+
top-level source directory) enriched with ADR signal (C4 Mermaid diagrams + "Affected
19+
Components" tables improve labels and add links).
20+
- `straymark architecture sync [path] [--out <dir>] [--apply]` — append-only reconciliation:
21+
detect new source dirs / ADR components not yet in the model and append them to `model.yml`
22+
+ `plan.drawio` without clobbering human edits or DrawIO geometry. Dry-run by default.
23+
- `straymark architecture validate [path] [--out <dir>] [--output <text|json|markdown>]`
24+
report model↔plan integrity signals (`undrawn` / `unmodeled` / `empty`); exits 1 on any
25+
signal (CI-gateable). Degrades to glob-coverage-only when `plan.drawio` is absent.
26+
- `straymark status --where [path] [--out <dir>]` — textual "you are here": projects each
27+
component's state (`active` / `in-progress` / `implemented` / `has-debt` / `uncharted`) from
28+
live governance signals (Charters + drift + open TDEs + on-disk inventory) and prints the
29+
"Where are we" summary. The `active`/`implemented` flags line up with
30+
`charter list --status in-progress`/`--status closed` + `charter drift` by construction.
31+
32+
### Added (Core)
33+
34+
- New `straymark_core::architecture` module: the typed `ArchModel` (`model.yml` parser +
35+
structural validation) and the **pure** `(model + GovernanceState) -> Projection` status
36+
function (zero I/O), shared by the CLI's `status --where` and the future Loom server so both
37+
compute the same answer. Plus `validate_model` for the model↔plan integrity signals.
38+
- New `straymark_core::ailog::parse_modified_files` (the AILOG `## Modified Files` extractor
39+
feeding the `implemented` state).
40+
41+
### Changed (Core)
42+
43+
- Governance primitives the projection depends on — Charter parsing (`charter`,
44+
`charter_files`), the drift matcher (`drift`), and `split_frontmatter` (`utils`) — moved from
45+
`straymark-cli` into `straymark-core` so the CLI and Loom share one extractor (no behavior
46+
change; verified against the full regression suite).
47+
48+
---
49+
1050
## Loom 0.4.2 — R3: legibility at 100+ nodes
1151

1252
### Added (Loom)

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ StrayMark uses independent version tags for each component:
278278
| Component | Tag prefix | Example | Includes |
279279
| --- | --- | --- | --- |
280280
| Framework | `fw-` | `fw-4.26.0` | Templates (12 types), governance, directives, Charter template + schema |
281-
| CLI | `cli-` | `cli-3.24.0` | The `straymark` binary |
281+
| CLI | `cli-` | `cli-3.25.0` | The `straymark` binary |
282282
| Loom (EXPERIMENTAL) | `loom-` | `loom-0.4.2` | The `straymark-loom` visualization server, downloaded on demand by `straymark loom serve` |
283283

284284
Check installed versions with `straymark status` or `straymark about`.

cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "straymark-cli"
3-
version = "3.24.0"
3+
version = "3.25.0"
44
edition = "2021"
55
description = "CLI for StrayMark — the cognitive discipline your AI-assisted projects need"
66
license = "MIT"
@@ -17,7 +17,7 @@ name = "straymark"
1717
path = "src/main.rs"
1818

1919
[dependencies]
20-
straymark-core = { version = "0.4.1", path = "../core" }
20+
straymark-core = { version = "0.5.0", path = "../core" }
2121
clap = { version = "4", features = ["derive"] }
2222
reqwest = { version = "0.12", features = ["blocking", "rustls-tls", "json"] }
2323
serde = { version = "1", features = ["derive"] }

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "straymark-core"
3-
version = "0.4.1"
3+
version = "0.5.0"
44
edition = "2021"
55
description = "Shared document model and knowledge graph for StrayMark — parses governance documents and builds their typed traceability graph"
66
license = "MIT"

docs/adopters/CLI-REFERENCE.md

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ StrayMark uses **independent version tags** for each component:
4848
| Component | Tag prefix | Example | What it includes |
4949
|-----------|-----------|---------|------------------|
5050
| Framework | `fw-` | `fw-4.26.0` | Templates (12 types), governance docs, directives, Charter template + schema |
51-
| CLI | `cli-` | `cli-3.24.0` | The `straymark` binary |
51+
| CLI | `cli-` | `cli-3.25.0` | The `straymark` binary |
5252
| Loom (EXPERIMENTAL) | `loom-` | `loom-0.4.2` | The `straymark-loom` visualization server, downloaded on demand by `straymark loom serve` |
5353

5454
Framework and CLI are released independently. A framework update does not require a CLI update, and vice versa.
@@ -239,6 +239,45 @@ $ straymark status
239239
→ Run straymark explore to browse documentation interactively
240240
```
241241

242+
#### `straymark status --where [path] [--out <dir>]` *(cli-3.25.0+, EXPERIMENTAL)*
243+
244+
The textual **"you are here"** companion to Loom's Architecture Plan view (the terminal half of the dashboard). Loads `architecture/model.yml` and projects each component's state from your live governance signals, so you can answer *"where are we?"* without opening a browser.
245+
246+
> ⚠️ **EXPERIMENTAL (Loom v0).** Requires an `architecture/model.yml` (see `straymark architecture generate`). The output shape may change without a deprecation cycle.
247+
248+
| Flag | Default | Description |
249+
|---|---|---|
250+
| `--where` | off | Switch `status` into the architecture projection view |
251+
| `--out <dir>` | `.straymark/architecture` | Directory holding `model.yml` (point it elsewhere to project a model kept outside `.straymark/`) |
252+
253+
Each component is tagged with one or more states, derived purely from governance (no new frontmatter):
254+
255+
- **`active`** — an `in-progress` Charter declares files matching the component (← *you are here*);
256+
- **`in-progress`** — within an active component, declared files already touched (declared ∩ git-modified);
257+
- **`implemented`** — a closed Charter (and its AILOGs) touched the component;
258+
- **`has-debt`** — an open `TDE` relates to the component;
259+
- **`uncharted`** — files on disk that no Charter or document references.
260+
261+
The view ends with a **"Where are we" summary**: the active Charter, declared-vs-modified progress, recent AILOGs, and open debt. The `active`/`implemented` flags line up with `straymark charter list --status in-progress`/`--status closed` + `charter drift` by construction (one shared projection).
262+
263+
```
264+
$ straymark status --where
265+
266+
Where are we
267+
268+
Tooling (Rust workspace)
269+
▸ straymark-cli [active] [in-progress] ← you are here
270+
· straymark-core [implemented]
271+
272+
Visualization
273+
· Loom [has-debt]
274+
275+
Summary
276+
Active Charter: A1.4 — status --where
277+
Progress: 1/2 declared files touched (50%)
278+
Debt: 1 component with open debt, 0 uncharted
279+
```
280+
242281
---
243282

244283
### `straymark repair [path]`
@@ -1383,6 +1422,39 @@ StrayMark CLI
13831422

13841423
---
13851424

1425+
### `straymark architecture <generate|sync|validate>` *(cli-3.25.0+, EXPERIMENTAL)*
1426+
1427+
Author and maintain the **architecture model** that powers Loom's Architecture Plan view (Spec 002): a semantic `model.yml` (components → file globs + layers + links) paired with a `plan.drawio` blueprint, linked by a stable `component_id` (the BIM "model vs drawing" split). The textual projection over this model is `straymark status --where`; the visual overlay is Loom (A2).
1428+
1429+
> ⚠️ **EXPERIMENTAL (Loom v0).** The model schema, DrawIO conventions, and command surface may change without a deprecation cycle. All three subcommands operate on `.straymark/architecture/` by default; `--out <dir>` overrides it.
1430+
1431+
**`straymark architecture generate [path] [--force] [--out <dir>]`** — write a first-draft `model.yml` + `plan.drawio` by mining your codebase structure (one component per top-level source directory, glob `dir/**`) enriched with ADR signal (C4 Mermaid diagrams + "Affected Components" tables improve labels and add links). Components land in a placeholder `unassigned` layer and the `.straymark` stages 00–09 seed the layer list — you then refine by hand (reassign/rename layers, tighten globs, add links). `--force` overwrites existing artifacts.
1432+
1433+
**`straymark architecture sync [path] [--out <dir>] [--apply]`****append-only** reconciliation: detect new top-level source directories / ADR components not yet covered by the model and append them to `model.yml` + `plan.drawio`, **never** clobbering human edits or DrawIO geometry. Dry-run by default; `--apply` writes.
1434+
1435+
**`straymark architecture validate [path] [--out <dir>] [--output <text|json|markdown>]`** — report model↔plan integrity signals: **undrawn** (component with no DrawIO cell), **unmodeled** (a DrawIO cell absent from the model), **empty** (globs match no files on disk). **Exits 1** when any signal is found (CI-gateable). Degrades to glob-coverage-only when `plan.drawio` is absent.
1436+
1437+
| Subcommand | Key flags | Writes? |
1438+
|---|---|---|
1439+
| `generate` | `--force`, `--out` | Yes (refuses to overwrite without `--force`) |
1440+
| `sync` | `--apply`, `--out` | Only with `--apply` (append-only) |
1441+
| `validate` | `--output`, `--out` | No (read-only; exit 1 on any signal) |
1442+
1443+
**Example:**
1444+
1445+
```bash
1446+
$ straymark architecture generate
1447+
✓ Wrote .straymark/architecture/model.yml (4 components, 9 layers)
1448+
✓ Wrote .straymark/architecture/plan.drawio
1449+
→ Mined 3 ADRs: 2 labels improved, 1 link added.
1450+
→ Refine by hand: reassign components from `unassigned` to real layers, then open the plan in DrawIO.
1451+
1452+
$ straymark architecture validate
1453+
✓ Architecture model is consistent (4 components).
1454+
```
1455+
1456+
---
1457+
13861458
### `straymark loom serve [path] [--port <port>] [--no-open]` *(cli-3.24.0+, EXPERIMENTAL)*
13871459

13881460
Launch **Loom**, the EXPERIMENTAL knowledge-graph visualization server: a loopback-only, read-only web dashboard that renders the project's StrayMark documents as a live force-directed graph (nodes colored by Louvain community and sized by connectivity; node and corpus-stat panels; server-side metadata/date filters; selecting a node lights up its whole thread of relationships; edits to watched `.md` files update the open browser in under a second).

docs/i18n/es/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ StrayMark usa tags de versión independientes para cada componente:
241241
| Componente | Prefijo de tag | Ejemplo | Incluye |
242242
|------------|---------------|---------|---------|
243243
| Framework | `fw-` | `fw-4.26.0` | Plantillas (12 tipos), gobernanza, directivas, plantilla + schema de Charter |
244-
| CLI | `cli-` | `cli-3.24.0` | El binario `straymark` |
244+
| CLI | `cli-` | `cli-3.25.0` | El binario `straymark` |
245245
| Loom (EXPERIMENTAL) | `loom-` | `loom-0.4.2` | El servidor de visualización `straymark-loom`, descargado bajo demanda por `straymark loom serve` |
246246

247247
Verifica las versiones instaladas con `straymark status` o `straymark about`.

docs/i18n/es/adopters/CLI-REFERENCE.md

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ StrayMark usa **tags de versión independientes** para cada componente:
4848
| Componente | Prefijo de tag | Ejemplo | Qué incluye |
4949
|------------|---------------|---------|-------------|
5050
| Framework | `fw-` | `fw-4.26.0` | Plantillas (12 tipos), docs de gobernanza, directivas |
51-
| CLI | `cli-` | `cli-3.24.0` | El binario `straymark` |
51+
| CLI | `cli-` | `cli-3.25.0` | El binario `straymark` |
5252
| Loom (EXPERIMENTAL) | `loom-` | `loom-0.4.2` | El servidor de visualización `straymark-loom`, descargado bajo demanda por `straymark loom serve` |
5353

5454
Framework y CLI se publican de forma independiente. Una actualización del framework no requiere actualización del CLI, y viceversa.
@@ -224,6 +224,47 @@ Documents:
224224

225225
---
226226

227+
#### `straymark status --where [path] [--out <dir>]` *(cli-3.25.0+, EXPERIMENTAL)*
228+
229+
El acompañante textual del **"estás aquí"** de la vista del Plan de Arquitectura de Loom (la mitad en terminal del dashboard). Carga `architecture/model.yml` y proyecta el estado de cada componente a partir de tus señales de gobernanza en vivo, de modo que puedas responder *"¿dónde estamos?"* sin abrir un navegador.
230+
231+
> ⚠️ **EXPERIMENTAL (Loom v0).** Requiere un `architecture/model.yml` (ver `straymark architecture generate`). La forma de la salida puede cambiar sin ciclo de deprecación.
232+
233+
| Flag | Default | Descripción |
234+
|---|---|---|
235+
| `--where` | off | Cambia `status` a la vista de proyección de arquitectura |
236+
| `--out <dir>` | `.straymark/architecture` | Directorio que contiene `model.yml` (apúntalo a otro sitio para proyectar un modelo mantenido fuera de `.straymark/`) |
237+
238+
Cada componente se etiqueta con uno o más estados, derivados puramente de la gobernanza (sin nuevo frontmatter):
239+
240+
- **`active`** — un Charter `in-progress` declara archivos que coinciden con el componente (← *estás aquí*);
241+
- **`in-progress`** — dentro de un componente activo, archivos declarados ya tocados (declarados ∩ modificados-en-git);
242+
- **`implemented`** — un Charter cerrado (y sus AILOGs) tocó el componente;
243+
- **`has-debt`** — un `TDE` abierto se relaciona con el componente;
244+
- **`uncharted`** — archivos en disco que ningún Charter o documento referencia.
245+
246+
La vista termina con un **resumen "Where are we"**: el Charter activo, el progreso declarados-vs-modificados, los AILOGs recientes y la deuda abierta. Los flags `active`/`implemented` se alinean con `straymark charter list --status in-progress`/`--status closed` + `charter drift` por construcción (una sola proyección compartida).
247+
248+
```
249+
$ straymark status --where
250+
251+
Where are we
252+
253+
Tooling (Rust workspace)
254+
▸ straymark-cli [active] [in-progress] ← you are here
255+
· straymark-core [implemented]
256+
257+
Visualization
258+
· Loom [has-debt]
259+
260+
Summary
261+
Active Charter: A1.4 — status --where
262+
Progress: 1/2 declared files touched (50%)
263+
Debt: 1 component with open debt, 0 uncharted
264+
```
265+
266+
---
267+
227268
### `straymark repair [path]`
228269

229270
Repara una instalación de StrayMark rota restaurando directorios y archivos del framework faltantes.
@@ -1073,6 +1114,39 @@ StrayMark CLI
10731114

10741115
---
10751116

1117+
### `straymark architecture <generate|sync|validate>` *(cli-3.25.0+, EXPERIMENTAL)*
1118+
1119+
Crea y mantén el **modelo de arquitectura** que alimenta la vista del Plan de Arquitectura de Loom (Spec 002): un `model.yml` semántico (componentes → globs de archivos + capas + enlaces) emparejado con un plano `plan.drawio`, vinculados por un `component_id` estable (la separación BIM "modelo vs dibujo"). La proyección textual sobre este modelo es `straymark status --where`; la superposición visual es Loom (A2).
1120+
1121+
> ⚠️ **EXPERIMENTAL (Loom v0).** El esquema del modelo, las convenciones de DrawIO y la superficie de comandos pueden cambiar sin ciclo de deprecación. Los tres subcomandos operan sobre `.straymark/architecture/` por defecto; `--out <dir>` lo sobrescribe.
1122+
1123+
**`straymark architecture generate [path] [--force] [--out <dir>]`** — escribe un primer borrador de `model.yml` + `plan.drawio` minando la estructura de tu base de código (un componente por directorio de fuentes de nivel superior, glob `dir/**`) enriquecido con señal de ADRs (los diagramas C4 Mermaid + las tablas "Affected Components" mejoran las etiquetas y añaden enlaces). Los componentes aterrizan en una capa `unassigned` de relleno y las etapas 00–09 de `.straymark` siembran la lista de capas — luego refinas a mano (reasignar/renombrar capas, ajustar globs, añadir enlaces). `--force` sobrescribe los artefactos existentes.
1124+
1125+
**`straymark architecture sync [path] [--out <dir>] [--apply]`** — reconciliación **append-only** (solo-añadir): detecta nuevos directorios de fuentes de nivel superior / componentes de ADRs todavía no cubiertos por el modelo y los añade a `model.yml` + `plan.drawio`, sin **nunca** pisar las ediciones humanas ni la geometría de DrawIO. Dry-run por defecto; `--apply` escribe.
1126+
1127+
**`straymark architecture validate [path] [--out <dir>] [--output <text|json|markdown>]`** — reporta señales de integridad modelo↔plan: **undrawn** (componente sin celda de DrawIO), **unmodeled** (una celda de DrawIO ausente del modelo), **empty** (globs que no coinciden con ningún archivo en disco). **Sale con 1** cuando se encuentra cualquier señal (gestionable en CI). Degrada a solo-cobertura-de-globs cuando `plan.drawio` está ausente.
1128+
1129+
| Subcomando | Flags clave | ¿Escribe? |
1130+
|---|---|---|
1131+
| `generate` | `--force`, `--out` | Sí (rehúsa sobrescribir sin `--force`) |
1132+
| `sync` | `--apply`, `--out` | Solo con `--apply` (append-only) |
1133+
| `validate` | `--output`, `--out` | No (solo-lectura; sale con 1 ante cualquier señal) |
1134+
1135+
**Ejemplo:**
1136+
1137+
```bash
1138+
$ straymark architecture generate
1139+
✓ Wrote .straymark/architecture/model.yml (4 components, 9 layers)
1140+
✓ Wrote .straymark/architecture/plan.drawio
1141+
→ Mined 3 ADRs: 2 labels improved, 1 link added.
1142+
→ Refine by hand: reassign components from `unassigned` to real layers, then open the plan in DrawIO.
1143+
1144+
$ straymark architecture validate
1145+
✓ Architecture model is consistent (4 components).
1146+
```
1147+
1148+
---
1149+
10761150
### `straymark loom serve [path] [--port <puerto>] [--no-open]` *(cli-3.24.0+, EXPERIMENTAL)*
10771151

10781152
Lanza **Loom**, el servidor EXPERIMENTAL de visualización del grafo de conocimiento: un dashboard web solo-loopback y solo-lectura que renderiza los documentos StrayMark del proyecto como un grafo de fuerzas en vivo (nodos coloreados por tipo de documento, dimensionados por conectividad; seleccionar un nodo ilumina todo su hilo de relaciones; las ediciones a archivos `.md` vigilados actualizan el navegador abierto en menos de un segundo).

docs/i18n/zh-CN/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ StrayMark 为每个组件使用独立的版本标签:
259259
| 组件 | 标签前缀 | 示例 | 包含内容 |
260260
|------|----------|------|----------|
261261
| Framework | `fw-` | `fw-4.26.0` | 模板(12 种类型)、治理文档、指令、Charter 模板 + schema |
262-
| CLI | `cli-` | `cli-3.24.0` | `straymark` 二进制文件 |
262+
| CLI | `cli-` | `cli-3.25.0` | `straymark` 二进制文件 |
263263
| Loom(实验性) | `loom-` | `loom-0.4.2` | `straymark-loom` 可视化服务器,由 `straymark loom serve` 按需下载 |
264264

265265
使用 `straymark status` 或 `straymark about` 查看已安装的版本。

0 commit comments

Comments
 (0)