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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Model: 2 release PR
Integration branch: `main`
Deliver and verify: a merge into `main` publishes nothing; release-please keeps the release pull request, Bruno merges it, and `release.yml` publishes after he approves the `npm` environment (`docs/release.md`); verify with `npm view @brunosouzas/stackledger version`

Implemented: the catalogue format and `stackledger validate` (`catalogue-model`), the SVG map engine and `stackledger map` (`metro-map-engine`), the read-only MCP server with the `full` and `staff` views (`mcp-server`), `stackledger build` with the static `full` and `staff` sites (`catalogue-site`), the licence report: `stackledger report`, the Reports page and `renewals.ics` of the `full` site (`licence-reports`), and Mac discovery: `stackledger discover`, `stackledger drift` with `--scaffold` and the `stackledger/<source>` annotations (`mac-discovery`), and `stackledger skills validate`, which reads and checks a set of agent skills, playbooks, agents and rules (`skills-source`, code in `src/skills/`), skipping what a `.stackledgerignore` file at the top of a given folder lists (`skills-ignore`, `src/skills/ignore.ts`), and `stackledger skills map`, which writes Markdown pages with Mermaid diagrams of the set's declared relations into a folder it owns, with `--check` for pipelines (`skills-mermaid`, `src/skills/graph.ts`, `mermaid.ts`, `map-command.ts`), and the Skills section of `stackledger build` with `--skills` and `spec.skills.folders`: the skills map file `stackledger-skills.yaml` (`src/skills/lines.ts`), the skills metro map with playbook zones (`src/skills/metro.ts`), the relation diagram (`src/map/relations.ts`), the page data (`src/site/skills-data.ts`, `skills-build.ts`) and the Astro pages under `site/src/pages/{skills,skill-map,rules,playbooks,agents}/` (`skills-site`), and station labels that wrap instead of being cut, with the rule count on skills stations (`station-labels-and-rules`, `src/map/labels.ts`, `layout.ts`), and the home page at `/` with the map at `/map/`, the default title `stackledger` and `spec.site.home` (`site-home`, `site/src/pages/index.astro`, `src/site/relative.ts` for the home links' exemption), and the city backdrop of the software map: `spec.map.backdrop` and `stackledger map --backdrop`, `neutral` or `london`, its OpenStreetMap credit in the SVG and under the site's map frame (`map-backgrounds`, `src/map/backdrops/` generated by `scripts/backdrops/`, `src/map/svg.ts`, colours from the design system's `backdrop` tokens in `src/map/themes.ts`). The publishable npm package, owner-approved release workflow, catalogue repository pipeline template and protected hosting recipes (`catalogue-deployment`) are implemented. Released on npm: 0.1.0 to 0.4.0 as `stackledger` (deprecated), 0.4.1 as `@brunosouzas/stackledger` (the same code under the npm organisation's scope; the command stays `stackledger`), 0.5.0, with the identity of `@brunosouzas/design-system`, since renamed `@brunosouzas/signwright` (`design-system-identity`, `home-banner`, `design-system-pieces`, `round-bends`), 0.5.1, with maps never shown larger than drawn (`map-scale`) and the design system 0.4.0, 0.6.0, with the city backdrop of the software map (`map-backgrounds`) and the design system 0.5.3, and 0.7.0, with the script of interpreter jobs (`launchd-script`) and the helpers apps declare (`app-helpers`), and 0.8.0, with the identity v2 on design system 0.8.1 (`identity-v2`); the fictitious demo is rebuilt by hand following `docs/demo.md`. Where the identity v2 lives: Source fonts through Astro's Fonts API with the local provider (`src/site/build.ts`), its build-time font server bound to loopback (`src/site/loopback.ts`), the font CSS moved into `_astro/fonts.css` before the scan (`moveFontCss` in `src/site/relative.ts`), stackledger's accent, the outline frame, the map's `color.state.*` colours and quoted `font.sans` stack (`src/map/themes.ts`, `src/map/xml.ts`), the wordmark, the footer endorsement and the redrawn art (`scripts/site-art.mjs`). The rest of the roadmap is not implemented: say so instead of describing files that do not exist.
Implemented: the catalogue format and `stackledger validate` (`catalogue-model`), the SVG map engine and `stackledger map` (`metro-map-engine`), the read-only MCP server with the `full` and `staff` views (`mcp-server`), `stackledger build` with the static `full` and `staff` sites (`catalogue-site`), the licence report: `stackledger report`, the Reports page and `renewals.ics` of the `full` site (`licence-reports`), and Mac discovery: `stackledger discover`, `stackledger drift` with `--scaffold` and the `stackledger/<source>` annotations (`mac-discovery`), and `stackledger skills validate`, which reads and checks a set of agent skills, playbooks, agents and rules (`skills-source`, code in `src/skills/`), skipping what a `.stackledgerignore` file at the top of a given folder lists (`skills-ignore`, `src/skills/ignore.ts`), and `stackledger skills map`, which writes Markdown pages with Mermaid diagrams of the set's declared relations into a folder it owns, with `--check` for pipelines (`skills-mermaid`, `src/skills/graph.ts`, `mermaid.ts`, `map-command.ts`), and the Skills section of `stackledger build` with `--skills` and `spec.skills.folders`: the skills map file `stackledger-skills.yaml` (`src/skills/lines.ts`), the skills metro map with playbook zones (`src/skills/metro.ts`), the relation diagram (`src/map/relations.ts`), the page data (`src/site/skills-data.ts`, `skills-build.ts`) and the Astro pages under `site/src/pages/{skills,skill-map,rules,playbooks,agents}/` (`skills-site`), and reading Claude Code plugin marketplaces: a given folder with `.claude-plugin/marketplace.json` is read through its plugins, items are named `plugin:name`, plain names resolve by plugin first, remote plugins are skipped with a warning (`skills-marketplaces`, `src/skills/marketplace.ts`, `resolve.ts`, `examples/northwind-marketplace/`), and station labels that wrap instead of being cut, with the rule count on skills stations (`station-labels-and-rules`, `src/map/labels.ts`, `layout.ts`), and the home page at `/` with the map at `/map/`, the default title `stackledger` and `spec.site.home` (`site-home`, `site/src/pages/index.astro`, `src/site/relative.ts` for the home links' exemption), and the city backdrop of the software map: `spec.map.backdrop` and `stackledger map --backdrop`, `neutral` or `london`, its OpenStreetMap credit in the SVG and under the site's map frame (`map-backgrounds`, `src/map/backdrops/` generated by `scripts/backdrops/`, `src/map/svg.ts`, colours from the design system's `backdrop` tokens in `src/map/themes.ts`). The publishable npm package, owner-approved release workflow, catalogue repository pipeline template and protected hosting recipes (`catalogue-deployment`) are implemented. Released on npm: 0.1.0 to 0.4.0 as `stackledger` (deprecated), 0.4.1 as `@brunosouzas/stackledger` (the same code under the npm organisation's scope; the command stays `stackledger`), 0.5.0, with the identity of `@brunosouzas/design-system`, since renamed `@brunosouzas/signwright` (`design-system-identity`, `home-banner`, `design-system-pieces`, `round-bends`), 0.5.1, with maps never shown larger than drawn (`map-scale`) and the design system 0.4.0, 0.6.0, with the city backdrop of the software map (`map-backgrounds`) and the design system 0.5.3, and 0.7.0, with the script of interpreter jobs (`launchd-script`) and the helpers apps declare (`app-helpers`), and 0.8.0, with the identity v2 on design system 0.8.1 (`identity-v2`).; the fictitious demo is rebuilt by hand following `docs/demo.md`. Where the identity v2 lives: Source fonts through Astro's Fonts API with the local provider (`src/site/build.ts`), its build-time font server bound to loopback (`src/site/loopback.ts`), the font CSS moved into `_astro/fonts.css` before the scan (`moveFontCss` in `src/site/relative.ts`), stackledger's accent, the outline frame, the map's `color.state.*` colours and quoted `font.sans` stack (`src/map/themes.ts`, `src/map/xml.ts`), the wordmark, the footer endorsement and the redrawn art (`scripts/site-art.mjs`). The rest of the roadmap is not implemented: say so instead of describing files that do not exist.

Layout: `src/` the CLI and its modules (`src/map/` map engine and diagrams, `src/site/` site data, build, publication, `src/discovery/` the Mac sources, sandboxed runner and snapshot); `site/` the Astro project shipped in the package and copied into the build's staging folder; `test/unit`, `test/integration` (vitest) and `test/browser` (Playwright); `examples/northwind/` the fictitious example catalogue and `examples/northwind-machine/` its fictitious Mac snapshot, `examples/northwind-skills/` a fictitious skill set with a skills map file.
Layout: `src/` the CLI and its modules (`src/map/` map engine and diagrams, `src/site/` site data, build, publication, `src/discovery/` the Mac sources, sandboxed runner and snapshot); `site/` the Astro project shipped in the package and copied into the build's staging folder; `test/unit`, `test/integration` (vitest) and `test/browser` (Playwright); `examples/northwind/` the fictitious example catalogue and `examples/northwind-machine/` its fictitious Mac snapshot, `examples/northwind-skills/` a fictitious skill set with a skills map file and `examples/northwind-marketplace/` a fictitious plugin marketplace.

- Build: `npm run build`
- Test: `npm test` (vitest; build first for CLI integration tests)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The diagram as Mermaid, and the personal and corporate modes: [docs/how-it-works
4. **The website is static.** No server, no database, nothing to patch. Why: [ADR 5](docs/adr/0005-static-site-no-server.md).
5. **It is written in TypeScript**, so the same map engine runs at build time and in the browser. Why: [ADR 9](docs/adr/0009-typescript-end-to-end.md).
6. **Agent skills are a second ledger in the same tool.** The skills, agents, playbooks and rules your AI agents use are read from their own folders, never copied into YAML. `stackledger skills validate` checks them, `stackledger skills map` draws them in the skills repository, and since 0.3.0 the site has a Skills section next to Software; linking each skill to the software it needs is planned. Why: [ADR 10](docs/adr/0010-agent-skills-are-a-second-ledger-read-from-their-folders.md).
7. **Planned: skills from plugin marketplaces and several maps.** [ADR 11](docs/adr/0011-skills-are-read-from-plugin-marketplaces.md) adds reading plugin marketplaces and skills map lines that are journeys; [ADR 12](docs/adr/0012-several-named-maps-and-stations-of-any-kind.md) adds several named maps. Neither is built; see the [roadmap](docs/roadmap.md#v21-one-site-marketplaces-journeys-and-named-maps).
7. **Skills from plugin marketplaces; journeys and several maps are planned.** A Claude Code plugin marketplace is read as one set, items named `plugin:skill` ([ADR 11](docs/adr/0011-skills-are-read-from-plugin-marketplaces.md)); skills map lines that are journeys are planned, and [ADR 12](docs/adr/0012-several-named-maps-and-stations-of-any-kind.md) adds several named maps. Those are not built; see the [roadmap](docs/roadmap.md#v21-one-site-marketplaces-journeys-and-named-maps).
8. **It looks like brunosouzas.com, with an identity of its own.** The map, the diagrams, the favicon and the site's colours come from [`@brunosouzas/signwright`](https://www.npmjs.com/package/@brunosouzas/signwright), a dependency of the published package; stackledger keeps the layout and writes every piece through its own SVG writer. On top of the family it has its own accent (a blue), its wordmark (the site title in Source Serif 4 italic), its mark (a ledger page) and the parent brand's endorsement in the footer. The fonts are the site's: Source Sans 3, Source Serif 4 and Source Code Pro, shipped in the package and delivered by Astro's Fonts API, so no font is fetched from another site. See [the map](docs/map.md#routes-and-themes) and [the site](docs/site.md).

The context, the main flows and the module map are in [the architecture](docs/architecture.md).
Expand Down Expand Up @@ -251,6 +251,8 @@ metadata:

`stackledger-kind` is `skill` (the default) or `playbook`; the other two keys hold names separated by spaces. Give the folders one agent loads together, and check each tool folder on its own. A `.stackledgerignore` file at the top of a given folder skips templates, examples and test fixtures with `.gitignore` patterns, and the output counts and lists what it skipped. `stackledger skills map` writes the set's declared relations as Markdown pages with Mermaid diagrams into the repository, for offline reading and pull-request diffs, and `--check` fails a pipeline when they are out of date. The format, every check, the map and a CI example: [docs/skills.md](docs/skills.md). With `--skills` or `spec.skills.folders`, `stackledger build` also publishes the set on the site ([Skills on the site](#skills-on-the-site)).

Pointed at a Claude Code plugin marketplace root (a folder with `.claude-plugin/marketplace.json`), it reads every local plugin's skills and agents as one set, with items named `plugin:name`; remote plugins are skipped with a warning and nothing is fetched. See [Plugin marketplaces](docs/skills.md#plugin-marketplaces) and `examples/northwind-marketplace/`.

## How this project is built

stackledger follows spec-driven development:
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Kept by hand: update it in the pull request that adds, moves or removes a module
| `site/` | Astro project shipped in the package; its pages read the site data only |
| `src/mcp.ts` | Read-only MCP server |
| `src/discovery/`, `discover-command.ts`, `drift*.ts`, `scaffold.ts` | Read the Mac, write the snapshot, compare, draft entries |
| `src/skills/` | Read and check a skill set, its map files, Mermaid pages and the skills metro model |
| `src/skills/` | Read and check a skill set (`marketplace.ts` reads a plugin marketplace's manifest, `resolve.ts` resolves plain and `plugin:name` names), its map files, Mermaid pages and the skills metro model |
| `src/errors.ts`, `control.ts`, `stdout.ts` | Shared output handling |
| `src/index.ts` | Library entry |
| `scripts/` | Release steps, backdrop data and the repository art |
Expand All @@ -123,4 +123,4 @@ Status is in the [ADR index](adr/README.md).
- [ADR 8](adr/0008-read-only-mcp-early-no-ai-in-the-core.md): a read-only MCP server and no AI model in the core.
- [ADR 9](adr/0009-typescript-end-to-end.md): TypeScript end to end.
- [ADR 10](adr/0010-agent-skills-are-a-second-ledger-read-from-their-folders.md): agent skills are a second ledger in the same tool.
- [ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md), [ADR 12](adr/0012-several-named-maps-and-stations-of-any-kind.md) and [ADR 13](adr/0013-one-private-site-at-the-root.md): planned, not built; see the [roadmap](roadmap.md).
- [ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md): plugin marketplaces are read (`skills-marketplaces`); its journeys and zones are planned. [ADR 12](adr/0012-several-named-maps-and-stations-of-any-kind.md) and [ADR 13](adr/0013-one-private-site-at-the-root.md): planned, not built; see the [roadmap](roadmap.md).
2 changes: 1 addition & 1 deletion docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Decided on 2026-12-05 by [ADR 11](adr/0011-skills-are-read-from-plugin-marketpla
| # | Change | Delivers | Status |
|---|---|---|---|
| 1 | `single-site` | One private site served at the root, with no `full`/`staff` split and no `/full/` or `/staff/` paths; whoever has access sees everything, licences included; the `staff` view stays in the code, deprecated and not built into a reachable address; old `/full/` links redirect to the root; the hosting recipes and pipeline template follow, and the Access application covering the root must allow only people who may see everything before the first deploy ([ADR 13](adr/0013-one-private-site-at-the-root.md)) | Planned (SW-345) |
| 2 | `skills-marketplaces` | Reading Claude Code plugin marketplaces (`marketplace.json`, each plugin's `skills/` and `agents/`), names as `plugin:skill`, same-named agents of two plugins both kept; loose folders keep working ([ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md)) | Planned (SW-346) |
| 2 | `skills-marketplaces` | Reading Claude Code plugin marketplaces (`marketplace.json`, each plugin's `skills/` and `agents/`), names as `plugin:skill`, same-named agents of two plugins both kept; loose folders keep working ([ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md)) | Delivered in [#65](https://github.com/brunosouzas/stackledger/pull/65) |
| 3 | `skill-journeys` | Skills map lines are journeys (kinds of work) without playbooks as zones; zones are marketplaces, and skills outside one get a zone of their own; shared skills and agents show as interchanges; the skills map file may live in the catalogue repository | Planned (SW-347) |
| 4 | `project-journeys` | A project component declares the journeys it follows (the annotation key is set by the spec); a per-project view computed from the journeys | Planned (SW-348) |
| 5 | `named-maps` | Several named maps in one catalogue, and a station that may be software or a skill; `validate` must then know about skills; the first use is a map of a product family ([ADR 12](adr/0012-several-named-maps-and-stations-of-any-kind.md)) | Planned (SW-349) |
Expand Down
Loading
Loading