Skip to content

Commit b0a58c3

Browse files
authored
feat: add durable execution support (#383)
* docs: add durable execution architecture decisions * docs: clarify architecture decision records * docs: add examples to durable execution ADRs * docs: simplify durable execution ADRs * docs: add durable pipeline architecture decision * docs: add durable execution architecture decisions * docs: clarify architecture decision records * docs: add examples to durable execution ADRs * docs: simplify durable execution ADRs * docs: pressure-test durable pipeline ADR * docs: clarify durable envelope ownership * docs: accept durable pipeline architecture decision * chore(deps): pin durable execution packages * feat(core): expose invocation serializer * feat(core): enforce durable terminal lifecycle * docs: finalize durable handler contract * feat: add durable execution package * feat: add durable handler API * feat(source-generators): recognize durable handlers * feat(source-generators): validate durable handlers * feat(source-generators): emit durable adapters * test(source-generators): expand durable coverage * test(core): verify durable terminal lifecycle * test(testing): add durable host integration * test(aot): add durable publish smoke * test(durable): verify public runtime APIs * test(durable): cover workflow replay semantics * docs(examples): add durable execution sample * docs(durable): document package usage * test(packaging): add durable consumer matrix * docs: add durable execution guide * docs(durable): add deployment recipes * docs(decisions): defer durable templates * ci: isolate durable package releases * chore(deps): update validation toolchain * test(durable): support debug fallback assertion * chore(deps): update package versions in shared props file - Bumped versions for multiple dependencies, including Amazon.Lambda.Core and NSubstitute. - Adjusted package versions for frameworks targeting .NET 8.0, 9.0, 10.0, and 11.0. - Included compatibility updates for pre-release versions where applicable. * fix: address durable execution review feedback * fix(tests): suppress NU1608 warning for AutoFixture.AutoNSubstitute - Added a suppression for NU1608 in test projects due to NSubstitute version compatibility notes. * chore(deps): fix formatting in shared props file - Added missing spaces before closing slashes in all `<PackageVersion>` elements. - Ensured consistent XML formatting for improved readability in `Directory.Packages.props`. * fix(tests): add null-forgiving operator to suppress nullable warnings - Updated `GetService` calls in unit tests to include null-forgiving operator (`null!`). - Ensured consistent suppression of nullable reference warnings in test setups. * test(source-generators): add multi-targeting support and conditional durable execution references - Updated tests to support multi-targeting for .NET 8.0, 9.0, 10.0, and 11.0 frameworks. - Added conditional compilation for `DurableExecution` references targeting .NET 10.0 and newer. - Adjusted project file to define `TargetFrameworks` and conditionally include durable references. - Expanded GitHub Actions workflow to test against all targeted frameworks. * test(tests): guard compatibility package references * fix(tests): adjust lambda middleware formatting in unit test - Fixed inconsistent spacing in lambda middleware setup in `MiddlewareOpenTelemetryExtensionsTest`. - Ensured consistent formatting for improved code readability. * refactor(durable)!: simplify durable handler adapter Remove durable lifecycle and envelope feature plumbing. Generated handlers now serialize AWS envelopes directly around DurableFunction.WrapAsync. * test(aot): root libraries for publish analysis Replace durable workflow smoke code with an empty executable and explicit trimmer roots. * refactor(durable)!: relax handler signature validation * fix(durable): bind cancellation tokens and reject duplicate events * fix(source-generators): harden durable handler validation * fix(source-generators): harden durable handler adapters * fix(durable): address review findings * ci: restore DevOps template workflows * ci(github): document DevOps template policy * ci: unify package releases * test(tests): restore multi-target integration coverage * ci(github): stabilize required PR build check * ci(github): remove duplicate PR build * docs: preserve contributing formatting * feat(caveman-compress): add natural language compression tools - Introduced scripts for caveman compression: CLI, main entrypoint, and benchmark tools. - Added validation and token counting utilities to streamline compression. - Implemented prompts and retry logic to handle LLM-guided compression. - Set up detection for compressible files based on heuristics and file type. - Preserved YAML frontmatter and ensured atomic writes for backups. - Included safeguard mechanisms to prevent handling sensitive data or massive files. * ci(github): upgrade DevOps template workflows --------- Signed-off-by: Jonas Ha <61319894+j-d-ha@users.noreply.github.com>
1 parent 2f8fa71 commit b0a58c3

135 files changed

Lines changed: 8791 additions & 240 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.

.agents/skills/cavecrew/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# cavecrew
2+
3+
Decision guide. When to delegate to caveman subagents instead of doing the work inline.
4+
5+
## What it does
6+
7+
Tells the main thread when to spawn a caveman-style subagent versus the vanilla equivalent. The win: subagent tool-results inject back into main context verbatim, and caveman output is roughly 1/3 the size of vanilla prose. Across 20 delegations in one session, that is the difference between context exhaustion and finishing the task.
8+
9+
Three subagents:
10+
11+
| Subagent | Job | Use when |
12+
|----------|-----|----------|
13+
| `cavecrew-investigator` | Locate code (read-only) | "Where is X defined / what calls Y / list uses of Z" |
14+
| `cavecrew-builder` | Surgical edit, 1-2 files | Scope is obvious, ≤2 files. Refuses 3+ file scope. |
15+
| `cavecrew-reviewer` | Diff/file review | One-line findings with severity emoji |
16+
17+
Use vanilla `Explore` or `Code Reviewer` when you want prose, architecture commentary, or rationale. Use main thread directly for one-line answers and 3+ file refactors.
18+
19+
This skill is a decision guide, not a slash command. It activates when the conversation mentions delegation.
20+
21+
## How to invoke
22+
23+
Triggers on phrases like "delegate to subagent", "use cavecrew", "spawn investigator", "save context", "compressed agent output".
24+
25+
## Example chaining
26+
27+
Locate → fix → verify (most common):
28+
29+
1. `cavecrew-investigator` returns site list (`path:line — symbol — note`)
30+
2. Main thread picks 1-2 sites, hands paths to `cavecrew-builder`
31+
3. `cavecrew-reviewer` audits the resulting diff
32+
33+
Parallel scout: spawn 2-3 `cavecrew-investigator` calls in one message with different angles (defs, callers, tests). Aggregate in main.
34+
35+
## Model overrides
36+
37+
By default, `cavecrew-reviewer` and `cavecrew-investigator` pin `model: haiku` in their frontmatter; `cavecrew-builder` has no `model:` line (uses the API session default). Set env vars in your shell before launching Claude Code to override per-agent:
38+
39+
| Env var | Agent |
40+
|---|---|
41+
| `CAVECREW_REVIEWER_MODEL` | `cavecrew-reviewer` |
42+
| `CAVECREW_BUILDER_MODEL` | `cavecrew-builder` |
43+
| `CAVECREW_INVESTIGATOR_MODEL` | `cavecrew-investigator` |
44+
45+
Example — run reviewer on sonnet, keep others on default:
46+
47+
```sh
48+
export CAVECREW_REVIEWER_MODEL=sonnet
49+
```
50+
51+
Use the same model name strings you'd use in any Claude Code agent frontmatter (e.g. `haiku`, `sonnet`, `opus`).
52+
53+
Overrides patch only the `model:` line in the installed agent's frontmatter; the prompt body is untouched and keeps receiving upstream updates. Plugin installs only — standalone hook installs have no local agent files to patch. Unset or blank = no change. The patch persists in the installed file until the plugin is updated or reinstalled.
54+
55+
## See also
56+
57+
- [`SKILL.md`](./SKILL.md) — full decision matrix and output contracts
58+
- [`agents/cavecrew-investigator.md`](../../agents/cavecrew-investigator.md)
59+
- [`agents/cavecrew-builder.md`](../../agents/cavecrew-builder.md)
60+
- [`agents/cavecrew-reviewer.md`](../../agents/cavecrew-reviewer.md)
61+
- [Caveman README](../../README.md) — repo overview

.agents/skills/cavecrew/SKILL.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
name: cavecrew
3+
description: >
4+
Decision guide for delegating to caveman-style subagents. Tells the main
5+
thread WHEN to spawn `cavecrew-investigator` (locate code), `cavecrew-builder`
6+
(1-2 file edit), or `cavecrew-reviewer` (diff review) instead of doing the
7+
work inline or using vanilla `Explore`. Subagent output is caveman-compressed
8+
so the tool-result injected back into main context is ~60% smaller — main
9+
context lasts longer across long sessions.
10+
Trigger: "delegate to subagent", "use cavecrew", "spawn investigator/builder/reviewer",
11+
"save context", "compressed agent output".
12+
---
13+
14+
Cavecrew = three subagent presets that emit caveman output. Same job as Anthropic defaults (`Explore`, edit-style agents, reviewer); difference is the tool-result they return is compressed, so main context shrinks per delegation.
15+
16+
## When to use cavecrew vs alternatives
17+
18+
| Task | Use |
19+
|---|---|
20+
| "Where is X defined / what calls Y / list uses of Z" | `cavecrew-investigator` |
21+
| Same but you also want suggestions/architecture commentary | `Explore` (vanilla) |
22+
| Surgical edit, ≤2 files, scope obvious | `cavecrew-builder` |
23+
| New feature / 3+ files / cross-cutting refactor | Main thread or `feature-dev:code-architect` |
24+
| Review diff, branch, or file for bugs | `cavecrew-reviewer` |
25+
| Deep code review with rationale + alternatives | `Code Reviewer` (vanilla) |
26+
| One-line answer you already know | Main thread, no subagent |
27+
28+
Rule of thumb: **if you'd want the subagent's output in 1/3 the tokens, pick cavecrew. If you'd want prose, pick vanilla.**
29+
30+
## Why this exists (the real win)
31+
32+
Subagent tool results get injected into main context verbatim. A vanilla `Explore` that returns 2k tokens of prose costs 2k tokens of main-context budget every time. The same finding from `cavecrew-investigator` returns ~700 tokens. Across 20 delegations in one session that's the difference between context exhaustion and finishing the task.
33+
34+
## Output contracts
35+
36+
What main thread can rely on per agent:
37+
38+
**`cavecrew-investigator`**
39+
```
40+
<Header>:
41+
- path:line — `symbol` — short note
42+
totals: <counts>.
43+
```
44+
Or `No match.` Always file-path-first, line-number-attached, backticked symbols. Safe to grep with `path:\d+`.
45+
46+
**`cavecrew-builder`**
47+
```
48+
<path:line-range> — <change ≤10 words>.
49+
verified: <re-read OK | mismatch @ path:line>.
50+
```
51+
Or one of: `too-big.` / `needs-confirm.` / `ambiguous.` / `regressed.` (terminal first token).
52+
53+
**`cavecrew-reviewer`**
54+
```
55+
path:line: <emoji> <severity>: <problem>. <fix>.
56+
totals: N🔴 N🟡 N🔵 N❓
57+
```
58+
Or `No issues.` Findings sorted file → line ascending.
59+
60+
## Chaining patterns
61+
62+
**Locate → fix → verify** (most common):
63+
1. `cavecrew-investigator` returns site list.
64+
2. Main thread picks 1-2 sites, hands paths to `cavecrew-builder`.
65+
3. `cavecrew-reviewer` audits the diff.
66+
67+
**Parallel scout** (when investigation is broad):
68+
Spawn 2-3 `cavecrew-investigator` calls in one message (different angles: defs vs callers vs tests). Aggregate in main thread.
69+
70+
**Single-shot edit** (when site is already known):
71+
Skip investigator. Hand exact path:line to `cavecrew-builder` directly.
72+
73+
## What NOT to do
74+
75+
- Don't use `cavecrew-builder` when you don't already know the file. Spawn investigator first or main thread will eat tokens passing context.
76+
- Don't chain `cavecrew-investigator → cavecrew-builder` for a 5-file refactor. Builder will return `too-big.` and you'll have wasted a turn.
77+
- Don't ask `cavecrew-reviewer` for "general feedback" — it returns findings only, no architecture opinions. Use `Code Reviewer` for that.
78+
- Don't expect prose. Cavecrew output is structured, sometimes terse to the point of cryptic. If a human will read it directly, paraphrase.
79+
80+
## Auto-clarity (inherited)
81+
82+
Subagents drop caveman → normal English for security warnings, irreversible-action confirmations, and any output where fragment ambiguity could be misread. Resume caveman after.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# caveman-commit
2+
3+
Terse Conventional Commits. Why over what.
4+
5+
## What it does
6+
7+
Generates commit messages in Conventional Commits format. Subject ≤50 chars, hard cap 72. Imperative mood. Body only when the *why* is non-obvious or there are breaking changes. No AI attribution, no "this commit does X", no emoji unless the project uses them. Body always required for breaking changes, security fixes, data migrations, and reverts — future debuggers need the context.
8+
9+
Outputs only the message. Does not stage, commit, or amend.
10+
11+
## How to invoke
12+
13+
```
14+
/caveman-commit
15+
```
16+
17+
Also triggers on phrases like "write a commit", "commit message", "generate commit".
18+
19+
## Example output
20+
21+
Diff: new endpoint for user profile.
22+
23+
```
24+
feat(api): add GET /users/:id/profile
25+
26+
Mobile client needs profile data without the full user payload
27+
to reduce LTE bandwidth on cold-launch screens.
28+
29+
Closes #128
30+
```
31+
32+
Diff: breaking API rename.
33+
34+
```
35+
feat(api)!: rename /v1/orders to /v1/checkout
36+
37+
BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout
38+
before 2026-06-01. Old route returns 410 after that date.
39+
```
40+
41+
## See also
42+
43+
- [`SKILL.md`](./SKILL.md) — full LLM-facing instructions
44+
- [Caveman README](../../README.md) — repo overview
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: caveman-commit
3+
description: >
4+
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving
5+
intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why"
6+
isn't obvious. Use when user says "write a commit", "commit message", "generate commit",
7+
"/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
8+
---
9+
10+
Write commit messages terse and exact. Conventional Commits format. No fluff. Why over what.
11+
12+
## Rules
13+
14+
**Subject line:**
15+
- `<type>(<scope>): <imperative summary>``<scope>` optional
16+
- Types: `feat`, `fix`, `refactor`, `perf`, `docs`, `test`, `chore`, `build`, `ci`, `style`, `revert`
17+
- Imperative mood: "add", "fix", "remove" — not "added", "adds", "adding"
18+
- ≤50 chars when possible, hard cap 72
19+
- No trailing period
20+
- Match project convention for capitalization after the colon
21+
22+
**Body (only if needed):**
23+
- Skip entirely when subject is self-explanatory
24+
- Add body only for: non-obvious *why*, breaking changes, migration notes, linked issues
25+
- Wrap at 72 chars
26+
- Bullets `-` not `*`
27+
- Reference issues/PRs at end: `Closes #42`, `Refs #17`
28+
29+
**What NEVER goes in:**
30+
- "This commit does X", "I", "we", "now", "currently" — the diff says what
31+
- "As requested by..." — use Co-authored-by trailer
32+
- "Generated with Claude Code" or any AI attribution — unless the user's own rule requires an `Assisted-by`/AI-attribution trailer, then add it as a trailer
33+
- Emoji (unless project convention requires)
34+
- Restating the file name when scope already says it
35+
36+
## Examples
37+
38+
Diff: new endpoint for user profile with body explaining the why
39+
- ❌ "feat: add a new endpoint to get user profile information from the database"
40+
-
41+
```
42+
feat(api): add GET /users/:id/profile
43+
44+
Mobile client needs profile data without the full user payload
45+
to reduce LTE bandwidth on cold-launch screens.
46+
47+
Closes #128
48+
```
49+
50+
Diff: breaking API change
51+
-
52+
```
53+
feat(api)!: rename /v1/orders to /v1/checkout
54+
55+
BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout
56+
before 2026-06-01. Old route returns 410 after that date.
57+
```
58+
59+
## Auto-Clarity
60+
61+
Always include body for: breaking changes, security fixes, data migrations, anything reverting a prior commit. Never compress these into subject-only — future debuggers need the context.
62+
63+
## Boundaries
64+
65+
Only generates the commit message. Does not run `git commit`, does not stage files, does not amend. Output the message as a code block ready to paste. "stop caveman-commit" or "normal mode": revert to verbose commit style.

0 commit comments

Comments
 (0)