Skip to content

Commit fc8d019

Browse files
authored
Merge pull request #1 from spacedriveapp/main
update
2 parents 392cdff + 8fb07b8 commit fc8d019

707 files changed

Lines changed: 179976 additions & 28085 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: async-state-safety
3+
description: This skill should be used when the user asks to change "worker lifecycle", "cancellation", "retrigger behavior", "state machine", "delivery receipts", "timeouts", or "race conditions". Enforces explicit async/state invariants and targeted race-safe verification.
4+
---
5+
6+
# Async State Safety
7+
8+
## Goal
9+
10+
Prevent race regressions in async and stateful paths.
11+
12+
## Required Invariants
13+
14+
- Define valid terminal states before coding.
15+
- Define allowed state transitions before coding.
16+
- Keep terminal transitions idempotent.
17+
- Ensure duplicate events cannot double-apply terminal effects.
18+
- Ensure retries do not corrupt state.
19+
20+
## Race Checklist
21+
22+
- Cancellation racing completion
23+
- Timeout racing completion
24+
- Retry racing ack/receipt update
25+
- Concurrent updates to the same worker/channel record
26+
- Missing-handle and stale-handle behavior
27+
28+
## Implementation Checklist
29+
30+
- Add or update transition guards.
31+
- Keep error handling explicit and structured.
32+
- Preserve status/event emission on all terminal branches.
33+
- Document why each race path converges safely.
34+
35+
## Verification Checklist
36+
37+
- Run targeted tests for each touched race path.
38+
- Add at least one negative-path test for terminal convergence.
39+
- Add at least one idempotency test where applicable.
40+
- Run broad gate checks after targeted checks pass.
41+
42+
## Handoff Requirements
43+
44+
- Terminal states and transition matrix
45+
- Race windows analyzed
46+
- Targeted commands and outcomes
47+
- Residual risks and follow-up tests

.agents/skills/commit-all/SKILL.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: commit-all
3+
description: Use this skill when the user asks to "commit all", "commit everything", or wants all outstanding changes committed. Groups unrelated changes into separate, well-described commits instead of one catch-all commit.
4+
---
5+
6+
# Commit All
7+
8+
## Goal
9+
10+
Commit every outstanding change in the working tree — but group unrelated changes into separate, informative commits so the git history stays useful.
11+
12+
## Workflow
13+
14+
1. **Survey all changes.** Run `git status` and `git diff` (staged + unstaged) to see the full picture. Include untracked files.
15+
2. **Identify logical groups.** Cluster files by the change they belong to. A "group" is a set of files that were modified for the same reason (e.g. a bug fix, a new feature, a config tweak, a dependency update). Use file paths, diff content, and your understanding of the codebase to decide.
16+
3. **Order commits.** Infra/config/dependency changes first, then library/core changes, then feature/UI changes, then docs/polish.
17+
4. **For each group, create one commit:**
18+
- Stage only the files belonging to that group (`git add <file> ...`). Never use `git add -A` or `git add .`.
19+
- Write a concise, informative commit message that describes *what* changed and *why*. Follow the repo's existing commit style (check `git log --oneline -10`).
20+
- Do not lump unrelated changes together just because they're small.
21+
5. **Verify.** After all commits, run `git status` to confirm the tree is clean. Run `git log --oneline -n <N>` (where N = number of commits created) to show the user what was committed.
22+
23+
## Commit Message Rules
24+
25+
- Keep the subject line under 72 characters.
26+
- Use imperative mood ("add", "fix", "update", not "added", "fixes").
27+
- If a change is trivial (whitespace, typo, formatting), it's fine to batch those into one commit labeled accordingly.
28+
- End every commit message with the Co-Authored-By trailer.
29+
30+
## Hard Rules
31+
32+
- Never combine unrelated changes in one commit.
33+
- Never skip or discard changes — everything gets committed.
34+
- Never use `git add -A` or `git add .`.
35+
- Do not push. Only commit locally.
36+
- Do not commit files that look like they contain secrets (`.env`, credentials, tokens). Warn the user about those instead.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: messaging-adapter-parity
3+
description: This skill should be used when the user asks to change "Slack adapter", "Telegram adapter", "Discord adapter", "Webhook adapter", "status delivery", "message routing", or "delivery receipts". Enforces cross-adapter parity and explicit delivery semantics.
4+
---
5+
6+
# Messaging Adapter Parity
7+
8+
## Goal
9+
10+
Prevent adapter-specific regressions by validating behavior contracts across messaging backends.
11+
12+
## Contract Areas
13+
14+
- User-visible reply behavior
15+
- Status update behavior (`surfaced` vs `not surfaced`)
16+
- Delivery receipt ack/failure semantics
17+
- Retry behavior and bounded backoff
18+
- Error mapping and logging clarity
19+
20+
## Parity Checklist
21+
22+
- For every changed adapter path, compare expected behavior with at least one other adapter.
23+
- If an adapter intentionally does not surface a status, ensure receipt handling still converges correctly.
24+
- Ensure unsupported features degrade gracefully and predictably.
25+
- Ensure worker terminal notices cannot loop indefinitely.
26+
27+
## Verification Checklist
28+
29+
- Run targeted tests for the touched adapter.
30+
- Run targeted tests for receipt ack/failure paths.
31+
- Run at least one parity comparison check across adapters.
32+
- Run broad gate checks after targeted checks pass.
33+
34+
## Required Handoff
35+
36+
- Adapter paths changed
37+
- Contract decisions made
38+
- Receipt behavior outcomes
39+
- Verification evidence
40+
- Residual parity gaps

