Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 20, 2026

Summary

Proposal to introduce lightweight "napkin" files (.napkin.md) as precursors to full changes.

Problem: When users start a new change with /opsx:new, their initial description gets lost. The system creates an empty folder but the user's intent isn't captured anywhere.

Solution: Napkins are simple markdown files that:

  • Live in openspec/changes/ as <name>.napkin.md
  • Capture the user's initial intent immediately
  • Get promoted to full change folders via /opsx:continue
  • Are deleted after promotion (content seeds the proposal)

Test plan

  • Review proposal for completeness
  • Discuss design/implementation approach

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Introduced lightweight "napkin" concept as a precursor to full changes with a streamlined workflow for creation, refinement, and promotion to full changes.
    • Updated CLI and related tools to support napkin handling, including creation, detection, listing, and promotion operations.
  • Chores

    • Added configuration file with schema and metadata.

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

- Replace interactive config prompts with automatic config creation using
  default schema. The generated config includes helpful comments explaining
  context and rules options.
- Remove unused promptForConfig, promptForArtifactRules, and isExitPromptError
  functions from config-prompts.ts
- Add forceExit: true to vitest config to prevent worker processes from hanging
  after tests complete
Proposal to add schema alias support so `openspec-default` and `spec-driven`
can be used interchangeably, enabling a rename without breaking existing configs.
- Remove `forceExit: true` from vitest.config.ts (Jest option, not Vitest)
- Add actual teardown logic in vitest.setup.ts that forces exit after 1s
  grace period if processes are still hanging
Proposal to introduce lightweight "napkin" files (.napkin.md) as precursors
to full changes. Napkins capture user intent immediately when starting a
change, then get promoted to full change folders with proposals.

Key points:
- Napkins live in openspec/changes/ as <name>.napkin.md files
- Promoted to folders via /opsx:continue
- Deleted after promotion (content seeds proposal)
- Solves the "lost intent" problem when creating new changes
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

This PR introduces a "napkin" concept—a lightweight markdown-based precursor to full OpenSpec changes. It adds configuration metadata and documentation defining a workflow where napkins can be created, edited, refined, promoted to full proposals via the /opsx:continue command, and subsequently deleted.

Changes

Cohort / File(s) Summary
Napkin Feature Definition
openspec/changes/napkin-changes/.openspec.yaml, openspec/changes/napkin-changes/proposal.md
Introduces napkin workflow documentation and metadata. Configuration file specifies spec-driven schema and creation timestamp. Proposal document outlines napkin lifecycle (create, edit, promote to full change, remove), integration points with CLI commands (/opsx:new, /opsx:continue), and updates to utilities and Claude skills for napkin handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Napkins scribbled, rough and light,
Quick ideas jotted, drafts in sight!
When refined, they bloom and grow,
Into changes with a brilliant glow.
From sketch to spec, the hop of progress true,
Whiskers twitch—let's build something new!

🚥 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 PR title 'docs: add napkin-changes proposal' accurately describes the addition of a napkin-changes proposal document, which is one of the main changes in this changeset.
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.

@greptile-apps
Copy link

greptile-apps bot commented Jan 20, 2026

Greptile Summary

Simplified config creation by removing interactive prompts and replaced them with a default config file containing helpful comment templates. Added two new change proposals: napkin-changes for lightweight change tracking and schema-alias-support for backward-compatible schema renaming.

Key Changes:

  • Removed promptForConfig() and isExitPromptError() interactive prompt logic
  • Config creation now generates openspec/config.yaml with default schema and comment-based documentation
  • Removed unused imports from artifact-workflow.ts
  • Added process.exit(0) with 1-second grace period in vitest teardown to prevent worker hanging
  • Added two well-structured change proposals following OpenSpec conventions

Proposals:

  • napkin-changes: Introduces lightweight .napkin.md files as precursors to full change folders, solving the "lost intent" problem when users start new changes
  • schema-alias-support: Enables renaming spec-driven to openspec-default without breaking existing configs through alias resolution

Confidence Score: 5/5

  • Safe to merge with minimal risk
  • All changes are well-contained refactorings that simplify code by removing interactive prompts. Unused imports properly cleaned up. Test fix prevents hanging without changing test behavior. New proposals are documentation-only and follow project conventions.
  • No files require special attention

Important Files Changed

Filename Overview
src/commands/artifact-workflow.ts Simplified config creation by removing interactive prompts, now creates default config with helpful comments
src/core/config-prompts.ts Removed all interactive prompt logic, simplified to template-based config generation with inline comments
vitest.setup.ts Added force exit in teardown to prevent test worker hanging

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as artifact-experimental-setup
    participant FS as FileSystem
    participant Config as config-prompts

    User->>CLI: Run openspec artifact-experimental-setup
    CLI->>CLI: Create .claude/skills and commands
    
    alt config.yaml exists
        CLI->>FS: Check for openspec/config.yaml
        FS-->>CLI: File exists
        CLI->>User: Skip config creation (already exists)
    else non-interactive mode
        CLI->>CLI: Check process.stdin.isTTY
        CLI->>User: Skip config prompts (CI/automation)
    else interactive mode
        CLI->>Config: serializeConfig({ schema: DEFAULT_SCHEMA })
        Config-->>CLI: YAML with default schema + comment templates
        CLI->>FS: Write openspec/config.yaml
        alt write success
            FS-->>CLI: Success
            CLI->>User: Config created with default schema
            CLI->>User: Show git commit suggestion
        else write failure
            FS-->>CLI: Error
            CLI->>User: Show error + manual fallback instructions
        end
    end
    
    CLI->>User: Show usage instructions
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 changed the title refactor(setup): simplify config creation + add change proposals docs: add napkin-changes proposal Jan 20, 2026
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