skills/openspec-development/tasks-md-validation-testing/SKILL.md
Setup and run comprehensive tests for OpenSpec tasks.md validation. Use when needing to verify validation behavior, create test environments, debug validation issues, or ensure validation works correctly.
npx skillsauth add atman-33/atman-workspace tasks-md-validation-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides a complete testing infrastructure for OpenSpec's tasks.md validation feature. It includes test file templates, automated setup scripts, and comprehensive test scenarios.
# 1. Setup test files
bash .claude/skills/tasks-md-validation-testing/scripts/setup-tests.sh
# 2. Build OpenSpec
pnpm run build
# 3. Run all tests
bash .claude/skills/tasks-md-validation-testing/scripts/run-tests.sh
# 4. Cleanup (optional)
bash .claude/skills/tasks-md-validation-testing/scripts/cleanup-tests.sh
The tasks.md validation feature ensures that OpenSpec changes include properly formatted implementation checklists. This skill provides a self-contained test environment with:
setup-tests.sh: Creates test changes from templates in assets/test-files/run-tests.sh: Executes all test scenarios and reports resultscleanup-tests.sh: Removes test changes from workspacetest-files/: Complete test change templates for 5 scenarios
proposal.md, specs/, and tasks.md (except test-missing-tasks)openspec/changes/The setup script copies bundled test templates to your workspace:
bash .claude/skills/tasks-md-validation-testing/scripts/setup-tests.sh
This creates 5 test changes in openspec/changes/:
test-tasks-validation - Valid referencetest-missing-tasks - Missing file testtest-no-checkboxes - Format error testtest-empty-tasks - Content error testtest-both-errors - Multiple errors testThe script will:
assets/test-files/Ensure OpenSpec is built before testing:
pnpm run build
Execute all test scenarios with automated verification:
bash .claude/skills/tasks-md-validation-testing/scripts/run-tests.sh
The test runner will:
Output includes:
Remove test files when done:
bash .claude/skills/tasks-md-validation-testing/scripts/cleanup-tests.sh
The cleanup script will:
Location: openspec/changes/test-tasks-validation/
File Content:
- [ ] Implement validation logic
- [x] Add test cases
- [ ] Update documentation
Expected Output:
✓ Change test-tasks-validation is valid
Location: openspec/changes/test-missing-tasks/
Setup: No tasks.md file exists
Expected Output:
✗ ERROR: Missing required file: tasks.md
Location: openspec/changes/test-no-checkboxes/
File Content:
- Implement validation logic
- Add test cases
Expected Output:
✗ ERROR: No checkboxed tasks found. Add tasks with [ ] or [x] checkboxes.
Location: openspec/changes/test-empty-tasks/
File Content:
- [x]
- [ ]
- [ ] Valid task
Expected Output:
✗ ERROR: Empty task description at line 1
✗ ERROR: Empty task description at line 2
Location: openspec/changes/test-both-errors/
Setup: Both files exist but have format errors
tasks.md: No checkboxes (only plain list items)specs/test-capability/spec.md: Requirement without Scenario blockExpected Output:
✗ ERROR: test-capability/spec.md: ADDED "Test requirement without scenario" must include at least one scenario
✗ ERROR: tasks.md: tasks.md must contain at least one checkboxed task
If you need to test specific scenarios not covered by the bundled templates:
# Create custom test change
mkdir -p openspec/changes/my-test/specs/test-capability
# Create files
echo "# Proposal" > openspec/changes/my-test/proposal.md
echo "# Spec" > openspec/changes/my-test/specs/test-capability/spec.md
echo "- [ ] Task" > openspec/changes/my-test/tasks.md
# Validate
./bin/openspec.js validate my-test
tasks.md must exist in the change directory- [ ], - [x], - [X]- [], * [ ], plain text- [ ] (empty) vs - [ ] Task (valid)// Checkbox detection (any checkbox)
/^[-*]\s+\[[xX\s]\]/
// Empty task detection (checkbox with no description)
/^[-*]\s+\[[xX\s]\]\s*$/
# Test each scenario individually
./bin/openspec.js validate test-tasks-validation
./bin/openspec.js validate test-missing-tasks
./bin/openspec.js validate test-no-checkboxes
./bin/openspec.js validate test-empty-tasks
./bin/openspec.js validate test-both-errors
# Get machine-readable JSON
./bin/openspec.js validate test-both-errors --json
# Pretty print with jq
./bin/openspec.js validate test-both-errors --json | jq .
# Extract validation issues
./bin/openspec.js validate test-both-errors --json | jq '.items[0].issues'
# Count errors
./bin/openspec.js validate test-both-errors --json | jq '.items[0].issues | length'
# Validate all changes
./bin/openspec.js validate --changes
# Validate with strict mode
./bin/openspec.js validate --changes --strict
# JSON output for all changes
./bin/openspec.js validate --changes --json
| Test Case | Exit Code | Error Count | Key Validation | |-----------|-----------|-------------|----------------| | test-tasks-validation | 0 | 0 | Valid format | | test-missing-tasks | 1 | 1 | File existence | | test-no-checkboxes | 1 | 1 | Checkbox presence | | test-empty-tasks | 1 | 2+ | Task descriptions | | test-both-errors | 1 | 2+ | Multiple files |
ls -la openspec/changes/test-*/
cat openspec/changes/test-empty-tasks/tasks.md
node -e "
const pattern = /^[-*]\s+\[[xX\s]\]/;
console.log(pattern.test('- [ ] Task')); // true
console.log(pattern.test('- [x] Task')); // true
console.log(pattern.test('- [] Task')); // false
"
For empty task errors, check reported line numbers match actual file:
grep -n "^\- \[[xX ]\]\s*$" openspec/changes/test-empty-tasks/tasks.md
Use test-tasks-validation as reference for correct format:
diff openspec/changes/test-tasks-validation/tasks.md openspec/changes/my-test/tasks.md
Cause: OpenSpec not built
Solution: Run pnpm run build
Cause: Setup script not run
Solution: Run bash .claude/skills/tasks-md-validation-testing/scripts/setup-tests.sh
Cause: Stale build after code changes
Solution: Run pnpm run build before testing
Cause: Permission issues or wrong directory Solution: Run from OpenSpec root, check file permissions
Cause: Validation errors sent to stderr
Solution: Use 2>&1 to merge streams: ./bin/openspec.js validate test --json 2>&1 | jq
- name: Setup validation tests
run: bash .claude/skills/tasks-md-validation-testing/scripts/setup-tests.sh
- name: Build OpenSpec
run: pnpm run build
- name: Run validation tests
run: bash .claude/skills/tasks-md-validation-testing/scripts/run-tests.sh
- name: Cleanup
if: always()
run: bash .claude/skills/tasks-md-validation-testing/scripts/cleanup-tests.sh
.claude/skills/tasks-md-validation-testing/
├── SKILL.md # This file
├── scripts/
│ ├── setup-tests.sh # Setup test environment
│ ├── run-tests.sh # Execute all tests
│ └── cleanup-tests.sh # Remove test files
└── assets/
└── test-files/ # Test templates
├── test-tasks-validation/
│ ├── proposal.md
│ ├── tasks.md
│ └── specs/test-capability/spec.md
├── test-missing-tasks/
│ ├── proposal.md
│ └── specs/test-capability/spec.md
├── test-no-checkboxes/
│ ├── proposal.md
│ ├── tasks.md
│ └── specs/test-capability/spec.md
├── test-empty-tasks/
│ ├── proposal.md
│ ├── tasks.md
│ └── specs/test-capability/spec.md
└── test-both-errors/
└── proposal.md
tools
Zenn記事のMarkdown校正を行うスキル。記事を読み、Zenn独自記法の正確性・見出し構造・コードブロック・リンク・画像・テーブル・埋め込み・メッセージ/アコーディオン記法をチェックし、改善提案を行う。ユーザーが「Zenn記事を校正して」「Zennの記法をチェックして」「記事をレビューして」「Markdown確認して」と依頼した際に使用する。
tools
Develop React applications for VS Code Webview surfaces. Use when working on the `webview-ui` package, creating features, components, or hooks for VS Code extensions. Includes project structure, coding guidelines, and testing instructions.
testing
Best practices for reliable terminal command execution and output capture. Use this skill when running shell commands, especially in environments like WSL where output might be truncated or lost, to ensure results are properly captured and inspected.
databases
Supabaseデータベースマイグレーションの準備を行うスキル。バックアップの作成と差分マイグレーションファイルの生成を実施します。ユーザーが「マイグレーションを準備」「バックアップと差分を作成」「マイグレーションファイルを生成」などのリクエストをした際に使用します。