Graveyard Shift — Devpost Submission (Kiroween 2026)
- Live Interactive Workbench: https://graveyardshift.gilbertcv.com
- Demo Video (1080p HD): https://youtu.be/qGgUfX_laE8
- GitHub Repository: https://github.com/gil906/graveyard-shift-kiroween-2026
Inspiration
Every production team inherits a "haunted" service: a 2019 billing cron or checkout monolith still running on an End-of-Life container, pinned to packages with critical CVEs, cluttered with dead functions nobody dares delete, and wrapped in a bare except: block that silently swallows errors at 2:00 AM. Traditional linters dump hundreds of noisy warnings without showing why a codebase is dangerous or how to fix it safely. We built Graveyard Shift to turn legacy archaeology into a calm, visual, one-click resurrection workflow.
What It Does
Graveyard Shift is an AI-assisted legacy code resurrection and incident post-mortem workbench:
- Multi-Source Ingestion: Load one of three realistic haunted repositories (Legacy Billing Daemon 2019, Ghost E-Commerce Checkout v1, Phantom Auth Gateway) in one click, or upload your own
.py,.js,.ts,requirements.txt,package.json,Dockerfile, or.ziparchive. - Deep Static & Advisory Analysis: Uses Python's
astmodule, JavaScript/TypeScript structural scanners, and a curated CVE/EOL catalog to detect unused functions, unreachable dead branches, orphan imports, bareexcept:/ emptycatchtraps, unsafeyaml.load()/pickle.loads()/eval()sinks, hardcoded secrets, vulnerable dependencies, and EOL Docker base images. - Interactive Dependency Graveyard: Renders a clickable SVG dependency graph connecting source files, rotting packages, EOL runtimes, and architectural ghosts so engineers see blast radius at a glance.
- One-Click Resurrection Plan & Live Re-Scoring: Generates standard unified diffs (
--- a/,+++ b/) for every fix, lets engineers apply selected patches live to watch the Haunt Score drop in real time, and exports a clean.patchfile. - Evidence-Linked Incident Post-Mortem: Reconstructs a chronological 5-stage incident timeline (Latent Rot → Trigger → Silent Failure → Blast Radius → Resurrection) exportable as Markdown.
How We Built It (with Kiro)
We used Kiro Spec-Driven Development from the first line of code, preserving the entire /.kiro/ directory in the repository:
.kiro/specs/graveyard-shift/(requirements.md,design.md,tasks.md): Defined EARS-format acceptance criteria, the Haunt Score weighting formula, AST + diff patch architecture, and a 9-step task plan before writing implementation code..kiro/steering/(product.md,tech.md,structure.md): Steered every design decision toward a calm executive dark-mode workspace (max 3 hero indicators, deep telemetry in an Inspector Drawer, 0px horizontal overflow across Desktop, Mobile, and unfolded Galaxy Z Fold7)..kiro/hooks/(on-save-audit.json,pre-commit-resurrection-check.json): Automated secret/CSS/syntax audits on save and fullpytest+ spec-alignment checks before commit.
Challenges We Ran Into
- Safe Multi-Operation Patching: Applying multiple line deletions and line replacements to the same file without shifting line numbers required ordering deletions bottom-up while preserving newline fidelity and generating clean
difflib.unified_diffpreviews. - Zero-Overflow Responsive Workbench: Packing a code viewer, findings list, unified diffs, and an SVG dependency graph into Desktop (
1440×900), Mobile (390×844), and unfolded foldable (884×1104) screens without horizontal overflow required strictminmax(0, 1fr)grid constraints and contained code scroll containers.
Accomplishments That We're Proud Of
- 100% Offline, Deterministic Verification: Judges can test every feature immediately with zero API keys or setup friction.
- Real Patch Execution: Clicking Resurrect All doesn't fake a progress bar — it applies real AST/text patches to the files, re-runs the full analyzer, and drops Legacy Billing Daemon (2019) from Haunt Score 100 (Grade F) down to Grade A/B with a real downloadable
.patch. - 100% Automated Test Coverage: Every endpoint, sample pack, malformed-syntax fallback, ZIP upload guard, and resurrection apply path is verified by
pytest.
What We Learned
Spec-driven development with Kiro dramatically reduced UI scope creep and kept our backend data contracts, frontend cross-panel hover linking, and security guards tightly aligned from start to finish.
What's Next for Graveyard Shift
- GitHub PR automation that opens a branch and applies the generated
.patchwith the Markdown post-mortem in the PR body. - Support for Go, Java (
pom.xml), and Rust (Cargo.toml) dependency graveyards. - Live OSV.dev advisory sync with offline cache fallback.
Built With
- Python 3.11, FastAPI, Pydantic v2, Uvicorn, Python
ast,difflib - HTML5, Modern CSS Grid, Vanilla ES6 JavaScript, Interactive SVG
- Kiro Specs, Steering Docs & Agent Hooks (
/.kiro/) - Docker &
pytest
Built With
- ast
- css3
- docker
- fastapi
- html5
- javascript
- kiro
- pydantic
- python
- svg