@brunosouzas/stackledger 0.10.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +32 -27
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/discovery/annotations.d.ts +11 -0
  5. package/dist/discovery/annotations.js +18 -0
  6. package/dist/discovery/annotations.js.map +1 -1
  7. package/dist/map/command.js +3 -1
  8. package/dist/map/command.js.map +1 -1
  9. package/dist/map/labels.js +3 -2
  10. package/dist/map/labels.js.map +1 -1
  11. package/dist/map/layout.js +10 -3
  12. package/dist/map/layout.js.map +1 -1
  13. package/dist/map/model.d.ts +1 -1
  14. package/dist/map/neighbourhood.js +1 -1
  15. package/dist/map/neighbourhood.js.map +1 -1
  16. package/dist/map/parallel.js +1 -1
  17. package/dist/map/parallel.js.map +1 -1
  18. package/dist/map/pieces.d.ts +2 -2
  19. package/dist/map/relations.js +1 -1
  20. package/dist/map/relations.js.map +1 -1
  21. package/dist/map/strip.js +1 -1
  22. package/dist/map/strip.js.map +1 -1
  23. package/dist/map/svg.js +2 -2
  24. package/dist/map/svg.js.map +1 -1
  25. package/dist/map/themes.js +2 -2
  26. package/dist/map/themes.js.map +1 -1
  27. package/dist/map/zones.d.ts +9 -3
  28. package/dist/map/zones.js +24 -1
  29. package/dist/map/zones.js.map +1 -1
  30. package/dist/mcp.js +3 -1
  31. package/dist/mcp.js.map +1 -1
  32. package/dist/schema.d.ts +3 -1
  33. package/dist/schema.js +4 -1
  34. package/dist/schema.js.map +1 -1
  35. package/dist/site/build.d.ts +4 -7
  36. package/dist/site/build.js +38 -45
  37. package/dist/site/build.js.map +1 -1
  38. package/dist/site/command.js +7 -9
  39. package/dist/site/command.js.map +1 -1
  40. package/dist/site/data.d.ts +3 -0
  41. package/dist/site/data.js.map +1 -1
  42. package/dist/site/policy.d.ts +5 -4
  43. package/dist/site/policy.js +5 -4
  44. package/dist/site/policy.js.map +1 -1
  45. package/dist/site/project-journeys.d.ts +29 -0
  46. package/dist/site/project-journeys.js +81 -0
  47. package/dist/site/project-journeys.js.map +1 -0
  48. package/dist/site/publish.d.ts +2 -5
  49. package/dist/site/publish.js +27 -26
  50. package/dist/site/publish.js.map +1 -1
  51. package/dist/site/skills-build.js +16 -2
  52. package/dist/site/skills-build.js.map +1 -1
  53. package/dist/site/skills-data.d.ts +6 -0
  54. package/dist/site/skills-data.js +7 -0
  55. package/dist/site/skills-data.js.map +1 -1
  56. package/dist/site/staging.d.ts +7 -4
  57. package/dist/site/staging.js +7 -4
  58. package/dist/site/staging.js.map +1 -1
  59. package/dist/site/ui-icons.js +1 -1
  60. package/dist/site/ui-icons.js.map +1 -1
  61. package/dist/skills/command.js +4 -3
  62. package/dist/skills/command.js.map +1 -1
  63. package/dist/skills/graph.d.ts +3 -0
  64. package/dist/skills/graph.js +4 -2
  65. package/dist/skills/graph.js.map +1 -1
  66. package/dist/skills/lines.d.ts +50 -10
  67. package/dist/skills/lines.js +78 -15
  68. package/dist/skills/lines.js.map +1 -1
  69. package/dist/skills/map-command.js +11 -0
  70. package/dist/skills/map-command.js.map +1 -1
  71. package/dist/skills/marketplace.d.ts +24 -0
  72. package/dist/skills/marketplace.js +179 -0
  73. package/dist/skills/marketplace.js.map +1 -0
  74. package/dist/skills/mermaid.js +10 -1
  75. package/dist/skills/mermaid.js.map +1 -1
  76. package/dist/skills/metro.js +9 -5
  77. package/dist/skills/metro.js.map +1 -1
  78. package/dist/skills/resolve.d.ts +22 -0
  79. package/dist/skills/resolve.js +47 -0
  80. package/dist/skills/resolve.js.map +1 -0
  81. package/dist/skills/source.d.ts +12 -2
  82. package/dist/skills/source.js +44 -26
  83. package/dist/skills/source.js.map +1 -1
  84. package/dist/skills/walk.d.ts +13 -0
  85. package/dist/skills/walk.js +90 -6
  86. package/dist/skills/walk.js.map +1 -1
  87. package/dist/validate.js +29 -2
  88. package/dist/validate.js.map +1 -1
  89. package/dist/views.d.ts +5 -4
  90. package/dist/views.js +4 -6
  91. package/dist/views.js.map +1 -1
  92. package/examples/catalogue-repository/.github/workflows/stackledger.yml +15 -15
  93. package/examples/catalogue-repository/README.md +13 -25
  94. package/examples/hosting/Caddyfile +14 -17
  95. package/examples/northwind/stackledger.yaml +1 -12
  96. package/examples/northwind-journeys/README.md +11 -0
  97. package/examples/northwind-journeys/catalogue/catalog-info.yaml +47 -0
  98. package/examples/northwind-journeys/catalogue/stackledger-skills.yaml +55 -0
  99. package/examples/northwind-journeys/foundry/.claude-plugin/marketplace.json +18 -0
  100. package/examples/northwind-journeys/foundry/plugins/engineering/agents/reviewer.md +10 -0
  101. package/examples/northwind-journeys/foundry/plugins/engineering/skills/build/SKILL.md +8 -0
  102. package/examples/northwind-journeys/foundry/plugins/engineering/skills/review/SKILL.md +8 -0
  103. package/examples/northwind-journeys/foundry/plugins/engineering/skills/spec/SKILL.md +8 -0
  104. package/examples/northwind-journeys/foundry/plugins/release/agents/releaser.md +10 -0
  105. package/examples/northwind-journeys/foundry/plugins/release/skills/ship/SKILL.md +8 -0
  106. package/examples/northwind-journeys/integration/.claude-plugin/marketplace.json +13 -0
  107. package/examples/northwind-journeys/integration/plugins/mule/skills/contract/SKILL.md +8 -0
  108. package/examples/northwind-journeys/integration/plugins/mule/skills/munit/SKILL.md +8 -0
  109. package/examples/northwind-journeys/loose/skills/notes/SKILL.md +8 -0
  110. package/examples/northwind-journeys/studio/.claude-plugin/marketplace.json +18 -0
  111. package/examples/northwind-journeys/studio/plugins/publishing/skills/publish/SKILL.md +8 -0
  112. package/examples/northwind-journeys/studio/plugins/writing/agents/reviewer.md +10 -0
  113. package/examples/northwind-journeys/studio/plugins/writing/skills/draft/SKILL.md +8 -0
  114. package/examples/northwind-journeys/studio/plugins/writing/skills/edit/SKILL.md +8 -0
  115. package/examples/northwind-marketplace/.claude-plugin/marketplace.json +9 -0
  116. package/examples/northwind-marketplace/README.md +7 -0
  117. package/examples/northwind-marketplace/plugins/review/agents/reviewer.md +10 -0
  118. package/examples/northwind-marketplace/plugins/review/skills/checklist/SKILL.md +8 -0
  119. package/examples/northwind-marketplace/plugins/writing/.claude-plugin/plugin.json +1 -0
  120. package/examples/northwind-marketplace/plugins/writing/agents/reviewer.md +10 -0
  121. package/examples/northwind-marketplace/plugins/writing/skills/draft/SKILL.md +8 -0
  122. package/examples/northwind-marketplace/plugins/writing/skills/publish/SKILL.md +12 -0
  123. package/npm-shrinkwrap.json +677 -312
  124. package/package.json +3 -3
  125. package/site/public/favicon.svg +9 -6
  126. package/site/public/link-icons/stackledger-dark.svg +4 -3
  127. package/site/public/link-icons/stackledger-light.svg +4 -3
  128. package/site/src/components/Footer.astro +1 -1
  129. package/site/src/components/Header.astro +1 -1
  130. package/site/src/components/SkillItem.astro +7 -2
  131. package/site/src/components/SubNav.astro +2 -2
  132. package/site/src/pages/[reports].astro +2 -4
  133. package/site/src/pages/index.astro +1 -1
  134. package/site/src/pages/licences/[name].astro +2 -2
  135. package/site/src/pages/skill-map/[...map].astro +27 -9
  136. package/site/src/pages/software/[name].astro +50 -0
  137. package/site/src/styles/tokens.css +1 -1
  138. package/site/public/brand-mark-dark.svg +0 -6
