[#312] docs: website IA restructuring (Option A) — hub, dissolve guides/, dedupe, extend staleness gate#315
Conversation
Code Review — PR #315 (Independent, consolidated)Review Information
Review SummaryOverall Assessment
This PR went through 2 review rounds pre-PR (branch reviewed locally before push, per this session's convention): an initial round found 1 Major (CLI help emitting a moved URL) + 4 Minor (stale skill counts, missing e2e smoke for new pages, gate not proven by a negative test) — all fixed in the remediation commit and independently re-verified against the pushed head, not against the fix claims. Acceptance Criteria — all verified met
Findings (all resolved, carried for transparency)
No Critical or Major findings remain. Risk AssessmentLow — docs + static config only, no dependencies, no secrets, 7 URLs change with permanent redirects covering all of them. VerdictApproved with Comments. All 8 ACs independently verified against the pushed head; gates green; remaining items are nonActionable disclosures, not blockers. 🤖 Independent review generated with Claude Code |
0b0d65a to
75190b3
Compare
75190b3 to
171378b
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ate extension
- /docs rewritten as real hub (4 journeys + top tasks); new concepts/index + reference/index (F1/F2/F11)
- 6 stale skill counts fixed to 35 (verified vs dataset/.skills: 25 capability + 9 process + 1 meta)
- docs-staleness-check.js: skill-count check now scans ALL content/docs/**/*.mdx; regex extended
with 'composable' variant (getting-started phrasing) — subset counts ('9 process skills') excluded
- gate also gains dead-internal-link check (resolves ](/docs/...) against content tree) — the
optional check from the story, implemented since clean against the filesystem source
- test-first proof: extended gate FAILed with 6 count mismatches + 8 dead section links, PASSes after fixes
- 8 broken section links fixed (concepts/reference via new indexes; 4 /docs/guides links retargeted
to stable pages ahead of T3 dissolve)
- quickstart variants retitled 'Quickstart: Solo/Team/Organization' (F6); developer-journey unified
on 'Process Lifecycle' (meta.json + 4 prose labels) (F10)
- llms-txt orphan: inbound links from concepts/index + reference/kb-structure (F12)
- e2e title/sidebar assertions updated (docs + landing); CP5 QA doc: +2 index URLs, label sync
Refs: #312 T1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…shooting Union of support/faq.mdx (361L) + guides/troubleshooting.mdx (236L) into support/troubleshooting.mdx; conflicting permission fix reconciled (nvm recommended, npm-prefix alternative). Redirects /docs/support/faq + /docs/guides/troubleshooting -> /docs/support/troubleshooting (new redirects() block). Inbound links updated (grep zero in content/). E2e: redirect test added, sidebar/smoke lists updated. CP5 inventory synced.
4 moves: adopter-checklist->getting-started/checklist, cli-workflows-> reference/cli/workflows, install-from-url->customization/install-from-url, update-link->reference/cli/update-link. 2 merges: customize-kb-> customization/team (Quick Recipe section), packaging->customization/ organization (layout-modes detail kept, org flags reconciled with parser, pair->pair-cli normalized). guides/ removed; 7 redirects added (full table now 9 rows incl /docs/guides->/docs). Root meta: drop guides, promote tutorials (13->12). Inbound links updated — grep /docs/guides zero in content/ (incl. one link-only edit in frozen reference/cli/commands.mdx). Hub: duplicate h1 fixed. E2e: moved-pages + dissolved-guides redirect tests, smoke/prev-next lists updated — 31/31 green. CP5 inventory synced.
…smoke, gate negative test Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
171378b to
a303b60
Compare
apps/website/docs-structure-assessment.md was an analysis/decision artifact sitting inside the published site's app directory (not published content itself, but out of place there). Moved to .pair/adoption/decision-log/ where decision records belong. Updated the two references in the #312 issue body accordingly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
DOCS_MIGRATIONS_BASE built URLs under /docs/guides/migrations, a page that never existed there (migrations live at /docs/migrations, top-level). Found during #312's docs restructuring review — pre-existing, unrelated to that PR's scope, so fixed here. Updated the 4 hardcoded test-expected URLs across migration-url.test.ts, version-check.test.ts, version-check-formatter.test.ts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Remediation update — 2 additional fixes + assessment re-verificationPushed 1. Assessment re-verification (no code change — verification only)Reconsidered the "nothing left to do" claim rather than trusting it: re-checked the full 69-page target structure from 2.
|
- ai-assisted-sdlc said "11 process guides", developer-journey/index "all 11 guides" — actual KB count is 9; normalize phrasing to "how-to guides" - extend docs-staleness-check: "N how-to/process guides" claims now verified against dataset .pair/knowledge/how-to (test-first, negative + positive fixture cases added) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- concepts/index: replace wall-of-text with recommended reading order (4 core concepts) + deeper-mechanics list + forward link to lifecycle - customization/index: surface install-from-url (moved here by T3 but invisible from the section index) - docs hub: add Migrations row to top tasks (only section unreachable from the hub) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remediation follow-up + IA challenge round1. Remediation mapping (post re-review fixes already on the branch)Two fixes were folded in after review round 2 and are hereby mapped to their findings:
The PR body's "Files Changed" and "Reviewer notes" sections were stale on both points and have been corrected. 2. Independent verification (all 8 ACs re-checked on the branch)AC1–AC8 verified against the actual tree, not the PR body: hub real, section indexes resolve, staleness gate scans all Gates (fresh run): website vitest 35/35 · docs:staleness PASS (35 skills, 8 commands) · knowledge-hub check:links PASS · mdlint PASS · 3. IA challenge — implemented (same branch)Critical read of the post-restructure tree against the full set of pair aspects (KB, skills, CLI, PM tools, journeys, customization, contributing). Low-risk, clearly net-positive fixes landed:
No URLs or page titles changed; all gates re-run green (incl. pre-push hook). 4. IA challenge — proposals for discussion (not implemented)
🤖 Generated with Claude Code |
Re-review of post-approval commits (cc9fcd2..a9d4764)Review InformationPR Number: #315 Review SummaryOverall Assessment
Key Changes Summary
Business Value ValidationAll three changes extend the story's own goals (AC3 drift-class protection generalized to how-to counts; AC1/AC5 navigability gaps closed: Independent Verification (evidence, re-derived from the tree)
Testing ReviewSecurity ReviewNo security surface: static docs content, a read-only filesystem scan in a CI script, tests. No secrets, no input handling. Detailed Review CommentsPositive Feedback
Issues to AddressMinor Issues 💡
Critical / Major IssuesNone. Risk Assessment
Tech DebtTwo small items surfaced (Minor #1, #2) — surfaced, not blocking. Additional same-class note for a future pass: "9 guideline categories" counts (developer-journey pages, guidelines-catalog) remain unguarded by any check. Adoption ComplianceInline check (docs-only incremental range): no new dependencies ( Follow-up Actions
Verdict: Approved with Comments. No Critical/Major findings; all story ACs remain met; frozen paths untouched; gates independently re-verified green at |
…-dir - GUIDE_COUNT_RE now covers adjective phrasings (sequential, step-by-step) with optional modifier — mirrors Check 1's shape; caught 2 more live stale counts on the real tree (knowledge-base.mdx, quickstart.mdx: "11 step-by-step ... guides" vs actual 9) — fixed - guidelines-catalog description normalized "(9 sequential steps)" → "9 sequential how-to guides" so every guide-count claim is gate-covered - missing how-to dataset dir now pushes an error instead of silently skipping the check (consistent with Check 1) - tests: +2 (adjective-phrasing negative, missing-dir failure) Refs: PR #315 re-review findings 1-2 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remediation — re-review findings (#315 (comment))
Gates after fixes: website vitest 37/37 · docs:staleness PASS (35 skills, 8 commands) · mdlint PASS · 🤖 Generated with Claude Code |
Remediation verified — Approve (re-review findings 1–3, commit
|
Code Review — PR #315 (Canonical, /pair-process-review skill-run)Review Information
Review SummaryOverall Assessment
Key Changes SummaryTargeted IA consolidation of Business Value ValidationDelivers the story's goal: every audience journey reaches content in ≤2 clicks, duplicated pages are unified, and stale counts now fail CI. Verified against the tree, not the PR body. Acceptance Criteria — independently verified
Frozen anchors: Repo-wide grep: zero stray Testing ReviewThe staleness gate is genuinely test-first: real spawned-script negative cases (wrong skill count, wrong how-to count, adjective phrasings) AND a missing-dir loud-failure test. Not tautological. Strong. Security ReviewNo security surface: static docs content, a read-only CI filesystem scan, static redirect config, tests. No secrets, no input handling, no dependencies added. Adoption Compliance (Phase 3)Inline dependency check (docs + config only): Detailed Review CommentsPositive Feedback
Minor Issues 💡 (surfaced, non-blocking)
Accepted / by-design (nonActionable — reported for transparency)
Risk Assessment
Tech Debt (assess-debt — output-only, non-blocking)
VerdictApproved with Comments. All 8 ACs independently verified against 🤖 Canonical review via |
Canonical review found the gate could not catch the very phrasings it was meant to guard: - skill regex now matches "N+ skills" (trailing +) and the agent/idempotent adjectives, not just pair/composable — "30+ skills" and "N agent skills" previously slipped through silently - guide regex tightened: requires a how-to qualifier (adjective OR how-to/process word), so arbitrary "N guides" prose no longer false-positives in CI (was over-broadened in prior remediation) - Check 5 dead-link scan extended to JSX `href="/docs/..."` card attributes (Fumadocs <Card>), not just markdown `](/docs/...)` - README.md documented as intentionally out of docs-gate scope (literal counts owned by PR #325) tests: +6 (N+/agent/composable skill mismatches, bare "N guides" non-false-positive, dead + valid JSX href). All test-first (red→green). Refs: PR #315 canonical review Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remediation — canonical /pair-process-review findingsFix commit: Stale counts (website docs)Re-checked on-branch: all skill counts are already 35 — the flagged lines were fixed in earlier commits on this branch, so nothing further to change:
The real exposure was that the gate could not have caught those forms — addressed below. Gate hardening —
|
Re-review of gate-hardening
|
…p script Owner rule: tested functionality lives in production code and is tested there — do NOT unit-test scripts. The gate violated this (logic in scripts/docs-staleness-check.js, test spawned it black-box). - port ALL logic verbatim (incl. #315 hardening: tightened guide regex, widened skill regex with +/adjectives, JSX href dead-link scan, README out-of-scope note) into apps/website/lib/docs-staleness-check.ts — ESM module, functions exported individually, import.meta main-guard CLI wrapper, DOCS_STALENESS_ROOT retained, root resolved up 3 - rewrite the test as WHITE-BOX vitest unit tests importing the exported functions directly; ZERO spawnSync/exec — real-tree parity asserted in-process via runAllChecks(). red->green coverage preserved as per-function negatives (wrong N+/composable/agent skills, bare "N guides" non-false-positive, dead/valid JSX href, missing how-to dir) - wire: tsx (catalog 4.23.1) + website script docs:staleness=tsx; root docs:staleness delegates to @pair/website, unchanged in quality-gate + ci.yml (now delegates) - delete scripts/docs-staleness-check.js (single source of truth); update decision-log path refs Refs: PR #315 architectural rule (no test-on-script) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…on scripts
Record the architectural rule the docs-staleness refactor implements as
a non-architectural ADL (adoption/decision-log/2026-07-13-gate-tooling-
code-in-tested-modules.md): gate logic lives in tested owning-package
modules; scripts/CLIs are thin entrypoints; root gates delegate; scripts
are never unit-tested (smoke tests cover CLI end-to-end).
- complements (does not amend) the test-file-colocation ADL — placement
vs module-vs-script boundary are orthogonal; cross-linked
- surfaced from way-of-working Quality Gates ("Gate & tooling code" bullet)
- no dataset mirror (adoption decision-log is not auto-mirrored; siblings
husky/colocation are adoption-only)
Refs: PR #315 architectural rule (no test-on-script)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Refactor: docs-staleness gate → tested module (no test-on-script) + ADLApplies the repo-owner architectural rule — tested functionality lives in production code and is tested there; scripts are not unit-tested (use a smoke test if you want CLI-level coverage). The docs-staleness gate violated it: logic sat in What changed (bc83c37, 46292c8)
ADLRecorded the rule as a non-architectural ADL: Verification
🤖 Generated with Claude Code |
Re-review of docs-staleness module-ization + ADL — ApproveIndependent re-review of the delta since Findings — all clear
Verdict: Approved. No Critical/Major/Minor findings. Merge remains human-gated. |
- implement-batch.js Input: batch items are STORIES (one branch + one PR, create-or-update), never one-PR-per-task; second PR forbidden unless human instructs - implementer.md: add one-PR-per-story operating rule + pointer to gate/test ADL - implement SKILL (dataset + .claude mirror): one-PR-per-story reinforcement line - git-workflow (dataset + root mirror): normative one-PR-per-story in branch/PR strategy - reviewer.md unchanged (never opens PRs — Rule 2 no-op) Refs owner rules 1 (gate/test) + 2 (one-PR-per-story); gate/test ADL lands on PR #315. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- implement-batch.js Input: batch items are STORIES (one branch + one PR, create-or-update), never one-PR-per-task; second PR forbidden unless human instructs - implementer.md: add one-PR-per-story operating rule + pointer to gate/test ADL - implement SKILL (dataset + .claude mirror): one-PR-per-story reinforcement line - git-workflow (dataset + root mirror): normative one-PR-per-story in branch/PR strategy - reviewer.md unchanged (never opens PRs — Rule 2 no-op) Refs owner rules 1 (gate/test) + 2 (one-PR-per-story); gate/test ADL lands on PR #315. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Docs website IA restructuring (Option A)
Story: Closes #312
Type: Documentation · Priority: P2 · Risk: Low (content + static config only)
Motivation
Full IA assessment of
apps/website/content/docs/**(69 pages, 12 sections + root) found:/docsroot is a dead-end (15 lines, zero links, yet the landing page CTA points there); 8 internal links point at index-less section URLs that 404 under Fumadocs;guides/is a 7-page grab-bag spanning three audiences with no shared theme; two active duplication pairs (FAQ vs troubleshooting, packaging vs organization); hardcoded skill counts already drifted (30/32/34 vs the real 35) and the staleness gate only checked one page. Option A (targeted consolidation) fixes every Major finding while changing only 9 URLs, leaving the healthy 70% of the tree untouched.Changes Made
/docsroot as a real hub (links to the 4 journeys + top tasks); addedconcepts/index.mdx+reference/index.mdx; fixed the 8 broken section links intutorials/*.mdx; fixed 6 stale skill counts; extendeddocs-staleness-check.jsto scan skill counts across all docs pages (not justskills-catalog.mdx) + added a dead-internal-link check; retitled quickstart variants ("Quickstart: Solo/Team/Organization"); unified developer-journey title; updated e2e sidebar-title assertions.support/faq.mdx+guides/troubleshooting.mdxinto a newsupport/troubleshooting.mdx(union of Q&As, conflicting fixes reconciled — nvm recommended over sudo/npm-permissions, with the alternative noted); added the firstredirects()block tonext.config.mjs.guides/: 4 moves (adopter-checklist→getting-started/checklist,cli-workflows→reference/cli/workflows,install-from-url→customization/install-from-url,update-link→reference/cli/update-link), 2 content merges (customize-kb→customization/team.mdx,packaging→customization/organization.mdx, deduped);guides/section removed entirely; root nav 13→12 entries; ~15 inbound links updated.update-linkmetadata pointed at the old/docs/guides/update-link), 2 stale skill counts fixed (skill-management.mdx table, claude-code.mdx "30+" that escaped the gate regex), e2e smoke tests added for/docs,/docs/concepts,/docs/reference, and a genuine negative test added for the extended staleness gate (spawns the real script against a fixture with a wrong count, asserts failure).concepts/index.mdxrewritten from a wall-of-text into a recommended reading order + deeper-mechanics split; orphanedinstall-from-urlsurfaced incustomization/index.mdx; Migrations top-task row added to the/docshub — the only section previously unreachable from it (0541e11).apps/website/lib/docs-staleness-check.ts(ESM, functions exported individually,import.metamain-guard CLI wrapper,DOCS_STALENESS_ROOTretained); rewrote the test as white-box unit tests importing those functions directly — zerospawnSync/exec in vitest (real-tree parity asserted in-process viarunAllChecks()); deletedscripts/docs-staleness-check.js; rootdocs:stalenessnow delegatespnpm --filter @pair/website docs:staleness(addedtsx;quality-gate+ CI step unchanged, now delegating). Recorded the rule as ADL2026-07-13-gate-tooling-code-in-tested-modules.md, surfaced from way-of-working Quality Gates (bc83c37, 46292c8).Files Changed
content/docs/concepts/index.mdx,content/docs/reference/index.mdx,content/docs/support/troubleshooting.mdx,apps/website/lib/docs-staleness-check.ts(gate module),apps/website/lib/docs-staleness-check.test.ts(white-box unit tests),.pair/adoption/decision-log/2026-07-12-docs-website-ia-restructuring-assessment.md(the full assessment — relocated fromapps/website/docs-structure-assessment.mdduring review — analysis/decision artifact, not published site content),.pair/adoption/decision-log/2026-07-13-gate-tooling-code-in-tested-modules.md(ADL: gate/tooling code in tested modules, no unit-test on scripts).guides/(see above);guides/deleted.scripts/docs-staleness-check.js(logic ported to the website module; root gate delegates).content/docs/index.mdx, root + sectionmeta.jsonfiles,next.config.mjs(newredirects()),e2e/docs.e2e.test.ts, ~20 pages with fixed inbound links/counts;apps/pair-cli/src/commands/kb-info/migration-url.ts(+ 4 test URL updates across 3 test files) — dead/docs/guides/migrationsbase fixed to/docs/migrations;package.json+apps/website/package.json+pnpm-workspace.yaml(rootdocs:stalenessdelegates, website script runs the module viatsx,tsxadded to catalog);.pair/adoption/tech/way-of-working.md(ADL surfacing bullet).Redirects (9, permanent)
/docs/guides/{adopter-checklist,cli-workflows,customize-kb,install-from-url,packaging,troubleshooting,update-link},/docs/support/faq,/docs/guides— all e2e-verified live.Testing / Quality Gates
Risk Assessment
Low — docs content + static config only, no dependencies added, no secrets. Only 7 URLs actually change; frozen anchors (
reference/skills-catalog.mdx,reference/cli/commands.mdx) untouched except one unavoidable link-only edit insidecommands.mdx(old link now points to the moved page, forced by the new dead-link gate — content itself untouched).Reviewer notes (disclosures)
.pair/adoption/decision-log/2026-07-12-docs-website-ia-restructuring-assessment.md— relocated fromapps/website/docs-structure-assessment.mdduring review (commit fe62307); the story's Documentation Links pointer was updated to match.apps/pair-cli/src/commands/kb-info/migration-url.tsemitted/docs/guides/migrations/*, which 404s — initially deferred as out of scope, then fixed in this PR (commit cc9fcd2):DOCS_MIGRATIONS_BASEnow points at/docs/migrations, with the 4 dependent test URLs updated.🤖 Generated with Claude Code