Skip to content

Add design document support to APS planning framework#30

Merged
joshuaboys merged 2 commits intomainfrom
claude/add-designs-folder-qwjzs
Mar 2, 2026
Merged

Add design document support to APS planning framework#30
joshuaboys merged 2 commits intomainfrom
claude/add-designs-folder-qwjzs

Conversation

@joshuaboys
Copy link
Contributor

@joshuaboys joshuaboys commented Feb 27, 2026

Summary

This PR introduces design documents as a first-class artefact in the APS planning framework. Design docs capture architectural thinking and approach decisions before committing to modules and work items, enabling better review and comparison of alternatives for complex, multi-module work.

Key Changes

  • New design document format (designs/YYYY-MM-DD-slug.design.md):

    • Metadata table with Status, Created date, and linked Modules
    • Problem statement, Design approach, Alternatives Considered, Implementation Notes, and Decisions sections
    • Template provided in templates/design.template.md and scaffold/designs/.design.template.md
  • Validation rules for design docs (warnings only, free-form designs accepted):

    • W014: Missing ## Problem section
    • W015: Missing ## Design section
    • W016: Missing metadata table with Status field
    • Implemented in lib/rules/design.sh (bash) and lib/rules/Design.psm1 (PowerShell)
  • CLI integration:

    • Updated bin/aps and bin/aps.ps1 to source design validation rules
    • Updated lib/lint.sh and lib/Lint.psm1 to detect and lint .design.md files
    • Design files automatically included when linting plans/ directory
  • Documentation updates:

    • Added design document guidance to plans/aps-rules.md and scaffold/plans/aps-rules.md
    • Updated aps-planning/reference.md and aps-planning/SKILL.md with design workflow
    • Added design step to getting-started guide and workflow documentation
    • Updated README with design template reference
  • Scaffold improvements:

    • scaffold/init.sh and scaffold/install.ps1 now create designs/ directory and copy template
    • Design directory created alongside plans/ in new projects
  • Example design document:

    • Added examples/user-auth/designs/2025-01-05-auth-architecture.design.md demonstrating JWT + refresh token strategy for authentication
    • Linked from example index

Implementation Details

  • Design docs live in designs/ at project root (peer to plans/), not nested within plans
  • Designs are optional — straightforward features, bug fixes, and established approaches skip this step
  • "Accept-then-normalise" approach: free-form designs are accepted; missing sections can be added later without rewriting author content
  • Design validation is warnings-only to encourage adoption without blocking
  • Designs link to relevant modules via metadata table, enabling cross-referencing from module files

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44bc9f7853

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds design documents as a first-class APS planning artefact (stored in designs/), including templates, lint rules (warnings W014–W016), CLI integration, scaffold support, docs updates, and an example design.

Changes:

  • Introduces a new design doc template/format and updates docs to describe the design workflow.
  • Adds design-doc linting rules (bash + PowerShell) and integrates .design.md discovery into the linter/CLI.
  • Updates scaffolding/installation scripts and adds an example design doc linked from the user-auth example.

Reviewed changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
templates/design.template.md New repo-level design doc template.
scaffold/designs/.design.template.md New scaffolded design template for new projects.
lib/rules/design.sh New bash lint rules for design docs (W014–W016).
lib/rules/Design.psm1 New PowerShell lint rules for design docs (W014–W016).
lib/lint.sh Adds .design.md discovery and dispatch to lint_design.
lib/Lint.psm1 Adds .design.md discovery and dispatch to Invoke-ApsDesignLint.
bin/aps Sources new design.sh rules module.
bin/aps.ps1 Imports new Design.psm1 rules module.
scaffold/init.sh Bootstrap scaffold now creates designs/ and installs the design template.
scaffold/install.ps1 PowerShell installer now creates designs/ and downloads the design template + rule modules.
plans/aps-rules.md Documents designs/ location and guidance for design docs.
scaffold/plans/aps-rules.md Same as above for scaffolded guidance file.
aps-planning/reference.md Adds design doc patterns + warning codes to reference docs.
scaffold/aps-planning/reference.md Same reference updates for scaffolded skill docs.
aps-planning/SKILL.md Updates skill to consider design docs and normalisation guidance.
scaffold/aps-planning/SKILL.md Same skill updates for scaffolded version.
docs/workflow.md Adds design doc step to workflow narrative.
docs/getting-started.md Adds design doc option to getting-started flow + file layout.
README.md Adds design template to template list and file layout snippet.
AGENTS.md Notes design docs as part of APS artefacts.
examples/user-auth/index.aps.md Links the new example design doc.
examples/user-auth/designs/2025-01-05-auth-architecture.design.md New example design document.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

claude and others added 2 commits March 2, 2026 21:24
Introduces a standardized `designs/` folder at the project root for
technical/architectural design documents. Designs capture the "why this
approach" thinking before committing to modules and work items.

Key changes:
- New design template (templates/design.template.md)
- Scaffold creates designs/ with template on init and update
- Linter detects and validates *.design.md files (warnings only, no errors)
- Agent guidance includes accept-then-normalise rule for free-form designs
- Example design doc added to user-auth example
- All docs, rules, and references updated with designs/ in file layouts

https://claude.ai/code/session_01MJJzMEySiQmiCoUEw73qte
- Fix design path matching to handle root-level designs/ paths
  (bash and PowerShell)
- Require both Field header and Status row for W016 check
- Add design rule files to all CLI manifests (scaffold/install,
  scaffold/update, lib/scaffold.sh, lib/Scaffold.psm1 etc.)
- Fix grammar: "a Action Plan" → "an Action Plan"
- Fix broken module links in example design doc

Authored-By: Aneki (joshuaboys)
@joshuaboys joshuaboys force-pushed the claude/add-designs-folder-qwjzs branch from 44bc9f7 to 5465707 Compare March 2, 2026 13:27
@joshuaboys
Copy link
Contributor Author

Review Feedback Addressed

Code Changes (1 commit pushed)

  • Fixed get_file_type in lib/lint.sh to match root-level designs/ paths (not just /designs/)
  • Fixed Get-ApsFileType in lib/Lint.psm1 with updated regex for root-level paths
  • W016 now checks for both | Field | header AND | Status | row (bash + PowerShell)
  • Added lib/rules/design.sh + Design.psm1 to all CLI file manifests (scaffold/install, scaffold/update, scaffold/update.ps1, lib/scaffold.sh, lib/Scaffold.psm1)
  • Fixed grammar: "a Action Plan" → "an Action Plan" in docs/workflow.md
  • Fixed broken module links in example design doc

Replied (no code change)

  • Test fixture coverage (outdated thread) — can be tracked separately

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5465707242

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


# Also scan designs/ when the target is specifically plans/
# (find_aps_files already recurses, so this only adds the sibling designs/ dir)
if [[ "$target" == "plans" || "$target" == "plans/" ]]; then

Choose a reason for hiding this comment

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

P2 Badge Resolve sibling designs for any plans directory target

The new sibling-scan only runs when target is exactly plans or plans/, so aps lint ./plans, aps lint ../repo/plans, or absolute .../plans paths never include design docs and silently skip W014–W016. In this commit, cmd_lint advertises design linting as part of plans linting, but this literal string check means the behavior only works for one invocation form; please derive the sibling designs path from the provided target directory instead of hard-coding designs in CWD (the same pattern appears in lib/Lint.psm1).

Useful? React with 👍 / 👎.

@joshuaboys joshuaboys merged commit a191cca into main Mar 2, 2026
3 checks passed
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.

3 participants