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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The diagram as Mermaid, and the personal and corporate modes: [docs/how-it-works
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).
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).
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).

Expand Down
1 change: 1 addition & 0 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The first version (v1) is split into OpenSpec changes, delivered in this order.
| 15 | `identity-v2` | stackledger on `@brunosouzas/design-system` 0.8.1: Source Sans 3, Source Serif 4 and Source Code Pro through Astro's Fonts API with its local provider, the font CSS moved by the build into `_astro/fonts.css` under the unchanged policy; stackledger's own accent (`brand.<theme>.stackledgerAccent`), the outline frame without shadow, the map's `color.state.*` colours and dark header band; the wordmark in Source Serif 4 italic; the parent brand's symbol and "by Bruno Souza" in the footer and the README; the home banner "From the ledger to the map" with the Folha `ledgerMark`; the How it works diagram with its fonts embedded | Delivered ([#49](https://github.com/brunosouzas/stackledger/pull/49), AB#303); released in 0.8.0 |
| 15a | `stackledger-link-icon` | `@brunosouzas/design-system` 0.10.0 and its fifth link icon: a home link may take `icon: stackledger`; no other visible change from the bump | Delivered ([#53](https://github.com/brunosouzas/stackledger/pull/53), AB#326); released in 0.9.0 |
| 15b | `home-link-icon-row` | Home links with `icon` as a row of icon-only anchors before the text links, named by their title (`aria-label`), without description or tooltip; 32-pixel icons, 40-pixel targets, the site's focus ring and an even 12-pixel gap; `@brunosouzas/design-system` 0.11.0 and its sixth link icon, `brunosouzas` | Delivered ([#55](https://github.com/brunosouzas/stackledger/pull/55), AB#326); released in 0.10.0 |
| 15c | `family-mark` | stackledger on `@brunosouzas/signwright` 0.20.0: the favicon and the header mark are the family mark (a blue `s` and the parent's moon on the cream tile, the same in both themes); `ledgerMark` stays in the banner and the maps | SW-304 | In review |
| 15c | `external-links-new-tab` | Links to other sites (the home links and the map's OpenStreetMap credit) open in a new tab, with `rel="noopener noreferrer"`, and their accessible name ends with " (opens in a new tab)" (WCAG G201); links inside the site keep the same tab | In review ([#57](https://github.com/brunosouzas/stackledger/pull/57), AB#336) |

## v2: agent skills
Expand Down
2 changes: 1 addition & 1 deletion docs/site.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The look follows brunosouzas.com (based on the Astroplate theme, MIT). Its palet

**Fonts.** Source Sans 3 for text, labels, the map and the diagrams, Source Serif 4 for headings and the site title, Source Code Pro for code, as on brunosouzas.com. They are delivered by Astro's Fonts API with its local provider, which reads the `@fontsource/source-sans-3`, `source-serif-4` and `source-code-pro` files (SIL Open Font License 1.1) shipped in the package, so the build makes no network call. The Fonts API names each family `<name>-<hash>` and defines `--font-primary`, `--font-secondary` and `--font-mono`; the site's CSS reads only those. It writes its CSS in inline `<style>` elements; the build moves that CSS, and only that (its `:root` font variables and `@font-face` rules), into one file `_astro/fonts.css`, which every page links where the first element was, so the pages keep the fixed policy below with no inline style. Any other `<style>`, font CSS that differs between two pages, a page without it or a missing font file fails the build before anything is published. Only Source Sans 3 400 and Source Serif 4 700 are preloaded; the other faces load when a page uses them (about 73 KB of fonts on the home, up to about 103 KB on the map page). The map and the diagrams name the design system's plain family (`'Source Sans 3'`) in their SVG; a site rule points them at the shipped face, while `stackledger map` and the README images keep the plain name.

**Marks and art.** The header's site title is the wordmark: Source Serif 4, italic, 700. The favicon is the package's `ledgerMark` (the "Folha" ledger page), the same in both themes. The mark beside the site title in the header is that `ledgerMark` in the light theme and the one drawn for the dark surface in the dark theme; it is decorative (empty `alt`). The footer, after the view and the stackledger version, shows the parent brand's endorsement: the package's `symbol` (`symbol-light.svg` or `symbol-dark.svg`, by theme, decorative) and "by Bruno Souza", not a link. Below its title and text, the home shows the package's banner, "From the ledger to the map": stackledger's mark on the left, three of its rows leaving it as orange, blue and ink metro lines that cross at an interchange and run to Sinal at the end of the line, on the cream page, with no words and no motion, the same in both themes (`site/public/home-banner.svg`). A home link with `icon` is the package's link icon alone (`link-icons/<icon>-light.svg` or `-dark.svg`, by theme), 2rem (32 pixels on wide pages, about 26 under 768 pixels, where the root text is smaller), in a row of separate anchors before the other links; its title is the anchor's accessible name, not shown as text. These images are static files in `site/public/`, written by `scripts/site-art.mjs` from the package and checked by tests against it; none holds a `style` element. The map and the diagrams use the style of the site's illustrations (ink outlines and casings, see [the map](map.md#routes-and-themes)). A theme switch in the header follows the system's light or dark setting until the reader chooses, then remembers the choice in the browser for every page of that site; it shows the package's sun and moon icons. The zoom buttons of the maps and the renewal calendar button of the Reports page start with the package's interface icons (`uiIcon`), inlined in the page so they take the button's text colour, also on hover. `spec.site` in the `Settings` document sets the site title and up to four light-theme colours; see [the catalogue format](catalogue-format.md#settings-and-views).
**Marks and art.** The header's site title is the wordmark: Source Serif 4, italic, 700. The favicon is the family mark of `@brunosouzas/signwright` (`scripts/favicon.json`, `brand: stackledger`): a cream tile with stackledger's lowercase blue `s` and the parent's orange moon, the same in both themes. The mark beside the site title in the header is that same file, decorative (empty `alt`). The ledger page (`ledgerMark`) stays only in the home banner and the maps. The footer, after the view and the stackledger version, shows the parent brand's endorsement: the package's `symbol` (`symbol-light.svg` or `symbol-dark.svg`, by theme, decorative) and "by Bruno Souza", not a link. Below its title and text, the home shows the package's banner, "From the ledger to the map": stackledger's mark on the left, three of its rows leaving it as orange, blue and ink metro lines that cross at an interchange and run to Sinal at the end of the line, on the cream page, with no words and no motion, the same in both themes (`site/public/home-banner.svg`). A home link with `icon` is the package's link icon alone (`link-icons/<icon>-light.svg` or `-dark.svg`, by theme), 2rem (32 pixels on wide pages, about 26 under 768 pixels, where the root text is smaller), in a row of separate anchors before the other links; its title is the anchor's accessible name, not shown as text. These images are static files in `site/public/`, written by `scripts/site-art.mjs` from the package and checked by tests against it; none holds a `style` element. The map and the diagrams use the style of the site's illustrations (ink outlines and casings, see [the map](map.md#routes-and-themes)). A theme switch in the header follows the system's light or dark setting until the reader chooses, then remembers the choice in the browser for every page of that site; it shows the package's sun and moon icons. The zoom buttons of the maps and the renewal calendar button of the Reports page start with the package's interface icons (`uiIcon`), inlined in the page so they take the button's text colour, also on hover. `spec.site` in the `Settings` document sets the site title and up to four light-theme colours; see [the catalogue format](catalogue-format.md#settings-and-views).

**Known limitation:** a remembered theme is applied by a script file after the page starts to load (the policy forbids inline scripts), so a page can show the system theme for a moment before switching.

Expand Down
8 changes: 4 additions & 4 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions openspec/changes/family-mark/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# stackledger adopts the family mark (SW-304)

## Problem

The marks under brunosouzas are one family (signwright ADR 0013, SW-282): a cream tile, the product's lowercase initial in its own colour and the parent's moon. `@brunosouzas/signwright` 0.20.0 draws stackledger's `s`. The site's favicon and header mark are still the `ledgerMark` ledger page, so the product shows two identities.

## What changes

- **Package:** `@brunosouzas/signwright` pinned exactly to `0.20.0` (from `0.19.0`) in `package.json` and `npm-shrinkwrap.json`.
- **Favicon:** `site/public/favicon.svg` is written from `scripts/favicon.json` (`format: favicon`, `brand: stackledger`): the blue `s` (`brand.light.stackledgerAccent`) and the orange moon on the cream tile. The tile is cream in both themes, so one file serves the browser tab and the header; it was checked at 16 px in light and dark and shown to the owner.
- **Header mark:** one decorative `img` (`favicon.svg`) replaces the light and dark pair; `brand-mark-dark.svg` is removed.
- **Link icon:** `site/public/link-icons/stackledger-*.svg` change because the package redraws `linkIcon` `stackledger` as the same `s` (0.20.0). The package also draws a `tenavu` link icon, which a stackledger home does not offer; `scripts/site-art.mjs` skips it.
- **Unchanged:** the home banner and the maps keep `ledgerMark` (the metro line with two stations stays as a drawing for the map and diagrams); the character Sinal; the parent symbol in the footer.

## Capabilities

### Modified Capabilities

- `catalogue-site`: "Brand mark" is replaced by "Family mark".

## Implicit requirements

- Errors and invalid input: `scripts/site-art.mjs` validates `scripts/favicon.json` with the others before writing any file.
- Repetition and idempotency: the script writes the same bytes on every run; the art tests compare the files with the package.
- Security: the favicon is a static file checked inert like the other art ("Site art is inert").
- Concurrency, limits, logs: n/a.

## Documentation

`docs/site.md` (Marks and art), the README's identity line and `docs/roadmap.md` (a row). No ADR: the decision is signwright's ADR 0013.
34 changes: 34 additions & 0 deletions openspec/changes/family-mark/specs/catalogue-site/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## REMOVED Requirements

### Requirement: Brand mark
**Reason**: the favicon and the header mark are no longer the `ledgerMark` page, and the dark variant is gone.
**Migration**: see "Family mark", which replaces it.

## ADDED Requirements

### Requirement: Family mark
The favicon SHALL be the design system's family mark for stackledger, built from `scripts/favicon.json`, and the header SHALL show that same file before the site title as one decorative image (`alt=""`) in both themes. The site's templates SHALL write `img` elements only for the header mark, the footer symbols, the home banner and the home link icons.

#### Scenario: Favicon is the family mark
- **WHEN** `site/public/favicon.svg` is read
- **THEN** its shapes equal those of `coverTree` for `scripts/favicon.json`, which `validateCoverSpec` accepts with no problem

#### Scenario: Favicon is the cream tile with the blue s and the orange moon
- **WHEN** `site/public/favicon.svg` is read
- **THEN** its tile `rect` is filled `#F6F3EC`, its `path` is stroked `#3B5BDB`, its `circle` is filled `#E04E17`, and it holds no `style` element and no `prefers-color-scheme` rule

#### Scenario: The ledger page stays in the banner
- **WHEN** the files of `site/public/` are listed
- **THEN** there is no `brand-mark-dark.svg`, and `ledgerMark` remains in `home-banner.svg`

#### Scenario: Header mark with a custom title
- **WHEN** `spec.site.title` is `Northwind software` and any page is opened
- **THEN** the header link to the home holds one `img` with `alt=""` and a relative `src` ending in `favicon.svg`, followed by `Northwind software`

#### Scenario: Mark in both themes
- **WHEN** any page is shown in the light theme, then in the dark theme
- **THEN** `favicon.svg` is the only image visible in the header in both, inline before the title

#### Scenario: No other images
- **WHEN** both sites are built from the example with `spec.site.home.links` holding a link with an icon
- **THEN** every `img` element of every page is the header mark, a footer symbol (`symbol-light.svg` or `symbol-dark.svg`), the home banner or a home link icon
17 changes: 17 additions & 0 deletions openspec/changes/family-mark/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Tasks: stackledger adopts the family mark

Levels: unit and integration are vitest (`npm test`, after `npm run build`), e2e is Playwright (`npm run test:browser`).

## 1. Package and art

- [x] 1.1 Pin `@brunosouzas/signwright` to exactly `0.20.0`; the diff of `package.json` and `npm-shrinkwrap.json` touches only that package.
- [x] 1.2 Add `scripts/favicon.json`; `scripts/site-art.mjs` writes `favicon.svg` from it, no longer writes `brand-mark-dark.svg`, and skips the `tenavu` link icon. Proves catalogue-site / Family mark / "Favicon is the family mark", "Favicon is the cream tile…", "The ledger page stays in the banner" (`test/unit/site-brand.test.ts`, unit); `test/unit/how-it-works.test.ts` runs the script with the new spec.

## 2. Site

- [x] 2.1 The header shows the one `favicon.svg` image. Proves "Header mark with a custom title" (`test/integration/site.test.ts`, integration) and "Mark in both themes" (`test/browser/site.spec.ts`, e2e); "No other images" (`test/integration/site.test.ts`, `site-skills.test.ts`, integration).
- [x] 2.2 The packed files no longer list `brand-mark-dark.svg` (`test/integration/package.test.ts`).

## 3. Documentation

- [x] 3.1 `docs/site.md`, README and `docs/roadmap.md`.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"test:perf": "vitest run --config vitest.perf.config.ts"
},
"dependencies": {
"@brunosouzas/signwright": "0.19.0",
"@brunosouzas/signwright": "0.20.0",
"@fontsource/source-code-pro": "5.3.1",
"@fontsource/source-sans-3": "5.3.1",
"@fontsource/source-serif-4": "5.3.1",
Expand Down
7 changes: 7 additions & 0 deletions scripts/favicon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"id": "stackledger-favicon",
"format": "favicon",
"brand": "stackledger",
"title": "stackledger",
"description": "stackledger's mark: a blue s with an orange moon, on the cream tile of the brunosouzas family."
}
Loading
Loading