Loading...
Loading...
Saves, retrieves, and searches structured context (reasoning, decisions, trade-offs) behind AI-generated code, linked to git commits. Use when the developer says "save this session with GitWhy", asks about past context or decisions, or wants to push context to a PR. Also use after significant implementation work, debugging sessions, or architecture decisions.
npx skill4agent add gitwhy-cli/gitwhy gitwhy-context-saving| MCP Tool | CLI Command | Purpose |
|---|---|---|
| | Check saved contexts and pending commits |
| | Save structured context |
| | Retrieve context by ID |
| | Search contexts by keyword |
| | Browse domain/topic structure |
| | Upload to cloud (private) |
| | Share with team |
| | Post to GitHub PR |
<context><context>
<!-- Required -->
<title>Short title of what was done</title>
<story>
Organize by phases. Write in first-person engineering journal style.
Phase 1 — Setup:
What user asked, what you did, challenges faced, how you resolved them.
Include back-and-forth with the user where it shaped the outcome.
Phase 2 — Implementation:
Technical details, decisions made during coding, problems solved.
</story>
<reasoning>
Why you chose this approach.
<decisions>
- RS256 over HS256 — allows key rotation without redeploying
- 24h token expiry — balances security vs UX
</decisions>
<rejected>
- Session cookies — requires server-side session store
- OAuth2 external provider — overkill for internal service
</rejected>
<tradeoffs>
- No refresh tokens in v1 — simplifies MVP but means 24h hard limit
</tradeoffs>
</reasoning>
<files>
src/auth/middleware.ts — new — Token verification middleware
src/routes/login.ts — modified — Added token signing on login
package.json — modified — Added jsonwebtoken dependency
</files>
<!-- Optional -->
<agent>claude-code (claude-opus-4)</agent>
<tags>auth, jwt, middleware</tags>
<tools>MCP: nia, sequential-thinking</tools>
<verification>All 14 tests passing. Build successful.</verification>
<risks>No rate limiting on login endpoint yet.</risks>
</context>| Tag | Required | Notes |
|---|---|---|
| Yes | Short title of the work done |
| Yes | Phase-organized engineering journal. First-person, chronological. |
| Yes | Why this approach. Nest |
| Yes | One per line. Flexible format: |
| Optional | Agent name and model |
| Optional | Comma-separated keywords for discovery |
| Optional | MCPs, CLI tools, resources used |
| Optional | Test results, build status |
| Optional | Open questions, follow-up items |
gitwhy_statusgit why log<context>gitwhy_save(markdown="<context>...</context>")git why save --file context.mdecho '<context>...</context>' | git why savegitwhy_get(id="ctx_a1b2c3d4")git why get ctx_a1b2c3d4gitwhy_search(query="authentication")git why search "auth"gitwhy_list()git why treegitwhy_syncgit why pushgitwhy_publish(ids=...)git why push --sharegitwhy_post_prgit why post-pr