Compare commits
5 Commits
82fb1738c1
...
bead/nixos
| Author | SHA1 | Date | |
|---|---|---|---|
| 6441352ed9 | |||
| 266dee9f8f | |||
| 38395c238f | |||
| e4a1771f48 | |||
| ff1fb245ac |
File diff suppressed because one or more lines are too long
@@ -219,7 +219,11 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = nixosModules ++ [
|
modules = nixosModules ++ [
|
||||||
./machines/john-endesktop/configuration.nix
|
./machines/john-endesktop/configuration.nix
|
||||||
# Minimal server - no home-manager needed
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.users.johno = import ./home/home-server.nix;
|
||||||
|
home-manager.extraSpecialArgs = { inherit system; };
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
home.roles = {
|
home.roles = {
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
development.enable = true;
|
development.enable = true;
|
||||||
|
emacs.enable = true;
|
||||||
|
starship.enable = true;
|
||||||
tmux.enable = true;
|
tmux.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -85,12 +85,17 @@ in
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy local skills from this repo
|
# Copy local skills from this repo (with retry for race conditions with running Claude)
|
||||||
for file in ${./skills}/*.md; do
|
for file in ${./skills}/*.md; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
filename=$(basename "$file" .md)
|
filename=$(basename "$file" .md)
|
||||||
dest="$HOME/.claude/commands/''${filename}.md"
|
dest="$HOME/.claude/commands/''${filename}.md"
|
||||||
cp "$file" "$dest"
|
# Remove existing file first, then copy with retry on failure
|
||||||
|
rm -f "$dest" 2>/dev/null || true
|
||||||
|
if ! cp "$file" "$dest" 2>/dev/null; then
|
||||||
|
sleep 0.5
|
||||||
|
cp "$file" "$dest" || echo "Warning: Failed to copy $filename.md to commands"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,13 @@ Work on bead [BEAD_ID]: [BEAD_TITLE]
|
|||||||
- [List of changes made]"
|
- [List of changes made]"
|
||||||
```
|
```
|
||||||
|
|
||||||
6. **Report results**:
|
6. **Update bead status**:
|
||||||
|
- Mark the bead as "in_review": `bd update [BEAD_ID] --status=in_review`
|
||||||
|
- Add the PR URL to the bead notes: `bd update [BEAD_ID] --notes="$(bd show [BEAD_ID] --json | jq -r '.notes')
|
||||||
|
|
||||||
|
PR: [PR_URL]"`
|
||||||
|
|
||||||
|
7. **Report results**:
|
||||||
- Return: PR URL, bead ID, success/failure status
|
- Return: PR URL, bead ID, success/failure status
|
||||||
- If blocked or unable to complete, explain what's blocking progress
|
- If blocked or unable to complete, explain what's blocking progress
|
||||||
```
|
```
|
||||||
@@ -165,11 +171,11 @@ Example output:
|
|||||||
```
|
```
|
||||||
## Parallel Beads Summary
|
## Parallel Beads Summary
|
||||||
|
|
||||||
| Bead | PR | Status | Review |
|
| Bead | PR | Bead Status | Review |
|
||||||
|------|-----|--------|--------|
|
|------|-----|-------------|--------|
|
||||||
| beads-abc | #123 | Success | Approved |
|
| beads-abc | #123 | in_review | Approved |
|
||||||
| beads-xyz | #124 | Success | Needs changes |
|
| beads-xyz | #124 | in_review | Needs changes |
|
||||||
| beads-123 | - | Failed | Blocked by missing dependency |
|
| beads-123 | - | open (failed) | Blocked by missing dependency |
|
||||||
|
|
||||||
### Failures/Blockers
|
### Failures/Blockers
|
||||||
- beads-123: Could not complete because [reason]
|
- beads-123: Could not complete because [reason]
|
||||||
@@ -177,6 +183,7 @@ Example output:
|
|||||||
### Next Steps
|
### Next Steps
|
||||||
- Review PRs that need changes
|
- Review PRs that need changes
|
||||||
- Address blockers for failed beads
|
- Address blockers for failed beads
|
||||||
|
- Run `/reconcile_beads` after PRs are merged to close beads
|
||||||
```
|
```
|
||||||
|
|
||||||
## Error Handling
|
## Error Handling
|
||||||
|
|||||||
85
home/roles/development/skills/reconcile_beads.md
Normal file
85
home/roles/development/skills/reconcile_beads.md
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
---
|
||||||
|
description: Reconcile beads with merged PRs and close completed beads
|
||||||
|
---
|
||||||
|
|
||||||
|
# Reconcile Beads Workflow
|
||||||
|
|
||||||
|
This skill reconciles beads that are in `in_review` status with their corresponding PRs. If a PR has been merged, the bead is closed.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Custom status `in_review` must be configured: `bd config set status.custom "in_review"`
|
||||||
|
- Beads in `in_review` status should have a PR URL in their notes
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
### Step 1: Find beads in review
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bd list --status=in_review
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2: For each bead, check PR status
|
||||||
|
|
||||||
|
1. **Get the PR URL from bead notes**:
|
||||||
|
```bash
|
||||||
|
bd show [BEAD_ID] --json | jq -r '.notes'
|
||||||
|
```
|
||||||
|
Extract the PR URL (look for lines starting with "PR:" or containing pull request URLs)
|
||||||
|
|
||||||
|
2. **Detect hosting provider**:
|
||||||
|
- Run `git remote get-url origin`
|
||||||
|
- If URL contains `github.com`, use `gh`; otherwise use `tea` (Gitea/Forgejo)
|
||||||
|
|
||||||
|
3. **Check PR status**:
|
||||||
|
- For GitHub:
|
||||||
|
```bash
|
||||||
|
gh pr view [PR_NUMBER] --json state,merged
|
||||||
|
```
|
||||||
|
- For Gitea:
|
||||||
|
```bash
|
||||||
|
tea pr view [PR_NUMBER]
|
||||||
|
```
|
||||||
|
Look for "State: merged" or "State: closed"
|
||||||
|
|
||||||
|
### Step 3: Close merged beads
|
||||||
|
|
||||||
|
If the PR is merged:
|
||||||
|
```bash
|
||||||
|
bd close [BEAD_ID] --reason="PR merged: [PR_URL]"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 4: Report summary
|
||||||
|
|
||||||
|
Present results:
|
||||||
|
|
||||||
|
```
|
||||||
|
## Beads Reconciliation Summary
|
||||||
|
|
||||||
|
### Closed (PR Merged)
|
||||||
|
| Bead | PR | Title |
|
||||||
|
|------|-----|-------|
|
||||||
|
| beads-abc | #123 | Feature X |
|
||||||
|
| beads-xyz | #456 | Bug fix Y |
|
||||||
|
|
||||||
|
### Still in Review
|
||||||
|
| Bead | PR | Status | Title |
|
||||||
|
|------|-----|--------|-------|
|
||||||
|
| beads-def | #789 | Open | Feature Z |
|
||||||
|
|
||||||
|
### Issues Found
|
||||||
|
- beads-ghi: No PR URL found in notes
|
||||||
|
- beads-jkl: PR #999 not found (may have been deleted)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
- **Missing PR URL**: Skip the bead and report it
|
||||||
|
- **PR not found**: Report the error but continue with other beads
|
||||||
|
- **API errors**: Report and continue
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- This skill complements `/parallel_beads` which sets beads to `in_review` status
|
||||||
|
- Run this skill periodically or after merging PRs to keep beads in sync
|
||||||
|
- Beads with closed (but not merged) PRs are not automatically closed - they may need rework
|
||||||
Reference in New Issue
Block a user