why
Investigates why code, a threshold, guard, workflow, or design decision exists. Use for historical rationale, regressions, postmortems, legacy removal, rejected alternatives, and product or operational constraints. Separates direct evidence from inference and reports unavailable sources. Use how for runtime mechanics.
- License 许可
- MIT
- 所属仓库
- daanqq/.pi
- 最近更新
- 2026-09-30
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- why
- license
- LICENSE
- metadata
- { "source": "https://github.com/cursor/plugins/tree/57fc467a229cf2853329f19c9e6a9fd83ddc2ea2/pstack/skills/why", "adapted-for": "pi" }
- description
- Investigates why code, a threshold, guard, workflow, or design decision exists. Use for historical rationale, regressions, postmortems, legacy removal, rejected alternatives, and product or operational constraints. Separates direct evidence from inference and reports unavailable sources. Use how for runtime mechanics.
02 资源文件 2
- 许可证LICENSE1.0 KB
- 参考文档references/epistemics.md1.9 KB
03 SKILL.md 正文
Why
Investigate the forces that produced a design. Code is evidence of mechanics, not proof of intent. Build the answer from cited history and keep unsupported explanations visibly separate.
Read references/epistemics.md before synthesizing.
Workflow
- Lock the question. Name the target and the kind of rationale requested: design choice, alternative, defensive edge case, threshold, regression, business constraint, or historical evolution.
- Anchor in code. Identify exact paths, lines, symbols, tests, current behavior, and recent commits. Use
git blame,git log --follow, commit messages, and local documentation. Completion: every source search has concrete identifiers instead of a broad project name. - Build the available-source map. Search only read-only sources that actually exist and can affect the question:
- git history, code comments, tests, and local ADRs or docs;
- GitLab MR context through the installed review tooling when the target came from an MR;
- YouTrack or PORA through installed EUTP tooling when the target has a task identifier;
- Pond for past agent sessions and decisions, using semantic search first and reading relevant session tails;
- other connected MCP sources only after checking their instructions and confirming the calls are read-only.
- Investigate proportionally. Start with source control and the strongest named source. Add another source when it can distinguish competing explanations or fill a material gap. Use at most one subagent by default for an independent evidence category; the parent owns synthesis and citation checks.
- Test alternatives. Ask what evidence would exist if a competing explanation were true and search for it. Preserve contradictions instead of choosing the smoothest story.
- Synthesize. Separate direct evidence, supported inference, competing hypotheses, and unknowns. Every claim about intent needs a citation or an explicit inference chain.
Do not query production or shared develop databases. Obtain permission before any other configured database query. Never update tickets, MRs, documents, chats, dashboards, or external systems during a why investigation without explicit confirmation.
Pond discipline
- Through the MCP gateway, use
pond_pond_searchto find relevant conversational messages, thenpond_pond_get_sessionfrom the end to capture the final state. UsemcpScriptwhen several Pond calls need logic between them. - Search does not include tool bodies or reasoning. Use
pond_pond_get_messageor scopedpond_pond_sqlwhen the answer depends on commands, failures, or tool parameters. - Scope by workspace, topic, date, or session. Do not treat the nearest vector result as proof.
- A missing Pond result means only that the searchable corpus did not surface evidence.
Output
- Question. The rationale being investigated.
- Code anchor. Paths, lines, symbols, and commits.
- Direct evidence. Cited statements from commits, MRs, tickets, docs, comments, tests, or past sessions.
- Reasonable inference. The evidence chain and calibrated confidence.
- Competing hypotheses. Evidence for and against each, when more than one survives.
- Unknowns. Specific gaps and unavailable sources.
- Sources consulted. What was searched, what was found, and what was unavailable or irrelevant.
When the investigation precedes a change, finish with Preserve, Change, Avoid, and Risk constraints for planning.
04 同仓库更多 Skills
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
typescript-best-practices
Applies concrete TypeScript type, boundary, API, and test rules when reading, writing, reviewing, or refactoring .ts and .tsx files. Use to model state honestly, remove unchecked casts, derive types from authoritative schemas, and keep external validation at boundaries.
show-me-your-work
Keeps a compact, reviewable TSV decision trail for long-running, multi-phase, delegated, or unattended work. Use when the user will review the work after a pause, when hypotheses or pivots must remain auditable, or when another skill needs a canonical evidence log.
prove-it-works
Verifies completed work against the real artifact and behavior rather than a build, cached representation, tool summary, or agent self-report. Use before declaring an implementation, fix, migration, generated artifact, configuration change, or delegated task complete.
how
Explains how a subsystem, feature flow, or function works and where its logic belongs. Use for code walkthroughs, runtime traces, ownership and layering questions, onboarding mental models, or architectural critique before changing code. Use historical investigation separately when the question is why the design exists.
blast-radius
Finds behavior outside a diff that a change could break and proves the load-bearing safety fact with the cheapest executable check. Use when asked what a change could break, when reviewing a deceptively small high-risk diff, or before shipping changes to shared state, protocols, lifecycle code, or external boundaries.