Skip to content

Commit 91fe084

Browse files
authored
Build documentation from the pinned canonical Docs source (#25)
1 parent c0c773f commit 91fe084

70 files changed

Lines changed: 244 additions & 3680 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
node-version: 22.14.0
2525
cache: npm
2626

27+
- name: Retrieve verified canonical documentation
28+
run: npm run docs:source
29+
2730
- name: Read pinned CLI documentation contract
2831
id: cli
2932
run: |

‎.github/workflows/release-freshness.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ jobs:
2121
- name: Compare documentation with the latest published CLI
2222
env:
2323
GH_TOKEN: ${{ github.token }}
24-
run: node scripts/cli-release.mjs --live
24+
run: |
25+
npm run docs:source
26+
node scripts/cli-release.mjs --live

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ docs/.vitepress/cache
1616
.dev.vars*
1717
.stack-cli
1818
.stack-specification
19+
.stack-docs
20+
/public/docs-source.json
21+
docs/**/*.md
1922

2023
# Editor directories and files
2124
.vscode/*

‎README.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ The Playground publishes canonical, Open Graph, Twitter Card, and `WebApplicatio
6161

6262
## Keeping CLI documentation current
6363

64-
`scripts/docs-validation.config.mjs` pins the published CLI version and its exact release commit. Run `npm run docs:release:sync` after a stable CLI release to update that pin and all four Getting Started version declarations together. Review any changed command behavior, then run `STACK_CLI_BIN=/absolute/path/to/the/verified/release/stack npm run docs:smoke` and the normal build checks before opening a PR. The sync command does not install a CLI, accept provider terms, or publish changes.
64+
User-facing Markdown and the published CLI identity are owned by [stack-sh/docs](https://github.com/stack-sh/docs). Edit sources there, run `npm run release:sync` after a stable CLI release, verify, and merge. Then update `scripts/docs-source.json` to the merged Docs commit and SHA-256 of its `generated/manifest.json`. Run `npm run docs:source` to retrieve the verified inputs. Web's CLI version and skill instructions come from that same manifest; there is no second editable CLI version pin here.
65+
66+
The original documentation Markdown paths under `docs/` are generated, ignored build inputs. Do not edit them. VitePress configuration and site assets remain Web-owned. Build and docs development commands retrieve the pinned source before use. A missing resource, invalid manifest, unsafe path, duplicate path, or hash mismatch fails before writing the fetched bundle. Source retrieval requires network access; the subsequent validation commands operate on the verified local inputs.
67+
68+
Review command behavior, then run `STACK_CLI_BIN=/absolute/path/to/the/verified/release/stack npm run docs:smoke` and the normal build checks before opening a consumer PR. The former Web `docs:release:sync` command now directs maintainers to the canonical Docs repository instead of editing generated files.
6569

6670
The required CI baseline compares the pin against GitHub's latest stable release and resolved tag commit, executes documentation commands using both the pinned source and the attested published Linux archive, and verifies that an unsupported flag fails the documentation smoke. Offline documentation builds check locale version consistency without contacting GitHub. The read-only `Release freshness` workflow checks daily and on manual dispatch, so a CLI-only release cannot remain silently stale until someone edits this repository. A failed run requires a synchronization PR and a verified Web deployment; this workflow does not auto-merge or auto-publish. GitHub scheduled runs may be delayed, and GitHub Actions notification preferences govern failure notifications.
6771

6872
## Coding agent skill
6973

70-
Install the focused diagram skill with `npx skills add stack-sh/cli` in the target project. It provides instructions, not a CLI binary. See the [coding agent guide](https://stack-diagram.com/docs/guide/coding-agents) for a copyable prompt, local validation loop, installation boundaries, and limitations. The CLI repository owns `skills/stack-diagrams/SKILL.md`; `scripts/agent-skill.mjs` pins its merged revision and SHA-256. CI fetches and verifies those exact bytes, then runs its CLI examples alongside documentation examples against the published CLI. Update this separate skill pin after reviewing a merged skill change; it is independent of the binary release pin.
74+
Install the focused diagram skill with `npx skills add stack-sh/cli` in the target project. It provides instructions, not a CLI binary. See the [coding agent guide](https://stack-diagram.com/docs/guide/coding-agents) for the usage workflow. Docs generates both the skill distributed by CLI and the workflow displayed here from one source. Web verifies and executes the same Docs bundle's skill commands alongside documentation examples against the published CLI.
7175

7276
## Playground features
7377

‎docs/.vitepress/config.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ type Labels = {
7070
introduction: string
7171
gettingStarted: string
7272
codingAgents: string
73+
agentWorkflow: string
7374
examples: string
7475
playground: string
7576
providerIcons: string
@@ -135,6 +136,7 @@ const en: Labels = {
135136
introduction: "What is Stack?",
136137
gettingStarted: "Getting started",
137138
codingAgents: "Coding agents",
139+
agentWorkflow: "Agent workflow",
138140
examples: "Examples",
139141
playground: "Using the Playground",
140142
providerIcons: "Provider icons",
@@ -165,6 +167,7 @@ const ja: Labels = {
165167
introduction: "Stackとは",
166168
gettingStarted: "はじめる",
167169
codingAgents: "Coding agentで使う",
170+
agentWorkflow: "Agent向け共通手順",
168171
examples: "Example gallery",
169172
playground: "Playgroundの使い方",
170173
providerIcons: "Provider icon",
@@ -195,6 +198,7 @@ const zh: Labels = {
195198
introduction: "什么是 Stack?",
196199
gettingStarted: "快速开始",
197200
codingAgents: "Coding agent",
201+
agentWorkflow: "Agent 工作流程",
198202
examples: "示例库",
199203
playground: "使用 Playground",
200204
providerIcons: "云服务商图标",
@@ -225,6 +229,7 @@ const ko: Labels = {
225229
introduction: "Stack이란?",
226230
gettingStarted: "시작하기",
227231
codingAgents: "Coding agent",
232+
agentWorkflow: "Agent 워크플로",
228233
examples: "예제 갤러리",
229234
playground: "Playground 사용법",
230235
providerIcons: "클라우드 제공자 아이콘",

‎docs/examples/index.md‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎docs/guide/coding-agents.md‎

Lines changed: 0 additions & 42 deletions
This file was deleted.

‎docs/guide/getting-started.md‎

Lines changed: 0 additions & 86 deletions
This file was deleted.

‎docs/guide/playground.md‎

Lines changed: 0 additions & 42 deletions
This file was deleted.

‎docs/guide/provider-icons.md‎

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)