Resolution Capsule
AI coding assistants are trained on Stack Overflow. When they fix your bug, that fix should go back to Stack Overflow.
Resolution Capsule closes the loop: it captures an AI-generated fix, strips everything private (tokens, emails, internal paths, IPs, ticket IDs), and posts a clean, reviewable draft directly to Stack Overflow.
The Problem
Every day, AI assistants help developers fix bugs using knowledge that was scraped from public forums. Those fixes stay in a chat window and never benefit the next person who hits the same error. The knowledge loop is broken.
What It Does
- You fix a bug — with an AI assistant or manually
- Resolution Capsule captures the fix and its context
- It redacts secrets, identity markers, and internal details automatically
- It produces a Stack Overflow-ready draft and posts it via the API
The goal is zero friction between "fix applied" and "community helped."
Surfaces
| Surface | Best for |
|---|---|
| VS Code extension | Capturing AI-generated fixes directly from your editor (git diff → post) |
| MCP server | Runs inside Claude Code, Cursor, or any MCP-compatible AI assistant |
| CLI | CI pipelines, scripts, batch processing of resolved incidents |
| Web UI | Quick one-off drafts and testing the sanitizer |
VS Code Extension
Install from the marketplace or from the .vsix in vscode-extension/.
MCP server (Claude Code, Cursor, any MCP client):
uvx resolution-capsule # run directly, no install needed
pipx install resolution-capsule # install permanently
Add to ~/.claude/settings.json:
{
"mcpServers": {
"resolution-capsule": {
"command": "uvx",
"args": ["resolution-capsule"]
}
}
}
Key command — Create from AI Fix:
- Use your AI assistant to apply a fix
Cmd+Shift+P→ Resolution Capsule: Create from AI Fix- Describe the problem and root cause
- A sanitized draft opens — one click posts it to Stack Overflow
The command captures your current git diff as the fix automatically. No copy-pasting.
Other commands: Create From Selection, Create From Prompts, Connect Stack Overflow, Disconnect Stack Overflow.
CLI
python3 capsule_cli.py \
--problem "Build fails after dependency upgrade" \
--rootCause "Lockfile drift" \
--fix "Regenerated package-lock.json" \
--source "ai-assisted"
JSON input:
python3 capsule_cli.py --format json --json '{"problem":"...","rootCause":"...","fix":"...","source":"ai-assisted","mode":"balanced"}'
Write to file:
python3 capsule_cli.py --output capsule.md --problem "..." --rootCause "..." --fix "..."
Web UI
python3 app.py
Open http://127.0.0.1:8000.
Sanitization
Balanced mode (default): API keys, bearer tokens, JWTs, GitHub tokens, Slack tokens, AWS keys, emails, IPs, internal URLs, filesystem user paths, private key blocks.
Strict mode: everything above plus ticket IDs and long numeric identifiers.
What's Missing (and Where to Help)
This is a work in progress. The pieces that matter most and aren't built yet:
- Cursor / Copilot / Claude Code hooks — trigger a capsule automatically when an AI fix is accepted, without the developer doing anything manually
- Entropy-based secret detection — catch high-entropy strings that don't match known patterns
- Duplicate detection — check if the question already exists on Stack Overflow before posting
- Team policy packs — org-level redaction rules layered on top of the defaults
- JetBrains plugin — same workflow as the VS Code extension
If any of these interest you, the codebase is small and the engine is pure Python with no dependencies.
Stack Overflow Setup
To enable auto-posting, register a free app at stackapps.com/apps/oauth/register with OAuth domain localhost, then add your credentials to VS Code settings:
resolutionCapsule.stackOverflow.clientId
resolutionCapsule.stackOverflow.clientSecret
resolutionCapsule.stackOverflow.apiKey
Run Resolution Capsule: Connect Stack Overflow once to authorise.
Contributing
The repo is at github.com/adivarshney/resolution-capsule. Issues, PRs, and ideas are all welcome. If you're unsure where to start, the AI tool integrations section above is the frontier.
Run the Tests
python3 -m unittest test_app -v
Metadata
Release files for resolution-capsule 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resolution_capsule-0.2.0.tar.gz | 72.4 kB | Without provenance | Details for resolution_capsule-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resolution_capsule-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for resolution_capsule-0.2.0-py3-none-any.whl |
Total release size: 82.2 kB
Release files / resolution_capsule-0.2.0.tar.gz
| Download URL | resolution_capsule-0.2.0.tar.gz |
|---|---|
| Size | 72.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c84cd8f0137dda1d10972f2981a900fc4504e25bd2d2ab5b50a6d17603a14ae
|
|
BLAKE2b-256 checksum How to use checksums |
d3712713a3144ed071d263bc44624571dba62bb4c059a7b9b3c398115e1ab258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / resolution_capsule-0.2.0-py3-none-any.whl
| Download URL | resolution_capsule-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c51a9559a9c21a4a52aab29b57a364add06344edeed9f7337d7566b519f064d
|
|
BLAKE2b-256 checksum How to use checksums |
eec0432c2bd228f1b28a8b6366e1615551333b1bf1a8c323190600b2d6f73498
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for resolution-capsule 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.