time-capsule
Write messages to your future self — or your future team — that unlock when specific code conditions are met. "Dear future me: if you're reading this, someone finally tried to refactor the billing module. Here's what you need to know..." Encodes institutional knowledge into the codebase itself, triggered exactly when it's needed.
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install github:LeoYeAI~openclaw-master-skills~time-capsulecURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/github%3ALeoYeAI~openclaw-master-skills~time-capsule/file -o time-capsule.md# Time Capsule
> "The best time to document your decisions was when you made them. The second best time is to leave a message for whoever has to deal with them later."
## What It Does
You know things right now that will be desperately needed later — but you don't know *when* later. Time Capsule lets you **bury messages in the codebase** that surface automatically when specific conditions are triggered:
- When someone finally touches that file nobody's touched in 2 years
- When the TODO count in a module exceeds a threshold
- When a specific dependency gets upgraded
- When test coverage drops below a certain percentage
- When a new developer makes their first commit
- On a specific date ("Hey team, the API license expires next month")
The message arrives exactly when it's relevant — not before (when it would be noise) and not after (when it would be too late).
## Capsule Types
### The Welcome Capsule
*Triggered when a new contributor makes their first commit*
```
╔══════════════════════════════════════════════════════════════╗
║ ⏳ TIME CAPSULE OPENED! ║
║ Buried by: @jcooley on 2025-06-15 ║
║ Trigger: New contributor detected ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ Dear new team member, ║
║ ║
║ Welcome! Here's what I wish someone told me on day one: ║
║ ║
║ 1. The "legacy" folder isn't legacy — it's the billing ║
║ engine and it handles $2M/day. Don't rename anything. ║
║ ║
║ 2. Tests in /integration are slow (40 min). Run /unit ║
║ first. Only run integration before pushing to main. ║
║ ║
║ 3. If you see a function called `doTheThing()` in ║
║ auth.ts — yes, we know. No, don't fix it yet. There's ║
║ a Time Capsule on it. You'll understand when it opens. ║
║ ║
║ 4. The real architecture diagram is in /docs/actual.png, ║
║ not /docs/architecture.png (which is from 2023). ║
║ ║
║ Good luck. You're going to love it here. ║
║ — The team, June 2025 ║
╚══════════════════════════════════════════════════════════════╝
```
### The Warning Capsule
*Triggered when someone modifies a specific dangerous file*
```
╔══════════════════════════════════════════════════════════════╗
║ ⏳ TIME CAPSULE OPENED! ║
║ Buried by: @sarah on 2025-09-22 ║
║ Trigger: src/payments/reconciliation.ts was modified ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ STOP. Read this before you change anything. ║
║ ║
║ This file handles payment reconciliation with Stripe. ║
║ It looks simple. It is NOT simple. Here's what you need ║
║ to know: ║
║ ║
║ - The 3-second delay on line 47 is NOT arbitrary. ║
║ Stripe's webhook delivery has a race condition. ║
║ Without the delay, 1 in ~500 payments double-charges. ║
║ We learned this the hard way. Ticket: INC-2847. ║
║ ║
║ - The `Math.round()` on line 63 MUST stay. ║
║ Floating point + currency = disaster. We lost $12,847 ║
║ over 3 weeks before we found this. Ticket: INC-3012. ║
║ ║
║ - If you need to test this, use the Stripe sandbox with ║
║ the webhook replay tool. Do NOT test with real charges. ║
║ (Yes, someone did. No, we don't talk about it.) ║
║ ║
║ If you're refactoring: keep all three invariants above. ║
║ If you're fixing a bug: check INC-2847 and INC-3012 first. ║
║ ║
║ — Sarah, the last person who touched this file ║
╚══════════════════════════════════════════════════════════════╝
```
### The Date Capsule
*Triggered on a specific calendar date*
```
╔══════════════════════════════════════════════════════════════╗
║ ⏳ TIME CAPSULE OPENED! ║
║ Buried by: @mike on 2025-11-01 ║
║ Trigger: Date reached: March 1, 2026 ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ Hey team, ║
║ ║
║ The GeoLocation API license expires on March 31, 2026. ║
║ Renewal costs $4,800/year. The free alternative (OpenCage) ║
║ exists but doesn't support batch queries. ║
║ ║
║ Decision needed: ║
║ 1. Renew the license ($4,800) ║
║ 2. Migrate to OpenCage (est. 3 dev-days) ║
║ 3. Build our own geocoding cache (est. 2 dev-weeks) ║
║ ║
║ I buried this 4 months early so you have time to decide. ║
║ Don't let it expire accidentally like the SSL cert in 2024. ║
║ ║
║ — Mike ║
╚══════════════════════════════════════════════════════════════╝
```
### The Threshold Capsule
*Triggered when a code metric crosses a threshold*
```
╔══════════════════════════════════════════════════════════════╗
║ ⏳ TIME CAPSULE OPENED! ║
║ Buried by: @jcooley on 2025-08-10 ║
║ Trigger: src/checkout/ test coverage dropped below 80% ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ Coverage dropped below 80%. I knew this day would come. ║
║ ║
║ When I wrote the checkout tests in August 2025, coverage ║
║ was 94%. I'm writing this capsule because I know that ║
║ deadline pressure will slowly erode it. Here's the deal: ║
║ ║
║ The untested code paths are where the money bugs hide. ║
║ Specifically: multi-currency, discount stacking, and ║
║ partial refunds. If coverage dropped, it's probably ║
║ because someone added a feature without adding tests. ║
║ ║
║ Recovery plan: ║
║ 1. Run: npm test -- --coverage checkout/ ║
║ 2. The red lines are the new code without tests ║
║ 3. Priority: anything touching money gets tests FIRST ║
║ 4. Don't let this drop below 70%. Below 70%, the ║
║ checkout module becomes unfixable without fear. ║
║ ║
║ I've buried another capsule at 70%. You don't want to ║
║ read that one. ║
║