Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 26, 2026

Summary

  • Rewrote docs/customization.md to document the actual openspec schema CLI commands instead of a manual process
  • Removed misleading "Current Limitations" section that claimed "No scaffolding" exists (it does)
  • Added practical examples and progressive structure (config → custom schemas → global overrides)

Problem

The old guide described a painful manual workflow:

mkdir -p ~/.local/share/openspec/schemas/spec-driven/templates
npm list -g openspec --parseable
cp <package-path>/schemas/... 

And explicitly listed these as "Current Limitations":

  • "No scaffolding" - Users must manually create directories and copy files
  • "No verification" - No way to confirm which schema is actually being resolved

But these commands have existed for a while:

  • openspec schema fork - automated scaffolding
  • openspec schema init - create from scratch
  • openspec schema validate - verification
  • openspec schema which - resolution debugging

Test plan

  • Review the updated guide renders correctly
  • Verify command examples match actual CLI behavior

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Restructured customization guide into a three-level model (project, custom schemas, global overrides) with comparison tables.
    • Added Quick Setup, expanded schema creation/override workflows, examples (including TDD and review artifacts), and validation/debug guidance.
    • Clarified schema resolution order and updated CLI-related schema location guidance.
    • Improved cross-references and step-by-step flows for applying and testing customizations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Warning

Rate limit exceeded

@TabishB has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This PR substantially rewrites docs/customization.md to introduce a three-level customization model (Project Config, Custom Schemas, Global Overrides), adds concrete schema structure/examples, clarifies schema resolution order, and updates docs/cli.md to change the user-scoped schema path to ~/.local/share/openspec/schemas/<name>/.

Changes

Cohort / File(s) Summary
Customization docs
docs/customization.md
Replaces two-level model with three-level model (Project Config, Custom Schemas, Global Overrides); adds Quick Setup, reorganizes "How It Works", expands Custom Schemas (structure, artifacts, templates, instructions, dependencies, apply block), adds validation/debugging, many example workflows and tables, and a See Also section.
CLI docs
docs/cli.md
Updates user-scoped schema directory in schema resolution list from ~/.openspec/schemas/<name>/ to ~/.local/share/openspec/schemas/<name>/ (XDG location).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through docs, with pen in paw,

I sketched three tiers and cleaned the law,
From project rules to global skies,
Schemas bloom before your eyes,
A rabbit's cheer for clearer guides. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change: rewriting the customization documentation to document schema CLI commands instead of manual processes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

@greptile-apps
Copy link

greptile-apps bot commented Jan 26, 2026

Greptile Overview

Greptile Summary

Rewrote the customization guide to document the actual openspec schema CLI commands (fork, init, validate, which) instead of the previous manual copy-paste workflow. The guide now provides a progressive structure (project config → custom schemas → global overrides) with practical examples.

Major improvements:

  • Documents automated scaffolding commands that already exist
  • Removes misleading "Current Limitations" section claiming features don't exist
  • Adds validation and debugging command examples
  • Provides clear schema structure and resolution precedence documentation
  • Includes practical examples (Minimal TDD Workflow, Adding a Review Artifact)

Issues found:

  • CLI output format example doesn't match actual implementation (line 252-254)
  • Broken link to non-existent schemas.md file (line 358)

Confidence Score: 4/5

  • Safe to merge after fixing two minor documentation errors
  • Documentation rewrite correctly documents existing CLI commands verified in codebase. Two minor issues found: incorrect CLI output format example and broken link. Content is technically accurate otherwise and significantly improves user experience by documenting automated workflows instead of manual processes.
  • docs/customization.md - Fix CLI output example format and remove broken link to schemas.md

Important Files Changed

Filename Overview
docs/customization.md Comprehensive rewrite documenting schema CLI commands, replacing manual workflow. Found two minor issues: incorrect CLI output format example and broken link to non-existent schemas.md

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as openspec CLI
    participant Resolver as Schema Resolver
    participant Project as openspec/schemas/
    participant UserDir as ~/.local/share/openspec/schemas/
    participant Package as Built-in schemas/

    Note over User,Package: Schema Fork Workflow

    User->>CLI: openspec schema fork spec-driven my-workflow
    CLI->>Resolver: Find source schema "spec-driven"
    Resolver->>Project: Check project schemas
    Project-->>Resolver: Not found
    Resolver->>UserDir: Check user schemas
    UserDir-->>Resolver: Not found
    Resolver->>Package: Check package schemas
    Package-->>Resolver: Found at schemas/spec-driven/
    Resolver-->>CLI: Return source path
    CLI->>Project: Copy to openspec/schemas/my-workflow/
    CLI->>Project: Update schema.yaml name field
    CLI-->>User: Schema forked successfully

    Note over User,Package: Schema Resolution Workflow

    User->>CLI: openspec new change feature --schema my-workflow
    CLI->>Resolver: Resolve schema "my-workflow"
    Resolver->>Project: Check openspec/schemas/my-workflow/
    Project-->>Resolver: Found (highest priority)
    Note over Resolver: Project wins over User and Package
    Resolver-->>CLI: Return project schema path
    CLI->>Project: Load schema.yaml and templates
    CLI-->>User: Use my-workflow schema
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 252 to 254
```
my-workflow resolves from: project
Source: /path/to/project/openspec/schemas/my-workflow
Copy link

Choose a reason for hiding this comment

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

Output format doesn't match actual CLI. The actual output is:

Schema: my-workflow
Source: project
Path: /path/to/project/openspec/schemas/my-workflow

Not "resolves from:"

Suggested change
```
my-workflow resolves from: project
Source: /path/to/project/openspec/schemas/my-workflow
my-workflow
Source: project
Path: /path/to/project/openspec/schemas/my-workflow

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/customization.md
Line: 252:254

