why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
Skill by kkgogogo17
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kkgogogo17-why
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, devops, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
why- Description
- Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
- License
- MIT
- Instructions
- 226 lines in SKILL.md · view on GitHub
Files (13)
- SKILL.md
- epistemics.md · references/
- investigator-prompt.md · references/
- source-playbook.md · references/
- code-archaeology.md · references/sources/
- databricks.md · references/sources/
- datadog.md · references/sources/
- incident-postmortem.md · references/sources/
- linear.md · references/sources/
- notion.md · references/sources/
- sentry.md · references/sources/
- slack.md · references/sources/
- synthesizer-prompt.md · references/
SKILL.md (first lines)
# Why
Investigate the motivation and intent behind code. Why was it built this way? What edge cases were considered? What product, business, or operational constraints shaped the design? What alternatives were rejected, and why?
Companion to the `how` skill. `how` answers what the code does and how it works. `why` answers what forces led to its shape.
## How this skill works
Historical context spreads across seven evidence categories: source control history, issue or ticket tracking, long-form documents, real-time team chat, infrastructure observability, error or exception tracking, and product analytics warehouses. You cannot predict from the question alone which one holds the answer, so the skill enumerates available MCPs at run time, maps each to a category, queries all seven in parallel, then synthesizes with explicit confidence calibration. Null results from searched categories are first-class evidence about how the decision was made; report them alongside positive findings. The default is coverage, not minimalism.
## Operating Posture
Operate as a careful, cautious, precise investigator. Think like a detective piecing together a historical case from fragmentary records. When the record is thin, say so.
Concretely:
- **Evidence before narrative.** Collect the pieces first, then see what story they support. Never pick a story and recruit the evidence that fits it.
- **Precision over polish.** Prefer the exact quote and citation over a smooth paraphrase. A reader should be able to follow any claim back to its source and verify it in under a minute.
- **Consider what you haven't seen.** The evidence you find is a sample, not the whole truth. Before concluding, ask what you would expect to see if an alternative explanation were true, and whether you looked for it.
- **Name the gaps.** If a thread goes cold, a source isn't searchable, or a question has no answer, document the gap. Don't paper it over with an authoritative-sounding guess.
- **Hedge on purpose.** When evidence is indirect, your language should signal it ("appears to", "likely", "suggests"). Confidence-matching phrasing is a feature of the output, not a stylistic choice the synthesizer may override.
- **No shortcut by code-reading.** The code tells you what it does, rarely why it exists. Resist inferring intent from code shape.
This posture is the working method, not a disclaimer.
## Core Epistemics
This skill builds a **patchwork understanding** from fragmented historical evidence. Tickets go stale. Chat threads get deleted. Commit messages lie. People change their minds between the PR description and the implementation. The original author may have left the company.
Be ruthlessly honest about what you know versus what you're inferring. The goal is not a satisfying story; it is to surface evidence, calibrate confidence, and let the user decide.
Principles:
- **Cite everything.** Every claim about intent should reference a specific commit hash, PR number, ticket ID, doc URL, chat permalink, or code comment. If you can't cite it, it's inference, not fact, and must be labeled as such.
- **Prefer "appears to" over "because".** Hedge when evidence is indirect. Reserve confident language for direct, explicit evidence.
- **Surface contradictions.** If two sources disagree, show both. Don't quietly pick the one that fits your narrative.
- **Acknowledge gaps.** If a question has no answer in any source you searched, say so. An honest "we couldn't find out why" beats a confident guess.
- **Multiple hypotheses are valid.** When the evidence fits several stories, present them all with the evidence for each. Let the user triangulate.
- **Beware rationalization.** Code that makes sense today may have been written for reasons that no longer apply, or for no good reason at all. Don't retrofit intent.
Read `references/epistemics.md` for the full confidence framework and phrasing guide. The synthesizer must follow it.
## Step 1. Understand the Target and the Question
Parse what the user is asking. The **target** is usually a chunk of code, a pattern, a feature, or a named design decision. The **question** is usually one of:
- "Why was X designed this way?" Design rationale.
- "Why do we do X instead of Y?" Tradeoff or alternatives.
- "What edge cases motivated this?" Defensive reasoning.
- "What business or product constraint led to this?" External forcing function.
- "Why does this code still exist?" Dead-code territory.
- "What's the history of X?" Broad archaeological sweep.
If the target is vague ("why do we do it this way?" with no clear referent), make your best guess from conversation context (open files, recent edits, the current working directory, what was just discussed). State your interpretation briefly so the user can redirect if you're off, then proceed.
## Step 2. Establish the Code Anchor
Before spawning investigators, anchor the investigation in concrete code. You need:
- The relevant file path(s) and line range(s)
- The key symbols (function names, class names, constants)
- An initial commit list. The last few commits touching the target.
- PR numbers from merge commits (pattern `(#1234)` in the subject line)
Build this inline. It's cheap, and every investigator needs it.
```bash
# Blame target lines for last-touch commits
git blame -L <start>,<end> <file>
# Full file history, with patches, through renames
git log --follow -p -- <file>
# Last N commits touching the file, PR numbers visible
git log --oneline -20 -- <file>
# Extract PR numbers from a commit message
git log -1 --format=%B <commit>
```
Pull PR bodies and discussion via `gh` for any substantive commits:
```bash
gh pr view <number> --json title,body,author,createdAt,mergedAt,labels,closingIssuesReferences,comments,reviews
```
Capture this as seed context (file paths, symbols, commits, PR numbers, linked ticket IDs). Pass it to the investigators so they don't rediscover it.
## Step 3. Spawn Parallel Investigators (default posture)
**Default to the full parallel investigation.** Each evidence category lives in a different kind of system, and you cannot tell from the question alone which one holds the answer without looking. So look across every available category, in parallel, by default.
### Discovery
Before spawning investigators, list the available MCPs from the Pi environment. Use the available-tools map when present. Otherwise inspect the `mcps/` directory Pi exposes for enabled MCP servers.
Map each available MCP to one evidence category:
1. Source control history
2. Issue / ticket tracker
3. Long-form documents
4. Real-time team chat
5. Infrastructure observability
6. Error / exception tracking
7. Product analytics warehouse
Source control is always available through git and `gh`. For the other six, classify using the MCP name, server instructions, tool names, and resource descriptors. If an MCP could fit more than one category, choose the one matching its primary evidence. Record ambiguous cases in the coverage map.
Aim for a complete **coverage map**, not a minimal one. A null result from an issue tracker is evidence the decision was not ticketed, a useful fact in itself. Document the null, don't skip the search.
Launch all matching investigators in a single message so they run concurrently. One investigator per category lets each specialize in one tool's query vocabulary and result shape. Don't ask one agent to cover multiple MCPs.
Subagent config (each):
- `agent`: `poteto-agent`
- `model`: your configured why-investigators model (default `inherit-parent`)
- use a normal Pi child process. **Do not use restricted-tool mode.** It strips MCP access, which disables MCP-backed investigators entirely. The source control investigator would be safe in readonly, but keep modes uniform. Investigators still shouldn't write anything. That's a posture, not a sandbox.
Each investigator gets:
1. The base prompt from `references/investigator-prompt.md`From kkgogogo17/pi-pstack, MIT.
More from kkgogogo17/pi-pstack
- 0.595score
show-me-your-work
kkgogogo17
Keep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result).
SkillBFreshness: B★ 10Claude Code +9 - 0.587score
swarm
kkgogogo17
Fan out N parallel workers, drain them, and return one report.
SkillBFreshness: B★ 10Claude Code +9 - 0.587score
technical-writing
kkgogogo17
Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax.
SkillBFreshness: B★ 10Claude Code +9 - 0.582score
setup-pstack
kkgogogo17
Configure the Pi models pstack delegates to by role.
SkillBFreshness: B★ 10Claude Code +9 - 0.567score
interrogate
kkgogogo17
Use for "interrogate", "adversarial review", "multi-model review", "challenge this", "stress test this code", "find blind spots", or "tear this apart".
SkillBFreshness: B★ 10Claude Code +9 - 0.567score
architect
kkgogogo17
Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in.
SkillBFreshness: B★ 10Claude Code +9 - 0.565score
figure-it-out
kkgogogo17
Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away.
SkillBFreshness: B★ 10Claude Code +9 - 0.565score
automate-me
kkgogogo17
Use for "automate me", "create/update/refresh my -mode skill", "turn/capture my preferences or working style into a skill", or wanting agents to follow how…
SkillBFreshness: B★ 10Claude Code +9 - 0.562score
arena
kkgogogo17
Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it.
SkillBFreshness: B★ 10Claude Code +9 - 0.559score
no-comments
kkgogogo17
Spawn Comment Sicko, fix accepted findings, and offer encodings for claimed constraints.
SkillBFreshness: B★ 10Claude Code +9
Signals
- Stars
- 10
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Aug 8, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/kkgogogo17/pi-pstack
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.769score
why
backnotprop
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 2.7KClaude Code +9 - 0.411score
why
uzairansaruzi
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 155Claude Code +9 - 0.405score
why
Dimon94
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 107Claude Code +9 - 0.389score
why
iap
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 27Claude Code +9 - 0.389score
why
n3m6
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 19Claude Code +9 - 0.372score
why
shrimpwtf
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillBFreshness: B★ 39Claude Code +9 - 0.359score
why
painhardcore
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillBFreshness: B★ 12Claude Code +9 - 0.352score
why
MarvinSchenkel
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 1Claude Code +9 - 0.342score
why
luckenco
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: AClaude Code +9 - 0.298score
why
emmaneugene
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillCFreshness: C★ 1Claude Code +9 - 0.285score
why
emmaneugene
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillCFreshness: CClaude Code +9 - 0.272score
why
sediman-agent
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillCFreshness: C★ 394Claude Code +9
More from kkgogogo17
- 0.595score
show-me-your-work
kkgogogo17
Keep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result).
SkillBFreshness: B★ 10Claude Code +9 - 0.587score
swarm
kkgogogo17
Fan out N parallel workers, drain them, and return one report.
SkillBFreshness: B★ 10Claude Code +9 - 0.587score
technical-writing
kkgogogo17
Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax.
SkillBFreshness: B★ 10Claude Code +9 - 0.582score
setup-pstack
kkgogogo17
Configure the Pi models pstack delegates to by role.
SkillBFreshness: B★ 10Claude Code +9 - 0.567score
interrogate
kkgogogo17
Use for "interrogate", "adversarial review", "multi-model review", "challenge this", "stress test this code", "find blind spots", or "tear this apart".
SkillBFreshness: B★ 10Claude Code +9 - 0.567score
architect
kkgogogo17
Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in.
SkillBFreshness: B★ 10Claude Code +9
Cite this page
why skill. Agent Mart. https://agentmart.dev/skills/kkgogogo17-why (last updated 2026-10-24)