Skip to content

Commit 858dd22

Browse files
author
bgagent
committed
docs: fix broken site images + in-body links + Slack app-install wording (#90)
Three docs-site fixes: 1. Missing Slack setup images (the #90 report). The sync script rewrites `../imgs/foo.png` to an absolute `/<base>/imgs/foo.png` URL served from `docs/public/`, but never copied `docs/imgs/` → `docs/public/imgs/` — so the four Slack screenshots 404'd on the published site. Add a `copyAssetDir` step that mirrors source `imgs/` and `diagrams/` into `public/`, and commit the copied assets. Prevents recurrence for any future image. 2. Broken in-body design-doc links site-wide. `rewriteDocsLinkTarget` emitted bare root-relative routes (`/architecture/foo`) with no base prefix, so they resolved to the domain root and 404'd under the project base path. Starlight prefixes its own nav links automatically but not our rewritten markdown-body links. Prepend `docsBase` to every rewritten target (same prefix the image rewrite already uses). Re-synced all mirrors — the large diff is purely the base-path prefix on existing links. 3. Reword the Slack prerequisite away from "use a personal free workspace if your corporate Slack restricts app installs" — we don't want to suggest bypassing org controls. Now points users to request admin approval through their Slack administrator.
1 parent af33bc0 commit 858dd22

51 files changed

Lines changed: 4311 additions & 177 deletions

Some content is hidden

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

docs/guides/SLACK_SETUP_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This guide walks through setting up the ABCA Slack integration. Once configured,
66

77
- ABCA CDK stack deployed (see [Developer guide](./DEVELOPER_GUIDE.md))
88
- A Cognito user account configured (see [User guide](./USER_GUIDE.md))
9-
- A Slack workspace where you can install apps (use a personal free workspace if your corporate Slack restricts app installs)
9+
- A Slack workspace where you are authorized to install apps (if your workspace requires admin approval for app installs, request it through your Slack administrator)
1010
- AWS CLI configured with credentials for your ABCA account
1111

1212
## Quick start

docs/public/diagrams/interactive-agents-phases.drawio

Lines changed: 1223 additions & 0 deletions
Large diffs are not rendered by default.

docs/public/diagrams/phase3-cedar-hitl.drawio

Lines changed: 2874 additions & 0 deletions
Large diffs are not rendered by default.
121 KB
Loading
124 KB
Loading
324 KB
Loading
340 KB
Loading

docs/scripts/sync-starlight.mjs

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,17 @@ function ensureFrontmatter(content, title) {
9999
.replaceAll('../diagrams/', `${docsBase}/diagrams/`)
100100
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (match, label, target) => {
101101
const rewritten = rewriteDocsLinkTarget(target);
102-
return rewritten ? `[${label}](${rewritten})` : match;
102+
if (!rewritten) {
103+
return match;
104+
}
105+
// The site is served under `base` (docsBase), so root-relative routes
106+
// must carry that prefix — otherwise they resolve to the domain root
107+
// and 404. Starlight prefixes its own nav links automatically, but our
108+
// rewritten body links are raw markdown and need it added explicitly
109+
// (same reason the image rewrites above include docsBase). Anchors
110+
// (`#…`) stay untouched. (Fixes the broken in-body design-doc links.)
111+
const prefixed = rewritten.startsWith('#') ? rewritten : `${docsBase}${rewritten}`;
112+
return `[${label}](${prefixed})`;
103113
});
104114

105115
const trimmed = normalized.trimStart();
@@ -156,6 +166,25 @@ function mirrorDirectory(sourceDir, targetDirRelative) {
156166
}
157167
}
158168

169+
// Recursively copy a source asset directory into the site's public/ tree so
170+
// every committed image/diagram is served at its rewritten absolute URL.
171+
// Filenames are preserved verbatim (markdown references them as-is).
172+
function copyAssetDir(sourceDir, targetDir) {
173+
if (!fs.existsSync(sourceDir)) {
174+
return;
175+
}
176+
fs.mkdirSync(targetDir, { recursive: true });
177+
for (const entry of fs.readdirSync(sourceDir, { withFileTypes: true })) {
178+
const from = path.join(sourceDir, entry.name);
179+
const to = path.join(targetDir, entry.name);
180+
if (entry.isDirectory()) {
181+
copyAssetDir(from, to);
182+
} else if (entry.isFile()) {
183+
fs.copyFileSync(from, to);
184+
}
185+
}
186+
}
187+
159188
function splitGuide(sourcePath, targetDirRelative, introTitle) {
160189
if (!fs.existsSync(sourcePath)) {
161190
return;
@@ -279,5 +308,13 @@ mirrorDirectory(path.join(docsRoot, 'design'), path.join('src', 'content', 'docs
279308
// --- Decision records (ADRs): mirror to decisions/ ---
280309
mirrorDirectory(path.join(docsRoot, 'decisions'), path.join('src', 'content', 'docs', 'decisions'));
281310

311+
// --- Static assets: copy source image/diagram dirs into the site's public/ ---
312+
// Guides reference images as `../imgs/foo.png`; rewriteContent() turns those
313+
// into absolute `/<base>/imgs/foo.png` URLs, which Astro serves from public/.
314+
// Copy the source dirs here so every committed asset is published — otherwise
315+
// a new image lands in docs/imgs/ but 404s on the site (the cause of #90).
316+
copyAssetDir(path.join(docsRoot, 'imgs'), path.join(docsRoot, 'public', 'imgs'));
317+
copyAssetDir(path.join(docsRoot, 'diagrams'), path.join(docsRoot, 'public', 'diagrams'));
318+
282319
// Guardrail: ensure target tree exists when running in a clean checkout.
283320
fs.mkdirSync(targetRoot, { recursive: true });

docs/src/content/docs/architecture/Api-contract.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Api contract
77
The REST API is the single entry point for all platform interactions. The CLI, webhook integrations, and any future clients use this API to submit tasks, check status, and manage integrations. This is a design-level specification; the source of truth for types is `cdk/src/handlers/shared/types.ts`.
88

99
- **Use this doc for:** endpoint paths, payload shapes, auth requirements, and error codes.
10-
- **Related docs:** [INPUT_GATEWAY.md](/architecture/input-gateway) for the gateway's role, [ORCHESTRATOR.md](/architecture/orchestrator) for the task state machine, [SECURITY.md](/architecture/security) for the authentication model.
10+
- **Related docs:** [INPUT_GATEWAY.md](/sample-autonomous-cloud-coding-agents/architecture/input-gateway) for the gateway's role, [ORCHESTRATOR.md](/sample-autonomous-cloud-coding-agents/architecture/orchestrator) for the task state machine, [SECURITY.md](/sample-autonomous-cloud-coding-agents/architecture/security) for the authentication model.
1111

1212
## Base URL
1313

@@ -310,7 +310,7 @@ Returns a summary subset of fields. Use `GET /v1/tasks/{task_id}` for full detai
310310
DELETE /v1/tasks/{task_id}
311311
```
312312

313-
Cancels a task. See [ORCHESTRATOR.md](/architecture/orchestrator) for cancellation behavior by state.
313+
Cancels a task. See [ORCHESTRATOR.md](/sample-autonomous-cloud-coding-agents/architecture/orchestrator) for cancellation behavior by state.
314314

315315
**Response: `200 OK`** — a compact confirmation body (not a full `TaskDetail`):
316316

docs/src/content/docs/architecture/Architecture.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This document outlines the overall architecture of the platform. Each component
1010

1111
## Design principles
1212

13-
For long-term direction and review tenets, see [VISION.md](/architecture/vision).
13+
For long-term direction and review tenets, see [VISION.md](/sample-autonomous-cloud-coding-agents/architecture/vision).
1414

1515
- **Extensibility** - Extend the system without modifying core code. Critical components are accessed through internal interfaces (ComputeStrategy, MemoryStore) so implementations can be swapped.
1616
- **Flexibility** - This field moves fast. Components should be replaceable as better options emerge.
@@ -39,13 +39,13 @@ flowchart LR
3939

4040
The orchestrator and agent are deliberately separated. The orchestrator handles everything deterministic (cheap Lambda invocations); the agent handles everything that needs LLM reasoning (expensive compute + tokens). This separation provides reliability (crashed agents don't leave orphaned state), cost efficiency (bookkeeping doesn't burn tokens), security (the agent can't bypass platform invariants), and testability (deterministic steps are unit-tested without LLM calls).
4141

42-
For the full orchestrator design, see [ORCHESTRATOR.md](/architecture/orchestrator). For the API contract, see [API_CONTRACT.md](/architecture/api-contract).
42+
For the full orchestrator design, see [ORCHESTRATOR.md](/sample-autonomous-cloud-coding-agents/architecture/orchestrator). For the API contract, see [API_CONTRACT.md](/sample-autonomous-cloud-coding-agents/architecture/api-contract).
4343

4444
## Repository onboarding
4545

4646
Onboarding is CDK-based. Each repository is an instance of the `Blueprint` construct in the stack. The construct writes a `RepoConfig` record to DynamoDB; the orchestrator reads it at task time.
4747

48-
Blueprints configure how the orchestrator executes steps for each repo: compute strategy, model selection, turn limits, GitHub token, and optional custom steps. See [REPO_ONBOARDING.md](/architecture/repo-onboarding) for the full design.
48+
Blueprints configure how the orchestrator executes steps for each repo: compute strategy, model selection, turn limits, GitHub token, and optional custom steps. See [REPO_ONBOARDING.md](/sample-autonomous-cloud-coding-agents/architecture/repo-onboarding) for the full design.
4949

5050
## Model selection
5151

@@ -68,7 +68,7 @@ The dominant cost is Bedrock inference + compute, not infrastructure. Memory, La
6868
| Medium (small team) | 200-500 | $500-3,000 |
6969
| High (org-wide) | 2,000-5,000 | $5,000-30,000 |
7070

71-
For the full breakdown, see [COST_MODEL.md](/architecture/cost-model).
71+
For the full breakdown, see [COST_MODEL.md](/sample-autonomous-cloud-coding-agents/architecture/cost-model).
7272

7373
## Known architectural risks
7474

0 commit comments

Comments
 (0)