Comment:
Output format doesn't match actual CLI. The actual output is:
```
Schema: my-workflow
Source: project
Path: /path/to/project/openspec/schemas/my-workflow
```

Not "resolves from:"

```suggestion
my-workflow
  Source: project
  Path: /path/to/project/openspec/schemas/my-workflow
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

| `src/core/artifact-graph/instruction-loader.ts` | Template loading |
| `src/core/global-config.ts` | XDG path helpers |
| `schemas/spec-driven/` | Default schema and templates |
- [CLI Reference: Schema Commands](cli.md#schema-commands) - Full command documentation
Copy link

Choose a reason for hiding this comment

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

Broken link - schemas.md doesn't exist in the repo

Suggested change
- [CLI Reference: Schema Commands](cli.md#schema-commands) - Full command documentation
- [CLI Reference: Schema Commands](cli.md#schema-commands) - Full command documentation
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/customization.md
Line: 358:358

Comment:
Broken link - `schemas.md` doesn't exist in the repo

```suggestion
- [CLI Reference: Schema Commands](cli.md#schema-commands) - Full command documentation
```

How can I resolve this? If you propose a fix, please make it concise.

@TabishB TabishB force-pushed the docs/fix-customization-guide branch 2 times, most recently from a6b4972 to b5cdb91 Compare January 26, 2026 07:25
The old guide described a painful manual process for schema customization
(mkdir, npm list, cp commands) and even listed "No scaffolding" as a
limitation. But the `openspec schema` commands have existed for a while:

- `schema fork` - copy existing schema to customize
- `schema init` - create new schema from scratch
- `schema validate` - check schema structure
- `schema which` - debug resolution precedence

Rewrote the guide to:
- Lead with the actual CLI commands instead of manual steps
- Remove the misleading "Current Limitations" section
- Add practical examples (TDD workflow, adding review artifact)
- Structure progressively: config → custom schemas → global overrides
@TabishB TabishB force-pushed the docs/fix-customization-guide branch from b5cdb91 to 99acace Compare January 26, 2026 07:30
Copy link
Contributor

@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: 3

🤖 Fix all issues with AI agents
In `@docs/customization.md`:
- Around line 252-256: The fenced code block containing "Schema: my-workflow",
"Source: project", and "Path: /path/to/project/openspec/schemas/my-workflow" is
missing a language tag; update the block delimiter from ``` to ```text so the
block becomes a fenced "text" block (i.e., replace the opening ``` with ```text)
to satisfy MD040 and ensure proper syntax highlighting.
- Around line 110-118: Update the fenced code block that shows the directory
tree for "openspec/schemas/my-workflow/" by adding a language tag (e.g., text)
after the opening triple backticks so the block becomes a labeled code fence;
ensure the opening fence that currently reads ``` is changed to ```text to
satisfy MD040.
- Around line 110-117: The template filename in
openspec/schemas/my-workflow/templates is inconsistent (uses spec.md) while the
artifact name elsewhere is "specs"; rename spec.md to specs.md and update any
references to the template name (e.g., in schema.yaml or docs) so the template
filename matches the artifact identifier "specs" and aligns with built-in schema
conventions.

Comment on lines 110 to 117
```
openspec/schemas/my-workflow/
├── schema.yaml # Workflow definition
└── templates/
├── proposal.md # Template for proposal artifact
├── spec.md # Template for specs
├── design.md # Template for design
└── tasks.md # Template for tasks
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Template filename likely mismatched (spec.md vs specs.md).

Elsewhere the artifact is “specs”, and built-in schemas typically use specs.md. Consider aligning the filename to avoid confusion.

✏️ Proposed fix
-    ├── spec.md           # Template for specs
+    ├── specs.md          # Template for specs
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

110-110: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@docs/customization.md` around lines 110 - 117, The template filename in
openspec/schemas/my-workflow/templates is inconsistent (uses spec.md) while the
artifact name elsewhere is "specs"; rename spec.md to specs.md and update any
references to the template name (e.g., in schema.yaml or docs) so the template
filename matches the artifact identifier "specs" and aligns with built-in schema
conventions.

Address review feedback from CodeRabbit:
- Add 'text' language tag to directory tree code blocks
- Satisfies MD040 markdown lint rule
@TabishB TabishB merged commit 0bfe1d4 into main Jan 26, 2026
9 checks passed
@TabishB TabishB deleted the docs/fix-customization-guide branch January 26, 2026 07:37
StrayDragon pushed a commit to StrayDragon/OpenSpec that referenced this pull request Jan 26, 2026
…n-AI#582)

* docs: rewrite customization guide to document schema commands

The old guide described a painful manual process for schema customization
(mkdir, npm list, cp commands) and even listed "No scaffolding" as a
limitation. But the `openspec schema` commands have existed for a while:

- `schema fork` - copy existing schema to customize
- `schema init` - create new schema from scratch
- `schema validate` - check schema structure
- `schema which` - debug resolution precedence

Rewrote the guide to:
- Lead with the actual CLI commands instead of manual steps
- Remove the misleading "Current Limitations" section
- Add practical examples (TDD workflow, adding review artifact)
- Structure progressively: config → custom schemas → global overrides

* docs: add language tags to code blocks in customization guide

Address review feedback from CodeRabbit:
- Add 'text' language tag to directory tree code blocks
- Satisfies MD040 markdown lint rule
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