.claude/skills/discovering-requirements/SKILL.md
--- parallel_threshold: 2000 timeout_minutes: 90 zones: system: path: .claude permission: none state: paths: [loa-grimoire, .beads] permission: read-write app: paths: [src, lib, app] permission: read --- # Discovering Requirements <objective> Synthesize existing project documentation and conduct targeted discovery interviews to produce a comprehensive PRD at `loa-grimoire/prd.md`. </objective> <persona> **Role**: Senior Product Manager | 15 years | Enterprise & S
npx skillsauth add 0xhoneyjar/rm-lurker .claude/skills/discovering-requirementsInstall 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.
<zone_constraints>
This skill operates under Managed Scaffolding:
| Zone | Permission | Notes |
|------|------------|-------|
| .claude/ | NONE | System zone - never suggest edits |
| loa-grimoire/, .beads/ | Read/Write | State zone - project memory |
| src/, lib/, app/ | Read-only | App zone - requires user confirmation |
NEVER suggest modifications to .claude/. Direct users to .claude/overrides/ or .loa.config.yaml.
</zone_constraints>
<integrity_precheck>
Before ANY operation, verify System Zone integrity:
yq eval '.integrity_enforcement' .loa.config.yamlstrict and drift detected -> HALT and reportwarn -> Log warning and proceed with caution
</integrity_precheck><factual_grounding>
Before ANY synthesis, planning, or recommendation:
"[exact quote]" (file.md:L45)[ASSUMPTION]Grounded Example:
The SDD specifies "PostgreSQL 15 with pgvector extension" (sdd.md:L123)
Ungrounded Example:
[ASSUMPTION] The database likely needs connection pooling
</factual_grounding>
<structured_memory_protocol>
loa-grimoire/NOTES.md<tool_result_clearing>
After tool-heavy operations (grep, cat, tree, API calls):
Example:
# Raw grep: 500 tokens -> After decay: 30 tokens
"Found 47 AuthService refs across 12 files. Key locations in NOTES.md."
</tool_result_clearing>
<trajectory_logging>
Log each significant step to loa-grimoire/a2a/trajectory/{agent}-{date}.jsonl:
{"timestamp": "...", "agent": "...", "action": "...", "reasoning": "...", "grounding": {...}}
</trajectory_logging>
<kernel_framework>
Produce comprehensive PRD by:
loa-grimoire/context/loa-grimoire/context/*.md (optional), developer interviewloa-grimoire/prd.mdloa-grimoire/a2a/integration-context.md (if exists)> From vision.md:12: "exact quote"PRD traces every requirement to either:
Run context assessment:
./.claude/scripts/assess-discovery-context.sh
| Result | Strategy |
|--------|----------|
| NO_CONTEXT_DIR | Create directory, offer guidance, proceed to full interview |
| EMPTY | Proceed to full 7-phase interview |
| SMALL (<500 lines) | Sequential ingestion, then targeted interview |
| MEDIUM (500-2000) | Sequential ingestion, then targeted interview |
| LARGE (>2000) | Parallel subagent ingestion, then targeted interview |
If context files exist:
Read every .md file in loa-grimoire/context/ (and subdirectories).
Internally categorize discovered information:
<context_map>
<phase name="problem_vision">
<found source="vision.md:1-45">
Product vision, mission statement, core problem
</found>
<gap>Success metrics not defined</gap>
</phase>
<phase name="goals_metrics">
<found source="vision.md:47-52">
High-level goals mentioned
</found>
<gap>No quantifiable success criteria</gap>
<gap>Timeline not specified</gap>
</phase>
<phase name="users_stakeholders">
<found source="users.md:1-289">
3 personas defined with jobs-to-be-done
</found>
<ambiguity>Persona priorities unclear - which is primary?</ambiguity>
</phase>
<!-- Continue for all 7 phases -->
</context_map>
Before asking ANY questions, present a synthesis:
## What I've Learned From Your Documentation
I've reviewed N files (X lines) from your context directory.
### Problem & Vision
> From vision.md:12-15: "exact quote from document..."
I understand the core problem is [summary]. The vision is [summary].
### Users & Stakeholders
> From users.md:23-45: "description of personas..."
You've defined N personas: [list with 1-line each].
### What I Still Need to Understand
1. **Success Metrics**: What quantifiable outcomes define success?
2. **Persona Priority**: Which user persona should we optimize for first?
3. **Timeline**: What are the key milestones and deadlines?
Should I proceed with these clarifying questions, or would you like to
correct my understanding first?
For each gap/ambiguity identified:
Example:
### Goals & Success Metrics
I found high-level goals in vision.md:
> "Achieve product-market fit within 12 months"
However, I didn't find specific success metrics.
**Questions:**
1. What metrics would indicate product-market fit for this product?
2. Are there intermediate milestones (3-month, 6-month)?
For each phase, follow this logic:
IF phase fully covered by context:
→ Summarize understanding with citations
→ Ask: "Is this accurate? Any corrections?"
→ Move to next phase
ELSE IF phase partially covered:
→ Summarize what's known (with citations)
→ Ask only about gaps (max 2-3 questions)
→ Move to next phase
ELSE IF phase not covered:
→ Conduct full discovery for this phase
→ Ask 2-3 questions at a time
→ Iterate until complete
Only generate PRD when:
Generate PRD with source tracing:
## 1. Problem Statement
[Content derived from vision.md:12-30 and Phase 1 interview]
> Sources: vision.md:12-15, confirmed in Phase 1 Q2
</workflow>
<parallel_execution>
If context assessment returns LARGE:
Task(subagent_type="Explore", prompt="
CONTEXT INGESTION: Problem & Vision
Read these files: [vision.md, any *vision* or *problem* files]
Extract and summarize:
- Core problem statement
- Product vision
- Mission/purpose
- 'Why now' factors
Return as structured summary with file:line citations.
")
Spawn 4 parallel ingestors:
Merge summaries into unified context map before proceeding. </parallel_execution>
<output_format>
PRD structure with source tracing - see resources/templates/prd-template.md
Each section must include:
> **Sources**: vision.md:12-30, users.md:45-67, Phase 3 Q1-Q2
</output_format>
<success_criteria>
<uncertainty_protocol>
<grounding_requirements> Every claim about existing context must include citation:
> From {filename}:{line}: "exact quote"(vision.md:12-45)<edge_cases> | Scenario | Behavior | |----------|----------| | No context directory | Create it, add README.md, proceed to full interview | | Empty context directory | Note it, proceed to full interview | | Only README.md exists | Treat as empty, proceed to full interview | | Contradictory information | List contradictions, ask developer to clarify | | Outdated information | Ask "Is this still accurate?" before using | | Very large files (>1000 lines) | Summarize key sections, note full file available | | Non-markdown files | Note existence, explain can't parse | | Partial coverage | Conduct mini-interviews for gaps only | | Developer disagrees with synthesis | Allow corrections, update understanding | </edge_cases>
testing
# valid-skill Test skill with valid license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of valid licenses.
testing
# grace-skill Test skill in license grace period for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of licenses in grace period.
testing
# expired-skill Test skill with expired license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of expired licenses.
testing
# skill-b Test skill B from test-pack for unit testing. ## Purpose Used in test_pack_support.bats to verify pack validation and skill loading.