feat(skills): add requirements-interview skill (grill-me pattern) for /spec#1812
Conversation
… wire into /spec Add `requirements-interview` skill implementing Pocock's grill-me pattern: adversarial design-tree traversal with a recommended answer per question, codebase-first lookup, and a structured PRD output. Wire it into the /spec command as step 2 so every spec starts with shared understanding before any classification, CVA, or critic pass runs. Closes the alignment-before-generation gap documented in issue #1798. Files: - .claude/skills/requirements-interview/SKILL.md (new, 105 lines, prompt-only) - .claude/skills/requirements-interview/tests/test_skill_contract.py (new, 10 tests) - .claude/commands/spec.md (insert step 2, renumber 3..9) - .agents/sessions/2026-04-27-session-1760-*.json (session log) Validation: skill_frontmatter PASS, skill_size PASS, markdownlint clean, 10/10 contract tests pass. Fixes #1798 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR Validation ReportCaution ❌ Status: FAIL Description Validation
PR Standards
QA Validation
|
Session Protocol Compliance ReportCaution ❌ Overall Verdict: CRITICAL_FAIL All session protocol requirements satisfied. What is Session Protocol?Session logs document agent work sessions and must comply with RFC 2119 requirements:
See Compliance Summary
Detailed Validation ResultsClick each session to see the complete validation report with specific requirement failures. 📄 sessions-2026-04-27-session-1760-1798-grill-me-requirements-interview=== Session Validation === [FAIL] Validation errors:
✨ Zero-Token ValidationThis validation uses deterministic script analysis instead of AI:
Powered by 📊 Run Details
Powered by Session Protocol Validator workflow |
Spec-to-Implementation ValidationTip ✅ Final Verdict: PASS What is Spec Validation?This validation ensures your implementation matches the specifications:
Validation Summary
Spec References
Requirements Traceability DetailsRequirements Coverage Matrix
Summary
Gaps
Implementation Completeness DetailsAcceptance Criteria ChecklistBased on Issue #1798, the acceptance criteria are:
Missing FunctionalityNone identified. All explicit requirements from Issue #1798 are addressed. Edge Cases Not Covered
Implementation Quality
Run Details
Powered by AI Spec Validator workflow |
There was a problem hiding this comment.
Code Review
This pull request introduces the requirements-interview skill, implementing an adversarial 'grill-me' pattern to elicit testable requirements before implementation. It updates the .claude/commands/spec.md process to incorporate this interview as a mandatory step and adds a contract test suite to validate the skill's structure and frontmatter. Review feedback focuses on improving the test implementation by utilizing existing internal validation scripts to parse frontmatter, define constants, and perform regex-based XML tag checks, thereby reducing external dependencies and preventing logic duplication.
AI Quality Gate ReviewTip ✅ Final Verdict: PASS WalkthroughThis PR was reviewed by six AI agents in parallel, analyzing different aspects of the changes:
Review Summary
💡 Quick Access: Click on individual agent jobs (e.g., "🔒 security Review", "🧪 qa Review") in the workflow run to see detailed findings and step summaries. Security Review DetailsNow I have reviewed all the changed files. Let me compile my security analysis. Security Review: PR #1812PR Type Classification
Findings
Analysis SummaryPROMPT Files (SKILL.md, spec.md)
CODE File (test_skill_contract.py)
CONFIG Files (JSON)
DOCS File (Serena memory)
RecommendationsNone required. The PR follows security best practices:
Verdict{
"verdict": "PASS",
"message": "No security vulnerabilities found. Skill uses least-privilege tool scope, no shell access, no secrets exposure.",
"agent": "security",
"timestamp": "2026-04-29T03:42:29.442Z",
"findings": []
}QA Review DetailsNow I have a complete picture of the PR. Let me produce my QA review verdict. QA Review: PR #1812PR TYPE: MIXED
Test Coverage Assessment
Quality Concerns
Regression Risk Assessment
Code Quality Verification
Pre-Executed Test Results
Fail-Safe Pattern Verification
Test-Implementation Alignment
Coverage: 10/10 acceptance criteria covered (100%) {
"verdict": "PASS",
"message": "New skill with comprehensive contract tests (10/10) and pytest suite (7362 passed); no blocking issues.",
"agent": "qa",
"timestamp": "2026-04-29T03:43:38.154Z",
"findings": [
{
"severity": "low",
"category": "code-quality",
"description": "Test imports private validator patterns (_NAME_PATTERN, _XML_TAG_PATTERN)",
"location": "test_skill_contract.py:22-28",
"recommendation": "Documented as deferred in Serena memory; track for follow-up refactor"
},
{
"severity": "low",
"category": "test-coverage",
"description": "DESCRIPTION_MAX=1024 differs from 200-char memory guideline for short descriptions",
"location": "test_skill_contract.py:34",
"recommendation": "Acceptable; validates against canonical validator maximum, not style preference"
}
]
}Analyst Review DetailsNow I have enough context to perform the analysis. Let me compile the findings. Analysis: PR #1812 - Requirements Interview Skill (grill-me pattern)Code Quality Score
Overall: 4.5/5 Impact Assessment
Findings
Recommendations
VerdictThe skill is well-structured, follows established patterns, and includes 10 contract tests. The The test constant duplication is a known trade-off documented in the Serena memory entry and PR notes. No architectural violations or blocking issues. {
"verdict": "PASS",
"message": "Clean skill implementation with comprehensive tests. Minor maintainability debt (test constant duplication) is tracked for follow-up.",
"agent": "analyst",
"timestamp": "2026-04-29T03:42:34.235Z",
"findings": [
{
"severity": "low",
"category": "maintainability",
"description": "Test file duplicates VALID_MODEL_ALIASES, _NAME_PATTERN, _XML_TAG_PATTERN constants from validator. Future drift risk if validator changes.",
"location": "tests/test_skill_contract.py:22-28",
"recommendation": "Future PR: promote validator private constants to public exports and import them in tests."
},
{
"severity": "low",
"category": "documentation",
"description": "Description length (289 chars) exceeds 200-char best practice from steering guidance, though under 1024-char hard limit.",
"location": "SKILL.md:4",
"recommendation": "Consider shortening description in future iteration."
},
{
"severity": "low",
"category": "consistency",
"description": "Session log episode outcome marked 'failure' but metrics show 8 commits and all validations passed.",
"location": "episode-2026-04-27-session-1761.json:5",
"recommendation": "Fix episode outcome to 'success'."
},
{
"severity": "low",
"category": "documentation",
"description": "Analyst-agent integration deferred. Documented in PR notes and Serena memory.",
"location": "PR description",
"recommendation": "Track in separate issue per PR notes."
}
]
}Architect Review DetailsNow I have enough context to perform the architectural review. Architect Review: PR #1812 — requirements-interview skillDesign Quality Assessment
Overall Design Score: 4.6/5 Architectural Concerns
Breaking Change Assessment
Technical Debt Analysis
ADR Assessment
Recommendations
Verdict{
"verdict": "PASS",
"message": "Well-structured skill with clear boundaries. Two low-severity findings are non-blocking.",
"agent": "architect",
"timestamp": "2026-04-29T03:42:25.869Z",
"findings": [
{
"severity": "low",
"category": "design-pattern",
"description": "Frontmatter description exceeds 200-char steering guideline (340 chars)",
"location": ".claude/skills/requirements-interview/SKILL.md:4",
"recommendation": "Shorten to under 200 chars per .agents/steering/claude-skills.md"
},
{
"severity": "low",
"category": "boundaries",
"description": "Serena memory file bundled with skill PR",
"location": ".serena/memories/skills/skills-requirements-interview-pattern.md",
"recommendation": "Move memory changes to separate PR per repository guidance"
}
]
}DevOps Review DetailsLet me check the local repository state and files mentioned in the PR description. Based on my review, I now have a complete picture of this PR. Let me compile the DevOps review. DevOps Review: PR #1812PR Scope Detection
Assessment: This PR contains no workflow files, no shell scripts, no GitHub Actions changes. It is primarily a skill addition (documentation + tests) with a marketplace count bump. Pipeline Impact Assessment
CI/CD Quality Checks
Findings
Template Assessment
Automation Opportunities
This PR follows existing patterns. The skill tests use the existing pytest infrastructure. The marketplace count validation script ( Recommendations
Verdict{
"verdict": "PASS",
"message": "DOCS/CONFIG-only PR with no CI/CD, workflow, or infrastructure changes. New pytest tests integrate with existing infrastructure.",
"agent": "devops",
"timestamp": "2026-04-29T03:42:26.166Z",
"findings": [
{
"severity": "low",
"category": "automation",
"description": "Marketplace skill count bumped from 65 to 66",
"location": ".claude-plugin/marketplace.json:21",
"recommendation": "Verified correct; count matches skill directory enumeration"
}
]
}Roadmap Review DetailsI have reviewed the key files. Now I'll provide the strategic alignment assessment. Roadmap Review: PR #1812Strategic Alignment Assessment
Feature Completeness
Impact Analysis
RICE Score (Estimated)
KANO ClassificationMust-Be (becoming): Requirements validation is expected in mature agent systems. Absence creates dissatisfaction when implementation diverges from intent. This skill converts what was an implicit expectation into an explicit gate. Concerns
Recommendations
Verdict{
"verdict": "PASS",
"message": "High-impact requirements-interview skill closes alignment-before-generation gap with research-backed methodology and minimal implementation cost",
"agent": "roadmap",
"timestamp": "2026-04-29T03:42:30.789Z",
"findings": [
{
"severity": "low",
"category": "scope",
"description": "Serena memory file included in skill PR",
"location": ".serena/memories/skills/skills-requirements-interview-pattern.md",
"recommendation": "Repository convention prefers memory changes in separate PRs. Acceptable for this PR but note for future."
},
{
"severity": "low",
"category": "documentation",
"description": "Deferred work items properly tracked",
"location": "PR description Notes section",
"recommendation": "Create follow-up issue for analyst-agent auto-invocation to complete #1798 Option C."
}
]
}Run Details
Powered by AI Quality Gate workflow |
Review Triage RequiredNote Priority: NORMAL - Human approval required before bot responds Review Summary
Next Steps
Powered by PR Maintenance workflow - Add triage:approved label |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR introduces a mandatory adversarial requirements-interview step into the Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Analyst as Analyst Agent<br/>(spec command)
participant Interview as requirements-interview<br/>skill
participant Codebase as Codebase
participant SpecGen as spec-generator<br/>stage
User->>Analyst: /spec [feature request]
Analyst->>Interview: invoke (grill-me pattern)
Interview->>Interview: restate & confirm problem
Interview->>Interview: construct design tree
loop for each branch (depth-first)
Interview->>Interview: walk to leaf decision
Interview->>Codebase: grep/explore for answer
alt answer found in codebase
Codebase-->>Interview: evidence
Interview->>Interview: recommend answer from code
else unknown answer
Interview->>User: ask decision question
User-->>Interview: provide answer
end
Interview->>Interview: record (CONFIRMED|OVERRIDDEN|DEFERRED|OUT_OF_SCOPE)
end
Interview->>Interview: finalize PRD (user stories,<br/>data model, integrations,<br/>failure modes, EARS criteria)
Interview-->>SpecGen: structured PRD (unchanged)
SpecGen->>SpecGen: compute complexity tier<br/>(driven by PRD)
SpecGen->>SpecGen: conditional CVA analysis
SpecGen->>SpecGen: formalize REQ/DESIGN/TASK<br/>artifacts
SpecGen-->>Analyst: durable artifacts
Analyst-->>User: spec output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.claude/skills/requirements-interview/tests/test_skill_contract.py (2)
31-41: Avoid duplicating the model allowlist in tests.
VALID_MODELSis duplicated here and in the validation script path referenced by this file. This will drift. Pull the allowlist from one shared source used by both validators and tests.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/skills/requirements-interview/tests/test_skill_contract.py around lines 31 - 41, Replace the duplicated VALID_MODELS set in the test with a single import from the shared canonical allowlist used by the validator: remove the local VALID_MODELS declaration and import the shared constant (e.g., VALID_MODELS or MODEL_ALLOWLIST) from the validator module referenced by this test, then use that imported symbol in assertions (wrap/convert to a set if the shared value is a list). Ensure the test still treats the imported allowlist as the same type (set/list) expected by the assertions so no other changes are needed.
1-133: Move skill contract tests to the central CI test tree.Keep skill directories execution-focused and relocate this test to
.github/tests/skills/requirements-interview/to match repo test layout conventions.As per coding guidelines: "Tests should be moved from skill directories to
.github/tests/skills/{skill-name}/. Keep skill directories focused on execution-time content only."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/skills/requirements-interview/tests/test_skill_contract.py around lines 1 - 133, Move the test module out of the skill directory into the central CI tree and update the SKILL_PATH constant so the tests still locate the skill’s SKILL.md from the new test location: relocate the file to .github/tests/skills/requirements-interview/, then edit SKILL_PATH (the module-level symbol) so it points at the original skill's SKILL.md (use a correct relative Path from the new test file to the skill directory), leaving all test functions (e.g. test_skill_file_exists, test_frontmatter_required_fields, test_skill_within_size_limit) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/spec.md:
- Around line 16-24: The interview Skill(skill="requirements-interview") must
emit and persist the full structured PRD (including user stories, data model,
integrations, failure modes, security, and observability) and downstream steps
must consume that full schema instead of only acceptance criteria; update the
orchestration so Task(subagent_type="analyst") and subsequent steps (including
Skill(skill="cva-analysis") and the acceptance-criteria writer) accept the PRD
object as input, preserve its fields, and explicitly reference/pass the
interview schema when calling step 3 (complexity tier classification), step 4
(codebase search), step 5 (cva-analysis), and step 6 (write requirements) so no
interview decisions are dropped.
In @.claude/skills/requirements-interview/SKILL.md:
- Around line 1-13: The frontmatter for the skill (fields like name:
requirements-interview, model: claude-sonnet-4-6, user-invocable: true) is
missing an allowed-tools declaration; add an allowed-tools YAML array to the
top-level frontmatter that explicitly lists only the minimal tool IDs this skill
requires (or an empty list if it needs no tools) so the MCP tool scope is
constrained for this user-invocable skill, and keep the rest of the frontmatter
unchanged.
---
Nitpick comments:
In @.claude/skills/requirements-interview/tests/test_skill_contract.py:
- Around line 31-41: Replace the duplicated VALID_MODELS set in the test with a
single import from the shared canonical allowlist used by the validator: remove
the local VALID_MODELS declaration and import the shared constant (e.g.,
VALID_MODELS or MODEL_ALLOWLIST) from the validator module referenced by this
test, then use that imported symbol in assertions (wrap/convert to a set if the
shared value is a list). Ensure the test still treats the imported allowlist as
the same type (set/list) expected by the assertions so no other changes are
needed.
- Around line 1-133: Move the test module out of the skill directory into the
central CI tree and update the SKILL_PATH constant so the tests still locate the
skill’s SKILL.md from the new test location: relocate the file to
.github/tests/skills/requirements-interview/, then edit SKILL_PATH (the
module-level symbol) so it points at the original skill's SKILL.md (use a
correct relative Path from the new test file to the skill directory), leaving
all test functions (e.g. test_skill_file_exists,
test_frontmatter_required_fields, test_skill_within_size_limit) unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 9f5b6c3d-6f40-4ee9-a61d-17de15618514
⛔ Files ignored due to path filters (1)
.agents/sessions/2026-04-27-session-1760-1798-grill-me-requirements-interview.jsonis excluded by!.agents/sessions/**
📒 Files selected for processing (3)
.claude/commands/spec.md.claude/skills/requirements-interview/SKILL.md.claude/skills/requirements-interview/tests/test_skill_contract.py
Pre-commit SkillForge validator at .claude/skills/SkillForge/scripts/validate-skill.py flagged three structural issues introduced by f6ae8c8: 1. Frontmatter "triggers:" key not in ALLOWED_PROPERTIES (only allowed: agent, allowed-tools, context, description, hooks, license, metadata, model, name, user-invocable, version). Drop the redundant frontmatter field; the markdown "## Triggers" section already provides the trigger phrases the validator parses (validate_triggers regex). 2. Section heading "## Method" must be "## Process" or "### Phase N" for validate_process to pass. 3. Section heading "## Quality Gates" must be "## Verification" / "## Success Criteria" / "## Checklist" for validate_verification to pass; checkboxes added so verification.checkboxes warning clears. Updated test_skill_contract.py REQUIRED_SECTIONS to match the new section names. 10/10 contract tests still pass. Validator now reports 18/19 checks pass (warning only: optional "Extension Points" section). No behavior change. Refs #1798 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… steps Previously /spec step 6 narrowed output to "testable acceptance criteria", dropping every other PRD section that step 2's requirements-interview skill emitted: user stories, data model, integrations, failure modes, security, observability, out-of-scope, deferred, open questions. Steps 3-5 also treated input as a raw problem statement, not as the structured PRD. Behavior preserved: no new file artifacts, no new agent invocations. This commit only routes the existing PRD through downstream steps and expands the Output section to mirror the PRD schema. SKILL.md handoff section reworded to match current /spec behavior (inline carry only). spec-generator integration follows in a separate commit per the refactor-then-feature discipline in .claude/rules/refactoring.md. Refs #1798 Addresses CodeRabbit comment on .claude/commands/spec.md (PR #1812) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…facts
/spec step 6 now invokes Task(subagent_type=spec-generator) with the full
PRD from step 2 plus the complexity tier from step 3 and CVA summary from
step 5. The spec-generator agent (.claude/agents/spec-generator.md, model:
sonnet) writes:
- .agents/specs/requirements/REQ-NNN-{slug}.md (EARS, one per requirement)
- .agents/specs/design/DESIGN-NNN-{slug}.md
- .agents/specs/tasks/TASK-NNN-{slug}.md
This realizes Issue #1798 Option C end-to-end: the requirements-interview
skill produces the structured PRD, /spec carries every section through
downstream steps (per the prior refactor commit), and the spec-generator
agent formalizes the result as durable on-disk artifacts. The full PRD is
passed in unchanged so the agent does not re-ask questions the interview
already answered.
requirements-interview SKILL.md handoff section updated to match the new
behavior: the skill produces the structured input the formalizer needs,
and the formalizer writes the REQ/DESIGN/TASK files.
Behavior change: /spec runs now produce on-disk artifacts in
.agents/specs/. Pre-existing inline-AC summary still surfaces via the
Output section. Callers depending on the "no files written" contract
should either invoke requirements-interview directly (skill is reusable)
or pin their flow before this commit.
Refs #1798
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…st memory - Update session log with workLog entries for the review pass and the three follow-up commits (5924cff fix, f036ad5 refactor, d6284f8 feat). - Set sessionEnd.serenaMemoryUpdated.Complete to true; evidence cites the new memory file. Closes the MUST violation flagged by the Session Protocol Validator on PR #1812. - Set endingCommit to d6284f8. - nextSteps now lists: push branch, reply to bot comments, open follow-up issues for analyst-agent integration and test-file refactor. - Write .serena/memories/skills/skills-requirements-interview-pattern.md with end-to-end /spec flow, SkillForge validator gotchas, and deferred-work pointers. Future sessions get the full picture without replaying PR #1812. Naming follows ADR-017 (skills-{description}, matching the skills/ subdirectory). - Episode .agents/memory/episodes/episode-2026-04-27-session-1760.json auto-extracted by the pre-commit hook from the session log. Refs #1798 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… (62 → 63) Adding the requirements-interview skill in f6ae8c8 should have bumped the project-toolkit description from 62 to 63 reusable skills. Pre-push test_validate_marketplace_counts.py::test_current_counts_are_valid caught the drift on /ship. Validator (build/scripts/validate_marketplace_counts.py) counts immediate subdirectories of .claude/skills/ that contain a SKILL.md. After this PR's addition, that count is 63. Refs #1798 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.claude/skills/requirements-interview/SKILL.md (1)
1-8:⚠️ Potential issue | 🟠 MajorAdd
allowed-toolsto this user-invocable skill.Line 7 sets
user-invocable: true, but there is no tool scope in frontmatter. Keep tool access explicit and minimal.Suggested patch
--- name: requirements-interview version: 0.1.0 description: Adversarial requirements interview that walks the design tree to elicit testable requirements before any code is written. Implements the grill-me pattern - ask relentlessly, recommend an answer for every question, and resolve dependencies between decisions one branch at a time. Skip any question the codebase can already answer. model: claude-sonnet-4-6 license: MIT user-invocable: true +allowed-tools: Read, Glob, Grep, Write ---As per coding guidelines: "Declare
allowed-toolsin skill definition files to scope MCP tool visibility to the skill context."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/skills/requirements-interview/SKILL.md around lines 1 - 8, The frontmatter for the skill "requirements-interview" declares user-invocable: true but omits the required allowed-tools key; add an explicit allowed-tools entry in the frontmatter (e.g., allowed-tools: [] or list the minimal MCP tools needed) directly below the existing fields so that the skill's metadata includes allowed-tools alongside name, version, description, model and user-invocable; ensure the key name is exactly allowed-tools and scope is as minimal as possible for this skill.
🧹 Nitpick comments (1)
.claude/skills/requirements-interview/tests/test_skill_contract.py (1)
31-41: Stop duplicating the model allowlist in test code.This set can drift from
scripts/validation/skill_frontmatter.py. Use one shared source so contract tests and validator cannot disagree.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/skills/requirements-interview/tests/test_skill_contract.py around lines 31 - 41, The test duplicates the model allowlist via the local VALID_MODELS constant; instead import and use the canonical allowlist from the validator module so they can't drift apart. Replace the local VALID_MODELS in test_skill_contract.py with an import of the authoritative symbol exported by the skill frontmatter validator (e.g., the allowlist constant or accessor such as ALLOWED_MODELS or get_allowed_models in the skill_frontmatter module) and reference that imported name in the test assertions so the test and the validator share one source of truth.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/spec.md:
- Around line 17-24: The CVA skip path is inconsistent: when Tier 1-2
single-use-case allows skipping CVA (step 3) you must still provide a stable
input to Task(subagent_type="spec-generator") in step 6 which currently expects
output from Skill(skill="cva-analysis"); update the flow to either (a) produce
an explicit empty/placeholder CVA object (e.g., cva_summary = {skipped: true,
reason: "Tier 1-2 single-use-case"}) whenever the skip branch is taken, or (b)
add a boolean flag (e.g., cva_required=false) alongside existing PRD payload so
Task(subagent_type="spec-generator") can handle missing CVA gracefully; update
the code paths that invoke Skill(skill="cva-analysis") and the call to the
spec-generator to pass this placeholder/flag and ensure
Task(subagent_type="spec-generator") checks for cva_summary before consuming it.
---
Duplicate comments:
In @.claude/skills/requirements-interview/SKILL.md:
- Around line 1-8: The frontmatter for the skill "requirements-interview"
declares user-invocable: true but omits the required allowed-tools key; add an
explicit allowed-tools entry in the frontmatter (e.g., allowed-tools: [] or list
the minimal MCP tools needed) directly below the existing fields so that the
skill's metadata includes allowed-tools alongside name, version, description,
model and user-invocable; ensure the key name is exactly allowed-tools and scope
is as minimal as possible for this skill.
---
Nitpick comments:
In @.claude/skills/requirements-interview/tests/test_skill_contract.py:
- Around line 31-41: The test duplicates the model allowlist via the local
VALID_MODELS constant; instead import and use the canonical allowlist from the
validator module so they can't drift apart. Replace the local VALID_MODELS in
test_skill_contract.py with an import of the authoritative symbol exported by
the skill frontmatter validator (e.g., the allowlist constant or accessor such
as ALLOWED_MODELS or get_allowed_models in the skill_frontmatter module) and
reference that imported name in the test assertions so the test and the
validator share one source of truth.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 882e0c19-14dc-4df5-94d6-85aa2ce1226e
⛔ Files ignored due to path filters (2)
.agents/sessions/2026-04-27-session-1760-1798-grill-me-requirements-interview.jsonis excluded by!.agents/sessions/**.serena/memories/skills/skills-requirements-interview-pattern.mdis excluded by!.serena/memories/**
📒 Files selected for processing (5)
.agents/memory/episodes/episode-2026-04-27-session-1760.json.claude-plugin/marketplace.json.claude/commands/spec.md.claude/skills/requirements-interview/SKILL.md.claude/skills/requirements-interview/tests/test_skill_contract.py
✅ Files skipped from review due to trivial changes (2)
- .claude-plugin/marketplace.json
- .agents/memory/episodes/episode-2026-04-27-session-1760.json
…terview contract tests Replace python-frontmatter with parse_frontmatter from scripts/validation/skill_frontmatter.py and import VALID_MODEL_ALIASES, DATED_SNAPSHOT_PATTERN, _NAME_PATTERN, and _XML_TAG_PATTERN from the same module. Eliminates a third-party dependency in the test path, removes a hardcoded VALID_MODELS set that was already drifting (missing claude-3-7-sonnet-latest), and ensures the contract test cannot disagree with production validation logic. Refs #1798 Co-Authored-By: Claude <noreply@anthropic.com>
…st-privilege scope Add allowed-tools (Read, Glob, Grep, Write) to the user-invocable skill so MCP tool visibility is constrained to what the interview process actually needs: reading source files and ADRs, globbing/grepping the codebase before asking questions, and writing the interview transcript to .agents/specs/interviews/. Matches the convention used by sibling skills (analyze, SkillForge) and the parent /spec command. Refs #1798 Co-Authored-By: Claude <noreply@anthropic.com>
Step 3 in /spec instructs Tier 1-2 single-use-case work to skip CVA, but step 5 unconditionally invoked Skill(skill="cva-analysis") and step 6 expected its output. That left the spec-generator with a missing input on the skip path. Reword step 5 so the CVA invocation is gated on tier (and multi-use-case status) and otherwise sets an explicit "CVA summary: N/A (single-use-case Tier 1-2)" placeholder. Step 6 carries this placeholder forward so the spec-generator always receives a stable PRD payload. Refs #1798 Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.claude/skills/requirements-interview/tests/test_skill_contract.py (1)
1-13: Move this contract test out of the skill directory.This file lives under
.claude/skills/.../tests/, but repository rules keep skill directories execution-only and place CI tests under.github/tests/skills/{skill-name}/.As per coding guidelines,
**/.claude/skills/**/test?(s)/**: Tests should be moved from skill directories to.github/tests/skills/{skill-name}/.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/skills/requirements-interview/tests/test_skill_contract.py around lines 1 - 13, The test module test_skill_contract.py currently lives inside the skill directory and must be relocated to the repository's CI test area for skills; move the entire file out of the .claude/skills tree into the central CI tests folder for skills, update any import or relative references if necessary, and ensure CI/test discovery still finds it (rename paths or package references so the module import name remains valid); after moving, remove the old file from the skill directory and run the test suite to confirm no import or path breaks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/requirements-interview/tests/test_skill_contract.py:
- Around line 49-50: The fixture function skill_text currently reads SKILL_PATH
directly which can raise FileNotFoundError before the test that asserts
existence runs; update skill_text to explicitly check SKILL_PATH.exists() (or
similar) and assert the file exists with a clear message before calling
SKILL_PATH.read_text(encoding="utf-8"), so failures are deterministic and point
to the missing SKILL file.
---
Nitpick comments:
In @.claude/skills/requirements-interview/tests/test_skill_contract.py:
- Around line 1-13: The test module test_skill_contract.py currently lives
inside the skill directory and must be relocated to the repository's CI test
area for skills; move the entire file out of the .claude/skills tree into the
central CI tests folder for skills, update any import or relative references if
necessary, and ensure CI/test discovery still finds it (rename paths or package
references so the module import name remains valid); after moving, remove the
old file from the skill directory and run the test suite to confirm no import or
path breaks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: eab630af-b5b4-4493-b203-3ee4cac38563
📒 Files selected for processing (3)
.claude/commands/spec.md.claude/skills/requirements-interview/SKILL.md.claude/skills/requirements-interview/tests/test_skill_contract.py
🚧 Files skipped from review as they are similar to previous changes (1)
- .claude/skills/requirements-interview/SKILL.md
…ce check Adds an assertion in the module-scoped skill_text fixture so any fixture-using test surfaces a deterministic, actionable error message when SKILL.md is missing, instead of the implicit FileNotFoundError that surfaces with a less obvious traceback. Test ordering already runs test_skill_file_exists first, so this is defensive only. Refs #1798 Co-Authored-By: Claude <noreply@anthropic.com>
Pull Request
Summary
Adds
requirements-interviewskill (Matt Pocock's grill-me pattern) and wires it through/specend-to-end. The skill walks the design tree adversarially, recommends an answer per question, greps the codebase before asking the user, and emits a structured PRD./specnow carries every PRD section through downstream steps and hands the result tospec-generatorfor durable REQ-NNN/DESIGN-NNN/TASK-NNN artifacts in.agents/specs/.Closes the alignment-before-generation gap documented in #1798. JetBrains ICSE 2026 and Faros 2026 both quantify the cost of skipping alignment (>50% review/edit time, +200% review time, +242% incidents per PR). This skill is the forcing function.
Specification References
Implements Issue #1798 Option C in spirit (skill is reusable + wired into
/specend-to-end). Direct analyst-agent invocation deferred to a follow-up issue (the/specintegration covers the primary alignment goal).Changes
.claude/skills/requirements-interview/SKILL.md(113 lines, prompt-only). Frontmatter declaresname,version,model,license,user-invocable, and least-privilegeallowed-tools. Defines the 7-branch checklist (user stories, data model, integrations, failure modes, security, observability, scope), question discipline (numbered, recommended-answer-required, codebase-first), and## Processand## Verificationsections aligned to the SkillForge validator schema..claude/skills/requirements-interview/tests/test_skill_contract.py. 10 contract tests imported from the canonical validator (no duplicated constants, no external dependency, regex-based XML check)..claude/commands/spec.md. Step 2 invokes the skill before complexity classification. Steps 3-5 carry the PRD forward and consume specific sections. Step 5 makes CVA conditional on tier and use-case count. Step 6 invokesTask(subagent_type="spec-generator")with the full PRD plus tier and CVA summary. Output section mirrors the PRD schema (12 sections instead of 5)..claude-plugin/marketplace.json. Bumpedproject-toolkitreusable-skill count to 66..agents/sessions/2026-04-27-session-1761-1798-grill-me-requirements-interview.json. Session log. Renumbered 1760 → 1761 to resolve an episode-file collision with main's session-1760..agents/memory/episodes/episode-2026-04-27-session-1761.json(auto-extracted from the session log)..serena/memories/skills/skills-requirements-interview-pattern.md. Captures the skill design, end-to-end/specflow, validator gotchas, test-contract sync rule, and deferred-work pointers.Type of Change
/specstep 6 to carry the PRD schema (separated from the new behavior into its own commit)Testing
Agent Review
Security Review
allowed-toolsdeclared for least-privilege scopeOther Agent Reviews
/review(5 specialists + adversarial Codex pass) on the original commitChecklist
/review+/pr-review)skills/)Related Issues
Closes #1798
Test Plan
Pre-push hook summary: 11 PASS, 1 WARN (PR size), 0 FAIL.
Notes
Deferred follow-ups (out of PR scope, tracked separately):
🤖 Generated with Claude Code