@@ -1,15 +1,16 @@
1
1
  # stackledger behind Caddy and oauth2-proxy: a fictitious example (Northwind, example.org).
2
2
  # The recipe, with the oauth2-proxy flags, is in docs/hosting.md.
3
3
  #
4
- # Every request is authenticated first, by oauth2-proxy at 127.0.0.1:4180. Only the groups that
5
- # oauth2-proxy returns in X-Auth-Request-Groups count:
6
- # /full/* finance
7
- # every other staff or finance
8
- # anything else 403
9
- # A request without a session is sent to the sign-in page. When oauth2-proxy cannot be reached,
10
- # Caddy answers 502 and serves nothing (it fails closed).
4
+ # One site, one audience: every request is authenticated first, by oauth2-proxy at 127.0.0.1:4180.
5
+ # Only the group `readers` in X-Auth-Request-Groups counts: whoever is in it sees everything, so
6
+ # put in it only the people who may see costs and contracts. Anyone else gets 403. An address of
7
+ # the old two-site layout (/full, /full/...) redirects to the same path at the root, after the
8
+ # check, so a reader's old links and bookmarks keep working. A request without a session is sent
9
+ # to the sign-in page. When oauth2-proxy cannot be reached, Caddy answers 502 and serves nothing
10
+ # (it fails closed).
11
11
  #
