SP 02 RESEARCH
# Stage 2 Prompt: Research and Pre-investigation
> Spec-Contract v5.0 | Cycle: Initial
> Stage Prompt ID: SP-02
---
## CONTEXT
- **Current Location:** Initial Cycle > Stage 2
- **Previous Stage:** Stage 1 Project Foundation Setup (Outputs: CLAUDE.md, Project_Requirement.md, Tech_Stack_Analysis.md, conventions/)
- **Next Stage:** Stage 3 Specification Document Writing
- **Product Mode:** Check execution determination in `00_STAGE_SKIP_DECISION.md` from Stage 0. May be skipped or partially executed
This Stage performs in-depth research on the confirmed technology stack. The principle was "human understands first, then synchronizes to AI" in v4.0; in v5.0, it transitions to a structure where the Agent autonomously performs web searches + official documentation analysis.
---
## OBJECTIVE
Establish the foundation for Stage 3 design by conducting official documentation research on confirmed technology stack, identifying technical constraints, and collecting reference patterns.
**Success Criteria:**
1. `Tech_Stack_Official_Docs_Research.md` summarizes latest recommendations, API changes, known issues by technology
2. `Tech_Constraints_and_Dependencies.md` systematically organizes constraints numbered from C-01 (including license risks)
3. `Reference_Patterns.md` includes patterns (P-xx) and anti-patterns (AP-xx) with code examples
4. `conventions/domain-model.md` describes domain entities, relationships, and state machines
---
## CONSTRAINTS
**MUST DO:**
- [ ] Activity 2-1: Investigate official documentation for each technology stack via web search. Collect latest version recommendations, Breaking Changes, migration guides
- [ ] Activity 2-2: Systematize technical constraints (free tier limits, compatibility, licenses, deployment constraints) with C-xx numbering. Include license risk classification (🔴 High/🟡 Medium/🟢 Low)
- [ ] Activity 2-3: Collect verified implementation patterns numbered P-xx, anti-patterns numbered AP-xx. Include code snippets (TypeScript/relevant language) for each pattern
- [ ] Activity 2-4: Draft domain model (ER, state machines, RBAC, etc.) from requirements + technology stack
- [ ] Reference_Patterns.md is ♻️ Reusable grade — write as generic patterns, not project-specific code
- [ ] Tech_Stack_Official_Docs_Research.md is ♻️ Reusable grade — structure sections so they're separable by technology
**MUST NOT DO:**
- [ ] Do not present unofficial blogs or unverified sources as official recommendations
- [ ] Do not copy code when collecting patterns; describe pattern structure and principles
- [ ] Do not make Stage 3 design decisions (architecture, UC definitions) in this Stage
**SCOPE:**
- Technology research + constraint identification + pattern collection + domain model draft only
- Architecture decisions, UC definitions, Phase decomposition outside this Stage scope
---
## INPUT ARTIFACTS
| ID | File Path | Reference Content |
|----|----------|----------|
| A-010 | `docs/Project_Requirement.md` | Project purpose, core features → derive domain model |
| A-011 | `docs/Tech_Stack_Analysis.md` | Confirmed technology stack → research targets |
| A-023 | `CLAUDE.md` | Hard boundaries → verify prohibited technologies |
---
## OUTPUT ARTIFACTS
| ID | File Path | Format | Grade | Description |
|----|----------|--------|:----:|------|
| A-030 | `docs/Tech_Stack_Official_Docs_Research.md` | 📄 MD | ♻️ | Official documentation summary by technology + reference URLs |
| A-031 | `docs/Tech_Constraints_and_Dependencies.md` | 📄 MD | 🏛️ | C-xx constraint list + license risk classification |
| A-032 | `docs/Reference_Patterns.md` | 📄 MD | ♻️ | P-xx patterns + AP-xx anti-patterns + code examples |
| A-033 | `docs/conventions/domain-model.md` | 📄 MD | 🏛️ | ER diagram, state machines, RBAC, API design |
---
## EXECUTION RULES
1. **Session Rules:** Execute Activities 2-1~2-4 sequentially in single session
2. **Web Search Strategy:**
- Official documentation first (*.dev, *.io, github.com/[org]/[repo])
- Check npm/pypi package README + CHANGELOG
- Always verify latest version Breaking Changes
3. **Pattern Collection Criteria:**
- Official example code > Community Best Practice > Blog
- Specify "when to use" + "when not to use" for each pattern
4. **License Classification Criteria:**
- 🔴 AGPL, GPL, SSPL, NOASSERTION → Immediate action
- 🟡 LGPL, MPL, EPL → Review usage method
- 🟢 MIT, Apache-2.0, BSD → Notice obligations only
5. **Completion Verification:** Confirm all A-030~A-033 are generated
6. **Next Stage:** Stage 3 (Specification Document Writing)
---
*Stage 2 Prompt — Spec-Contract v5.0*when to use it
Community prompt sourced from the open-source GitHub repo SunnyBan101/spec-contract-v5 (no explicit license). A "SP 02 RESEARCH" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
businesscommunitygeneral
source
SunnyBan101/spec-contract-v5 · no explicit license