fix: Commit embedded formulas for go install @latest (#117)
* fix: Commit embedded formulas for go install @latest The internal/formula/formulas/ directory was gitignored, causing `go install github.com/steveyegge/gastown/cmd/gt@latest` to fail with: pattern formulas/*.formula.json: no matching files found The go:embed directive requires these files at build time, but go install @latest doesn't run go:generate. By committing the generated formulas, users can install directly without cloning. Maintainers should run `go generate ./...` after modifying .beads/formulas/ to keep the embedded copy in sync. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: Add check for committed embedded formulas Adds a new CI job that: 1. Builds without running go:generate (catches missing formulas) 2. Verifies committed formulas match .beads/formulas/ source Also removes redundant go:generate steps from other jobs since formulas are now committed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: exclude towers-of-hanoi test formulas from embed These are durability stress test fixtures (pre-computed move sequences), not production formulas users need. Excluding them reduces embedded content by ~10K lines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: gus <steve.yegge@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4ffdc4fe40
commit
1e76bfd7ce
@@ -0,0 +1,227 @@
|
||||
description = """
|
||||
Generate daily digest for overseer (Mayor).
|
||||
|
||||
Dogs work through molecules (poured from this formula) on a scheduled basis (daily, or triggered by plugin)
|
||||
to create summary digests of Gas Town activity. This aggregates:
|
||||
- Work completed across all rigs
|
||||
- Issues filed and closed
|
||||
- Incidents and escalations
|
||||
- Agent health metrics
|
||||
- Key statistics and trends
|
||||
|
||||
## Dog Contract
|
||||
|
||||
This is infrastructure work. You:
|
||||
1. Receive digest period via hook_bead (e.g., daily, weekly)
|
||||
2. Collect data from all rigs you have access to
|
||||
3. Generate formatted digest
|
||||
4. Send to overseer
|
||||
5. Archive digest as bead
|
||||
6. Return to kennel
|
||||
|
||||
## Variables
|
||||
|
||||
| Variable | Source | Description |
|
||||
|----------|--------|-------------|
|
||||
| period | hook_bead | Time period for digest (daily, weekly) |
|
||||
| since | computed | Start timestamp for data collection |
|
||||
| until | computed | End timestamp (usually now) |
|
||||
|
||||
## Why Dogs?
|
||||
|
||||
Digest generation requires reading from multiple rigs. Dogs have multi-rig
|
||||
worktrees. This is also a periodic task that doesn't need a dedicated polecat."""
|
||||
formula = "mol-digest-generate"
|
||||
version = 1
|
||||
|
||||
[squash]
|
||||
trigger = "on_complete"
|
||||
template_type = "work"
|
||||
include_metrics = true
|
||||
|
||||
[[steps]]
|
||||
id = "determine-period"
|
||||
title = "Determine digest time period"
|
||||
description = """
|
||||
Establish the time range for this digest.
|
||||
|
||||
**1. Check assignment:**
|
||||
```bash
|
||||
gt hook # Shows period type
|
||||
```
|
||||
|
||||
**2. Calculate time range:**
|
||||
|
||||
| Period | Since | Until |
|
||||
|--------|-------|-------|
|
||||
| daily | Yesterday 00:00 | Today 00:00 |
|
||||
| weekly | Last Monday 00:00 | This Monday 00:00 |
|
||||
| custom | From hook_bead | From hook_bead |
|
||||
|
||||
```bash
|
||||
# For daily digest
|
||||
since=$(date -v-1d +%Y-%m-%dT00:00:00)
|
||||
until=$(date +%Y-%m-%dT00:00:00)
|
||||
```
|
||||
|
||||
**3. Record period for reporting:**
|
||||
Note the exact timestamps for the digest header.
|
||||
|
||||
**Exit criteria:** Time period established with precise timestamps."""
|
||||
|
||||
[[steps]]
|
||||
id = "collect-rig-data"
|
||||
title = "Collect activity data from all rigs"
|
||||
needs = ["determine-period"]
|
||||
description = """
|
||||
Gather activity data from each rig in the town.
|
||||
|
||||
**1. List accessible rigs:**
|
||||
```bash
|
||||
gt rigs
|
||||
# Returns list of rigs: gastown, beads, etc.
|
||||
```
|
||||
|
||||
**2. For each rig, collect:**
|
||||
|
||||
a) **Issues filed and closed:**
|
||||
```bash
|
||||
# From rig beads
|
||||
bd list --created-after={{since}} --created-before={{until}}
|
||||
bd list --status=closed --updated-after={{since}}
|
||||
```
|
||||
|
||||
b) **Agent activity:**
|
||||
```bash
|
||||
gt polecats <rig> # Polecat activity
|
||||
gt feed --since={{since}} # Activity feed entries
|
||||
```
|
||||
|
||||
c) **Merges:**
|
||||
```bash
|
||||
# Git log for merges to main
|
||||
git -C <rig-path> log --merges --since={{since}} --oneline main
|
||||
```
|
||||
|
||||
d) **Incidents:**
|
||||
```bash
|
||||
# Issues tagged as incident or high-priority
|
||||
bd list --label=incident --created-after={{since}}
|
||||
```
|
||||
|
||||
**3. Aggregate across rigs:**
|
||||
Sum counts, collect notable items, identify trends.
|
||||
|
||||
**Exit criteria:** Raw data collected from all accessible rigs."""
|
||||
|
||||
[[steps]]
|
||||
id = "generate-digest"
|
||||
title = "Generate formatted digest"
|
||||
needs = ["collect-rig-data"]
|
||||
description = """
|
||||
Transform collected data into formatted digest.
|
||||
|
||||
**1. Calculate summary statistics:**
|
||||
- Total issues filed
|
||||
- Total issues closed
|
||||
- Net change (closed - filed)
|
||||
- By type (task, bug, feature)
|
||||
- By rig
|
||||
|
||||
**2. Identify highlights:**
|
||||
- Biggest completions (epics, large features)
|
||||
- Incidents (any P0/P1 issues)
|
||||
- Notable trends (increasing backlog, fast closure rate)
|
||||
|
||||
**3. Generate digest text:**
|
||||
```markdown
|
||||
# Gas Town Daily Digest: {{date}}
|
||||
|
||||
## Summary
|
||||
- **Issues filed**: N (tasks: X, bugs: Y, features: Z)
|
||||
- **Issues closed**: N
|
||||
- **Net change**: +/-N
|
||||
|
||||
## By Rig
|
||||
| Rig | Filed | Closed | Active Polecats |
|
||||
|-----|-------|--------|-----------------|
|
||||
| gastown | X | Y | Z |
|
||||
| beads | X | Y | Z |
|
||||
|
||||
## Highlights
|
||||
### Completed
|
||||
- {{epic or feature}} - completed by {{polecat}}
|
||||
|
||||
### Incidents
|
||||
- {{incident summary if any}}
|
||||
|
||||
## Agent Health
|
||||
- Polecats spawned: N
|
||||
- Polecats retired: N
|
||||
- Average work duration: Xh
|
||||
|
||||
## Trends
|
||||
- Backlog: {{increasing/stable/decreasing}}
|
||||
- Throughput: {{issues/day}}
|
||||
```
|
||||
|
||||
**Exit criteria:** Formatted digest ready for delivery."""
|
||||
|
||||
[[steps]]
|
||||
id = "send-digest"
|
||||
title = "Send digest to overseer"
|
||||
needs = ["generate-digest"]
|
||||
description = """
|
||||
Deliver digest to the Mayor.
|
||||
|
||||
**1. Send via mail:**
|
||||
```bash
|
||||
gt mail send mayor/ -s "Gas Town Digest: {{date}}" -m "$(cat <<EOF
|
||||
{{formatted_digest}}
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
**2. Archive as bead:**
|
||||
Create a digest bead for permanent record:
|
||||
```bash
|
||||
bd create --title="Digest: {{date}}" --type=digest \
|
||||
--description="{{formatted_digest}}" \
|
||||
--label=digest,{{period}}
|
||||
```
|
||||
|
||||
**3. Sync:**
|
||||
```bash
|
||||
bd sync
|
||||
```
|
||||
|
||||
**Exit criteria:** Digest sent to Mayor and archived as bead."""
|
||||
|
||||
[[steps]]
|
||||
id = "return-to-kennel"
|
||||
title = "Signal completion and return to kennel"
|
||||
needs = ["send-digest"]
|
||||
description = """
|
||||
Signal work complete and return to available pool.
|
||||
|
||||
**1. Signal completion to Deacon:**
|
||||
```bash
|
||||
gt mail send deacon/ -s "DOG_DONE $(hostname)" -m "Task: digest-generate
|
||||
Period: {{period}}
|
||||
Date range: {{since}} to {{until}}
|
||||
Status: COMPLETE
|
||||
|
||||
Digest sent to Mayor.
|
||||
Ready for next assignment."
|
||||
```
|
||||
|
||||
**2. Return to kennel:**
|
||||
Dog returns to available state in the pool.
|
||||
|
||||
**Exit criteria:** Deacon notified, dog ready for next work."""
|
||||
|
||||
[vars]
|
||||
[vars.period]
|
||||
description = "The digest period type (daily, weekly, custom)"
|
||||
required = true
|
||||
default = "daily"
|
||||
Reference in New Issue
Block a user