Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 20, 2026

Summary

Changes

  • Document schema CLI commands (which, validate, fork, init)
  • Update gap summary to show completed phases
  • Improve custom schema examples with actual CLI usage
  • Add [experimental] tag and runtime warning to schema commands

Test plan

  • Verify docs render correctly
  • Run openspec schema --help to see [experimental] tag
  • Run openspec schema which --all to see runtime warning

🤖 Generated with Claude Code

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Warning

Rate limit exceeded

@TabishB has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 56 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 3cdcdfc and 2c1fd3f.

📒 Files selected for processing (3)
  • docs/experimental-workflow.md
  • docs/schema-workflow-gaps.md
  • src/commands/schema.ts

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.

Update documentation to reflect implemented schema management features:
- Document schema CLI commands (which, validate, fork, init)
- Update gap summary to show completed phases (PR #522, #525)
- Improve custom schema examples with actual CLI usage
- Update resolution order documentation
Add [experimental] tag to help description and runtime warning
for schema management commands to indicate they may change.
@TabishB TabishB force-pushed the docs/workflow-updates branch from 4a1db13 to 2c1fd3f Compare January 20, 2026 04:03
@greptile-apps
Copy link

greptile-apps bot commented Jan 20, 2026

Greptile Summary

Updated documentation to reflect implemented schema management features from PRs #522 and #525, and marked schema commands as experimental with [experimental] tag in help text and runtime warning.

  • Updated docs/experimental-workflow.md with concrete CLI examples for schema which, validate, fork, and init commands
  • Updated docs/schema-workflow-gaps.md to mark Phase 2 (project-local schemas) and Phase 3 (schema management CLI) as complete
  • Added [experimental] annotation to schema command description in src/commands/schema.ts:293
  • Implemented preAction hook in src/commands/schema.ts:296-298 to display runtime warning when any schema subcommand is invoked
  • Marked all 47 tasks as completed in openspec/changes/schema-management-cli/tasks.md
  • Registered schema command group in main CLI (src/cli/index.ts:19)
  • Added shell completion support for schema commands in src/core/completions/command-registry.ts and new schema-name positional type in src/core/completions/types.ts

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Documentation updates accurately reflect implemented features, experimental markers are properly applied, all tasks completed, comprehensive test coverage (467 lines), and changes are non-breaking additions
  • No files require special attention

Important Files Changed

Filename Overview
docs/experimental-workflow.md Updated to document schema CLI commands (which, validate, fork, init) with examples and better structure
src/cli/index.ts Added registration of schema command group to main CLI
src/commands/schema.ts New file implementing schema management commands with experimental warning, validation, fork, init, and which subcommands
test/commands/schema.test.ts Comprehensive test suite with 467 lines covering all schema subcommands, edge cases, and error scenarios

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI
    participant SchemaCmd
    participant Resolver
    participant FileSystem

    User->>CLI: openspec schema <subcommand>
    CLI->>SchemaCmd: registerSchemaCommand()
    SchemaCmd->>SchemaCmd: preAction hook
    SchemaCmd-->>User: "Schema commands are experimental"

    alt schema which [name]
        User->>SchemaCmd: which spec-driven
        SchemaCmd->>Resolver: getSchemaDir(name, projectRoot)
        Resolver->>FileSystem: Check project/openspec/schemas/
        Resolver->>FileSystem: Check ~/.local/share/openspec/schemas/
        Resolver->>FileSystem: Check package schemas/
        FileSystem-->>Resolver: Return paths and existence
        Resolver-->>SchemaCmd: First existing location
        SchemaCmd-->>User: Display source and path
    else schema which --all
        User->>SchemaCmd: which --all
        SchemaCmd->>Resolver: listSchemas(projectRoot)
        Resolver->>FileSystem: Read all schema directories
        FileSystem-->>Resolver: All schema names
        SchemaCmd->>SchemaCmd: checkAllLocations for each
        SchemaCmd-->>User: List by source (project, user, package)
    else schema validate [name]
        User->>SchemaCmd: validate my-workflow
        SchemaCmd->>Resolver: getSchemaDir(name, projectRoot)
        Resolver-->>SchemaCmd: Schema directory path
        SchemaCmd->>FileSystem: Read schema.yaml
        FileSystem-->>SchemaCmd: Schema YAML content
        SchemaCmd->>SchemaCmd: parseSchema()
        SchemaCmd->>SchemaCmd: Check template files exist
        SchemaCmd->>SchemaCmd: Validate dependency graph (cycles)
        SchemaCmd-->>User: Validation result
    else schema fork <source> [name]
        User->>SchemaCmd: fork spec-driven my-workflow
        SchemaCmd->>Resolver: getSchemaDir(source, projectRoot)
        Resolver-->>SchemaCmd: Source directory
        SchemaCmd->>FileSystem: Check if destination exists
        alt Destination exists
            SchemaCmd-->>User: Error or confirm overwrite
        else Destination available
            SchemaCmd->>FileSystem: Copy directory recursively
            SchemaCmd->>FileSystem: Update name in schema.yaml
            FileSystem-->>SchemaCmd: Success
            SchemaCmd-->>User: Forked schema created
        end
    else schema init <name>
        User->>SchemaCmd: init my-workflow
        SchemaCmd->>SchemaCmd: Validate name (kebab-case)
        SchemaCmd->>FileSystem: Check if schema exists
        alt Schema exists
            SchemaCmd-->>User: Error or confirm overwrite
        else New schema
            SchemaCmd->>User: Prompt for description
            User-->>SchemaCmd: Enter description
            SchemaCmd->>User: Prompt for artifacts (multi-select)
            User-->>SchemaCmd: Select artifacts
            SchemaCmd->>FileSystem: Create openspec/schemas/<name>/
            SchemaCmd->>FileSystem: Write schema.yaml
            SchemaCmd->>FileSystem: Create template files
            FileSystem-->>SchemaCmd: Success
            SchemaCmd-->>User: Schema initialized
        end
    end
Loading

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

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

@TabishB TabishB merged commit 43b01ad into main Jan 20, 2026
9 checks passed
@TabishB TabishB deleted the docs/workflow-updates branch January 20, 2026 04:41
StrayDragon pushed a commit to StrayDragon/OpenSpec that referenced this pull request Jan 20, 2026
…ission-AI#526)

* docs: update workflow docs for schema management CLI

Update documentation to reflect implemented schema management features:
- Document schema CLI commands (which, validate, fork, init)
- Update gap summary to show completed phases (PR Fission-AI#522, Fission-AI#525)
- Improve custom schema examples with actual CLI usage
- Update resolution order documentation

* feat(cli): mark schema commands as experimental

Add [experimental] tag to help description and runtime warning
for schema management commands to indicate they may change.
harikrishnan83 added a commit to intent-driven-dev/OpenSpec that referenced this pull request Jan 21, 2026
# By Tabish Bidiwale (57) and others
# Via GitHub
* main: (67 commits)
  fix(ci): use workflow_dispatch for polish release notes (Fission-AI#533)
  fix(changelog): convert markdown headers to bold text for proper formatting (Fission-AI#532)
  Version Packages (Fission-AI#531)
  Add changeset for project config and schema commands (Fission-AI#530)
  fix(config): handle null rules field in project config (Fission-AI#529)
  docs: update workflow docs and mark schema commands as experimental (Fission-AI#526)
  feat(cli): add schema management commands (Fission-AI#525)
  fix: Windows path compatibility in resolver tests (Fission-AI#524)
  change(schema-management-cli): proposal for schema management commands (Fission-AI#523)
  feat(resolver): add project-local schema support (Fission-AI#522)
  docs: add project-config demo guide (Fission-AI#521)
  feat(config): add project-level configuration via openspec/config.yaml (Fission-AI#499)
  fix: auto-trigger polish release notes on release publish (Fission-AI#519)
  perf: add path filtering to Nix validation CI job (Fission-AI#518)
  Version Packages (Fission-AI#517)
  Add changeset for v0.21 release (Fission-AI#516)
  fix: prevent implementation during explore mode (Fission-AI#515)
  OPSX apply: infer target change (Fission-AI#513)
  Refine opsx archive sync assessment (Fission-AI#514)
  feat: add nix flake support (sorry for this duplicate) (Fission-AI#459)
  ...

# Conflicts:
#	src/core/templates/slash-command-templates.ts
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