From d7acf385df65f8990b0d7e7905891271fb3dccaa Mon Sep 17 00:00:00 2001 From: brunosouzas-agent Date: Sun, 6 Dec 2026 07:46:33 +0000 Subject: [PATCH 1/4] spec: skill-journeys Co-Authored-By: Claude Sonnet 5.5 --- openspec/changes/skill-journeys/design.md | 15 +++ openspec/changes/skill-journeys/proposal.md | 49 +++++++++ .../specs/build-command/spec.md | 16 +++ .../skill-journeys/specs/catalogue/spec.md | 44 ++++++++ .../skill-journeys/specs/metro-map/spec.md | 20 ++++ .../skill-journeys/specs/skill-source/spec.md | 103 ++++++++++++++++++ .../skill-journeys/specs/skills-site/spec.md | 36 ++++++ .../specs/skills-validate-command/spec.md | 37 +++++++ openspec/changes/skill-journeys/tasks.md | 28 +++++ 9 files changed, 348 insertions(+) create mode 100644 openspec/changes/skill-journeys/design.md create mode 100644 openspec/changes/skill-journeys/proposal.md create mode 100644 openspec/changes/skill-journeys/specs/build-command/spec.md create mode 100644 openspec/changes/skill-journeys/specs/catalogue/spec.md create mode 100644 openspec/changes/skill-journeys/specs/metro-map/spec.md create mode 100644 openspec/changes/skill-journeys/specs/skill-source/spec.md create mode 100644 openspec/changes/skill-journeys/specs/skills-site/spec.md create mode 100644 openspec/changes/skill-journeys/specs/skills-validate-command/spec.md create mode 100644 openspec/changes/skill-journeys/tasks.md diff --git a/openspec/changes/skill-journeys/design.md b/openspec/changes/skill-journeys/design.md new file mode 100644 index 0000000..c6b0c91 --- /dev/null +++ b/openspec/changes/skill-journeys/design.md @@ -0,0 +1,15 @@ +## Context + +Zones are resolved in two places that must agree: `src/skills/lines.ts` (validation, `zoneMembers`) and `src/skills/metro.ts` (drawing). Journeys need no code: a `Line` already has free stops, and the map engine already draws an item on two lines as an interchange. + +## Decisions + +- **Zone name grammar.** `playbook:` and `marketplace:` are explicit; a plain name is a playbook when one matches (as before, so old maps are unchanged), else a marketplace; one that is both is an error asking for the prefix. `loose` alone is the zone of items with no marketplace; it never resolves to a playbook or marketplace (use the prefix for one called `loose`). Alternative rejected: a separate `kind` field on a zone, which would change the shared `MapLayout` schema the software map uses. +- **Zone keys** (`data-zone`): a playbook keeps its page file name; a marketplace is `marketplace--`; loose is `loose`. Old maps give the same keys. +- **Members of a marketplace zone:** every skill, playbook and agent whose `marketplace` is that name. Only the manifest name identifies a marketplace; two given marketplaces with one name are one zone (skills-marketplaces already says their items clash by name). +- **Map file in the catalogue:** `spec.skills.map`, a relative path whose base name is `stackledger-skills.yaml`. That base name is what the catalogue loader already skips, so the Lines in it never become software lines. It is read first, so its `MapLayout` is the one used and a layout at the top of a folder becomes the "Only one MapLayout" error. `readSkillSet` takes it as `options.mapFile`; the given folders' files follow in folder order, a file seen twice (by real path) once. Without folders in use there is no skill set, so the setting then has no effect. +- **Legend and filter text:** the label is computed from the zones drawn: all marketplaces (and loose) say Marketplace, all playbooks say Playbook, a mix says Zone. + +## Risks + +A marketplace zone is large when a marketplace has many plugins; the convex area then covers a lot. Readability is judged on the Northwind example with three marketplaces, and the engine's labels, parallel bundles and zone titles are used as they are. diff --git a/openspec/changes/skill-journeys/proposal.md b/openspec/changes/skill-journeys/proposal.md new file mode 100644 index 0000000..b088eb7 --- /dev/null +++ b/openspec/changes/skill-journeys/proposal.md @@ -0,0 +1,49 @@ +## Why + +[ADR 11](../../../docs/adr/0011-skills-are-read-from-plugin-marketplaces.md) says the skills map draws journeys (kinds of work) as lines and marketplaces as zones. `skills-marketplaces` (#65) made the set read marketplaces and name their items `plugin:skill`, but the map still asks every zone to be a playbook, and its text still says "playbook". The skills map file can also live only at the top of a skills folder, though journeys are about work, not about one marketplace. + +## What Changes + +- A line is a journey: a kind of work, written by hand in the skills map file with the existing `Line` kind. No playbook is needed for a line or a zone. Nothing is inferred: the tool draws only the journeys the file declares. +- A zone may name a marketplace of the set (`spec.zones[].name`: `northwind-skills`, or `marketplace:northwind-skills`); its members are the skills and agents of that marketplace's plugins. The reserved name `loose` is the zone of the items that come from no marketplace. A zone may still name a playbook (`playbook:` or a plain name). A plain name that is both a playbook and a marketplace is an error that asks for the prefix. +- Stops may be plain (`skill:editor`) or qualified (`skill:review:checklist`, `agent:writing:reviewer`), as already resolved by `skills-marketplaces`; this change specifies it for the map file, with the ambiguous plain name as an error. +- Interchanges: an item that is a stop of two or more lines is drawn as an interchange (the map engine already does this); an item on no line stays in the lists and pages and is not drawn. +- The skills map file may also live in the catalogue repository: `spec.skills.map` of the `Settings` names it (a path relative to the catalogue folder, ending in `stackledger-skills.yaml`), and `stackledger skills validate --map ` checks such a file against the folders given. The old place (the top of a given folder) keeps working; the catalogue still never reads a file with that name as catalogue documents. +- `/skill-map/`: the zone filter says Marketplace (or Playbook, or Zone when both appear), the lead says a line is a journey, and the empty page names both places a map file can be. +- `stackledger skills validate` checks a map file's zones against marketplaces too. + +## Capabilities + +### New Capabilities + +None. + +### Modified Capabilities + +- `skill-source`: journeys, zones that are marketplaces or `loose`, qualified stops, an extra map file read first. +- `catalogue`: `spec.skills.map` in the Settings. +- `build-command`: the map file named by the Settings. +- `skills-validate-command`: `--map ` and the usage line. +- `metro-map`: zone keys of marketplace zones. +- `skills-site`: the skill map page's texts and zone filter. + +## Out of scope + +- Project journeys (`project-journeys`, SW-348), named maps (SW-349), the `stackledger-catalog` repository's own files (SW-350), the website of tenavu and the brand mark. +- Inferring a journey, or a position, from skill text or from plugins: journeys are written by hand (ADR 3, ADR 11). No new layout feature: stations without a position are placed by the engine, and the build report suggests positions as before. +- `stackledger skills map` (Markdown pages) does not draw journeys or zones; it is unchanged. +- A `--map` option on `build` (the Settings names the file), several map files in the Settings, and fetching a marketplace. + +## Implicit requirements + +- **Errors and invalid input:** requirement. A zone that names nothing, a name that is ambiguous, a map path that is absolute, not named `stackledger-skills.yaml` or missing are problems on their own path; the rest of the map is still read. +- **Limits:** requirement. The map file named by the Settings shares the 1 MiB limit and the secret rules of every map file. +- **Repetition and idempotency:** requirement. Two spellings of one zone are one zone; the same file given by the Settings and found at the top of a folder is read once. Output depends only on the files. +- **Concurrency:** n/a: one read-only process. +- **Security:** requirement. The Settings path is relative to the catalogue folder, as `spec.skills.folders`; the file goes through the secret rules and the output carries no absolute path. +- **Logs and observability:** requirement. Every problem names its file and field; nothing is skipped silently. + +## Documentation + +- `docs/skills.md` (journeys, marketplace zones, the map file's places, the page), `docs/map.md`, `docs/catalogue-format.md` (Settings), `README.md`, `AGENTS.md` (implemented list), `docs/architecture.md` (module map), `docs/roadmap.md` (row delivered). +- Brain vault: the stackledger roadmap and changelog, after the merge. diff --git a/openspec/changes/skill-journeys/specs/build-command/spec.md b/openspec/changes/skill-journeys/specs/build-command/spec.md new file mode 100644 index 0000000..6a81cfa --- /dev/null +++ b/openspec/changes/skill-journeys/specs/build-command/spec.md @@ -0,0 +1,16 @@ +## ADDED Requirements + +### Requirement: Skills map file in the catalogue +When a skill set is read and the Settings in use has no error and has `spec.skills.map`, the command SHALL read that file, resolved from the catalogue folder, as an extra skills map file (skill-source, "Extra skills map file"), also when the folders come from `--skills`. Without a skill set the setting has no effect. The file SHALL never be read as catalogue documents, and the report SHALL count its problems with the skill set's. + +#### Scenario: Journeys in the catalogue +- **WHEN** the catalogue holds `journeys/stackledger-skills.yaml` with the line `ship`, `spec.skills.map` names it, and `spec.skills.folders` names a marketplace +- **THEN** `/skill-map/` draws the line `ship` and the software map has no line `ship` + +#### Scenario: Missing map file +- **WHEN** `spec.skills.map` names a file that does not exist +- **THEN** the build finishes with exit code 0, the report counts one skill set error, and the skills map has no line from that file + +#### Scenario: Map setting without folders +- **WHEN** `spec.skills.map` is set, there is no `spec.skills.folders` and no `--skills` +- **THEN** there is no Skills section and the exit code is 0 diff --git a/openspec/changes/skill-journeys/specs/catalogue/spec.md b/openspec/changes/skill-journeys/specs/catalogue/spec.md new file mode 100644 index 0000000..9f7e51c --- /dev/null +++ b/openspec/changes/skill-journeys/specs/catalogue/spec.md @@ -0,0 +1,44 @@ +## MODIFIED Requirements + +### Requirement: Skills settings +`spec.skills` MAY have `folders`: a list of 1 to 20 paths without repeats, where `stackledger build` reads a skill set, each a non-empty string relative to the catalogue folder: not starting with `/`, `\` or `~`, and not starting with a letter and `:`. `..` is allowed. It MAY also have `map`: one path, relative in the same way, whose last part is exactly `stackledger-skills.yaml`. Any other field under `spec.skills` SHALL be an error. + +#### Scenario: Two skills folders +- **WHEN** a `Settings` document has `spec.skills.folders: [../kit, ../openspec]` +- **THEN** it has no problem + +#### Scenario: Absolute path +- **WHEN** `spec.skills.folders` is `[/home/northwind/kit]` +- **THEN** it gets an error on `spec.skills.folders[0]` saying the path must be relative to the catalogue folder + +#### Scenario: Home folder shortcut +- **WHEN** `spec.skills.folders` is `[~/kit]` +- **THEN** it gets an error on `spec.skills.folders[0]` + +#### Scenario: Drive letter +- **WHEN** `spec.skills.folders` is `["C:kit"]` +- **THEN** it gets an error on `spec.skills.folders[0]` + +#### Scenario: Empty list +- **WHEN** `spec.skills.folders` is `[]` +- **THEN** it gets an error on `spec.skills.folders` + +#### Scenario: Too many folders +- **WHEN** `spec.skills.folders` lists 21 different paths +- **THEN** it gets an error on `spec.skills.folders` + +#### Scenario: Repeated folder +- **WHEN** `spec.skills.folders` is `[../kit, ../kit]` +- **THEN** the second entry gets an error + +#### Scenario: Unknown skills field +- **WHEN** `spec.skills` has `folder` +- **THEN** it gets an error on `spec.skills.folder` + +#### Scenario: Map file path +- **WHEN** `spec.skills.map` is `journeys/stackledger-skills.yaml` +- **THEN** it has no problem + +#### Scenario: Map file with another name +- **WHEN** `spec.skills.map` is `journeys/lines.yaml`, or `/home/northwind/stackledger-skills.yaml` +- **THEN** it gets an error on `spec.skills.map` diff --git a/openspec/changes/skill-journeys/specs/metro-map/spec.md b/openspec/changes/skill-journeys/specs/metro-map/spec.md new file mode 100644 index 0000000..5290a4b --- /dev/null +++ b/openspec/changes/skill-journeys/specs/metro-map/spec.md @@ -0,0 +1,20 @@ +## MODIFIED Requirements + +### Requirement: Skills map zones +On a skills map, a station SHALL join every zone whose members (skill-source, "Zones") include its item, so zones may overlap; each zone is drawn as the "Zones" requirement says. A station in a drawn zone SHALL carry `data-zone` with the keys of its zones, separated by spaces, in declaration order: a playbook zone's key is its page file name, a marketplace zone's is `marketplace--`, and the loose zone's is `loose`. + +#### Scenario: Overlapping zones +- **WHEN** the layout declares the zones `release` then `review`, both playbooks with `writer` among their members, with other drawn members each +- **THEN** both zone areas contain `writer`'s point, and its station has `data-zone="release review"` + +#### Scenario: Marketplace zones +- **WHEN** the layout declares the marketplaces `northwind-skills` and `northwind-extra`, and `draft` belongs to the first and `audit` to the second +- **THEN** `draft`'s station has `data-zone="marketplace--northwind-skills"` and `audit`'s `data-zone="marketplace--northwind-extra"` + +#### Scenario: Item in a marketplace and a playbook zone +- **WHEN** `draft` belongs to the marketplace `northwind-skills` and to the playbook `release`, and both are zones, in that order +- **THEN** its station has `data-zone="marketplace--northwind-skills release"` + +#### Scenario: Multi-word software zone +- **WHEN** a software map's component is in the zone `Team tools` +- **THEN** its station has `data-zone="team tools"`, as before this change diff --git a/openspec/changes/skill-journeys/specs/skill-source/spec.md b/openspec/changes/skill-journeys/specs/skill-source/spec.md new file mode 100644 index 0000000..6d0e58f --- /dev/null +++ b/openspec/changes/skill-journeys/specs/skill-source/spec.md @@ -0,0 +1,103 @@ +## ADDED Requirements + +### Requirement: Journeys +A `Line` of a skills map file SHALL be a journey: a kind of work written by hand, with stops that are skills, playbooks and agents of the set in the order the work visits them. A line SHALL need no playbook and no zone. An item that is a stop of two or more drawn lines SHALL be a shared item (an interchange on the map), and an item that is a stop of no line SHALL stay in the set and its lists but not be drawn. + +#### Scenario: Journeys without playbooks +- **WHEN** the set has no playbook and the map file has the lines `ship` (`draft`, `checklist`) and `publish` (`draft`, `publish`) +- **THEN** there is no problem and both lines are served + +#### Scenario: Shared item +- **WHEN** `draft` is a stop of `ship` and of `publish` +- **THEN** `draft` is a stop of both served lines + +#### Scenario: Item on no line +- **WHEN** the skill `linter` is a stop of no line +- **THEN** it is in the set and has no station + +### Requirement: Qualified stops +A stop or station key of a skills map file MAY name an item of a plugin by its qualified name (`skill:review:checklist`, `agent:writing:reviewer`), and MAY use its plain name when exactly one item of that kind has it. A plain name that two plugins' items of that kind share SHALL be an error at the stop or key, naming the matches and asking for the qualified name; that stop is not drawn. + +#### Scenario: Qualified agent +- **WHEN** `writing` and `review` each hold the agent `reviewer` and a stop is `agent:review:reviewer` +- **THEN** there is no problem and the stop is `review`'s agent + +#### Scenario: Ambiguous plain name +- **WHEN** the same two plugins hold `reviewer` and a stop is `agent:reviewer` +- **THEN** there is one error on that stop naming `review:reviewer` and `writing:reviewer`, and that stop is not drawn + +#### Scenario: Unique plain name +- **WHEN** only the plugin `writing` holds a skill `publish` and a stop is `skill:publish` +- **THEN** the stop is `writing:publish` and there is no problem + +### Requirement: Extra skills map file +`readSkillSet` MAY be given one more skills map file, not tied to a given folder. It SHALL be read with the same checks as any skills map file, before the files found in the given folders, so its `MapLayout` is the one used; a file already read by real path SHALL be read once. One that cannot be read SHALL be an error on its path and give no line and no layout. + +#### Scenario: Map file outside the folders +- **WHEN** the extra file holds the line `ship` and the given folders hold no map file +- **THEN** the set has the line `ship` + +#### Scenario: Same file twice +- **WHEN** the extra file is also the map file at the top of a given folder +- **THEN** its documents are read once and there is no duplicate-name problem + +#### Scenario: Extra file wins the layout +- **WHEN** the extra file and a given folder's map file both hold a `MapLayout` +- **THEN** the extra file's layout is used and the folder's gets the "only one" error + +#### Scenario: Missing extra file +- **WHEN** the extra file does not exist +- **THEN** there is one error on its path and every item is still in the set + +## RENAMED Requirements + +- FROM: `### Requirement: Playbook zones` +- TO: `### Requirement: Zones` + +## MODIFIED Requirements + +### Requirement: Zones +In a skills `MapLayout`, each zone of `spec.zones` SHALL name a marketplace or a playbook of the set, or be `loose`. `marketplace:` and `playbook:` are explicit; a plain name is a playbook when one matches, else a marketplace; one that is both, or a name that is neither, SHALL be an error on that zone's `name` (the layout is still used and the zone has no member). `loose` is the zone of the items from no marketplace. Zone names SHALL be resolved as in "Name resolution". + +#### Scenario: Marketplace as a zone +- **WHEN** the layout declares the zone `northwind-skills` and the marketplace `northwind-skills` has two plugins +- **THEN** there is no problem and the zone's members are the skills and agents of both plugins + +#### Scenario: Prefixed marketplace +- **WHEN** the layout declares the zone `marketplace:northwind-skills` +- **THEN** it is the same zone as `northwind-skills` + +#### Scenario: Loose zone +- **WHEN** the layout declares `loose` and the set has skills from a loose folder and from a marketplace +- **THEN** its members are the loose items only + +#### Scenario: Zone that is not a playbook +- **WHEN** the layout declares the zone `writer` and `writer` is a skill +- **THEN** there is an error on that zone's `name` saying it must name a marketplace, a playbook or `loose`, and the zone is not drawn + +#### Scenario: Playbook and marketplace with one name +- **WHEN** a playbook and a marketplace are both named `release` and the zone is `release` +- **THEN** there is an error on its `name` asking for `playbook:release` or `marketplace:release` + +#### Scenario: Playbook as a zone +- **WHEN** the layout declares the zone `release` and the playbook `release` loads `writer` and `editor` and uses `reviewer` +- **THEN** the zone's members are `release`, `writer`, `editor` and `reviewer`, not what those load + +#### Scenario: Only direct members +- **WHEN** the zone `ship` is the playbook `ship`, which loads the playbook `release`, which loads `writer` +- **THEN** the members of `ship` are `ship` and `release`, not `writer` + +#### Scenario: One skill in two zones +- **WHEN** the playbooks `release` and `review` both load `writer` and both are zones +- **THEN** `writer` is a member of both zones and there is no problem + +### Requirement: Several skills map files +The skills map files of the extra file (if any) and of the given folders SHALL be read, extra file first and then in folder order, as the documents of one catalogue: a line name or code already used by an earlier line is an error on the later one, and only the earliest `MapLayout` is used, a later one being an error naming the earlier file. + +#### Scenario: Second layout +- **WHEN** folders `repo` and `tool` are given and both map files hold a `MapLayout` +- **THEN** there is an error on `tool`'s naming `repo`'s file, and only `repo`'s positions are used + +#### Scenario: One line name in two files +- **WHEN** both map files hold a line named `publish` +- **THEN** there is an error on the line in `tool`'s file diff --git a/openspec/changes/skill-journeys/specs/skills-site/spec.md b/openspec/changes/skill-journeys/specs/skills-site/spec.md new file mode 100644 index 0000000..9cb70ca --- /dev/null +++ b/openspec/changes/skill-journeys/specs/skills-site/spec.md @@ -0,0 +1,36 @@ +## MODIFIED Requirements + +### Requirement: Skills map page +`/skill-map/` SHALL show the skills map of the set in the page theme, with zoom, pan, reset, line highlight and, when a zone is drawn, the zone filter as on the software map page, reading `data-zone` as a space-separated list. The filter SHALL be labelled Marketplace when every zone is a marketplace or loose, Playbook when every zone is a playbook, and Zone otherwise. The lead SHALL say that a line is a journey, and the list of lines and their stops SHALL follow the map as its text alternative. Each station SHALL be a link to its item page. + +#### Scenario: Station link +- **WHEN** the reader clicks station `skill:writer`, or focuses it and presses Enter +- **THEN** the browser opens `writer`'s page + +#### Scenario: Highlight a skill line +- **WHEN** the reader chooses line `publish` in the line chips, then chooses it again +- **THEN** every other line is dimmed, then restored + +#### Scenario: Filter by a marketplace zone +- **WHEN** `draft` is in the zones of the marketplaces `northwind-skills` and `northwind-extra`, `publish` only in the first, and the reader chooses the second +- **THEN** `publish` is dimmed and `draft` is not; choosing the first leaves both lit + +#### Scenario: Filter by a playbook zone +- **WHEN** `writer` is in the playbook zones `release` and `review`, `editor` only in `release`, and the reader chooses `review` +- **THEN** `editor` is dimmed and `writer` is not; choosing `release` leaves both lit + +#### Scenario: Filter label +- **WHEN** the drawn zones are all marketplaces +- **THEN** the filter is labelled Marketplace and its first option is All marketplaces + +#### Scenario: No zone filter without zones +- **WHEN** the skills layout declares no zone +- **THEN** the page has no zone filter + +#### Scenario: No skill lines +- **WHEN** the set has no line +- **THEN** the page says `No skill lines yet` and names `stackledger-skills.yaml` at the top of a skills folder and `spec.skills.map` of the Settings + +#### Scenario: Map without JavaScript +- **WHEN** JavaScript is disabled +- **THEN** the whole map is shown, at the size "Skills map shown size" gives diff --git a/openspec/changes/skill-journeys/specs/skills-validate-command/spec.md b/openspec/changes/skill-journeys/specs/skills-validate-command/spec.md new file mode 100644 index 0000000..0167582 --- /dev/null +++ b/openspec/changes/skill-journeys/specs/skills-validate-command/spec.md @@ -0,0 +1,37 @@ +## ADDED Requirements + +### Requirement: Map file option +`stackledger skills validate [folder...] [--map ] [--json]` SHALL read `` as an extra skills map file (skill-source, "Extra skills map file"), used as received, and check its stops, stations and zones against the set. A `--map` that is not a file SHALL be an error on its path, exit 1, not a usage error. + +#### Scenario: Map file of the catalogue +- **WHEN** the command runs with `--map catalogue/stackledger-skills.yaml` whose line stops at `skill:editr`, a skill the folders lack +- **THEN** there is one error naming `editr` on that file and the exit code is 1 + +#### Scenario: Map option without a value +- **WHEN** the command runs as `stackledger skills validate --map` +- **THEN** the exit code is 2 and stderr names `--map` + +#### Scenario: Map path is a folder +- **WHEN** `--map` names a folder +- **THEN** there is one error on it and the exit code is 1 + +## MODIFIED Requirements + +### Requirement: Skills usage errors +When `--help` is among the arguments, the command SHALL print usage on stdout and exit 0. Otherwise `stackledger skills` with no subcommand, an unknown subcommand or an unknown option SHALL print the reason and usage on stderr, nothing on stdout, and exit 2. The global usage SHALL list `stackledger skills validate [folder...] [--map ] [--json]`. + +#### Scenario: Help wins +- **WHEN** the command runs as `stackledger skills validate --help --fast` +- **THEN** stdout shows usage including the skills command, stderr is empty and the exit code is 0 + +#### Scenario: No subcommand +- **WHEN** the command runs as `stackledger skills` +- **THEN** the exit code is 2, stdout is empty and stderr says a skills subcommand is required + +#### Scenario: Unknown subcommand +- **WHEN** the command runs as `stackledger skills check` +- **THEN** the exit code is 2 and stderr names `check` + +#### Scenario: Unknown option +- **WHEN** the command runs as `stackledger skills validate --strict` +- **THEN** the exit code is 2 and stderr names `--strict` diff --git a/openspec/changes/skill-journeys/tasks.md b/openspec/changes/skill-journeys/tasks.md new file mode 100644 index 0000000..4b30334 --- /dev/null +++ b/openspec/changes/skill-journeys/tasks.md @@ -0,0 +1,28 @@ +## 1. Code + +- [x] 1.1 `src/skills/lines.ts`: `resolveZone`, `zoneKey` and `zoneMembers` for marketplaces, `loose` and playbooks; `marketplace` on `SetItem`; the zone check. Check: `npx vitest run test/unit/skills-journeys.test.ts test/unit/skills-lines.test.ts`. +- [x] 1.2 `src/skills/walk.ts`, `source.ts`: the extra map file (`WalkOptions.mapFile`) read first, once by real path. Check: same tests (Extra skills map file). +- [x] 1.3 `src/skills/metro.ts`: zone keys. `src/site/skills-data.ts`, `site/src/pages/skill-map/[...map].astro`, `SkillItem.astro`, `src/map/svg.ts`: texts and the filter label. Check: `test/unit/skills-journeys.test.ts` (Filter label) and `npm run test:browser`. +- [x] 1.4 `src/schema.ts`: `spec.skills.map`. `src/site/skills-build.ts`: pass it to the set. `src/skills/command.ts`, `src/cli.ts`: `--map` and the usage line. Check: `test/unit/settings.test.ts`, `test/integration/build-skills.test.ts`, `test/integration/skills-validate.test.ts`. + +## 2. Example, tests and documentation + +- [x] 2.1 `examples/northwind-journeys/`: three fictitious marketplaces, a loose skill and a catalogue with its map file; it validates with no problem and builds. +- [x] 2.2 `docs/skills.md`, `docs/map.md`, `docs/catalogue-format.md`, `README.md`, `AGENTS.md`, `docs/architecture.md`, `docs/roadmap.md`. Check: `npx vitest run test/integration/docs.test.ts`. + +## 3. Integration + +- [x] 3.1 Full suite. Check: `npm run build && npm test && npm run test:browser`. + +| Capability | Scenarios | Test | +|---|---|---| +| skill-source | Journeys without playbooks, Shared item, Item on no line, Qualified agent, Ambiguous plain name, Unique plain name | test/unit/skills-journeys.test.ts (unit) | +| skill-source | Map file outside the folders, Same file twice, Extra file wins the layout, Missing extra file | test/unit/skills-journeys.test.ts (unit) | +| skill-source | Marketplace as a zone, Prefixed marketplace, Loose zone, Zone that is not a playbook, Playbook and marketplace with one name | test/unit/skills-journeys.test.ts (unit); Zone that is not a playbook also test/unit/skills-lines.test.ts | +| skill-source | Playbook as a zone, Only direct members, One skill in two zones, Second layout, One line name in two files | test/unit/skills-lines.test.ts (unit, unchanged) | +| catalogue | Map file path, Map file with another name, and the folder scenarios | test/unit/settings.test.ts (unit) | +| build-command | Journeys in the catalogue, Missing map file, Map setting without folders | test/integration/build-skills.test.ts (integration) | +| skills-validate-command | Map file of the catalogue, Map option without a value, Map path is a folder; Help wins, No subcommand, Unknown subcommand, Unknown option | test/integration/skills-validate.test.ts (integration) | +| metro-map | Marketplace zones, Item in a marketplace and a playbook zone, Overlapping zones | test/unit/skills-journeys.test.ts, test/unit/skills-metro.test.ts (unit) | +| skills-site | Filter label, Filter by a marketplace zone, Highlight a skill line, Filter by a playbook zone, No zone filter without zones, Station link, Map without JavaScript | test/unit/skills-journeys.test.ts (Filter label), test/browser/site-skills.spec.ts (e2e, "Journeys and marketplace zones") | +| skills-site | No skill lines | not tested: the page text is checked by reading the template; the empty state has no fixture in the browser build | From 8f218a24411bffcc0758e510b281e41cf8717602 Mon Sep 17 00:00:00 2001 From: brunosouzas-agent Date: Sun, 6 Dec 2026 07:46:33 +0000 Subject: [PATCH 2/4] feat: skills map draws journeys as lines and marketplaces as zones A zone may name a marketplace, loose (the items of no marketplace) or a playbook; stops may be qualified; the skills map file may be named by spec.skills.map or given to skills validate with --map. Adds the northwind-journeys example. Co-Authored-By: Claude Sonnet 5.5 --- AGENTS.md | 4 +- README.md | 8 +- docs/architecture.md | 4 +- docs/catalogue-format.md | 1 + docs/map.md | 2 +- docs/roadmap.md | 2 +- docs/skills.md | 57 ++++--- examples/northwind-journeys/README.md | 11 ++ .../catalogue/catalog-info.yaml | 19 +++ .../catalogue/stackledger-skills.yaml | 55 +++++++ .../foundry/.claude-plugin/marketplace.json | 18 +++ .../plugins/engineering/agents/reviewer.md | 10 ++ .../plugins/engineering/skills/build/SKILL.md | 8 + .../engineering/skills/review/SKILL.md | 8 + .../plugins/engineering/skills/spec/SKILL.md | 8 + .../plugins/release/agents/releaser.md | 10 ++ .../plugins/release/skills/ship/SKILL.md | 8 + .../.claude-plugin/marketplace.json | 13 ++ .../plugins/mule/skills/contract/SKILL.md | 8 + .../plugins/mule/skills/munit/SKILL.md | 8 + .../loose/skills/notes/SKILL.md | 8 + .../studio/.claude-plugin/marketplace.json | 18 +++ .../publishing/skills/publish/SKILL.md | 8 + .../studio/plugins/writing/agents/reviewer.md | 10 ++ .../plugins/writing/skills/draft/SKILL.md | 8 + .../plugins/writing/skills/edit/SKILL.md | 8 + site/src/components/SkillItem.astro | 2 +- site/src/pages/skill-map/[...map].astro | 17 +- src/cli.ts | 2 +- src/map/svg.ts | 2 +- src/schema.ts | 3 + src/site/skills-build.ts | 5 +- src/site/skills-data.ts | 9 +- src/skills/command.ts | 7 +- src/skills/lines.ts | 68 ++++++-- src/skills/metro.ts | 8 +- src/skills/source.ts | 2 +- src/skills/walk.ts | 7 + test/browser/serve.mjs | 11 +- test/browser/site-skills.spec.ts | 25 +++ test/integration/build-skills.test.ts | 34 ++++ test/integration/skills-validate.test.ts | 24 ++- test/unit/settings.test.ts | 4 + test/unit/skills-journeys.test.ts | 153 ++++++++++++++++++ test/unit/skills-lines.test.ts | 2 +- 45 files changed, 636 insertions(+), 71 deletions(-) create mode 100644 examples/northwind-journeys/README.md create mode 100644 examples/northwind-journeys/catalogue/catalog-info.yaml create mode 100644 examples/northwind-journeys/catalogue/stackledger-skills.yaml create mode 100644 examples/northwind-journeys/foundry/.claude-plugin/marketplace.json create mode 100644 examples/northwind-journeys/foundry/plugins/engineering/agents/reviewer.md create mode 100644 examples/northwind-journeys/foundry/plugins/engineering/skills/build/SKILL.md create mode 100644 examples/northwind-journeys/foundry/plugins/engineering/skills/review/SKILL.md create mode 100644 examples/northwind-journeys/foundry/plugins/engineering/skills/spec/SKILL.md create mode 100644 examples/northwind-journeys/foundry/plugins/release/agents/releaser.md create mode 100644 examples/northwind-journeys/foundry/plugins/release/skills/ship/SKILL.md create mode 100644 examples/northwind-journeys/integration/.claude-plugin/marketplace.json create mode 100644 examples/northwind-journeys/integration/plugins/mule/skills/contract/SKILL.md create mode 100644 examples/northwind-journeys/integration/plugins/mule/skills/munit/SKILL.md create mode 100644 examples/northwind-journeys/loose/skills/notes/SKILL.md create mode 100644 examples/northwind-journeys/studio/.claude-plugin/marketplace.json create mode 100644 examples/northwind-journeys/studio/plugins/publishing/skills/publish/SKILL.md create mode 100644 examples/northwind-journeys/studio/plugins/writing/agents/reviewer.md create mode 100644 examples/northwind-journeys/studio/plugins/writing/skills/draft/SKILL.md create mode 100644 examples/northwind-journeys/studio/plugins/writing/skills/edit/SKILL.md create mode 100644 test/unit/skills-journeys.test.ts diff --git a/AGENTS.md b/AGENTS.md index 7ab2f6a..b3eaf0a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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/` 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. +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/` 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 journeys as the lines of the skills map with marketplaces (or `loose`, or playbooks) as zones, qualified stops, and the skills map file named by `spec.skills.map` or `skills validate --map` (`skill-journeys`, `src/skills/lines.ts` zones, `metro.ts`, `examples/northwind-journeys/`), 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 and `examples/northwind-marketplace/` a fictitious plugin marketplace. +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-journeys/` a fictitious setup of three marketplaces, a loose skill and a catalogue with journeys, `examples/northwind-marketplace/` a fictitious plugin marketplace. - Build: `npm run build` - Test: `npm test` (vitest; build first for CLI integration tests) diff --git a/README.md b/README.md index 92d5882..43d769f 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ What it does: - **Drift on a Mac.** What is installed but not declared, and what is declared but missing. - **Two views.** A `full` view for owners and finance, and a `staff` view without costs or renewal dates. - **An MCP server**, so your AI agent can query and check the catalogue. -- **Your agent skills on the same site.** Skills, playbooks and agents with their declared relations, rules and a skills metro map whose zones are your playbooks. +- **Your agent skills on the same site.** Skills, playbooks and agents with their declared relations, rules and a skills metro map whose lines are your journeys (kinds of work) and whose zones are your plugin marketplaces. ## How it works @@ -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. **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). +7. **Skills from plugin marketplaces; the skills map shows journeys.** A Claude Code plugin marketplace is read as one set, items named `plugin:skill`, and the skills map draws journeys as lines and marketplaces as zones ([ADR 11](docs/adr/0011-skills-are-read-from-plugin-marketplaces.md)); projects that declare 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 blue `s` with the parent's moon, the brunosouzas family mark) 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). @@ -126,7 +126,7 @@ cd /path/to/skills && node /path/to/stackledger/dist/cli.js skills map . --out d | `stackledger report [--date YYYY-MM-DD] [--days N] [--format text\|json\|csv\|ics]` | Prints the licence report of the `full` view on stdout: renewals in the next `--days` (default 90), recurring cost per currency by owner, payer and zone, one-off and planned costs, incomplete licences; or the renewal calendar. Exit 0 even with catalogue errors; 1: the report could not be computed or written; 2: usage or folder problem. See [docs/reports.md](docs/reports.md) | Available (npm 0.8.0, source) | | `stackledger discover` | Reads what this Mac has installed (Homebrew, App Store, applications, launchd and the helpers apps declare, mise, npm, pipx), with every program in the macOS sandbox, and writes `~/.stackledger//snapshot.json`; one summary line per source on stdout. Exit 0 also with skipped sources; 1: not macOS, no sandbox or the file could not be written safely; 2: usage problem. See [docs/discovery.md](docs/discovery.md) | Available (npm 0.8.0, source) | | `stackledger drift [--snapshot ] [--format text\|json] [--scaffold ]` | Compares the snapshot with the catalogue through `stackledger/` annotations: what is not declared (with the annotation to add), what is missing, what could not be checked, and `dependsOn` relations to confirm; `--scaffold` writes draft component files into a new folder outside the catalogue. Exit 0 even with catalogue errors; 1: internal or write failure; 2: usage, folder or snapshot problem. See [docs/discovery.md](docs/discovery.md) | Available (npm 0.8.0, source) | -| `stackledger skills validate [folder...] [--json]` | Checks agent skills, playbooks, agents and rules read from the given folders (default: the current folder) as one set, and reports each problem with file, line and field. Exit 0: no errors (warnings allowed); 1: errors; 2: usage or folder problem. See [docs/skills.md](docs/skills.md) | Available (npm 0.8.0, source) | +| `stackledger skills validate [folder...] [--map ] [--json]` | Checks agent skills, playbooks, agents and rules read from the given folders (default: the current folder) as one set, and reports each problem with file, line and field. Exit 0: no errors (warnings allowed); 1: errors; 2: usage or folder problem. See [docs/skills.md](docs/skills.md) | Available (npm 0.8.0, source) | | `stackledger skills map [folder...] --out [--check]` | Writes Markdown pages with Mermaid diagrams of the set's declared relations into ``: an index and one page per skill, playbook and agent, byte for byte the same on every machine; `--check` writes nothing and lists what is out of date. Exit 0: written (also with errors in the set) or up to date; 1: out of date with `--check`, nothing found in a given folder, the folder changed during the run or a write failed; 2: usage or folder problem. See [docs/skills.md](docs/skills.md#map-in-the-repository) | Available (npm 0.8.0, source) | `validate`, `mcp`, `map`, `report`, `drift` and `skills validate` only read files (`drift --scaffold` writes only inside the new folder it names); `build` and `skills map` write only inside their output folder; `discover` writes only its snapshot file. None of them makes network calls or sends telemetry, and none edits the catalogue. The text output and error messages of `validate`, `report`, `discover`, `drift` and `skills validate` carry no control characters from file names, options, catalogue or snapshot text, and their JSON output writes U+007F to U+009F as `\u` escapes; `build` and `mcp` keep their own rules, described in their documents. @@ -178,7 +178,7 @@ npx @brunosouzas/stackledger build ./catalogue --out ./public --skills ~/.claude In a pipeline, check out the skills repository next to the catalogue (so `../ai-kit` exists), or pass `--skills` with the path the checkout used. Pin one stackledger version everywhere, 0.3.0 or later: 0.2.0 reads `spec.skills` as an error. If the `Settings` has an error and sets `spec.skills`, the build stops with exit 1 and changes nothing published, rather than publish a site without its Skills section; fix it, or pass `--skills`. -The skills map is drawn from `stackledger-skills.yaml` at the top of a skills folder: `Line` and `MapLayout` documents, as in the catalogue, with stops such as `skill:writer`, `playbook:release` and `agent:reviewer`. Playbooks can be zones; a skill in two playbooks sits in both zones, so place the shared skills between the playbooks and the zones overlap there cleanly. The format, the CI recipe and what each page shows: [docs/skills.md](docs/skills.md#skills-on-the-site). +The skills map is drawn from `stackledger-skills.yaml`: `Line` and `MapLayout` documents, as in the catalogue. A line is a **journey**, a kind of work you write by hand ("ship a change"), with stops such as `skill:writing:draft` or `agent:reviewer`; a zone is a **marketplace** (or `loose`, for skills from none, or still a playbook). A skill that two journeys share is an interchange. Keep the file in the catalogue and name it in the Settings, `spec.skills.map: stackledger-skills.yaml`, or put it at the top of a skills folder, as before; see [`examples/northwind-journeys/`](examples/northwind-journeys/). The format, the CI recipe and what each page shows: [docs/skills.md](docs/skills.md#skills-on-the-site). ## Catalogue format diff --git a/docs/architecture.md b/docs/architecture.md index 8dcb6bd..4319f10 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -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 (`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/skills/` | Read and check a skill set (`marketplace.ts` reads a plugin marketplace's manifest, `resolve.ts` resolves plain and `plugin:name` names, `lines.ts` reads the map files of journeys and resolves zones: marketplaces, `loose` and playbooks), 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 | @@ -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): 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). +- [ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md): plugin marketplaces are read (`skills-marketplaces`), and the skills map's lines are journeys with marketplaces as zones (`skill-journeys`); project journeys 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). diff --git a/docs/catalogue-format.md b/docs/catalogue-format.md index 6978b34..5e90486 100644 --- a/docs/catalogue-format.md +++ b/docs/catalogue-format.md @@ -201,6 +201,7 @@ spec: | `spec.site.colors` | Optional mapping with any of `primary`, `accent`, `body` and `text`, each `#` and six hexadecimal digits (quote it: `#` starts a YAML comment). They replace the matching colours of the light theme only; the dark theme keeps its own | | `spec.map.backdrop` | Optional backdrop of the software map, `neutral` (the default, a flat panel) or `london` (central London from OpenStreetMap data, with its credit). Any other value, or any other field under `spec.map`, is an error, and the map then draws `neutral`. `stackledger map --backdrop` overrides it. See [the map](map.md#backdrop) | | `spec.skills.folders` | Optional list of 1 to 20 skills folders for `stackledger build`, without repeats, each relative to the catalogue folder (`..` allowed; no leading `/`, `\\` or `~`, and no drive letter such as `C:`). `--skills` replaces it. From 0.3.0; 0.2.0 reads it as an error: pin one version everywhere. See [Skills on the site](../README.md#skills-on-the-site) | +| `spec.skills.map` | Optional path, relative to the catalogue folder in the same way, of the [skills map file](skills.md#the-skills-map-file) of journeys and marketplace zones; its last part must be exactly `stackledger-skills.yaml`. Read first when a skill set is read. | | `spec.sites` | Optional list of the sites `stackledger build` writes: `[full]` (personal mode) or `[full, staff]` (corporate mode, the default), in any order, without repeats. `[staff]` alone, an empty list or any other value is an error | Unlisted fields anywhere in a Settings document are errors, so `spec.view` instead of `spec.views` is reported, and so is `spec.site.logo`. While the Settings document has an error, the sites use the default title and colours, and the home page shows the default text and no links. When `hide` is given it replaces the default list entirely: `[cost]` hides only the cost, and `[]` hides nothing. Without `hide`, the default list applies. diff --git a/docs/map.md b/docs/map.md index 506cf44..2c93054 100644 --- a/docs/map.md +++ b/docs/map.md @@ -68,5 +68,5 @@ Tests cover scenario-named numeric geometry, independently parsed hostile SVG, s ## Skills map -The site's Skills division draws a second metro map with the same engine, from a skill set's `stackledger-skills.yaml` ([docs/skills.md](skills.md#the-skills-map-file)). Its stations are skills, playbooks and agents; its zones are playbooks and may overlap, each title next to its playbook's station; its legend has only the interchange and suggested-position symbols, and it depends on no view or date. Station references use the item's page name (`skill:writer`, `skill:_577269746572` for `Writer`). The software map does not change with it: the same catalogue, view, theme and date place every station and line where 0.2.0 placed them; only the painting (the design system's pieces since 0.5.0) and the round bends differ. +The site's Skills division draws a second metro map with the same engine, from a skill set's `stackledger-skills.yaml` ([docs/skills.md](skills.md#the-skills-map-file)). Its stations are skills, playbooks and agents, named `plugin:name` when they come from a plugin; its lines are journeys; its zones are marketplaces, `loose` or playbooks and may overlap (a playbook's title sits next to its station, a marketplace's at the corner of its area); a station of two or more journeys is an interchange; its legend has only the interchange and suggested-position symbols, and it depends on no view or date. Station references use the item's page name (`skill:writer`, `skill:_577269746572` for `Writer`). The software map does not change with it: the same catalogue, view, theme and date place every station and line where 0.2.0 placed them; only the painting (the design system's pieces since 0.5.0) and the round bends differ. diff --git a/docs/roadmap.md b/docs/roadmap.md index 7ee86ef..adbee4d 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -51,7 +51,7 @@ Decided on 2026-12-05 by [ADR 11](adr/0011-skills-are-read-from-plugin-marketpla |---|---|---|---| | 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)) | 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) | +| 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 | Delivered in this change (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) | diff --git a/docs/skills.md b/docs/skills.md index 96555ad..773ff7c 100644 --- a/docs/skills.md +++ b/docs/skills.md @@ -1,13 +1,13 @@ # Agent skills -> **Partly planned:** [ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md) also adds skills map lines that are journeys, marketplaces as zones, and projects that declare the journeys they follow (changes `skill-journeys` and `project-journeys`); those are not built. Reading plugin marketplaces (`skills-marketplaces`) is: see [Plugin marketplaces](#plugin-marketplaces). The skills map still has playbooks as zones. +> **Partly planned:** [ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md) also adds projects that declare the journeys they follow (change `project-journeys`); that is not built. Reading plugin marketplaces (`skills-marketplaces`) and the journeys and marketplace zones of the skills map (`skill-journeys`) are: see [Plugin marketplaces](#plugin-marketplaces) and [The skills map file](#the-skills-map-file). `stackledger skills validate` checks a set of agent skills, playbooks, agents and rules kept in folders: what one agent would see. It reports problems in the same line format as `stackledger validate`, so a person can run it on their own folders and a team can run it in CI on every pull request. It only reads files: it writes nothing, makes no network call and fixes nothing. `stackledger skills map` draws the same set's declared relations as Markdown pages with Mermaid diagrams in your repository: see [Map in the repository](#map-in-the-repository). ```sh -stackledger skills validate [folder...] [--json] +stackledger skills validate [folder...] [--map ] [--json] ``` With no folder it checks the current folder. Several folders are read as one set, in the order given. @@ -271,24 +271,26 @@ The set is read exactly as `skills validate` reads it: the same folders give the ### The skills map file -The skills map lives in `stackledger-skills.yaml` at the top of a skills folder (never in a sub-folder, and not in a folder that is itself one skill). It holds the same `Line` and `MapLayout` documents as a catalogue, with skill references for stops and stations: +The skills map draws **journeys** as lines and **marketplaces** as zones ([ADR 11](adr/0011-skills-are-read-from-plugin-marketplaces.md)). A line is a kind of work ("ship a change", "ship an integration change", "publish an article"): you write it by hand, from a process you already follow, as a `Line` whose stops are the skills, playbooks and agents that work visits, in order. stackledger never invents a journey, and a line needs no playbook and no zone. The map file holds the same `Line` and `MapLayout` documents as a catalogue, with skill references for stops and stations. The worked example is [`examples/northwind-journeys/`](../examples/northwind-journeys/): three fictitious marketplaces, a loose skill, and a catalogue whose Settings names the map file. ```yaml apiVersion: stackledger/v1alpha1 kind: MapLayout metadata: - name: skills + name: journeys spec: stations: - "playbook:publishing": [0, 0] - "skill:writer": [2, 0] - "skill:editor": [4, 2] - "agent:reviewer": [6, 2] - "playbook:engineering": [0, 4] - "skill:tester": [2, 4] + "skill:writing:draft": [0, 0] + "skill:writing:edit": [2, 0] + "agent:writing:reviewer": [4, 0] + "skill:engineering:spec": [0, 4] + "skill:engineering:review": [4, 4] + "agent:engineering:reviewer": [6, 4] + "skill:notes": [0, 6] zones: - - { name: publishing, title: Publishing, color: "#F5A623" } - - { name: engineering, title: Engineering, color: "#7B61FF" } + - { name: northwind-studio, title: Studio, color: "#F5A623" } + - { name: northwind-foundry, title: Foundry, color: "#7B61FF" } + - { name: loose, title: Loose skills, color: "#808080" } --- apiVersion: stackledger/v1alpha1 kind: Line @@ -298,25 +300,41 @@ metadata: spec: code: P color: "#E4002B" - stops: ["playbook:publishing", "skill:writer", "skill:editor", "agent:reviewer"] + stops: ["skill:writing:draft", "skill:writing:edit", "agent:writing:reviewer"] ``` -- A reference is `skill:`, `playbook:` or `agent:` in lower case, then the item's exact name. A reference to something that is not in the set, or not of that kind, is an error at it, and that stop is not drawn; the item itself stays in the set. +**Where the file lives.** Either place works, and they can be combined: + +- **In the catalogue repository** (usual, because journeys are about work, not about one marketplace): name it in the `Settings`, `spec.skills.map: stackledger-skills.yaml`, a path relative to the catalogue folder whose last part is exactly `stackledger-skills.yaml`. It is read first, so its `MapLayout` is the one used. It is read only when a skill set is: with `spec.skills.folders` or `--skills`, and a `Settings` without error. `stackledger skills validate --map /stackledger-skills.yaml ...` checks it against the skills. +- **At the top of a skills folder** (never in a sub-folder, and not in a folder that is itself one skill), as before. + +**References.** A reference is `skill:`, `playbook:` or `agent:` in lower case, then the item's name. An item of a plugin may be written plain (`skill:draft`) when no other plugin has an item of that kind with that name, or qualified (`skill:writing:draft`, `agent:review:reviewer`). A plain name that two plugins share is an error that lists the matches and asks for the qualified one, and that stop is not drawn. A reference to something that is not in the set, or not of that kind, is an error at it; the item itself stays in the set. + +**Interchanges.** A skill or agent that is a stop of two or more journeys is drawn as an interchange, as in the software map. An item that is on no line stays in the lists and its page and is not drawn. + - Every catalogue rule for lines and layouts applies: at least two stops, unique names and codes, one layout, positions on whole grid cells, the secret guard. A stop without a position is placed by the map, and the build report suggests a position to paste, written as the key (`skill:writer: [2, 0]`). -- With several skills folders, their map files read as one: the first `MapLayout` wins, and a line name used twice is an error. +- With several map files, they read as one, the catalogue's first and then each skills folder's: the first `MapLayout` wins, and a line name used twice is an error. - `skills validate` checks the map file too, so a renamed skill fails the pipeline that checks the skills repository. It adds no count to its summary line. -- The catalogue never reads a file with this name, even inside the catalogue folder, so one repository can hold both. A catalogue that used this name for its own lines must rename the file. +- The catalogue never reads a file with this name as catalogue documents, even inside the catalogue folder, so the lines in it never reach the software map. A catalogue that used this name for its own lines must rename the file. + +**Zones.** Each zone's `name` is one of: + +| Name | Zone | Members | +| --- | --- | --- | +| `` or `marketplace:` | A marketplace, by its manifest name | Every skill, playbook and agent of its plugins | +| `loose` | The items that come from no marketplace | Every item of a loose folder | +| `` or `playbook:` | A playbook, as before | The playbook and what it names directly in `stackledger-skills` and `stackledger-agents` (not what the skills it loads bring in) | -**Playbook zones.** Each zone's `name` must be a playbook of the set. Its members are the playbook and what it names directly in `stackledger-skills` and `stackledger-agents` (not what the skills it loads bring in). A skill in two playbooks is in both zones, so zones overlap; the area of a zone is the convex outline of its members, so place the shared skills between the playbooks, as `editor` and `reviewer` above, and the overlap stays a clean band. Each zone title sits next to its playbook's station. You choose which playbooks are zones: with many playbooks, colour only the few that matter. A zone that names no playbook is an error on its `name`; the rest of the layout is still used. +A plain name is a playbook when one matches, else a marketplace; a name that is both is an error that asks for the `playbook:` or `marketplace:` prefix, and so is one that is neither. An item in two zones (a skill of a marketplace that a playbook also loads) is in both: zones overlap, and the site's filter keeps a station lit for each of its zones. The area of a zone is the convex outline of its members, so place the stations of one marketplace close together, and the shared ones, which belong to a journey but not to one marketplace, between them. You choose which zones to draw: with many marketplaces, colour only the few that matter. A playbook zone's title sits next to the playbook's station; a marketplace's, at the corner of its area. A zone that names nothing is an error on its `name`; the rest of the layout is still used. ### What the site shows | Page | Path | Shows | | --- | --- | --- | | Skills | `/skills/` | The counts, and every skill, playbook and agent with its kind, description and number of rules; search and a kind filter | -| Skill map | `/skill-map/` | The skills metro map, sized as the software map (never larger than drawn, so both show the same line thickness on a wide screen), with zoom, pan, line highlight and a playbook filter (a station in two zones stays lit for both), then each line's stops as links. A skill or playbook with rules shows their number on its station (`99+` above 99), explained in the legend as "Number of rules"; the rules themselves are on the item's page and in `/rules/` | +| Skill map | `/skill-map/` | The skills metro map, sized as the software map (never larger than drawn, so both show the same line thickness on a wide screen), with zoom, pan, journey highlight and a zone filter (Marketplace, Playbook, or Zone when both are drawn; a station in two zones stays lit for both), then each journey's stops as links. A skill or playbook with rules shows their number on its station (`99+` above 99), explained in the legend as "Number of rules"; the rules themselves are on the item's page and in `/rules/` | | Rules | `/rules/` | Every rule with its ID, text, group and the skill or playbook that defines it; search | -| Skill, playbook, agent | `/skills//`, `/playbooks//`, `/agents//` | Name, kind, description, a diagram of what brings it in and what it brings in, the same as lists, "Reached through", the skill lines that stop at it, its rules and its source files | +| Skill, playbook, agent | `/skills//`, `/playbooks//`, `/agents//` | Name, kind, description, a diagram of what brings it in and what it brings in, the same as lists, "Reached through", the journeys that stop at it, its rules and its source files | `` is the page name `skills map` uses, so `writer` is `/skills/writer/` and `Writer` is `/skills/_577269746572/`. Descriptions are shown on one line, cut at 1,024 characters; the body of `SKILL.md` is not published. Source files are shown as their path below the skills folder, never as an absolute path. @@ -342,5 +360,6 @@ The catalogue pipeline needs the skills too. Check out the skills repository fro - A private skills repository needs a token that can only read it. Keep it out of pull requests from forks: build those without the skills (no `--skills` and no `spec.skills`), and never publish a pull-request build. - The site changes when the skills change: rebuild on a schedule, or trigger the catalogue pipeline from the skills repository's main branch. - Any Git host works the same way: two checkouts, then one command. +- A map file kept in the catalogue repository is read from the catalogue checkout (`spec.skills.map`); no extra step. - No software catalogue yet? A catalogue folder with only `stackledger.yaml` (`spec.sites: [full]` and `spec.skills.folders`) builds a site whose Software map is empty and whose Skills section is complete. diff --git a/examples/northwind-journeys/README.md b/examples/northwind-journeys/README.md new file mode 100644 index 0000000..521b951 --- /dev/null +++ b/examples/northwind-journeys/README.md @@ -0,0 +1,11 @@ +# northwind-journeys + +A fictitious setup for stackledger's documentation, tests and demo of the skills map as **journeys** (lines) and **marketplaces** (zones): + +- `studio/`, `foundry/` and `integration/` are three fictitious Claude Code plugin marketplaces; `loose/` holds a skill that comes from none. +- `catalogue/` is a tiny catalogue. Its `Settings` reads the four folders and names its own skills map file, `catalogue/stackledger-skills.yaml`, with four journeys and one zone for each marketplace and for the loose skills. + +```sh +npx stackledger build examples/northwind-journeys/catalogue --out /tmp/northwind-site +stackledger skills validate examples/northwind-journeys/studio examples/northwind-journeys/foundry examples/northwind-journeys/integration examples/northwind-journeys/loose --map examples/northwind-journeys/catalogue/stackledger-skills.yaml +``` diff --git a/examples/northwind-journeys/catalogue/catalog-info.yaml b/examples/northwind-journeys/catalogue/catalog-info.yaml new file mode 100644 index 0000000..151a625 --- /dev/null +++ b/examples/northwind-journeys/catalogue/catalog-info.yaml @@ -0,0 +1,19 @@ +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: northwind-wiki + title: Northwind Wiki + description: The team wiki of the fictitious Northwind company. +spec: + type: tool + lifecycle: active + owner: group:northwind +--- +apiVersion: stackledger/v1alpha1 +kind: Settings +metadata: + name: settings +spec: + skills: + folders: [../studio, ../foundry, ../integration, ../loose] + map: stackledger-skills.yaml diff --git a/examples/northwind-journeys/catalogue/stackledger-skills.yaml b/examples/northwind-journeys/catalogue/stackledger-skills.yaml new file mode 100644 index 0000000..0c30d0c --- /dev/null +++ b/examples/northwind-journeys/catalogue/stackledger-skills.yaml @@ -0,0 +1,55 @@ +# Fictitious Northwind journeys. A line is a kind of work; a zone is a marketplace (or `loose`, the skills of none). +# Stops use qualified names where two plugins share a plain name (the two `reviewer` agents). +apiVersion: stackledger/v1alpha1 +kind: MapLayout +metadata: + name: northwind-journeys +spec: + stations: + "skill:writing:draft": [0, 0] + "skill:writing:edit": [2, 0] + "agent:writing:reviewer": [4, 0] + "skill:publishing:publish": [6, 0] + "skill:engineering:spec": [0, 4] + "skill:engineering:build": [2, 4] + "skill:engineering:review": [4, 4] + "agent:engineering:reviewer": [6, 4] + "skill:release:ship": [8, 4] + "skill:notes": [0, 6] + "skill:mule:contract": [2, 6] + "skill:mule:munit": [4, 6] + zones: + - { name: northwind-studio, title: Studio, color: "#F5A623" } + - { name: northwind-foundry, title: Foundry, color: "#7B61FF" } + - { name: northwind-integration, title: Integration, color: "#00A651" } + - { name: loose, title: Loose skills, color: "#808080" } +--- +apiVersion: stackledger/v1alpha1 +kind: Line +metadata: + name: publish + title: Publish an article +spec: + code: P + color: "#E4002B" + stops: ["skill:writing:draft", "skill:writing:edit", "agent:writing:reviewer", "skill:publishing:publish"] +--- +apiVersion: stackledger/v1alpha1 +kind: Line +metadata: + name: change + title: Ship a change +spec: + code: C + color: "#0072CE" + stops: ["skill:engineering:spec", "skill:engineering:build", "skill:engineering:review", "agent:engineering:reviewer", "skill:release:ship"] +--- +apiVersion: stackledger/v1alpha1 +kind: Line +metadata: + name: integration + title: Ship an integration change +spec: + code: I + color: "#00A651" + stops: ["skill:engineering:spec", "skill:notes", "skill:mule:contract", "skill:mule:munit", "skill:engineering:review", "skill:release:ship"] diff --git a/examples/northwind-journeys/foundry/.claude-plugin/marketplace.json b/examples/northwind-journeys/foundry/.claude-plugin/marketplace.json new file mode 100644 index 0000000..fe9a666 --- /dev/null +++ b/examples/northwind-journeys/foundry/.claude-plugin/marketplace.json @@ -0,0 +1,18 @@ +{ + "name": "northwind-foundry", + "owner": { + "name": "Northwind" + }, + "plugins": [ + { + "name": "engineering", + "source": "./plugins/engineering", + "description": "Fictitious engineering plugin." + }, + { + "name": "release", + "source": "./plugins/release", + "description": "Fictitious release plugin." + } + ] +} diff --git a/examples/northwind-journeys/foundry/plugins/engineering/agents/reviewer.md b/examples/northwind-journeys/foundry/plugins/engineering/agents/reviewer.md new file mode 100644 index 0000000..747ce87 --- /dev/null +++ b/examples/northwind-journeys/foundry/plugins/engineering/agents/reviewer.md @@ -0,0 +1,10 @@ +--- +name: reviewer +description: "Reviews a Northwind pull request." +tools: Read, Grep, Glob +model: sonnet +skills: + - review +--- + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/foundry/plugins/engineering/skills/build/SKILL.md b/examples/northwind-journeys/foundry/plugins/engineering/skills/build/SKILL.md new file mode 100644 index 0000000..3bbe9be --- /dev/null +++ b/examples/northwind-journeys/foundry/plugins/engineering/skills/build/SKILL.md @@ -0,0 +1,8 @@ +--- +name: build +description: "Builds a Northwind change from its spec." +--- + +# build + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/foundry/plugins/engineering/skills/review/SKILL.md b/examples/northwind-journeys/foundry/plugins/engineering/skills/review/SKILL.md new file mode 100644 index 0000000..bfefc99 --- /dev/null +++ b/examples/northwind-journeys/foundry/plugins/engineering/skills/review/SKILL.md @@ -0,0 +1,8 @@ +--- +name: review +description: "Reviews a Northwind change with a clean context." +--- + +# review + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/foundry/plugins/engineering/skills/spec/SKILL.md b/examples/northwind-journeys/foundry/plugins/engineering/skills/spec/SKILL.md new file mode 100644 index 0000000..ae48340 --- /dev/null +++ b/examples/northwind-journeys/foundry/plugins/engineering/skills/spec/SKILL.md @@ -0,0 +1,8 @@ +--- +name: spec +description: "Writes the spec of a Northwind change." +--- + +# spec + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/foundry/plugins/release/agents/releaser.md b/examples/northwind-journeys/foundry/plugins/release/agents/releaser.md new file mode 100644 index 0000000..9f57d83 --- /dev/null +++ b/examples/northwind-journeys/foundry/plugins/release/agents/releaser.md @@ -0,0 +1,10 @@ +--- +name: releaser +description: "Cuts a Northwind release." +tools: Read, Grep, Glob +model: sonnet +skills: + - ship +--- + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/foundry/plugins/release/skills/ship/SKILL.md b/examples/northwind-journeys/foundry/plugins/release/skills/ship/SKILL.md new file mode 100644 index 0000000..7eb906c --- /dev/null +++ b/examples/northwind-journeys/foundry/plugins/release/skills/ship/SKILL.md @@ -0,0 +1,8 @@ +--- +name: ship +description: "Merges and releases a Northwind change." +--- + +# ship + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/integration/.claude-plugin/marketplace.json b/examples/northwind-journeys/integration/.claude-plugin/marketplace.json new file mode 100644 index 0000000..460c145 --- /dev/null +++ b/examples/northwind-journeys/integration/.claude-plugin/marketplace.json @@ -0,0 +1,13 @@ +{ + "name": "northwind-integration", + "owner": { + "name": "Northwind" + }, + "plugins": [ + { + "name": "mule", + "source": "./plugins/mule", + "description": "Fictitious mule plugin." + } + ] +} diff --git a/examples/northwind-journeys/integration/plugins/mule/skills/contract/SKILL.md b/examples/northwind-journeys/integration/plugins/mule/skills/contract/SKILL.md new file mode 100644 index 0000000..f44afc7 --- /dev/null +++ b/examples/northwind-journeys/integration/plugins/mule/skills/contract/SKILL.md @@ -0,0 +1,8 @@ +--- +name: contract +description: "Writes the API contract of a Northwind integration change." +--- + +# contract + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/integration/plugins/mule/skills/munit/SKILL.md b/examples/northwind-journeys/integration/plugins/mule/skills/munit/SKILL.md new file mode 100644 index 0000000..1ac1e70 --- /dev/null +++ b/examples/northwind-journeys/integration/plugins/mule/skills/munit/SKILL.md @@ -0,0 +1,8 @@ +--- +name: munit +description: "Tests a Northwind integration flow." +--- + +# munit + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/loose/skills/notes/SKILL.md b/examples/northwind-journeys/loose/skills/notes/SKILL.md new file mode 100644 index 0000000..1b2fe53 --- /dev/null +++ b/examples/northwind-journeys/loose/skills/notes/SKILL.md @@ -0,0 +1,8 @@ +--- +name: notes +description: "Keeps the notes of a piece of Northwind work." +--- + +# notes + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/studio/.claude-plugin/marketplace.json b/examples/northwind-journeys/studio/.claude-plugin/marketplace.json new file mode 100644 index 0000000..4f6616e --- /dev/null +++ b/examples/northwind-journeys/studio/.claude-plugin/marketplace.json @@ -0,0 +1,18 @@ +{ + "name": "northwind-studio", + "owner": { + "name": "Northwind" + }, + "plugins": [ + { + "name": "writing", + "source": "./plugins/writing", + "description": "Fictitious writing plugin." + }, + { + "name": "publishing", + "source": "./plugins/publishing", + "description": "Fictitious publishing plugin." + } + ] +} diff --git a/examples/northwind-journeys/studio/plugins/publishing/skills/publish/SKILL.md b/examples/northwind-journeys/studio/plugins/publishing/skills/publish/SKILL.md new file mode 100644 index 0000000..f2274a9 --- /dev/null +++ b/examples/northwind-journeys/studio/plugins/publishing/skills/publish/SKILL.md @@ -0,0 +1,8 @@ +--- +name: publish +description: "Publishes a Northwind article to the site." +--- + +# publish + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/studio/plugins/writing/agents/reviewer.md b/examples/northwind-journeys/studio/plugins/writing/agents/reviewer.md new file mode 100644 index 0000000..2a67e44 --- /dev/null +++ b/examples/northwind-journeys/studio/plugins/writing/agents/reviewer.md @@ -0,0 +1,10 @@ +--- +name: reviewer +description: "Reads a Northwind draft before it goes out." +tools: Read, Grep, Glob +model: sonnet +skills: + - edit +--- + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/studio/plugins/writing/skills/draft/SKILL.md b/examples/northwind-journeys/studio/plugins/writing/skills/draft/SKILL.md new file mode 100644 index 0000000..ea95c03 --- /dev/null +++ b/examples/northwind-journeys/studio/plugins/writing/skills/draft/SKILL.md @@ -0,0 +1,8 @@ +--- +name: draft +description: "Writes the first draft of a Northwind article." +--- + +# draft + +Fictitious example for stackledger. diff --git a/examples/northwind-journeys/studio/plugins/writing/skills/edit/SKILL.md b/examples/northwind-journeys/studio/plugins/writing/skills/edit/SKILL.md new file mode 100644 index 0000000..174933e --- /dev/null +++ b/examples/northwind-journeys/studio/plugins/writing/skills/edit/SKILL.md @@ -0,0 +1,8 @@ +--- +name: edit +description: "Edits a Northwind draft for tone and clarity." +--- + +# edit + +Fictitious example for stackledger. diff --git a/site/src/components/SkillItem.astro b/site/src/components/SkillItem.astro index 7731b37..73150a0 100644 --- a/site/src/components/SkillItem.astro +++ b/site/src/components/SkillItem.astro @@ -83,7 +83,7 @@ const kinds: Record = { skill: 'Skill', playbook: 'Playbook', ag
-

