Skip to content

docs: URL contract, legacy /guides/ redirects, and docs-06 follow-up#109

Merged
djm81 merged 4 commits intodevfrom
chore/modules-docs-url-contract
Mar 26, 2026
Merged

docs: URL contract, legacy /guides/ redirects, and docs-06 follow-up#109
djm81 merged 4 commits intodevfrom
chore/modules-docs-url-contract

Conversation

@djm81
Copy link
Copy Markdown
Contributor

@djm81 djm81 commented Mar 26, 2026

Summary

Adds the authoritative docs/reference/documentation-url-contract.md on the modules site, redirect_from entries for legacy /guides/<basename>/ URLs where canonical permalinks live outside /guides/, openspec/changes/docs-06-modules-site-ia-restructure design + §7 tasks, modules-docs-publishing spec updates, sidebar + reference index links, and CHANGE_ORDER status for docs-06. Changelog [Unreleased] updated.

Refs:

  • specfact-cli issue: #439 (related handoff / cross-site contract; paired PR in specfact-cli)
  • related module migration item/change: docs-06-modules-site-ia-restructure (§7 URL contract follow-up)

Scope

  • Bundle source changes under packages/
  • Registry/manifest changes (registry/index.json, packages/*/module-package.yaml)
  • CI/workflow changes (.github/workflows/*)
  • Documentation changes (docs/*, README.md, AGENTS.md)
  • Security/signing changes (scripts/sign-modules.py, scripts/verify-modules-signature.py)

Bundle Impact

List impacted bundles and version updates:

  • None (docs and OpenSpec only).

Validation Evidence

  • Jekyll: bundle exec jekyll build recommended locally in docs/ after bundle install (not run in CI agent environment).

Required local gates

  • hatch run format
  • hatch run type-check
  • hatch run lint
  • hatch run yaml-lint
  • hatch run check-bundle-imports
  • hatch run contract-test
  • hatch run smart-test (or hatch run test)

Docs-only PR; run applicable gates as needed before merge.

Signature + version integrity (required)

  • N/A — no bundle or manifest content changes

CI and Branch Protection

  • PR orchestrator jobs expected:
    • verify-module-signatures
    • quality (3.11)
    • quality (3.12)
    • quality (3.13)
  • Branch protection required checks are aligned with the above

Docs / Pages

  • Bundle/module docs updated in this repo (docs/)
  • Pages workflow impact reviewed (docs-pages.yml, if changed)
  • Cross-links from specfact-cli docs updated (if applicable) — paired PR adds core summary pointing here

Checklist

  • Self-review completed
  • No unrelated files or generated artifacts included
  • Backward-compatibility/rollout notes documented (if needed) — redirects preserve old /guides/ URLs on modules

Add authoritative reference/documentation-url-contract, design notes, §7 tasks,
modules-docs-publishing spec updates, and redirect_from for guides whose canonical
permalink is outside /guides/ so legacy modules /guides/ URLs keep working.

Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Added authoritative reference documentation defining cross-site URL ownership and contracts between core and modules sites.
  • Documentation

    • Added URL redirects for legacy guide paths, ensuring previous URLs continue to resolve.
    • Updated reference section navigation with link to new URL contract page.

Walkthrough

Adds a published URL contract page for core↔modules docs, links it in navigation and reference README, updates many guide pages with Jekyll front-matter (permalinks and redirect_from), adds tests validating legacy /guides/<basename>/ aliases, and records IA restructure tasks in OpenSpec and CHANGELOG.

Changes

Cohort / File(s) Summary
URL contract & reference
docs/reference/documentation-url-contract.md, docs/reference/README.md
New reference page defining cross-site canonical/permalink ownership and redirect rules; README updated to link the contract.
Layout / Navigation
docs/_layouts/default.html
Added sidebar link under Reference to "Core vs modules URL contract".
Guide pages (redirects/permalinks)
docs/guides/...
docs/guides/ai-ide-workflow.md, .../common-tasks.md, .../competitive-analysis.md, .../contract-testing-workflow.md, .../copilot-mode.md, .../dual-stack-enrichment.md, .../integrations-overview.md, .../migration-0.16-to-0.19.md, .../migration-cli-reorganization.md, .../migration-guide.md, .../specmatic-integration.md, .../team-collaboration-workflow.md, .../testing-terminal-output.md, .../troubleshooting.md, .../use-cases.md, .../ux-features.md, .../workflows.md, .../brownfield-engineer.md, .../brownfield-faq.md, .../brownfield-journey.md, .../brownfield-roi.md
Added redirect_from: - /guides/<basename>/ entries to preserve legacy /guides/ URLs; several files also gained layout, title, and explicit permalink front-matter where missing.
Docs tracking & specs
openspec/CHANGE_ORDER.md, openspec/changes/docs-06-modules-site-ia-restructure/design.md, openspec/changes/.../tasks.md, openspec/specs/modules-docs-publishing/spec.md, CHANGELOG.md, README.md, docs/index.md
Marked IA restructure implemented, added design and task checklist items for URL contract and redirect hygiene, formalized published URL contract in modules publishing spec, and updated changelog/README/navigation references.
Tests
tests/unit/docs/test_docs_review.py
Added helpers and unit tests to detect missing legacy /guides/<basename>/ redirect_from aliases when canonical permalinks are outside /guides/.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding a URL contract documentation page, implementing legacy redirect entries, and completing docs-06 openspec follow-up tasks.
Description check ✅ Passed The description follows the repository template, includes required sections (Summary with Refs, Scope with checkboxes, Bundle Impact marked as none, Validation Evidence, CI sections, Docs/Pages checklist), and provides sufficient context about the documentation-only changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/modules-docs-url-contract

Comment @coderabbitai help to get the list of available commands and usage tips.

- Document canonical modules.specfact.io paths for docs-07-core-handoff-conversion
- Clarify mixed permalink styles (guides vs site root vs bundles)
- Fix docs index Architecture link to /architecture/
- Point README and reference index at the contract for maintainers

Made-with: Cursor
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@openspec/CHANGE_ORDER.md`:
- Line 57: The table row starting with "| docs | 06 |
docs-06-modules-site-ia-restructure |
[`#95`](https://github.com/nold-ai/specfact-cli-modules/issues/95) | docs-01 ✅;
docs-cli-command-alignment ✅ | ✅ implemented (pending archive; §7 URL contract)
|" has one too many cells for the header; edit the row in CHANGE_ORDER.md so it
has exactly five pipe-separated columns (either remove the extra trailing cell
or merge the status note into the preceding column) so the row matches the table
header and renders correctly.

In `@openspec/changes/docs-06-modules-site-ia-restructure/tasks.md`:
- Around line 48-52: Tests do not validate task 7.4 (the requirement that pages
in docs/guides/*.md whose canonical permalink is outside /guides/ must include a
redirect_from: /guides/<basename>/), so add/update a unit test in
tests/unit/docs/test_docs_review.py to assert that for any docs/guides/*.md with
a canonical permalink not under /guides/ the frontmatter contains a
redirect_from entry matching /guides/<basename>/; implement the check by reusing
the existing test helper and fixtures around the docs review (the block around
lines 234-275) and add a failing case (and a passing case) to ensure the rule is
enforced automatically in CI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 54b48ff5-775b-498f-9c76-6ef4a588d122

📥 Commits

Reviewing files that changed from the base of the PR and between ebcd2ce and 7ff9605.

📒 Files selected for processing (29)
  • CHANGELOG.md
  • docs/_layouts/default.html
  • docs/guides/ai-ide-workflow.md
  • docs/guides/brownfield-engineer.md
  • docs/guides/brownfield-faq.md
  • docs/guides/brownfield-journey.md
  • docs/guides/brownfield-roi.md
  • docs/guides/common-tasks.md
  • docs/guides/competitive-analysis.md
  • docs/guides/contract-testing-workflow.md
  • docs/guides/copilot-mode.md
  • docs/guides/dual-stack-enrichment.md
  • docs/guides/integrations-overview.md
  • docs/guides/migration-0.16-to-0.19.md
  • docs/guides/migration-cli-reorganization.md
  • docs/guides/migration-guide.md
  • docs/guides/specmatic-integration.md
  • docs/guides/team-collaboration-workflow.md
  • docs/guides/testing-terminal-output.md
  • docs/guides/troubleshooting.md
  • docs/guides/use-cases.md
  • docs/guides/ux-features.md
  • docs/guides/workflows.md
  • docs/reference/README.md
  • docs/reference/documentation-url-contract.md
  • openspec/CHANGE_ORDER.md
  • openspec/changes/docs-06-modules-site-ia-restructure/design.md
  • openspec/changes/docs-06-modules-site-ia-restructure/tasks.md
  • openspec/specs/modules-docs-publishing/spec.md

Comment thread openspec/CHANGE_ORDER.md Outdated
Comment thread openspec/changes/docs-06-modules-site-ia-restructure/tasks.md
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/reference/documentation-url-contract.md`:
- Around line 31-36: Rule 4 is too strict: it currently mandates a same-basename
alias under redirect_from, but some legacy pages were renamed and need a
different slug (e.g., handoff table example devops-adapter-integration vs
devops-adapter-overview). Update the documentation text for Rule 4 to allow a
legacy alias that maps any previous guide slug to the canonical page rather than
requiring the exact same basename; reword the paragraph to say "include one or
more redirect_from entries for any legacy /guides/<old-slug>/ aliases (not
necessarily the same basename as the filename)" and keep the YAML example but
indicate that <old-slug> may differ from the current filename.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 795b357c-3ea3-4243-a725-04f72456eb71

📥 Commits

Reviewing files that changed from the base of the PR and between 7ff9605 and 5573358.

📒 Files selected for processing (4)
  • README.md
  • docs/index.md
  • docs/reference/README.md
  • docs/reference/documentation-url-contract.md

Comment thread docs/reference/documentation-url-contract.md
@djm81 djm81 self-assigned this Mar 26, 2026
@djm81 djm81 added documentation Improvements or additions to documentation openspec openspec change labels Mar 26, 2026
@djm81 djm81 moved this from Todo to In Progress in SpecFact CLI Mar 26, 2026
@djm81 djm81 linked an issue Mar 26, 2026 that may be closed by this pull request
djm81 added 2 commits March 26, 2026 22:51
…s-06 §7.4)

- Merge docs-06 status into Blocked by column (five columns)
- Add _list_redirect_from_routes and _guides_legacy_redirect_violation helpers
- Enforce /guides/<basename>/ redirect for guides/*.md when canonical not under /guides/
- Add passing/failing unit examples plus repo-wide assertion

Made-with: Cursor
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/unit/docs/test_docs_review.py`:
- Around line 374-396: The _list_redirect_from_routes function currently scans
the whole document and can match a "redirect_from:" in the body; restrict
parsing to YAML front-matter by first locating the front-matter block (detect a
leading '---' start delimiter near the top, find the next '---' end delimiter)
and only iterate the lines between those delimiters when searching for
"redirect_from:". Update the function to skip processing if no front-matter
block is found, and then perform the existing inner parsing logic
(_normalize_route and the "- " handling) on that sliced front-matter lines
segment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2e17b484-4f9b-496d-b6e0-3c2276533666

📥 Commits

Reviewing files that changed from the base of the PR and between 5573358 and 50811ad.

📒 Files selected for processing (2)
  • openspec/CHANGE_ORDER.md
  • tests/unit/docs/test_docs_review.py

Comment thread tests/unit/docs/test_docs_review.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation openspec openspec change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs-06: Restructure Modules Docs Site Information Architecture

1 participant