Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
crates/compass-cli/assets/vendor/pierre-diffs-v1.2.12.js -whitespace
crates/compass-output/assets/viewer/graph.js -whitespace
crates/compass-output/assets/viewer/graph.js -whitespace linguist-generated=true
crates/compass-cli/assets/compass-skill/** text eol=lf
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## Unreleased

- Replace the predefined flat call-flow architecture model with the native
`compass.viewer.architecture/1` projection. Production source scope is fixed
before grouping, generated/vendor/test/documentation content cannot shape Production,
relationships have explicit classes and lenses, owner/leaf groups use
source-grounded unique names, overview overflow is exact omission metadata
rather than `Other`, and HTML plus VS Code share the same Rust semantics.
Add architecture quality diagnostics, complete-group search, compact
index-based memberships, bounded
drill-down, explicit versioned overlays, and migration guidance for direct
`compass.viewer.callflow/1` consumers.

- Hard-cut Swift, Dart, Scala, and Groovy/Gradle onto version-1 qualifying
universal evidence pipelines. The bounded AST-first producer publishes
declarations, scopes, bindings, occurrences, and conservative relationship
Expand Down
12 changes: 12 additions & 0 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ A user-visible incompatible change requires:
Versioned formats use Compass-owned identifiers. Consumers should reject
unknown major versions instead of attempting legacy fallback behavior.

The architecture viewer is a coordinated hard cut from
`compass.viewer.callflow/1` to `compass.viewer.architecture/1`. Capability
negotiation advertises `architecture_viewer`; consumers must reject an unknown
major. The new payload does not reinterpret old `sections` or `calls` fields:
it publishes typed nodes and relationships once plus source-specific group,
membership, route, omission, and quality projections. The `callflow-json` and
`callflow-html` command names remain available, but direct v1 callflow JSON
consumers must migrate.
Membership records are compact validated indexes into the deterministic node
and per-projection group arrays. Documentation is a first-class All-code source
scope and cannot influence Production architecture.

Before the first compatibility-stable release, Compass hard-resets active
internal extraction, cache, publication, store-index, query-index/ranker,
overview, qualification, and semantic-diff identities to v1. Provisional
Expand Down
18 changes: 18 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Compass domain language

This glossary records Compass-specific concepts whose meaning must stay stable
across extraction, projection, output, and viewer modules.

## Language

**Architecture projection**:
A bounded, source-scoped, relationship-typed presentation of graph communities as project owners, subsystem groups, routes, omissions, and quality evidence. It never rewrites the underlying graph or treats display names as identity.
_Avoid_: Call-flow sections, architecture inference, subsystem catalog

**Source scope**:
The evidence-backed classification of a graph node as Production, Test, Generated, Vendor, or Unknown for one architecture projection.
_Avoid_: Visibility filter, hidden code

**Architecture lens**:
A declared subset of typed graph relationships used to explain one aspect of project topology, such as execution, dependency, type, or structure.
_Avoid_: Edge filter, call filter
27 changes: 27 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,33 @@ candidate exports, and TypeScript scorecards likewise require their `/2`
schemas and use `producer` for the language evidence identity; regenerate
those audit inputs rather than trying to load the old field names.

## Architecture viewer contract

`compass export callflow-json` now emits
`compass.viewer.architecture/1`, replacing `compass.viewer.callflow/1`. Update
direct consumers as follows:

- negotiate `contracts.architecture_viewer` instead of `callflow_viewer`;
- read `relationships` and `relationClass` instead of treating every edge as a
call;
- select `projections[].scope` (`production` or `all_code`) and join
`memberships`, `groups`, and `routes` rather than reading flat `sections`;
- resolve each membership's `nodeIndex` against top-level `nodes` and
`groupIndex` against that projection's `groups` array;
- use `overviewGroupIds`, `overviewRouteIds`, and `omissions` instead of an
`Other` overflow section; and
- surface `quality` independently from extraction status.

Production excludes Documentation as well as Test, Generated, Vendor, and
Unknown. Select All-code when documentation architecture is intentionally in
scope.

The old major is rejected rather than silently translated. The CLI command
names remain compatible. Rename project section files to a versioned
`compass.architecture-overlay/1` JSON/TOML overlay and pass
`--architecture-overlay PATH`; `--sections` is temporarily retained as a
deprecated adapter.

## Install Compass

Install the latest macOS release:
Expand Down
5 changes: 4 additions & 1 deletion crates/compass-cli/src/capability_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ pub fn command(frontend: Frontend, args: &[String]) -> Outcome {
compass_version: env!("CARGO_PKG_VERSION"),
contracts: BTreeMap::from([
("graph_viewer", compass_output::GRAPH_VIEWER_SCHEMA),
("callflow_viewer", compass_output::CALLFLOW_VIEWER_SCHEMA),
(
"architecture_viewer",
compass_output::ARCHITECTURE_VIEWER_SCHEMA,
),
("call_graph", compass_analysis::UNIVERSAL_CALL_GRAPH_SCHEMA),
("program_call_graph", compass_analysis::CALL_GRAPH_SCHEMA),
("progress", crate::ide_contract::PROGRESS_SCHEMA),
Expand Down
4 changes: 2 additions & 2 deletions crates/compass-cli/src/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,13 @@ const PAGES: &[Page] = &[
"export callflow-html",
"Generate a sectioned call-flow report",
["compass export callflow-html [GRAPH_OR_DIR] [OPTIONS]"],
"Arguments:\n [GRAPH_OR_DIR] Graph JSON or project/output directory\n\nOptions:\n --graph <PATH> Graph JSON\n --labels <PATH> Community-label JSON\n --report <PATH> GRAPH_REPORT.md path\n --sections <PATH> JSON section definitions\n --output <HTML> Output page\n --lang <LANG> Report language [default: auto]\n --max-sections <N> Maximum derived sections [default: 15]\n --diagram-scale <NUMBER> Mermaid scale [default: 1.0]\n --max-diagram-nodes <N> Nodes per diagram [default: 18]\n --max-diagram-edges <N> Edges per diagram [default: 24]\n\nExamples:\n compass export callflow-html\n compass export callflow-html ./compass-out --lang en --max-sections 10\n\nNotes:\n Interactive terminals ask before opening the generated HTML; scripts never prompt or open a browser."
"Arguments:\n [GRAPH_OR_DIR] Graph JSON or project/output directory\n\nOptions:\n --graph <PATH> Graph JSON\n --labels <PATH> Community-label JSON\n --architecture-overlay <PATH> Versioned JSON/TOML architecture overlay\n --sections <PATH> Deprecated overlay/legacy-section alias\n --output <HTML> Output page\n --max-sections <N> Maximum overview groups [default: 15]\n\nExamples:\n compass export callflow-html\n compass export callflow-html ./compass-out --max-sections 10\n\nNotes:\n Produces the typed compass.viewer.architecture/1 workbench. Production is scoped before grouping, and omitted groups remain searchable rather than becoming Other. Interactive terminals ask before opening the generated HTML; scripts never prompt or open a browser."
),
page!(
"export callflow-json",
"Export the structured call-flow report",
["compass export callflow-json [GRAPH_OR_DIR] [OPTIONS]"],
"Arguments:\n [GRAPH_OR_DIR] Graph JSON or project/output directory\n\nOptions:\n --graph <PATH> Graph JSON\n --labels <PATH> Community-label JSON\n --report <PATH> GRAPH_REPORT.md path\n --sections <PATH> JSON section definitions\n --output <PATH> Atomically write the JSON document\n --lang <LANG> Report language [default: auto]\n --max-sections <N> Maximum derived sections [default: 15]\n --diagram-scale <NUMBER> Mermaid scale [default: 1.0]\n --max-diagram-nodes <N> Nodes per diagram [default: 18]\n --max-diagram-edges <N> Edges per diagram [default: 24]\n\nExamples:\n compass export callflow-json\n compass export callflow-json --graph compass-out/graph.json --output callflow.json\n\nNotes:\n The JSON output is the machine-readable counterpart to callflow-html."
"Arguments:\n [GRAPH_OR_DIR] Graph JSON or project/output directory\n\nOptions:\n --graph <PATH> Graph JSON\n --labels <PATH> Community-label JSON\n --architecture-overlay <PATH> Versioned JSON/TOML architecture overlay\n --sections <PATH> Deprecated overlay/legacy-section alias\n --output <PATH> Atomically write the JSON document\n --max-sections <N> Maximum overview groups [default: 15]\n\nExamples:\n compass export callflow-json\n compass export callflow-json --graph compass-out/graph.json --output architecture.json\n\nNotes:\n Emits compass.viewer.architecture/1 with typed source scopes, relationship classes, hierarchy, omissions, and quality diagnostics."
),
page!(
"export obsidian",
Expand Down
Loading
Loading