Skill lines

+

Journeys

{ page.lines.length === 0 ? (

No skill line stops here.

diff --git a/site/src/pages/skill-map/[...map].astro b/site/src/pages/skill-map/[...map].astro index 36b5f16..f3c32f9 100644 --- a/site/src/pages/skill-map/[...map].astro +++ b/site/src/pages/skill-map/[...map].astro @@ -1,7 +1,7 @@ --- // Skills map page (skills-site, Skills map page): the skills metro map in both themes, with the // software map page's zoom, pan, line highlight and, when zones are drawn, the zone filter. The frame -// is marked data-zone-mode="list" because playbook zones overlap (scripts/map.ts). The lines and their +// is marked data-zone-mode="list" because zones (marketplaces, playbooks) overlap (scripts/map.ts). The lines and their // stops follow the map as links: the map's text alternative. import Base from '../../layouts/Base.astro'; import Themed from '../../components/Themed.astro'; @@ -13,7 +13,8 @@ export function getStaticPaths() { const { skills } = Astro.props; const root = rootFor(Astro.url.pathname); -const { lines, zones, symbols } = skills.map; +const { lines, zones, zoneLabel, symbols } = skills.map; +const zonePlural = zoneLabel === 'Marketplace' ? 'marketplaces' : zoneLabel === 'Playbook' ? 'playbooks' : 'zones'; --- @@ -21,9 +22,9 @@ const { lines, zones, symbols } = skills.map;

Skill map

{ skills.map.empty ? ( -

No skill lines yet. Add a Line to stackledger-skills.yaml at the top of a skills folder to draw one.

+

No skill lines yet. A line is a journey, a kind of work. Add a Line to stackledger-skills.yaml, at the top of a skills folder or in the catalogue (spec.skills.map of the Settings), to draw one.

) : ( -

Each line is a way of working through the skills; each station opens its page.

+

Each line is a journey, a kind of work, through the skills and agents it uses. A station where lines cross is shared by those journeys{zones.length > 0 ? `; each coloured area is a ${zoneLabel.toLowerCase()}` : ''}. Each station opens its page.

) }