Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 13, 2026

Summary

  • Add --no-interactive flag to all openspec validate commands in agent workflows
  • Update agents-template.ts (7 commands), slash-command-templates.ts (2 commands)
  • Regenerate AGENTS.md with the updated template
  • Update test assertions in update.test.ts to match new command format

Fixes #492

Why

AI agents following OpenSpec workflows hit interactive prompts when running openspec validate because the documented commands didn't include --no-interactive. This caused hangs in LLM tool execution since agents typically run in pseudo-TTY environments where process.stdin.isTTY returns true, triggering interactive mode.

Test plan

  • All 908 tests pass
  • Verified openspec/AGENTS.md contains --no-interactive on all validate commands
  • Verified slash command templates updated

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated validation command documentation, examples, and templates to use non-interactive mode, removing prompts during validation steps and improving automation workflows.

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

…lows

AI agents following OpenSpec workflows would hit interactive prompts when
running `openspec validate` because the commands in AGENTS.md and slash
command templates didn't include the --no-interactive flag.

This caused hangs in LLM tool execution since agents run in pseudo-TTY
environments where process.stdin.isTTY returns true, triggering
interactive mode.

Fixes #492
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

The PR adds the --no-interactive flag to all openspec validate command invocations across documentation (AGENTS.md), template files (agents-template.ts, slash-command-templates.ts), and test expectations. This ensures validation runs non-interactively by default in agent workflows, preventing the validation process from blocking on user input prompts.

Changes

Cohort / File(s) Summary
Documentation and Templates
openspec/AGENTS.md, src/core/templates/agents-template.ts, src/core/templates/slash-command-templates.ts
Added --no-interactive flag to all openspec validate command invocations across validation tips, quick start examples, and workflow instructions for both agent template generation and slash-command workflows.
Test Expectations
test/core/update.test.ts
Updated test assertions to reflect the new validation command format with --no-interactive flag in error messages and instruction strings.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • #396: Fixes CLI behavior to correctly respect and handle the --no-interactive flag in validation commands, complementing this PR's documentation updates.
  • #395: Implements and fixes handling of the --no-interactive and interactive flags in validate and interactive utilities to ensure non-interactive invocations behave correctly.
  • #227: Previous edits to AGENTS.md and slash-command template validation behavior that overlap with this PR's scope.

Poem

🐰 No more hanging on prompts so tight,
Agents validate with --no-interactive!
No more waiting, no more stall,
Just smooth workflows, that's all! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding --no-interactive flag to validate commands in agent workflows, which matches the code changes across multiple template and documentation files.
Linked Issues check ✅ Passed The PR fully addresses the requirements of issue #492: validate commands now include --no-interactive flag in agents-template.ts, slash-command-templates.ts, AGENTS.md, and test assertions, preventing agent hangs.
Out of Scope Changes check ✅ Passed All changes are scoped to the objective of adding --no-interactive flags to validate commands in agent workflows; no unrelated modifications are present.
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.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07dd634 and b8c3218.

📒 Files selected for processing (4)
  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
  • test/core/update.test.ts
🧰 Additional context used
🧠 Learnings (17)
📓 Common learnings
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:02.839Z
Learning: Use `@/openspec/AGENTS.md` to learn how to create and apply change proposals, spec format and conventions, and project structure and guidelines
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Run `openspec validate [change-id] --strict` before requesting approval
📚 Learning: 2025-11-25T01:08:02.839Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:02.839Z
Learning: Use `@/openspec/AGENTS.md` to learn how to create and apply change proposals, spec format and conventions, and project structure and guidelines

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Run `openspec validate [change-id] --strict` before requesting approval

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
  • test/core/update.test.ts
📚 Learning: 2025-11-25T01:08:02.839Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:02.839Z
Learning: Always open `@/openspec/AGENTS.md` when the request mentions planning or proposals (words like proposal, spec, change, plan), introduces new capabilities, breaking changes, architecture shifts, or performance/security work, or sounds ambiguous and needs the authoritative spec before coding

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/*/proposal.md : Ensure `proposal.md` includes sections: Why (1-2 sentences), What Changes (bullet list with breaking change markers), and Impact (affected specs and code)

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/specs/**/spec.md : Use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` headers in spec delta files

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Use `openspec archive <change-id> --skip-specs --yes` for tooling-only changes

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/*.md : Scaffold proposal using `proposal.md`, `tasks.md`, optional `design.md`, and delta specs under `openspec/changes/<id>/`

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/specs/**/spec.md : Use `## ADDED Requirements` for new orthogonal capabilities that can stand alone; use `## MODIFIED Requirements` for behavior changes of existing requirements

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/**/specs/**/spec.md : Include at least one `#### Scenario:` per requirement in spec delta files

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Check `openspec/project.md` for project conventions before creating specs

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Use kebab-case, verb-led change IDs: `add-`, `update-`, `remove-`, `refactor-`

Applied to files:

  • openspec/AGENTS.md
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/*/tasks.md : Ensure `tasks.md` contains implementation checklist with numbered sections and checkbox items

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Move completed changes from `changes/[name]/` to `changes/archive/YYYY-MM-DD-[name]/` after deployment

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Search existing work using `openspec spec list --long`, `openspec list` for enumerating changes; use `rg` only for full-text search

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Create `design.md` only when needed: cross-cutting changes, new external dependencies, significant data model changes, security/performance complexity, or pre-coding ambiguity

Applied to files:

  • openspec/AGENTS.md
  • src/core/templates/agents-template.ts
  • src/core/templates/slash-command-templates.ts
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/specs/**/spec.md : Use SHALL/MUST for normative requirements in spec files; avoid should/may unless intentionally non-normative

Applied to files:

  • src/core/templates/slash-command-templates.ts
🔇 Additional comments (4)
openspec/AGENTS.md (1)

12-12: LGTM! Consistent addition of --no-interactive flag across all validate commands.

All seven occurrences of openspec validate with --strict in the documentation have been updated to include --no-interactive. This ensures agents won't hang on interactive prompts during validation. Based on learnings, this supersedes the previous guidance of using just --strict.

Also applies to: 47-47, 64-64, 111-111, 309-309, 346-346, 452-452

test/core/update.test.ts (1)

136-137: LGTM! Test assertions correctly updated to verify --no-interactive flag.

All nine test cases now assert the updated validation command format with --no-interactive. The tests cover a comprehensive set of AI tools (Claude, Cline, CodeBuddy, Crush, CoStrict, Qoder, RooCode, Windsurf) ensuring consistent behavior across all configurators.

Also applies to: 319-321, 1009-1011, 1087-1089, 1165-1167, 1206-1208, 1246-1248, 1434-1434, 1490-1490

src/core/templates/slash-command-templates.ts (1)

18-18: LGTM! Slash command templates correctly updated with --no-interactive flag.

Both the proposal (step 7) and archive (step 5) workflows now include --no-interactive in their validation commands. This ensures that when agents execute these slash commands, the validation process won't block waiting for user input.

Also applies to: 46-46

src/core/templates/agents-template.ts (1)

12-12: LGTM! Template correctly updated with --no-interactive across all validate commands.

All seven validation command references in the agents template have been updated consistently. This template generates openspec/AGENTS.md, and the changes here align perfectly with the documentation file, ensuring generated output will match.

Also applies to: 47-47, 64-64, 111-111, 309-309, 346-346, 452-452


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.

@TabishB TabishB merged commit d7a928b into main Jan 13, 2026
7 checks passed
@TabishB TabishB deleted the TabishB/verify-no-interactive-492 branch January 13, 2026 22:50
@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

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

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.

Add --no-interactive to openspec validate in agent workflows

2 participants