12
- # /srv/stackledger/publish holds only full/, staff/, _headers and robots.txt from stackledger build.
12
+ # /srv/stackledger/publish holds the site files from stackledger build (everything except the
13
+ # .stackledger-build marker): index.html, the page folders, renewals.ics, _headers and robots.txt.
13
14
  # Tested by test/integration/hosting-caddy.test.ts.
14
15
 
15
16
  catalogue.example.org {
@@ -40,17 +41,13 @@ catalogue.example.org {
40
41
  }
41
42
 
42
43
  # oauth2-proxy sends the groups as a comma-separated list.
43
- @full_refused {
44
- path /full /full/*
45
- not header_regexp X-Auth-Request-Groups (^|,)\s*finance\s*(,|$)
46
- }
47
- respond @full_refused 403
48
-
49
- @refused not header_regexp X-Auth-Request-Groups (^|,)\s*(staff|finance)\s*(,|$)
44
+ @refused not header_regexp X-Auth-Request-Groups (^|,)\s*readers\s*(,|$)
50
45
  respond @refused 403
51
46
 
52
- # The host has no page at /.
53
- redir / /staff/ 302
47
+ # Old two-site addresses: /full and /full/<path> are now /<path>. A path that starts with a
48
+ # second slash does not match, so the target can never be //other-host.
49
+ @old path_regexp old ^/full(?:/([^/].*)?)?$
50
+ redir @old /{re.old.1} 301
54
51
 
55
52
  # The same headers stackledger writes into _headers, which Caddy does not read.
56
53
  header {
@@ -2,15 +2,4 @@ apiVersion: stackledger/v1alpha1
2
2
  kind: Settings
3
3
  metadata:
4
4
  name: settings
5
- spec:
6
- views:
7
- staff:
8
- hide:
9
- - cost
10
- - currency
11
- - cycle
12
- - renewsOn
13
- - paidBy
14
- - seats
15
- - vaultItem
16
- - note
5
+ spec: {}
@@ -0,0 +1,11 @@
1
+ # northwind-journeys
2
+
3
+ A fictitious setup for stackledger's documentation, tests and demo of the skills map as **journeys** (lines) and **marketplaces** (zones):
4
+
5
+ - `studio/`, `foundry/` and `integration/` are three fictitious Claude Code plugin marketplaces; `loose/` holds a skill that comes from none.
6
+ - `catalogue/` is a tiny catalogue. Its `Settings` reads the four folders and names its own skills map file, `catalogue/stackledger-skills.yaml`, with three journeys and one zone for each marketplace and for the loose skills. Its three components follow journeys with the annotation `stackledger/journeys` (`publish`; `integration, change`; `change, publish`), so each component page shows the skills and marketplaces it passes through, computed from the journeys.
7
+
8
+ ```sh
9
+ npx @brunosouzas/stackledger build examples/northwind-journeys/catalogue --out /tmp/northwind-site
10
+ 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
11
+ ```
@@ -0,0 +1,47 @@
1
+ apiVersion: backstage.io/v1alpha1
2
+ kind: Component
3
+ metadata:
4
+ name: northwind-wiki
5
+ title: Northwind Wiki
6
+ description: The team wiki of the fictitious Northwind company.
7
+ annotations:
8
+ stackledger/journeys: publish
9
+ spec:
10
+ type: tool
11
+ lifecycle: active
12
+ owner: group:northwind
13
+ ---
14
+ apiVersion: backstage.io/v1alpha1
15
+ kind: Component
16
+ metadata:
17
+ name: northwind-orders
18
+ title: Northwind Orders
19
+ description: The fictitious orders API, an integration application.
20
+ annotations:
21
+ stackledger/journeys: integration, change
22
+ spec:
23
+ type: service
24
+ lifecycle: active
25
+ owner: group:northwind
26
+ ---
27
+ apiVersion: backstage.io/v1alpha1
28
+ kind: Component
29
+ metadata:
30
+ name: northwind-portal
31
+ title: Northwind Portal
32
+ description: The fictitious customer portal, with its own articles.
33
+ annotations:
34
+ stackledger/journeys: change, publish
35
+ spec:
36
+ type: website
37
+ lifecycle: active
38
+ owner: group:northwind
39
+ ---
40
+ apiVersion: stackledger/v1alpha1
41
+ kind: Settings
42
+ metadata:
43
+ name: settings
44
+ spec:
45
+ skills:
46
+ folders: [../studio, ../foundry, ../integration, ../loose]
47
+ map: stackledger-skills.yaml
@@ -0,0 +1,55 @@
1
+ # Fictitious Northwind journeys. A line is a kind of work; a zone is a marketplace (or `loose`, the skills of none).
2
+ # Stops use qualified names where two plugins share a plain name (the two `reviewer` agents).
3
+ apiVersion: stackledger/v1alpha1
4
+ kind: MapLayout
5
+ metadata:
6
+ name: northwind-journeys
7
+ spec:
8
+ stations:
9
+ "skill:writing:draft": [0, 0]
10
+ "skill:writing:edit": [2, 0]
11
+ "agent:writing:reviewer": [4, 0]
12
+ "skill:publishing:publish": [6, 0]
13
+ "skill:engineering:spec": [0, 4]
14
+ "skill:engineering:build": [2, 4]
15
+ "skill:engineering:review": [4, 4]
16
+ "agent:engineering:reviewer": [6, 4]
17
+ "skill:release:ship": [8, 4]
18
+ "skill:notes": [0, 6]
19
+ "skill:mule:contract": [2, 6]
20
+ "skill:mule:munit": [4, 6]
21
+ zones:
22
+ - { name: northwind-studio, title: Studio, color: "#F5A623" }
23
+ - { name: northwind-foundry, title: Foundry, color: "#7B61FF" }
24
+ - { name: northwind-integration, title: Integration, color: "#00A651" }
25
+ - { name: loose, title: Loose skills, color: "#808080" }
26
+ ---
27
+ apiVersion: stackledger/v1alpha1
28
+ kind: Line
29
+ metadata:
30
+ name: publish
31
+ title: Publish an article
32
+ spec:
33
+ code: P
34
+ color: "#E4002B"
35
+ stops: ["skill:writing:draft", "skill:writing:edit", "agent:writing:reviewer", "skill:publishing:publish"]
36
+ ---
37
+ apiVersion: stackledger/v1alpha1
38
+ kind: Line
39
+ metadata:
40
+ name: change
41
+ title: Ship a change
42
+ spec:
43
+ code: C
44
+ color: "#0072CE"
45
+ stops: ["skill:engineering:spec", "skill:engineering:build", "skill:engineering:review", "agent:engineering:reviewer", "skill:release:ship"]
46
+ ---
47
+ apiVersion: stackledger/v1alpha1
48
+ kind: Line
49
+ metadata:
50
+ name: integration
51
+ title: Ship an integration change
52
+ spec:
53
+ code: I
54
+ color: "#00A651"
55
+ stops: ["skill:engineering:spec", "skill:notes", "skill:mule:contract", "skill:mule:munit", "skill:engineering:review", "skill:release:ship"]
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "northwind-foundry",
3
+ "owner": {
4
+ "name": "Northwind"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "engineering",
9
+ "source": "./plugins/engineering",
10
+ "description": "Fictitious engineering plugin."
11
+ },
12
+ {
13
+ "name": "release",
14
+ "source": "./plugins/release",
15
+ "description": "Fictitious release plugin."
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: reviewer
3
+ description: "Reviews a Northwind pull request."
4
+ tools: Read, Grep, Glob
5
+ model: sonnet
6
+ skills:
7
+ - review
8
+ ---
9
+
10
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: build
3
+ description: "Builds a Northwind change from its spec."
4
+ ---
5
+
6
+ # build
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: review
3
+ description: "Reviews a Northwind change with a clean context."
4
+ ---
5
+
6
+ # review
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: spec
3
+ description: "Writes the spec of a Northwind change."
4
+ ---
5
+
6
+ # spec
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: releaser
3
+ description: "Cuts a Northwind release."
4
+ tools: Read, Grep, Glob
5
+ model: sonnet
6
+ skills:
7
+ - ship
8
+ ---
9
+
10
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: ship
3
+ description: "Merges and releases a Northwind change."
4
+ ---
5
+
6
+ # ship
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "northwind-integration",
3
+ "owner": {
4
+ "name": "Northwind"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "mule",
9
+ "source": "./plugins/mule",
10
+ "description": "Fictitious mule plugin."
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: contract
3
+ description: "Writes the API contract of a Northwind integration change."
4
+ ---
5
+
6
+ # contract
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: munit
3
+ description: "Tests a Northwind integration flow."
4
+ ---
5
+
6
+ # munit
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: notes
3
+ description: "Keeps the notes of a piece of Northwind work."
4
+ ---
5
+
6
+ # notes
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "northwind-studio",
3
+ "owner": {
4
+ "name": "Northwind"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "writing",
9
+ "source": "./plugins/writing",
10
+ "description": "Fictitious writing plugin."
11
+ },
12
+ {
13
+ "name": "publishing",
14
+ "source": "./plugins/publishing",
15
+ "description": "Fictitious publishing plugin."
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: publish
3
+ description: "Publishes a Northwind article to the site."
4
+ ---
5
+
6
+ # publish
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: reviewer
3
+ description: "Reads a Northwind draft before it goes out."
4
+ tools: Read, Grep, Glob
5
+ model: sonnet
6
+ skills:
7
+ - edit
8
+ ---
9
+
10
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: draft
3
+ description: "Writes the first draft of a Northwind article."
4
+ ---
5
+
6
+ # draft
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: edit
3
+ description: "Edits a Northwind draft for tone and clarity."
4
+ ---
5
+
6
+ # edit
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "northwind-skills",
3
+ "owner": { "name": "Northwind" },
4
+ "plugins": [
5
+ { "name": "writing", "source": "./plugins/writing", "description": "Fictitious writing plugin." },
6
+ { "name": "review", "source": "./plugins/review", "description": "Fictitious review plugin." },
7
+ { "name": "external", "source": { "source": "github", "repo": "northwind/external-plugin" }, "description": "Fictitious remote plugin; stackledger does not fetch it." }
8
+ ]
9
+ }
@@ -0,0 +1,7 @@
1
+ # northwind-marketplace
2
+
3
+ A fictitious Claude Code plugin marketplace for stackledger's documentation, tests and demo. Two plugins (`writing`, `review`) hold an agent with the same name, `reviewer`; a third entry has a remote source, which stackledger skips with a warning. Read it with:
4
+
5
+ ```sh
6
+ stackledger skills validate examples/northwind-marketplace
7
+ ```
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: reviewer
3
+ description: "Reviews a Northwind change with a clean context and reports findings."
4
+ tools: Read, Grep, Glob
5
+ model: sonnet
6
+ skills:
7
+ - checklist
8
+ ---
9
+
10
+ You are the Northwind change reviewer. Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: checklist
3
+ description: "Checks a Northwind change against the review checklist."
4
+ ---
5
+
6
+ # Checklist
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1 @@
1
+ { "name": "writing", "description": "Fictitious writing plugin for stackledger." }
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: reviewer
3
+ description: "Reads a Northwind draft for tone and clarity."
4
+ tools: Read, Grep, Glob
5
+ model: sonnet
6
+ skills:
7
+ - draft
8
+ ---
9
+
10
+ You are the Northwind writing reviewer. Fictitious example for stackledger.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: draft
3
+ description: "Writes the first draft of a Northwind article."
4
+ ---
5
+
6
+ # Draft
7
+
8
+ Fictitious example for stackledger.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: publish
3
+ description: "Publishes a Northwind article: drafts it, has it checked and reviewed."
4
+ metadata:
5
+ stackledger-kind: playbook
6
+ stackledger-skills: draft review:checklist
7
+ stackledger-agents: reviewer
8
+ ---
9
+
10
+ # Publish
11
+
12
+ Fictitious example for stackledger. `draft` is this plugin's skill; `review:checklist` is the qualified name of a skill of another plugin.