Skip to content

docs: JSDoc API reference research + PRD#11

Closed
diberry wants to merge 1 commit intodevfrom
squad/pao-jsdoc-ref-research
Closed

docs: JSDoc API reference research + PRD#11
diberry wants to merge 1 commit intodevfrom
squad/pao-jsdoc-ref-research

Conversation

@diberry
Copy link
Copy Markdown
Owner

@diberry diberry commented Mar 24, 2026

TypeDoc API Reference — Build Pipeline + Tests + Navigation

What this PR delivers

  • TypeDoc config (packages/squad-sdk/typedoc.json) targeting src/index.ts
  • Generation script (scripts/generate-api-docs.mjs) — produces 395 API pages
  • Build integrationnpm run docs:api generates markdown, hooked into docs:build
  • Playwright tests (docs/tests/api-reference.spec.mjs) — 8 tests covering landing, classes, functions, interfaces, nav, search
  • Nav update — "SDK API Reference" now points to the auto-generated TypeDoc content
  • Research docsdocs/research/jsdoc-api-reference-*.md

Generated docs are NOT committed

The 395 API markdown files are generated at build time and gitignored. Run npm run docs:api to generate locally.


Navigation — Before & After

Before (dev branch)

Nav Before

After (this PR)

Nav After

Change: "SDK API Reference" nav entry now points to the auto-generated TypeDoc content (reference/api/index) instead of the hand-authored page. Nav titles unchanged.


Screenshots

API Reference Landing Page

API Landing

Class Detail Page — RuntimeEventBus

Class Page

Interface Detail Page — AgentCapability

Interface Page

Function Detail Page — defineSquad

Function Page

Type Alias Detail Page — AgentRef

Type Alias Page

Variable Detail Page — DEFAULT_FALLBACK_CHAINS

Variable Page


To verify locally

npm run docs:api                    # Generate 395 API reference pages
cd docs && npm run dev              # Start Astro on port 4321
# Visit http://localhost:4321/squad/docs/reference/api/

To run Playwright tests

cd docs && npx playwright test tests/api-reference.spec.mjs

@diberry diberry force-pushed the squad/pao-jsdoc-ref-research branch 2 times, most recently from 4077aca to e2f0021 Compare March 24, 2026 15:52
diberry pushed a commit that referenced this pull request Mar 24, 2026
- Add TypeDoc + typedoc-plugin-markdown to squad-sdk devDependencies
- Create typedoc.json config targeting src/index.ts barrel export
- Add scripts/generate-api-docs.mjs for generation + Astro filename normalization
- Generate 395 API reference pages (classes, interfaces, functions, types, variables)
- Add curated landing page at docs/reference/api/ with categorized index
- Add npm script 'docs:api' and integrate into 'docs:build' pipeline
- Update navigation sidebar to link to new generated API reference
- Cross-link existing hand-written api-reference.md to generated docs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/pao-jsdoc-ref-research branch from ac56785 to 5616a4d Compare March 24, 2026 17:42
@diberry diberry force-pushed the squad/pao-jsdoc-ref-research branch 2 times, most recently from 102b6c5 to 480c268 Compare March 25, 2026 04:22
@diberry
Copy link
Copy Markdown
Owner Author

diberry commented Mar 25, 2026

⚠️ Workaround: \ our-first-session.md\ broken link added to KNOWN_ISSUES

The link to \ our-github-issues.md\ at line 263 of \docs/src/content/docs/tour-first-session.md\ is pre-existing on \dev\ (not introduced by this PR). It's been added to \KNOWN_ISSUES\ in \docs-links.test.ts\ as a workaround.

Tracked upstream: bradygaster#610

Action needed when bradygaster#610 is fixed: Remove the \ our-first-session.md:263\ entry from \KNOWN_ISSUES\ in \ est/docs-links.test.ts.

@diberry diberry force-pushed the squad/pao-jsdoc-ref-research branch from 480c268 to bef52f9 Compare March 25, 2026 12:12
diberry pushed a commit that referenced this pull request Mar 25, 2026
- nav-before.png: sidebar navigation on dev branch
- nav-after.png: sidebar navigation on PR branch with updated labels

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
diberry pushed a commit that referenced this pull request Mar 25, 2026
- nav-before.png: sidebar navigation on dev branch
- nav-after.png: sidebar navigation on PR branch with updated labels

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/pao-jsdoc-ref-research branch from bef52f9 to 332e114 Compare March 25, 2026 12:48
diberry pushed a commit that referenced this pull request Mar 25, 2026
- nav-before.png: sidebar navigation on dev branch
- nav-after.png: sidebar navigation on PR branch with updated labels

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/pao-jsdoc-ref-research branch from 332e114 to c95fc87 Compare March 25, 2026 13:54
diberry pushed a commit that referenced this pull request Mar 25, 2026
- Orchestration logs: Flight APPROVE, PAO REQUEST CHANGES, FIDO COMMENT
- Session log: PR #11 review summary
- Merged decision inbox: Crosslink pattern, quality recommendations
- Deleted inbox files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
diberry pushed a commit that referenced this pull request Mar 25, 2026
- Orchestration logs: Flight APPROVE, PAO REQUEST CHANGES, FIDO COMMENT
- Session log: PR #11 review summary
- Merged decision inbox: Crosslink pattern, quality recommendations
- Deleted inbox files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/pao-jsdoc-ref-research branch from 70aa09d to c36bd7d Compare March 25, 2026 14:13
- TypeDoc config (packages/squad-sdk/typedoc.json) targeting src/index.ts
- Generation script (scripts/generate-api-docs.mjs) — produces API pages
- Build integration: npm run docs:api generates markdown
- Playwright tests (docs/tests/api-reference.spec.mjs) — 8 tests covering
  landing, classes, functions, interfaces, nav, search
- Nav crosslinks: sidebar labels (SDK Guide + API Reference)
- Research docs: PRD and research analysis
- API reference screenshots (6 detail pages)
- PR screenshots capture skill + script

Review fixes applied:
- Crosslink banner added to sdk.md (PAO)
- Nav URL simplified to reference/api (PAO)
- CI/CD build order clarified in nav plan (PAO)
- Hardcoded export count replaced with > 100 assertion (Flight)
- Local typedoc binary instead of npx (Flight)
- TypeDoc pinned to ~0.28.18 (Flight)
- Error handling added to generation + screenshot scripts (FIDO)

Generated docs are NOT committed — they are built at CI/deploy time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry
Copy link
Copy Markdown
Owner Author

diberry commented Mar 25, 2026

Reopening as cross-fork PR targeting bradygaster/squad:dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants