Research
Research technical options and generate a structured decisions document for a project phase. This document sits between the general plan and the implementation plan — it identifies decisions that need to be made, presents alternatives with trade-offs, and recommends a path. The user reviews, decides, and the result feeds the plan-phase skill.
Context — read before generating
docs/project-plan.md — general project plan. Contains the phase description, its capabilities, and the defined stack.
docs/decisions/ and docs/adr/ — prior decisions at two altitudes: docs/decisions/technical-decisions-*.md (granular, per-phase) and accepted Architecture Decision Records in docs/adr/ (high-level/architectural, e.g. from tech-discovery). Both are hard constraints — do not reopen decided/accepted choices, and never recommend an option that violates an accepted ADR.
docs/phases/ — already planned phases. Read for format and naming consistency reference only, not as a source of technical decisions.
When this skill is needed
Not every phase needs research. Use this checklist:
- Does the phase involve choices of lib, framework, or service with real alternatives? (e.g., bcrypt vs argon2, JWT vs session)
- Are there competing implementation patterns with relevant trade-offs? (e.g., refresh token rotation vs blacklist)
- Does the phase have non-functional requirements that impact technical choices? (e.g., 10GB upload → chunked vs streaming vs tus)
- Do you have a real doubt about which path to take?
If the answer is no to all, skip the research and go straight to plan-phase. The user (the professional using the agent) must then provide technical decisions directly alongside the planning request.
How to identify technical decisions
Read each capability of the phase in project-plan.md and ask: "is there more than one reasonable way to implement this with the project's stack?" If yes, it's a technical decision.
Technical decisions appear in recurring categories:
- Strategy: how to approach the problem (e.g., stateless vs stateful auth)
- Lib/Service: which tool to use (e.g., Passport.js vs manual implementation)
- Pattern: which pattern to follow (e.g., refresh token rotation vs blacklist)
- Storage: where and how to persist data (e.g., token in cookie vs localStorage)
- Limits and policies: values and technical business rules (e.g., token expiration, rate limit, max size)
Ignore decisions already made in project-plan.md or in previous phases. Also ignore trivial decisions that have an obvious answer in the context of the stack.
How to research options
For each identified decision:
- Check the relevant project's installed versions first. Identify which project in the monorepo is in scope (e.g., nestjs-project, nextjs-project, or other) and check its
package.json / package-lock.json to see the versions already installed. This constrains which documentation versions to fetch and which alternatives are truly compatible with the existing stack.
- Research within stack context. For each option being evaluated, use Context7 MCP to fetch documentation for the versions compatible with your project's installed dependencies. This gives accurate API details, version compatibility, and known limitations — better than relying on training data or latest versions.
- Search for up-to-date information on alternatives. Use web search and Context7 to look up current documentation for competing libs, frameworks, and patterns. Versions change, libs get deprecated, new options emerge.
- Prioritize primary sources. Official documentation, RFCs, lib repositories. Avoid generic blog posts as a primary source.
- Be honest about trade-offs. Don't force a recommendation. If two options are equivalent in the context of your stack and constraints, say so.
Output structure
# Technical Decisions — Phase NN: [Name]
> **Phase:** [Phase name]
> **Status:** Pending | Decided
> **Date:** [YYYY-MM-DD]
---
## TD-01: [Decision name]
**Context:** Why this decision needs to be made. Which phase capability depends on it.
**Options:**
### Option A: [Name]
- How it works (2-3 sentences)
- **Pros:** concrete advantages
- **Cons:** concrete disadvantages
### Option B: [Name]
- How it works (2-3 sentences)
- **Pros:** concrete advantages
- **Cons:** concrete disadvantages
### Option C: [Name] _(if applicable)_
- How it works (2-3 sentences)
- **Pros:** concrete advantages
- **Cons:** concrete disadvantages
**Recommendation:** [Recommended option] — one-sentence justification considering the stack and project context.
**Decision:** _[to be filled by user]_
---
(repeat for each decision)
## Decisions Summary
| ID | Decision | Recommendation | Choice |
|----|----------|---------------|--------|
| TD-01 | [Name] | [Recommended option] | _[pending]_ |
| TD-02 | [Name] | [Recommended option] | _[pending]_ |
How to write recommendations
The recommendation is a suggestion, not a decision. It must:
- Be justified by the project context, not by generic preference.
- Consider what was already decided in previous phases.
- Be explicit about what is gained and what is lost.
- Admit when there is no significant difference between options.
Bad recommendations: "JWT is more modern." "Everyone uses bcrypt."
Good recommendations: "JWT + refresh in DB enables rotation (RFC 9700) without adding Redis as an auth dependency, since PostgreSQL is already in the stack."
Rules
- Present between 2 and 4 options per decision. Less than 2 is not a decision. More than 4 is noise.
- Do not include options that are clearly inadequate for the project's stack or scope.
- Do not make decisions for the user. Recommend, but leave the "Decision" field for them to fill.
- Do not go into implementation details. That's the job of
plan-phase.
- If a decision depends on another (e.g., token storage choice depends on auth strategy), indicate the dependency.
- Keep each option concise. If the explanation of an option exceeds 5-6 lines, it's too detailed for this document.
Output
Save to: docs/decisions/technical-decisions-phase-NN-[name-slug].md
Example: docs/decisions/technical-decisions-phase-02-auth.md
After the user fills in the decisions, this document serves as input for the plan-phase skill.
1---2name: research3description: Research technical options and generate a decisions document for a project phase. Use whenever the user needs to explore alternatives, understand trade-offs, or define technical paths before planning a phase — including variations like 'research options for phase X', 'what technologies to use in the phase', 'phase trade-offs', 'technical decisions for the phase', 'research the phase', or any mention of exploring alternatives before planning.4---56# Research78Research technical options and generate a structured decisions document for a project phase. This document sits between the general plan and the implementation plan — it identifies decisions that need to be made, presents alternatives with trade-offs, and recommends a path. The user reviews, decides, and the result feeds the `plan-phase` skill.910## Context — read before generating11121. **`docs/project-plan.md`** — general project plan. Contains the phase description, its capabilities, and the defined stack.132. **`docs/decisions/`** and **`docs/adr/`** — prior decisions at two altitudes: `docs/decisions/technical-decisions-*.md` (granular, per-phase) and accepted **Architecture Decision Records** in `docs/adr/` (high-level/architectural, e.g. from `tech-discovery`). Both are hard constraints — do not reopen decided/accepted choices, and never recommend an option that violates an accepted ADR.143. **`docs/phases/`** — already planned phases. Read for format and naming consistency reference only, not as a source of technical decisions.1516## When this skill is needed1718Not every phase needs research. Use this checklist:1920- Does the phase involve **choices of lib, framework, or service** with real alternatives? (e.g., bcrypt vs argon2, JWT vs session)21- Are there **competing implementation patterns** with relevant trade-offs? (e.g., refresh token rotation vs blacklist)22- Does the phase have **non-functional requirements** that impact technical choices? (e.g., 10GB upload → chunked vs streaming vs tus)23- Do you have a **real doubt** about which path to take?2425If the answer is no to all, skip the research and go straight to `plan-phase`. The user (the professional using the agent) must then provide technical decisions directly alongside the planning request.2627## How to identify technical decisions2829Read each capability of the phase in project-plan.md and ask: "is there more than one reasonable way to implement this with the project's stack?" If yes, it's a technical decision.3031Technical decisions appear in recurring categories:3233- **Strategy:** how to approach the problem (e.g., stateless vs stateful auth)34- **Lib/Service:** which tool to use (e.g., Passport.js vs manual implementation)35- **Pattern:** which pattern to follow (e.g., refresh token rotation vs blacklist)36- **Storage:** where and how to persist data (e.g., token in cookie vs localStorage)37- **Limits and policies:** values and technical business rules (e.g., token expiration, rate limit, max size)3839Ignore decisions already made in project-plan.md or in previous phases. Also ignore trivial decisions that have an obvious answer in the context of the stack.4041## How to research options4243For each identified decision:44451. **Check the relevant project's installed versions first.** Identify which project in the monorepo is in scope (e.g., nestjs-project, nextjs-project, or other) and check its `package.json` / `package-lock.json` to see the versions already installed. This constrains which documentation versions to fetch and which alternatives are truly compatible with the existing stack.462. **Research within stack context.** For each option being evaluated, use Context7 MCP to fetch documentation for the versions compatible with your project's installed dependencies. This gives accurate API details, version compatibility, and known limitations — better than relying on training data or latest versions.473. **Search for up-to-date information on alternatives.** Use web search and Context7 to look up current documentation for competing libs, frameworks, and patterns. Versions change, libs get deprecated, new options emerge.484. **Prioritize primary sources.** Official documentation, RFCs, lib repositories. Avoid generic blog posts as a primary source.495. **Be honest about trade-offs.** Don't force a recommendation. If two options are equivalent in the context of your stack and constraints, say so.5051## Output structure5253```markdown54# Technical Decisions — Phase NN: [Name]5556> **Phase:** [Phase name]57> **Status:** Pending | Decided58> **Date:** [YYYY-MM-DD]5960---6162## TD-01: [Decision name]6364**Context:** Why this decision needs to be made. Which phase capability depends on it.6566**Options:**6768### Option A: [Name]69- How it works (2-3 sentences)70- **Pros:** concrete advantages71- **Cons:** concrete disadvantages7273### Option B: [Name]74- How it works (2-3 sentences)75- **Pros:** concrete advantages76- **Cons:** concrete disadvantages7778### Option C: [Name] _(if applicable)_79- How it works (2-3 sentences)80- **Pros:** concrete advantages81- **Cons:** concrete disadvantages8283**Recommendation:** [Recommended option] — one-sentence justification considering the stack and project context.8485**Decision:** _[to be filled by user]_8687---8889(repeat for each decision)9091## Decisions Summary9293| ID | Decision | Recommendation | Choice |94|----|----------|---------------|--------|95| TD-01 | [Name] | [Recommended option] | _[pending]_ |96| TD-02 | [Name] | [Recommended option] | _[pending]_ |97```9899## How to write recommendations100101The recommendation is a suggestion, not a decision. It must:102103- Be justified by the project context, not by generic preference.104- Consider what was already decided in previous phases.105- Be explicit about what is gained and what is lost.106- Admit when there is no significant difference between options.107108Bad recommendations: "JWT is more modern." "Everyone uses bcrypt."109Good recommendations: "JWT + refresh in DB enables rotation (RFC 9700) without adding Redis as an auth dependency, since PostgreSQL is already in the stack."110111## Rules112113- Present between 2 and 4 options per decision. Less than 2 is not a decision. More than 4 is noise.114- Do not include options that are clearly inadequate for the project's stack or scope.115- Do not make decisions for the user. Recommend, but leave the "Decision" field for them to fill.116- Do not go into implementation details. That's the job of `plan-phase`.117- If a decision depends on another (e.g., token storage choice depends on auth strategy), indicate the dependency.118- Keep each option concise. If the explanation of an option exceeds 5-6 lines, it's too detailed for this document.119120## Output121122Save to: `docs/decisions/technical-decisions-phase-NN-[name-slug].md`123124Example: `docs/decisions/technical-decisions-phase-02-auth.md`125126After the user fills in the decisions, this document serves as input for the `plan-phase` skill.