.agents/skills/pr-gates/SKILL.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: pr-gates
3+
description: This skill should be used when the user asks to "open a PR", "prepare for review", "address review comments", "run gates", or "verify before pushing" in this repository. Enforces preflight/gate workflow, migration safety, and review-evidence closure.
4+
---
5+
6+
# PR Gates
7+
8+
## Mandatory Flow
9+
10+
1. Run `just preflight` before finalizing changes.
11+
2. Run `just gate-pr` before pushing or updating a PR.
12+
3. If the same command fails twice in one session, stop rerunning and switch to root-cause debugging.
13+
4. Do not push when any gate is red.
14+
15+
## Review Feedback Closure
16+
17+
For every P1/P2 review finding, include all three:
18+
19+
- Code change reference (file path and concise rationale)
20+
- Targeted verification command
21+
- Pass/fail evidence from that command
22+
23+
## Async And Stateful Changes
24+
25+
When touching worker lifecycle, cancellation, retries, state transitions, or caches:
26+
27+
- Document terminal states and allowed transitions.
28+
- Explicitly reason about race windows and idempotency.
29+
- Run targeted tests in addition to broad gate runs.
30+
- Capture the exact command proving the behavior.
31+
32+
## Migration Safety
33+
34+
- Never edit an existing file in `migrations/`.
35+
- Add a new timestamped migration for every schema change.
36+
- If a gate flags migration edits, stop and create a new migration file.
37+
38+
## Handoff Format
39+
40+
- Summary
41+
- Changed files
42+
- Gate commands executed
43+
- P1/P2 finding-to-evidence mapping
44+
- Residual risk

.agents/skills/pr-slicer/SKILL.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: pr-slicer
3+
description: This skill should be used when the user asks to "split this PR", "make this smaller", "create stacked PRs", "slice this change", or "reduce review churn". Helps break work into low-risk, reviewable slices with clear verification per slice.
4+
---
5+
6+
# PR Slicer
7+
8+
## Goal
9+
10+
Reduce review latency and rework by shipping smaller, independent slices.
11+
12+
## Default Slice Budgets
13+
14+
- Target `<= 400` changed lines per slice when practical.
15+
- Target `<= 10` changed files per slice when practical.
16+
- Target `1-4` commits per slice.
17+
- Keep each slice behaviorally coherent and independently verifiable.
18+
19+
## Slicing Order
20+
21+
1. Extract prerequisites first.
22+
2. Land mechanical refactors next.
23+
3. Land behavior changes after prerequisites are merged.
24+
4. Land UI/docs/polish last.
25+
26+
## Slice Packet Template
27+
28+
For each slice, define:
29+
30+
- `Goal`
31+
- `Owned files`
32+
- `Out of scope`
33+
- `Risk level` (`low`/`medium`/`high`)
34+
- `Verification command(s)` with expected pass condition
35+
- `Rollback plan`
36+
37+
## Hard Rules
38+
39+
- Avoid mixing refactor and behavior changes in one slice unless unavoidable.
40+
- Avoid touching unrelated subsystems in one slice.
41+
- Avoid cross-slice hidden dependencies.
42+
- If a slice depends on unmerged work, state it explicitly.
43+
44+
## Verification Discipline
45+
46+
- Run narrow checks first for touched behavior.
47+
- Run project gate checks before handoff.
48+
- Record exact commands and outcomes for each slice.
49+
50+
## Final Handoff Format
51+
52+
- Slice list with order and purpose
53+
- Per-slice owned files
54+
- Per-slice verification evidence
55+
- Residual risk and follow-up slices

0 commit comments

Comments
 (0)