Compare commits
2 Commits
main
...
891f1503ba
| Author | SHA1 | Date | |
|---|---|---|---|
| 891f1503ba | |||
| 352c89756f |
5
.beads/.gitignore
vendored
5
.beads/.gitignore
vendored
@@ -32,11 +32,6 @@ beads.left.meta.json
|
||||
beads.right.jsonl
|
||||
beads.right.meta.json
|
||||
|
||||
# Sync state (local-only, per-machine)
|
||||
# These files are machine-specific and should not be shared across clones
|
||||
.sync.lock
|
||||
sync_base.jsonl
|
||||
|
||||
# NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here.
|
||||
# They would override fork protection in .git/info/exclude, allowing
|
||||
# contributors to accidentally commit upstream issue databases.
|
||||
|
||||
@@ -10,11 +10,9 @@ jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@main
|
||||
|
||||
- name: Check flake
|
||||
run: nix flake check
|
||||
env:
|
||||
NIX_CONFIG: "access-tokens = git.johnogle.info=${{ secrets.GITEA_ACCESS_TOKEN }}"
|
||||
|
||||
6
flake.lock
generated
6
flake.lock
generated
@@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768509852,
|
||||
"narHash": "sha256-4oZXrqBjK9V8qKHoxlfil20qcJdOU8HXJA4627nX1nQ=",
|
||||
"lastModified": 1767911810,
|
||||
"narHash": "sha256-0L4ATr01UsmBC0rSW62VIMVVSUihAQu2+ZOoHk9BQnA=",
|
||||
"owner": "steveyegge",
|
||||
"repo": "beads",
|
||||
"rev": "d3db8253ff09e0f139ffbb6f839afe13acbf7bdb",
|
||||
"rev": "28ff9fe9919a9665a0f00f5b3fcd084b43fb6cc3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
home.roles = {
|
||||
"3d-printing".enable = true;
|
||||
base.enable = true;
|
||||
gaming.enable = true;
|
||||
desktop.enable = true;
|
||||
emacs.enable = true;
|
||||
email.enable = true;
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
home.roles = {
|
||||
base.enable = true;
|
||||
desktop.enable = true;
|
||||
gaming.enable = true;
|
||||
development.enable = true;
|
||||
communication.enable = true;
|
||||
email.enable = true;
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
home.roles = {
|
||||
base.enable = true;
|
||||
desktop.enable = true;
|
||||
gaming.enable = true;
|
||||
media.enable = true;
|
||||
communication.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.communication;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.communication = {
|
||||
@@ -13,14 +12,14 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
# For logging back into google chat (cross-platform)
|
||||
globalInputs.google-cookie-retrieval.packages.${system}.default
|
||||
] ++ optionals isLinux [
|
||||
# Linux-only communication apps (Electron apps don't build on Darwin)
|
||||
# Communication apps
|
||||
pkgs.element-desktop
|
||||
# Re-enabled in 25.11 after security issues were resolved
|
||||
pkgs.fluffychat
|
||||
pkgs.nextcloud-talk-desktop
|
||||
|
||||
# For logging back into google chat
|
||||
globalInputs.google-cookie-retrieval.packages.${system}.default
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.desktop;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.desktop = {
|
||||
@@ -13,29 +12,27 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Cross-platform desktop applications
|
||||
# Desktop applications
|
||||
bitwarden-desktop
|
||||
keepassxc
|
||||
xdg-utils # XDG utilities for opening files/URLs with default applications
|
||||
] ++ optionals isLinux [
|
||||
# Linux-only desktop applications
|
||||
dunst
|
||||
keepassxc
|
||||
unstable.ghostty
|
||||
|
||||
# Linux-only desktop utilities
|
||||
# Desktop utilities
|
||||
feh # Image viewer and wallpaper setter for X11
|
||||
rofi # Application launcher for X11
|
||||
solaar # Logitech management software
|
||||
waybar
|
||||
wofi # Application launcher for Wayland
|
||||
xdg-utils # XDG utilities for opening files/URLs with default applications
|
||||
|
||||
# Linux-only system utilities with GUI components
|
||||
# System utilities with GUI components
|
||||
(snapcast.override { pulseaudioSupport = true; })
|
||||
|
||||
# KDE tiling window management (Linux-only)
|
||||
# KDE tiling window management
|
||||
kdePackages.krohnkite # Dynamic tiling extension for KWin 6
|
||||
|
||||
# KDE PIM applications for email, calendar, and contacts (Linux-only)
|
||||
# KDE PIM applications for email, calendar, and contacts
|
||||
kdePackages.kmail
|
||||
kdePackages.kmail-account-wizard
|
||||
kdePackages.kmailtransport
|
||||
@@ -43,33 +40,33 @@ in
|
||||
kdePackages.kaddressbook
|
||||
kdePackages.kontact
|
||||
|
||||
# KDE System components needed for proper integration (Linux-only)
|
||||
# KDE System components needed for proper integration
|
||||
kdePackages.kded
|
||||
kdePackages.systemsettings
|
||||
kdePackages.kmenuedit
|
||||
|
||||
# Desktop menu support (Linux-only)
|
||||
# Desktop menu support
|
||||
kdePackages.plasma-desktop # Contains applications.menu
|
||||
|
||||
# KDE Online Accounts support (Linux-only)
|
||||
# KDE Online Accounts support
|
||||
kdePackages.kaccounts-integration
|
||||
kdePackages.kaccounts-providers
|
||||
kdePackages.signond
|
||||
|
||||
# KDE Mapping (Linux-only)
|
||||
# KDE Mapping
|
||||
kdePackages.marble # Virtual globe and world atlas
|
||||
|
||||
# KDE Productivity (Linux-only)
|
||||
# KDE Productivity
|
||||
kdePackages.kate # Advanced text editor with syntax highlighting
|
||||
kdePackages.okular # Universal document viewer (PDF, ePub, etc.)
|
||||
kdePackages.spectacle # Screenshot capture utility
|
||||
kdePackages.filelight # Visual disk usage analyzer
|
||||
|
||||
# KDE Multimedia (Linux-only)
|
||||
# KDE Multimedia
|
||||
kdePackages.gwenview # Image viewer and basic editor
|
||||
kdePackages.elisa # Music player
|
||||
|
||||
# KDE System Utilities (Linux-only)
|
||||
# KDE System Utilities
|
||||
kdePackages.ark # Archive manager (zip, tar, 7z, etc.)
|
||||
kdePackages.yakuake # Drop-down terminal emulator
|
||||
];
|
||||
@@ -80,15 +77,12 @@ in
|
||||
|
||||
programs.spotify-player.enable = true;
|
||||
|
||||
# Linux-only: GNOME keyring service
|
||||
services.gnome-keyring = mkIf isLinux {
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Linux-only: systemd user services for rbw vault unlock
|
||||
systemd.user.services = mkIf isLinux {
|
||||
# rbw vault unlock on login
|
||||
rbw-unlock-on-login = {
|
||||
# rbw vault unlock on login and resume from suspend
|
||||
systemd.user.services.rbw-unlock-on-login = {
|
||||
Unit = {
|
||||
Description = "Unlock rbw vault at login";
|
||||
After = [ "graphical-session.target" ];
|
||||
@@ -107,8 +101,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# rbw vault unlock on resume from suspend
|
||||
rbw-unlock-on-resume = {
|
||||
systemd.user.services.rbw-unlock-on-resume = {
|
||||
Unit = {
|
||||
Description = "Unlock rbw vault after resume from suspend";
|
||||
After = [ "suspend.target" ];
|
||||
@@ -126,10 +119,9 @@ in
|
||||
WantedBy = [ "suspend.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Linux-only: KDE environment variables for proper integration
|
||||
home.sessionVariables = mkIf isLinux {
|
||||
# KDE environment variables for proper integration
|
||||
home.sessionVariables = {
|
||||
QT_QPA_PLATFORMTHEME = "kde";
|
||||
KDE_SESSION_VERSION = "6";
|
||||
};
|
||||
@@ -149,14 +141,13 @@ in
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
};
|
||||
defaultApplications = {
|
||||
# Web browsers (cross-platform)
|
||||
# Web browsers
|
||||
"text/html" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
"x-scheme-handler/about" = "firefox.desktop";
|
||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||
} // optionalAttrs isLinux {
|
||||
# Linux-only: KDE application associations
|
||||
|
||||
# Documents
|
||||
"application/pdf" = "okular.desktop";
|
||||
"text/plain" = "kate.desktop";
|
||||
@@ -199,11 +190,9 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Linux-only: Fix for KDE applications.menu file issue on Plasma 6
|
||||
# Fix for KDE applications.menu file issue on Plasma 6
|
||||
# KDE still looks for applications.menu but Plasma 6 renamed it to plasma-applications.menu
|
||||
xdg.configFile."menus/applications.menu" = mkIf isLinux {
|
||||
source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
};
|
||||
xdg.configFile."menus/applications.menu".source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
|
||||
# Note: modules must be imported at top-level home config
|
||||
};
|
||||
|
||||
@@ -1,317 +0,0 @@
|
||||
---
|
||||
description: Batch research and planning for multiple beads with interactive question review
|
||||
model: opus
|
||||
---
|
||||
|
||||
# Beads Batch Research+Plan
|
||||
|
||||
This skill automates the common workflow of:
|
||||
1. Running /beads_research in parallel for multiple beads
|
||||
2. Presenting open questions interactively for user input (bead-by-bead)
|
||||
3. Running /beads_plan for all researched beads (plus any spawned from splits)
|
||||
|
||||
## When to Use
|
||||
|
||||
- You have multiple beads ready for work
|
||||
- You want to research and plan them efficiently before implementation
|
||||
- You prefer to batch your question-answering rather than context-switching between skills
|
||||
|
||||
## Phase 1: Selection
|
||||
|
||||
1. **Get ready beads**: Run `bd ready --limit=20` to list beads with no blockers
|
||||
|
||||
2. **Filter already-researched beads**:
|
||||
For each ready bead, check if it already has research:
|
||||
```bash
|
||||
ls thoughts/beads-{bead-id}/research.md 2>/dev/null
|
||||
```
|
||||
|
||||
Categorize beads:
|
||||
- **Needs research**: No `research.md` exists
|
||||
- **Has research, needs plan**: `research.md` exists but no `plan.md`
|
||||
- **Already planned**: Both `research.md` and `plan.md` exist
|
||||
|
||||
3. **Present selection**:
|
||||
```
|
||||
Ready beads available for batch research+plan:
|
||||
|
||||
NEEDS RESEARCH:
|
||||
- {bead-id}: {title} (type: {type})
|
||||
- ...
|
||||
|
||||
HAS RESEARCH (plan only):
|
||||
- {bead-id}: {title} (type: {type})
|
||||
- ...
|
||||
|
||||
ALREADY PLANNED (skip):
|
||||
- {bead-id}: {title}
|
||||
|
||||
Which beads would you like to process?
|
||||
```
|
||||
|
||||
4. **Use AskUserQuestion** with `multiSelect: true`:
|
||||
- Include bead ID and title for each option
|
||||
- Separate options by category
|
||||
- Allow selection across categories
|
||||
|
||||
## Phase 2: Parallel Research
|
||||
|
||||
For each selected bead that NEEDS RESEARCH, launch a research subagent.
|
||||
|
||||
### Subagent Instructions Template
|
||||
|
||||
```
|
||||
Research bead [BEAD_ID]: [BEAD_TITLE]
|
||||
|
||||
1. **Load bead context**:
|
||||
```bash
|
||||
bd show [BEAD_ID]
|
||||
```
|
||||
|
||||
2. **Create artifact directory**:
|
||||
```bash
|
||||
mkdir -p thoughts/beads-[BEAD_ID]
|
||||
```
|
||||
|
||||
3. **Conduct research** following beads_research.md patterns:
|
||||
- Analyze and decompose the research question
|
||||
- Spawn parallel sub-agent tasks (codebase-locator, codebase-analyzer, etc.)
|
||||
- Synthesize findings
|
||||
|
||||
4. **Write research document** to `thoughts/beads-[BEAD_ID]/research.md`:
|
||||
- Include frontmatter with metadata
|
||||
- Document findings with file:line references
|
||||
- **CRITICAL**: Include "## Open Questions" section listing any unresolved items
|
||||
|
||||
5. **Return summary**:
|
||||
- Research status (complete/partial)
|
||||
- Number of open questions
|
||||
- Key findings summary (2-3 bullet points)
|
||||
- List of open questions verbatim
|
||||
```
|
||||
|
||||
### Launching Subagents
|
||||
|
||||
Use `subagent_type: "opus"` for research subagents (matches beads_research model setting).
|
||||
|
||||
Launch ALL research subagents in a single message for parallel execution:
|
||||
```
|
||||
<Task calls for each selected bead needing research - all in one message>
|
||||
```
|
||||
|
||||
### Collecting Results
|
||||
|
||||
Wait for ALL research subagents to complete. Collect:
|
||||
- Bead ID
|
||||
- Research status
|
||||
- Open questions list
|
||||
- Any errors encountered
|
||||
|
||||
## Phase 3: Interactive Question Review
|
||||
|
||||
Present each bead's open questions sequentially for user input.
|
||||
|
||||
### For Each Bead (in order):
|
||||
|
||||
1. **Present research summary**:
|
||||
```
|
||||
## Bead {N}/{total}: {bead-id} - {title}
|
||||
|
||||
Research complete. Key findings:
|
||||
- {finding 1}
|
||||
- {finding 2}
|
||||
|
||||
Open questions requiring your input:
|
||||
1. {question 1}
|
||||
2. {question 2}
|
||||
|
||||
Additionally:
|
||||
- Should this bead be split into multiple beads? (y/n)
|
||||
- If split, describe the split:
|
||||
```
|
||||
|
||||
2. **Collect user responses**:
|
||||
- Answers to open questions
|
||||
- Split decision (yes/no)
|
||||
- If split: new bead titles and how to divide the work
|
||||
|
||||
3. **Handle splits**:
|
||||
If user indicates a split:
|
||||
```bash
|
||||
# Create new beads for split work
|
||||
bd create --title="{split title 1}" --type={type} --priority={priority} \
|
||||
--description="{description based on user input}"
|
||||
|
||||
# Update original bead if scope narrowed
|
||||
bd update {original-bead-id} --description="{updated description}"
|
||||
```
|
||||
|
||||
Track new bead IDs for inclusion in planning phase.
|
||||
|
||||
4. **Update research document**:
|
||||
Append user answers to `thoughts/beads-{id}/research.md`:
|
||||
```markdown
|
||||
## User Clarifications [{timestamp}]
|
||||
|
||||
Q: {question 1}
|
||||
A: {user answer 1}
|
||||
|
||||
Q: {question 2}
|
||||
A: {user answer 2}
|
||||
|
||||
## Bead Splits
|
||||
{If split: description of split and new bead IDs}
|
||||
```
|
||||
|
||||
### Progress Tracking
|
||||
|
||||
After each bead's questions are answered, confirm before moving to next:
|
||||
```
|
||||
Questions answered for {bead-id}. {N-1} beads remaining.
|
||||
Continue to next bead? (y/n)
|
||||
```
|
||||
|
||||
### Beads with No Questions
|
||||
|
||||
If a bead's research had no open questions:
|
||||
```
|
||||
## Bead {N}/{total}: {bead-id} - {title}
|
||||
|
||||
Research complete with no open questions.
|
||||
|
||||
Key findings:
|
||||
- {finding 1}
|
||||
- {finding 2}
|
||||
|
||||
Should this bead be split? (y/n)
|
||||
```
|
||||
|
||||
## Phase 4: Parallel Planning
|
||||
|
||||
After all questions answered, launch planning subagents for all beads.
|
||||
|
||||
### Beads to Plan
|
||||
|
||||
Include:
|
||||
- Original beads that were researched
|
||||
- Beads that had existing research (from selection phase)
|
||||
- New beads spawned from splits
|
||||
|
||||
### Subagent Instructions Template
|
||||
|
||||
```
|
||||
Create implementation plan for bead [BEAD_ID]: [BEAD_TITLE]
|
||||
|
||||
1. **Load context**:
|
||||
```bash
|
||||
bd show [BEAD_ID]
|
||||
```
|
||||
|
||||
2. **Read research** (it exists and has user clarifications):
|
||||
Read `thoughts/beads-[BEAD_ID]/research.md` FULLY
|
||||
|
||||
3. **Create plan** following beads_plan.md patterns:
|
||||
- Context gathering via sub-agents
|
||||
- Design approach based on research findings and user clarifications
|
||||
- **Skip interactive questions** - they were already answered in research review
|
||||
|
||||
4. **Write plan** to `thoughts/beads-[BEAD_ID]/plan.md`:
|
||||
- Full plan structure with phases
|
||||
- Success criteria (automated and manual)
|
||||
- References to research document
|
||||
|
||||
5. **Update bead**:
|
||||
```bash
|
||||
bd update [BEAD_ID] --notes="Plan created: thoughts/beads-[BEAD_ID]/plan.md"
|
||||
```
|
||||
|
||||
6. **Return summary**:
|
||||
- Plan status (complete/failed)
|
||||
- Number of phases
|
||||
- Estimated complexity (small/medium/large)
|
||||
- Any issues encountered
|
||||
```
|
||||
|
||||
### Launching Subagents
|
||||
|
||||
Use `subagent_type: "opus"` for planning subagents (matches beads_plan model setting).
|
||||
|
||||
Launch ALL planning subagents in a single message:
|
||||
```
|
||||
<Task calls for each bead to plan - all in one message>
|
||||
```
|
||||
|
||||
### Handling Beads Without Research
|
||||
|
||||
For beads that had existing research but user didn't review questions:
|
||||
- Planning subagent reads existing research
|
||||
- If research has unresolved open questions, subagent should flag this in its return
|
||||
|
||||
## Phase 5: Summary
|
||||
|
||||
After all planning completes, present final summary.
|
||||
|
||||
### Summary Format
|
||||
|
||||
```
|
||||
## Batch Research+Plan Complete
|
||||
|
||||
### Successfully Processed:
|
||||
| Bead | Title | Research | Plan | Phases | Complexity |
|
||||
|------|-------|----------|------|--------|------------|
|
||||
| {id} | {title} | Complete | Complete | 3 | medium |
|
||||
| {id} | {title} | Complete | Complete | 2 | small |
|
||||
|
||||
### New Beads (from splits):
|
||||
| Bead | Title | Parent | Status |
|
||||
|------|-------|--------|--------|
|
||||
| {new-id} | {title} | {parent-id} | Planned |
|
||||
|
||||
### Failed:
|
||||
| Bead | Title | Phase Failed | Error |
|
||||
|------|-------|--------------|-------|
|
||||
| {id} | {title} | Research | Timeout |
|
||||
|
||||
### Next Steps:
|
||||
1. Review plans at `thoughts/beads-{id}/plan.md`
|
||||
2. Run `/parallel_beads` to implement all planned beads
|
||||
3. Or run `/beads_implement {id}` for individual implementation
|
||||
|
||||
### Artifacts Created:
|
||||
- Research: thoughts/beads-{id}/research.md (x{N} files)
|
||||
- Plans: thoughts/beads-{id}/plan.md (x{N} files)
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Research Subagent Failure
|
||||
- Log the failure with bead ID and error
|
||||
- Continue with other beads
|
||||
- Exclude failed beads from question review and planning
|
||||
- Report in final summary
|
||||
|
||||
### Planning Subagent Failure
|
||||
- Log the failure with bead ID and error
|
||||
- Research still valid - can retry planning manually
|
||||
- Report in final summary
|
||||
|
||||
### User Cancellation During Question Review
|
||||
- Save progress to bead notes
|
||||
- Report which beads were completed
|
||||
- User can resume with remaining beads in new session
|
||||
|
||||
### Split Bead Creation Failure
|
||||
- Report error but continue with original bead
|
||||
- User can manually create split beads later
|
||||
|
||||
## Resource Limits
|
||||
|
||||
- Maximum concurrent research subagents: 5
|
||||
- Maximum concurrent planning subagents: 5
|
||||
- If more beads selected, process in batches
|
||||
|
||||
## Notes
|
||||
|
||||
- This skill is designed for the "research+plan before implementation" workflow
|
||||
- Pairs well with `/parallel_beads` for subsequent implementation
|
||||
- Run `/reconcile_beads` after implementation PRs merge
|
||||
@@ -5,12 +5,6 @@ with lib;
|
||||
let
|
||||
cfg = config.home.roles.development;
|
||||
|
||||
# FIXME: Temporary override for upstream beads vendorHash mismatch
|
||||
# Remove after upstream fix: https://github.com/steveyegge/beads/issues/XXX
|
||||
beadsPackage = globalInputs.beads.packages.${system}.default.overrideAttrs (old: {
|
||||
vendorHash = "sha256-YU+bRLVlWtHzJ1QPzcKJ70f+ynp8lMoIeFlm+29BNPE=";
|
||||
});
|
||||
|
||||
# Fetch the claude-plugins repository (for humanlayer commands/agents)
|
||||
# Update the rev to get newer versions of the commands
|
||||
claudePluginsRepo = builtins.fetchGit {
|
||||
@@ -43,7 +37,7 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
beadsPackage
|
||||
globalInputs.beads.packages.${system}.default
|
||||
pkgs.unstable.claude-code
|
||||
pkgs.unstable.claude-code-router
|
||||
pkgs.unstable.codex
|
||||
@@ -90,8 +84,8 @@ in
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy local commands from this repo (with retry for race conditions with running Claude)
|
||||
for file in ${./commands}/*.md; do
|
||||
# Copy local skills from this repo (with retry for race conditions with running Claude)
|
||||
for file in ${./skills}/*.md; do
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename "$file" .md)
|
||||
dest="$HOME/.claude/commands/''${filename}.md"
|
||||
@@ -104,36 +98,11 @@ in
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy local skills (reference materials) to skills subdirectory
|
||||
mkdir -p ~/.claude/commands/skills
|
||||
for file in ${./skills}/*.md; do
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename "$file" .md)
|
||||
dest="$HOME/.claude/commands/skills/''${filename}.md"
|
||||
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 skills"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy micro-skills (compact reusable knowledge referenced by formulas)
|
||||
for file in ${./skills/micro}/*.md; do
|
||||
if [ -f "$file" ]; then
|
||||
cp "$file" "$HOME/.claude/commands/skills/$(basename "$file")"
|
||||
fi
|
||||
done
|
||||
|
||||
# Install beads formulas to user-level formula directory
|
||||
mkdir -p ~/.beads/formulas
|
||||
for file in ${./formulas}/*.formula.toml; do
|
||||
if [ -f "$file" ]; then
|
||||
cp "$file" "$HOME/.beads/formulas/$(basename "$file")"
|
||||
fi
|
||||
done
|
||||
|
||||
$DRY_RUN_CMD echo "Claude Code plugins installed: humanlayer commands/agents + local commands + local skills + formulas"
|
||||
$DRY_RUN_CMD echo "Claude Code humanlayer commands and agents installed successfully${
|
||||
if cfg.allowArbitraryClaudeCodeModelSelection
|
||||
then " (model specifications preserved)"
|
||||
else " (model selection removed)"
|
||||
} + local skills"
|
||||
'';
|
||||
|
||||
# Set up beads Claude Code integration (hooks for SessionStart/PreCompact)
|
||||
@@ -141,7 +110,7 @@ in
|
||||
home.activation.claudeCodeBeadsSetup = lib.hm.dag.entryAfter ["writeBoundary" "claudeCodeCommands"] ''
|
||||
# Run bd setup claude to install hooks into ~/.claude/settings.json
|
||||
# This is idempotent - safe to run multiple times
|
||||
${beadsPackage}/bin/bd setup claude 2>/dev/null || true
|
||||
${globalInputs.beads.packages.${system}.default}/bin/bd setup claude 2>/dev/null || true
|
||||
|
||||
$DRY_RUN_CMD echo "Claude Code beads integration configured (hooks installed)"
|
||||
'';
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
# Quick Fix Formula
|
||||
#
|
||||
# Streamlined workflow for well-understood bugs and small fixes.
|
||||
# Skips the deep research and planning phases of RPI - get in, fix, get out.
|
||||
#
|
||||
# Use when:
|
||||
# - Bug is well-understood (you know what's broken)
|
||||
# - Fix is straightforward (no architectural decisions)
|
||||
# - Change is small (< 100 lines)
|
||||
#
|
||||
# Use RPI instead when:
|
||||
# - Root cause is unclear
|
||||
# - Multiple approaches possible
|
||||
# - Significant design decisions needed
|
||||
|
||||
formula = "quick-fix"
|
||||
description = """
|
||||
Streamlined workflow for bugs and small fixes.
|
||||
|
||||
A faster alternative to RPI for well-understood issues:
|
||||
1. Quick investigation to confirm understanding
|
||||
2. Implement the fix
|
||||
3. Verify with tests
|
||||
4. Commit and close
|
||||
|
||||
No human gates - designed for quick turnaround on obvious fixes.
|
||||
"""
|
||||
version = 1
|
||||
type = "workflow"
|
||||
|
||||
# === Variables ===
|
||||
|
||||
[vars.title]
|
||||
required = true
|
||||
description = "Brief description of the bug/fix"
|
||||
|
||||
[vars.bead_id]
|
||||
description = "Existing bead ID (creates new if not provided)"
|
||||
|
||||
[vars.test_cmd]
|
||||
default = "make test"
|
||||
description = "Command to verify the fix"
|
||||
|
||||
# === Steps ===
|
||||
|
||||
[[steps]]
|
||||
id = "investigate"
|
||||
title = "Investigate: {{title}}"
|
||||
description = """
|
||||
Quick investigation to confirm understanding of the bug.
|
||||
|
||||
Goals:
|
||||
- Locate the problematic code
|
||||
- Confirm root cause matches expectations
|
||||
- Identify files that need changes
|
||||
|
||||
This is NOT deep research - spend 5-10 minutes max.
|
||||
If the bug is more complex than expected, pivot to RPI workflow.
|
||||
|
||||
Output: Mental model of what to fix (no artifact needed).
|
||||
"""
|
||||
|
||||
[[steps]]
|
||||
id = "fix"
|
||||
title = "Fix: {{title}}"
|
||||
needs = ["investigate"]
|
||||
description = """
|
||||
Implement the fix.
|
||||
|
||||
Guidelines:
|
||||
- Make minimal changes to fix the issue
|
||||
- Follow existing code patterns
|
||||
- Add/update tests if appropriate
|
||||
- Keep changes focused (no drive-by refactors)
|
||||
|
||||
If the fix grows beyond expectations, pause and consider:
|
||||
- Should this be an RPI workflow instead?
|
||||
- Should we split into multiple changes?
|
||||
"""
|
||||
|
||||
[[steps]]
|
||||
id = "verify"
|
||||
title = "Verify fix"
|
||||
needs = ["fix"]
|
||||
description = """
|
||||
Verify the fix works correctly.
|
||||
|
||||
Run: {{test_cmd}}
|
||||
|
||||
Also check:
|
||||
- Bug is actually fixed (manual verification)
|
||||
- No obvious regressions introduced
|
||||
- Code compiles/builds cleanly
|
||||
|
||||
If tests fail, iterate on the fix step.
|
||||
"""
|
||||
|
||||
[[steps]]
|
||||
id = "commit"
|
||||
title = "Commit and close"
|
||||
needs = ["verify"]
|
||||
description = """
|
||||
Commit the fix and close the bead.
|
||||
|
||||
Actions:
|
||||
1. Stage changes: git add -A
|
||||
2. Commit with descriptive message: git commit -m "fix: {{title}}"
|
||||
3. Push to remote: git push
|
||||
4. Close the bead: bd close {{bead_id}}
|
||||
|
||||
Commit message should explain:
|
||||
- What was broken
|
||||
- How it was fixed
|
||||
- Any relevant context
|
||||
"""
|
||||
@@ -1,124 +0,0 @@
|
||||
# RPI Formula - Research -> Plan -> Implement
|
||||
#
|
||||
# Universal workflow for feature development with human gates.
|
||||
|
||||
formula = "rpi"
|
||||
description = """
|
||||
Research -> Plan -> Implement workflow.
|
||||
|
||||
Usage:
|
||||
bd pour rpi --var title="Add user preferences"
|
||||
bd pour rpi --var title="Auth" --var bead_id="project-abc" --var test_cmd="nix flake check"
|
||||
"""
|
||||
version = 1
|
||||
type = "workflow"
|
||||
|
||||
# ─── Variables ───
|
||||
|
||||
[vars.title]
|
||||
required = true
|
||||
description = "What are we building?"
|
||||
|
||||
[vars.bead_id]
|
||||
description = "Existing bead ID (creates new if not provided)"
|
||||
|
||||
[vars.test_cmd]
|
||||
default = "make test"
|
||||
description = "Command to run tests"
|
||||
|
||||
[vars.lint_cmd]
|
||||
default = "make lint"
|
||||
description = "Command to run linting"
|
||||
|
||||
# ─── Research Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "research"
|
||||
title = "Research: {{title}}"
|
||||
skill = "research-agents"
|
||||
description = """
|
||||
Conduct comprehensive codebase research.
|
||||
|
||||
Goals:
|
||||
- Understand current implementation
|
||||
- Identify patterns to follow
|
||||
- Find relevant files and dependencies
|
||||
- Document key discoveries
|
||||
|
||||
Output: thoughts/beads-{{bead_id}}/research.md
|
||||
"""
|
||||
|
||||
# ─── Planning Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "plan"
|
||||
title = "Plan: {{title}}"
|
||||
needs = ["research"]
|
||||
type = "human"
|
||||
skill = "planning"
|
||||
description = """
|
||||
Create detailed implementation plan based on research.
|
||||
|
||||
Goals:
|
||||
- Present understanding and clarify requirements
|
||||
- Propose design options with tradeoffs
|
||||
- Define phases with success criteria
|
||||
- Identify what we're NOT doing
|
||||
|
||||
Output: thoughts/beads-{{bead_id}}/plan.md
|
||||
"""
|
||||
|
||||
[steps.gate]
|
||||
type = "human"
|
||||
reason = "Plan approval before implementation"
|
||||
|
||||
# ─── Implementation Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "implement"
|
||||
title = "Implement: {{title}}"
|
||||
needs = ["plan"]
|
||||
description = """
|
||||
Execute the approved plan phase by phase.
|
||||
|
||||
For each phase:
|
||||
1. Make the changes
|
||||
2. Run verification: {{test_cmd}}, {{lint_cmd}}
|
||||
3. Update plan checkboxes for resumability
|
||||
|
||||
Stop and ask if encountering unexpected issues.
|
||||
"""
|
||||
|
||||
# ─── Verification Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "verify"
|
||||
title = "Manual verification"
|
||||
needs = ["implement"]
|
||||
type = "human"
|
||||
description = """
|
||||
Human confirms implementation works correctly.
|
||||
|
||||
Check: feature works, edge cases handled, no regressions.
|
||||
Tests: {{test_cmd}} | Lint: {{lint_cmd}}
|
||||
"""
|
||||
|
||||
[steps.gate]
|
||||
type = "human"
|
||||
reason = "Confirm implementation is correct"
|
||||
|
||||
# ─── Completion ───
|
||||
|
||||
[[steps]]
|
||||
id = "complete"
|
||||
title = "Close bead"
|
||||
needs = ["verify"]
|
||||
skill = "artifact-format"
|
||||
description = """
|
||||
Mark work as complete.
|
||||
|
||||
Actions:
|
||||
- bd update {{bead_id}} --notes="Implementation complete"
|
||||
- bd close {{bead_id}} --reason="Completed: {{title}}"
|
||||
- bd sync && git push
|
||||
"""
|
||||
@@ -1,230 +0,0 @@
|
||||
---
|
||||
description: How to use the bd (beads) CLI for issue tracking, dependencies, and workflow orchestration
|
||||
---
|
||||
|
||||
# BD Workflow
|
||||
|
||||
The `bd` CLI is a git-backed issue tracker with first-class dependency support. Use it for multi-session work, blocking relationships, and persistent memory across conversation compaction.
|
||||
|
||||
## When to Use BD vs TodoWrite
|
||||
|
||||
| Use BD | Use TodoWrite |
|
||||
|--------|---------------|
|
||||
| Work spans multiple sessions | Single-session tasks |
|
||||
| Dependencies between tasks | Independent subtasks |
|
||||
| Need audit trail in git | Ephemeral tracking |
|
||||
| Cross-repo coordination | Local project only |
|
||||
| Resuming after compaction | Simple task lists |
|
||||
|
||||
## Core Commands
|
||||
|
||||
### Creating Issues
|
||||
|
||||
```bash
|
||||
bd create "Issue title" # Basic task
|
||||
bd create "Bug title" --type=bug --priority=1 # P1 bug
|
||||
bd create "Feature" --type=feature -d "Details" # With description
|
||||
bd q "Quick capture" # Output only ID
|
||||
```
|
||||
|
||||
### Managing Issues
|
||||
|
||||
```bash
|
||||
bd show <id> # View issue details
|
||||
bd show <id> --children # View children of epic
|
||||
bd list # List open issues (default 50)
|
||||
bd list --all # Include closed
|
||||
bd list -s in_progress # Filter by status
|
||||
bd list -t bug -p 0 # P0 bugs
|
||||
bd list --pretty # Tree format
|
||||
```
|
||||
|
||||
### Updating Issues
|
||||
|
||||
```bash
|
||||
bd update <id> --status=in_progress # Start work
|
||||
bd update <id> --status=blocked # Mark blocked
|
||||
bd update <id> --claim # Claim atomically
|
||||
bd update <id> --add-label=urgent # Add label
|
||||
bd update <id> -d "New description" # Update description
|
||||
```
|
||||
|
||||
### Closing Issues
|
||||
|
||||
```bash
|
||||
bd close <id> # Close issue
|
||||
bd close <id> --continue # Auto-advance to next step
|
||||
bd close <id> --suggest-next # Show newly unblocked
|
||||
```
|
||||
|
||||
## Finding Work
|
||||
|
||||
```bash
|
||||
bd ready # Ready issues (no blockers)
|
||||
bd ready --mol <mol-id> # Ready steps in molecule
|
||||
bd ready -n 5 # Limit to 5
|
||||
bd ready --assignee me # Assigned to me
|
||||
bd blocked # Show blocked issues
|
||||
bd blocked --parent <id> # Blocked within epic
|
||||
```
|
||||
|
||||
## Dependency Management
|
||||
|
||||
### Creating Dependencies
|
||||
|
||||
```bash
|
||||
bd dep <blocker> --blocks <blocked> # A blocks B
|
||||
bd dep add <blocked> <blocker> # Same as above
|
||||
bd dep relate <id1> <id2> # Bidirectional link
|
||||
```
|
||||
|
||||
### Viewing Dependencies
|
||||
|
||||
```bash
|
||||
bd dep list <id> # Show dependencies
|
||||
bd dep tree <id> # Dependency tree
|
||||
bd dep cycles # Detect cycles
|
||||
```
|
||||
|
||||
### Removing Dependencies
|
||||
|
||||
```bash
|
||||
bd dep remove <blocked> <blocker> # Remove dependency
|
||||
bd dep unrelate <id1> <id2> # Remove relation
|
||||
```
|
||||
|
||||
## Sync Workflow
|
||||
|
||||
BD syncs issues via git. The daemon handles this automatically, but manual sync is available:
|
||||
|
||||
```bash
|
||||
bd sync # Full sync (pull, merge, push)
|
||||
bd sync --flush-only # Export to JSONL only
|
||||
bd sync --import-only # Import from JSONL only
|
||||
bd sync --status # Show sync branch diff
|
||||
bd sync --squash # Accumulate without commit
|
||||
```
|
||||
|
||||
## Formula and Molecule Workflow
|
||||
|
||||
Formulas are reusable workflow templates. Molecules are instantiated workflows.
|
||||
|
||||
### Formulas
|
||||
|
||||
```bash
|
||||
bd formula list # List available formulas
|
||||
bd formula list --type=workflow # Filter by type
|
||||
bd formula show <name> # Show formula details
|
||||
bd cook <formula> # Compile to proto (stdout)
|
||||
bd cook <formula> --var name=auth # With variable substitution
|
||||
bd cook <formula> --dry-run # Preview steps
|
||||
bd cook <formula> --persist # Save to database
|
||||
```
|
||||
|
||||
### Molecules: Pour vs Wisp
|
||||
|
||||
| pour (persistent) | wisp (ephemeral) |
|
||||
|-------------------|------------------|
|
||||
| Feature implementations | Release workflows |
|
||||
| Multi-session work | Patrol cycles |
|
||||
| Audit trail needed | Health checks |
|
||||
| Git-synced | Local only |
|
||||
|
||||
```bash
|
||||
# Persistent molecule (liquid phase)
|
||||
bd mol pour <proto> --var name=auth
|
||||
|
||||
# Ephemeral molecule (vapor phase)
|
||||
bd mol wisp <proto> --var version=1.0
|
||||
bd mol wisp list # List wisps
|
||||
bd mol wisp gc # Garbage collect
|
||||
```
|
||||
|
||||
### Tracking Molecule Progress
|
||||
|
||||
```bash
|
||||
bd mol show <mol-id> # Show structure
|
||||
bd mol show <mol-id> --parallel # Parallelizable steps
|
||||
bd mol current # Where am I?
|
||||
bd mol current <mol-id> # Status for molecule
|
||||
bd mol progress <mol-id> # Progress summary + ETA
|
||||
```
|
||||
|
||||
### Molecule Lifecycle
|
||||
|
||||
```bash
|
||||
bd mol squash <mol-id> # Condense to digest
|
||||
bd mol burn <mol-id> # Delete wisp
|
||||
bd mol distill <epic-id> # Extract formula from epic
|
||||
```
|
||||
|
||||
## Gates and Human Checkpoints
|
||||
|
||||
Gates are async wait conditions that block workflow steps:
|
||||
|
||||
| Gate Type | Wait Condition |
|
||||
|-----------|---------------|
|
||||
| human | Manual `bd close` |
|
||||
| timer | Timeout expires |
|
||||
| gh:run | GitHub workflow completes |
|
||||
| gh:pr | PR merges |
|
||||
| bead | Cross-rig bead closes |
|
||||
|
||||
```bash
|
||||
bd gate list # Show open gates
|
||||
bd gate list --all # Include closed
|
||||
bd gate check # Evaluate all gates
|
||||
bd gate check --type=bead # Check bead gates only
|
||||
bd gate resolve <id> # Close manually
|
||||
```
|
||||
|
||||
## Common Patterns
|
||||
|
||||
### Starting Work on a Bead
|
||||
|
||||
```bash
|
||||
bd update <id> --status=in_progress
|
||||
# ... do work ...
|
||||
bd close <id>
|
||||
```
|
||||
|
||||
### Creating Related Issues
|
||||
|
||||
```bash
|
||||
bd create "Main task" --deps "blocks:<other-id>"
|
||||
bd dep add <new-id> <blocker-id>
|
||||
```
|
||||
|
||||
### Working Through a Molecule
|
||||
|
||||
```bash
|
||||
bd mol pour my-workflow --var name=feature
|
||||
bd ready --mol <mol-id> # Find next step
|
||||
bd update <step-id> --claim # Claim step
|
||||
# ... do work ...
|
||||
bd close <step-id> --continue # Close and advance
|
||||
```
|
||||
|
||||
### Quick Status Check
|
||||
|
||||
```bash
|
||||
bd ready -n 3 # Top 3 ready items
|
||||
bd list -s in_progress # What's in flight?
|
||||
bd blocked # What's stuck?
|
||||
```
|
||||
|
||||
## Useful Flags
|
||||
|
||||
| Flag | Effect |
|
||||
|------|--------|
|
||||
| `--json` | JSON output for scripting |
|
||||
| `--quiet` | Suppress non-essential output |
|
||||
| `--dry-run` | Preview without executing |
|
||||
| `--pretty` | Tree format display |
|
||||
|
||||
## Integration Notes
|
||||
|
||||
- BD auto-syncs via daemon (check with `bd info`)
|
||||
- Issues stored in `.beads/` directory
|
||||
- JSONL files sync through git
|
||||
- Use `bd doctor` if something seems wrong
|
||||
@@ -1,123 +0,0 @@
|
||||
---
|
||||
description: How to structure research and plan artifacts in thoughts/
|
||||
---
|
||||
|
||||
# Artifact Format
|
||||
|
||||
Standardized format for thoughts/ artifacts. All beads-related artifacts should follow these conventions for consistency and machine parseability.
|
||||
|
||||
## Frontmatter (Required)
|
||||
|
||||
Every artifact MUST include YAML frontmatter:
|
||||
|
||||
```yaml
|
||||
---
|
||||
date: 2026-01-15T10:00:00-08:00 # ISO 8601 with timezone
|
||||
bead_id: project-abc # Bead identifier
|
||||
bead_title: "Title of the bead" # Human-readable title
|
||||
author: claude # Who created this
|
||||
git_commit: abc123def # Commit hash at creation
|
||||
branch: main # Branch name
|
||||
repository: repo-name # Repository name
|
||||
status: draft|complete # Artifact status
|
||||
---
|
||||
```
|
||||
|
||||
### Gathering Metadata
|
||||
|
||||
```bash
|
||||
git rev-parse HEAD # Current commit
|
||||
git branch --show-current # Current branch
|
||||
basename $(git rev-parse --show-toplevel) # Repo name
|
||||
date -Iseconds # ISO timestamp
|
||||
```
|
||||
|
||||
## Research Artifact Structure
|
||||
|
||||
Location: `thoughts/beads-{bead-id}/research.md`
|
||||
|
||||
```markdown
|
||||
# Research: {bead title}
|
||||
|
||||
**Bead**: {bead-id}
|
||||
**Date**: {timestamp}
|
||||
**Git Commit**: {commit hash}
|
||||
|
||||
## Research Question
|
||||
{Original question from bead description}
|
||||
|
||||
## Summary
|
||||
{2-3 sentence overview answering the research question}
|
||||
|
||||
## Key Discoveries
|
||||
- {Finding with file:line reference}
|
||||
- {Pattern or convention found}
|
||||
- {Architectural decision documented}
|
||||
|
||||
## Architecture
|
||||
{Current patterns and conventions in the codebase}
|
||||
|
||||
## Code References
|
||||
- `path/to/file.py:123` - Description of relevance
|
||||
- `another/file.ts:45-67` - Description of relevance
|
||||
|
||||
## Open Questions
|
||||
{Areas needing further investigation or human clarification}
|
||||
```
|
||||
|
||||
## Plan Artifact Structure
|
||||
|
||||
Location: `thoughts/beads-{bead-id}/plan.md`
|
||||
|
||||
```markdown
|
||||
# {Title} Implementation Plan
|
||||
|
||||
## Overview
|
||||
{What we're implementing and why - 1-2 sentences}
|
||||
|
||||
## Current State
|
||||
{What exists now, key constraints discovered}
|
||||
|
||||
### Key Discoveries
|
||||
- {Finding with file:line reference}
|
||||
- {Pattern to follow}
|
||||
|
||||
## Desired End State
|
||||
{Specification of what success looks like}
|
||||
|
||||
## What We're NOT Doing
|
||||
{Explicitly list out-of-scope items}
|
||||
|
||||
## Phase 1: {Descriptive Name}
|
||||
|
||||
### Overview
|
||||
{What this phase accomplishes}
|
||||
|
||||
### Changes
|
||||
- [ ] {Specific change with file path}
|
||||
- [ ] {Another change}
|
||||
|
||||
### Success Criteria
|
||||
|
||||
#### Automated
|
||||
- [ ] Tests pass: `{test command}`
|
||||
- [ ] Lint passes: `{lint command}`
|
||||
|
||||
#### Manual
|
||||
- [ ] {Human verification step}
|
||||
|
||||
## Phase 2: {Descriptive Name}
|
||||
{Repeat structure...}
|
||||
|
||||
## References
|
||||
- Bead: {bead-id}
|
||||
- Research: `thoughts/beads-{bead-id}/research.md`
|
||||
```
|
||||
|
||||
## Key Principles
|
||||
|
||||
1. **Always include file:line references** - Makes artifacts actionable
|
||||
2. **Separate automated vs manual verification** - Enables agent autonomy
|
||||
3. **Use checkboxes for phases** - Enables resumability after interruption
|
||||
4. **Keep frontmatter machine-parseable** - Enables tooling integration
|
||||
5. **Link related artifacts** - Research links to plan, plan links to bead
|
||||
@@ -1,121 +0,0 @@
|
||||
---
|
||||
description: How to create effective implementation plans with phased delivery and clear success criteria
|
||||
---
|
||||
|
||||
# Planning
|
||||
|
||||
Create implementation plans that enable incremental, verifiable progress.
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **Incremental delivery**: Each phase should produce working, testable changes
|
||||
2. **Clear checkpoints**: Success criteria that can be verified without ambiguity
|
||||
3. **Buy-in before detail**: Confirm understanding and approach before writing specifics
|
||||
4. **Explicit scope**: State what we're NOT doing to prevent scope creep
|
||||
|
||||
## Plan Document Structure
|
||||
|
||||
```markdown
|
||||
# {Feature} Implementation Plan
|
||||
|
||||
## Overview
|
||||
{1-2 sentences: what we're building and why}
|
||||
|
||||
## Current State Analysis
|
||||
{What exists now, key constraints, file:line references}
|
||||
|
||||
## Desired End State
|
||||
{Specification of outcome and how to verify it}
|
||||
|
||||
## What We're NOT Doing
|
||||
{Explicit out-of-scope items}
|
||||
|
||||
## Phase 1: {Descriptive Name}
|
||||
### Overview
|
||||
{What this phase accomplishes - should be independently valuable}
|
||||
|
||||
### Changes Required
|
||||
{Specific files and modifications with code snippets}
|
||||
|
||||
### Success Criteria
|
||||
#### Automated Verification
|
||||
- [ ] Tests pass: `{test command}`
|
||||
- [ ] Lint passes: `{lint command}`
|
||||
|
||||
#### Manual Verification
|
||||
- [ ] {Human-observable outcome}
|
||||
|
||||
## Testing Strategy
|
||||
{Unit tests, integration tests, manual testing steps}
|
||||
|
||||
## References
|
||||
{Links to research, related files, similar implementations}
|
||||
```
|
||||
|
||||
## Phase Design
|
||||
|
||||
Good phases are:
|
||||
- **Self-contained**: Completable in one session
|
||||
- **Testable**: Has clear pass/fail criteria
|
||||
- **Reversible**: Can be rolled back if needed
|
||||
- **Incremental**: Builds on previous phases without requiring all phases
|
||||
|
||||
Bad phases are:
|
||||
- "Refactor everything" (too broad)
|
||||
- "Add helper function" (too granular)
|
||||
- Phases that only work if ALL phases complete
|
||||
|
||||
## Success Criteria Guidelines
|
||||
|
||||
**Automated Verification** (agent-runnable):
|
||||
- Test commands: `make test`, `npm test`, `nix flake check`
|
||||
- Lint/format: `make lint`, `cargo fmt --check`
|
||||
- Type checking: `make typecheck`, `tsc --noEmit`
|
||||
- Build verification: `make build`, `nix build`
|
||||
|
||||
**Manual Verification** (requires human):
|
||||
- UI/UX functionality and appearance
|
||||
- Performance under realistic conditions
|
||||
- Edge cases hard to automate
|
||||
- Integration with external systems
|
||||
|
||||
**From Contribution Guidelines** (if CONTRIBUTING.md exists):
|
||||
- Include any testing requirements specified
|
||||
- Reference the guideline: "Per CONTRIBUTING.md: {requirement}"
|
||||
|
||||
## Presenting Understanding
|
||||
|
||||
Before writing the plan, confirm alignment:
|
||||
|
||||
```
|
||||
Based on the requirements and my research, I understand we need to [summary].
|
||||
|
||||
I've found that:
|
||||
- [Current implementation detail with file:line]
|
||||
- [Relevant pattern or constraint]
|
||||
- [Potential complexity identified]
|
||||
|
||||
Questions my research couldn't answer:
|
||||
- [Specific technical question requiring judgment]
|
||||
```
|
||||
|
||||
Only ask questions you genuinely cannot answer through code investigation.
|
||||
|
||||
## Design Options Pattern
|
||||
|
||||
When multiple approaches exist:
|
||||
|
||||
```
|
||||
**Design Options:**
|
||||
1. [Option A] - [1-sentence description]
|
||||
- Pro: [benefit]
|
||||
- Con: [drawback]
|
||||
|
||||
2. [Option B] - [1-sentence description]
|
||||
- Pro: [benefit]
|
||||
- Con: [drawback]
|
||||
|
||||
Which approach aligns best with [relevant consideration]?
|
||||
```
|
||||
|
||||
Get buy-in on approach before detailing phases.
|
||||
@@ -1,68 +0,0 @@
|
||||
---
|
||||
description: How to write comprehensive PR descriptions that help reviewers understand changes
|
||||
---
|
||||
|
||||
# PR Description
|
||||
|
||||
Write PR descriptions that help reviewers understand what changed and why.
|
||||
|
||||
## Structure
|
||||
|
||||
Use this standard structure for PR descriptions:
|
||||
|
||||
```markdown
|
||||
## Summary
|
||||
<1-3 bullet points of what changed and why>
|
||||
|
||||
## Context
|
||||
<Why this change was needed - the problem being solved>
|
||||
<Link to related issues/tickets>
|
||||
|
||||
## Changes
|
||||
<Detailed breakdown by area/component>
|
||||
- Area 1: What changed and why
|
||||
- Area 2: What changed and why
|
||||
|
||||
## Testing
|
||||
<How this was verified>
|
||||
- Automated: Tests added/updated, CI status
|
||||
- Manual: Steps to verify functionality
|
||||
|
||||
## Screenshots (if UI changes)
|
||||
<Before/after screenshots if applicable>
|
||||
```
|
||||
|
||||
## Guidelines
|
||||
|
||||
### Lead with WHY, not WHAT
|
||||
- The diff shows WHAT changed - your description explains WHY
|
||||
- Start with the problem being solved
|
||||
- Explain the approach chosen and alternatives considered
|
||||
|
||||
### Link to context
|
||||
- Reference related issues: `Fixes #123` or `Relates to #456`
|
||||
- Link to design docs or discussions
|
||||
- Mention dependent PRs if any
|
||||
|
||||
### Call out review areas
|
||||
- Highlight areas needing careful review
|
||||
- Note any tricky or non-obvious code
|
||||
- Point out architectural decisions
|
||||
|
||||
### Note breaking changes prominently
|
||||
- Use a dedicated "Breaking Changes" section if applicable
|
||||
- Explain migration path for consumers
|
||||
- List any deprecations
|
||||
|
||||
### Be scannable
|
||||
- Use bullet points over paragraphs
|
||||
- Keep sections focused and concise
|
||||
- Put the most important info first
|
||||
|
||||
## Anti-patterns to Avoid
|
||||
|
||||
- Empty descriptions or just "fixes bug"
|
||||
- Repeating the commit messages verbatim
|
||||
- Including irrelevant implementation details
|
||||
- Missing context on why the change was made
|
||||
- Forgetting to mention breaking changes
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
description: How to spawn and coordinate research sub-agents
|
||||
---
|
||||
|
||||
# Research Agents
|
||||
|
||||
Use parallel sub-agents for efficient codebase research.
|
||||
|
||||
## Available Agents
|
||||
|
||||
| Agent | Purpose |
|
||||
|-------|---------|
|
||||
| codebase-locator | Find WHERE files and components live |
|
||||
| codebase-analyzer | Understand HOW specific code works |
|
||||
| codebase-pattern-finder | Find examples of existing patterns |
|
||||
| thoughts-locator | Discover relevant documents in thoughts/ |
|
||||
|
||||
## Spawning Protocol
|
||||
|
||||
1. **Decompose** - Break the research question into 3-5 specific questions
|
||||
2. **Spawn parallel** - Use one Task call with multiple agents
|
||||
3. **Be specific** - Include directories and file patterns in prompts
|
||||
4. **Wait for all** - Do not synthesize until ALL agents complete
|
||||
5. **Synthesize** - Combine findings into coherent summary with file:line references
|
||||
|
||||
## Example
|
||||
|
||||
```
|
||||
Task(codebase-locator, "Find all files related to authentication in src/")
|
||||
Task(codebase-analyzer, "Explain how JWT tokens are validated in src/auth/")
|
||||
Task(codebase-pattern-finder, "Find examples of middleware patterns in src/")
|
||||
Task(thoughts-locator, "Find documents about auth design decisions in thoughts/")
|
||||
```
|
||||
|
||||
## Key Principles
|
||||
|
||||
- **Parallel when different** - Run agents in parallel when searching for different things
|
||||
- **WHAT not HOW** - Each agent knows its job; tell it what you need, not how to search
|
||||
- **Document, don't evaluate** - Agents should describe what exists, not critique it
|
||||
- **Specific directories** - Always scope searches to relevant directories
|
||||
- **File references** - Include specific file:line references in synthesis
|
||||
|
||||
## Agent Prompts
|
||||
|
||||
When spawning agents, include:
|
||||
- The specific question or goal
|
||||
- Relevant directories to search
|
||||
- Reminder to document (not evaluate) what they find
|
||||
- Request for file:line references in findings
|
||||
@@ -42,46 +42,7 @@ AskUserQuestion with:
|
||||
- options from filtered bd ready output
|
||||
```
|
||||
|
||||
## Phase 2: Worktree Setup
|
||||
|
||||
Before launching implementation subagents, create worktrees for all selected beads:
|
||||
|
||||
1. **Get repository name**:
|
||||
```bash
|
||||
REPO_NAME=$(git remote get-url origin | sed 's|.*/||' | sed 's/\.git$//')
|
||||
```
|
||||
|
||||
2. **For each selected bead**, create its worktree:
|
||||
```bash
|
||||
BEAD_ID="[bead-id]"
|
||||
# Check if worktree already exists
|
||||
if [ -d "$HOME/wt/${REPO_NAME}/${BEAD_ID}" ]; then
|
||||
echo "Worktree already exists: ~/wt/${REPO_NAME}/${BEAD_ID}"
|
||||
# Ask user: remove and recreate, or skip this bead?
|
||||
else
|
||||
git worktree add -b "bead/${BEAD_ID}" "$HOME/wt/${REPO_NAME}/${BEAD_ID}"
|
||||
fi
|
||||
```
|
||||
|
||||
3. **Track created worktrees**:
|
||||
Maintain a list of (bead_id, worktree_path) pairs for use in subagent instructions.
|
||||
|
||||
4. **Report status**:
|
||||
```
|
||||
Created worktrees:
|
||||
- nixos-configs-abc → ~/wt/nixos-configs/nixos-configs-abc (branch: bead/nixos-configs-abc)
|
||||
- nixos-configs-xyz → ~/wt/nixos-configs/nixos-configs-xyz (branch: bead/nixos-configs-xyz)
|
||||
|
||||
Skipped (existing worktree):
|
||||
- nixos-configs-123 → Ask user for resolution
|
||||
```
|
||||
|
||||
**Note**: If a worktree or branch already exists, ask the user before proceeding:
|
||||
- Remove existing worktree and branch, then recreate
|
||||
- Skip this bead
|
||||
- Use existing worktree as-is (risky - branch may have diverged)
|
||||
|
||||
## Phase 3: Parallel Implementation
|
||||
## Phase 2: Parallel Implementation
|
||||
|
||||
For each selected bead, launch a subagent using the Task tool. All subagents should be launched in parallel (single message with multiple Task tool calls).
|
||||
|
||||
@@ -92,92 +53,52 @@ Each implementation subagent should receive these instructions:
|
||||
```
|
||||
Work on bead [BEAD_ID]: [BEAD_TITLE]
|
||||
|
||||
Worktree path: [WORKTREE_PATH]
|
||||
1. **Create worktree**:
|
||||
- Branch name: `bead/[BEAD_ID]`
|
||||
- Worktree path: `~/wt/[REPO_NAME]/[BEAD_ID]`
|
||||
- Command: `git worktree add -b bead/[BEAD_ID] ~/wt/[REPO_NAME]/[BEAD_ID]`
|
||||
|
||||
## CRITICAL: Branch Verification (MUST DO FIRST)
|
||||
|
||||
1. **Navigate to worktree**:
|
||||
```bash
|
||||
cd [WORKTREE_PATH]
|
||||
```
|
||||
|
||||
2. **Verify branch** (MANDATORY before ANY modifications):
|
||||
```bash
|
||||
CURRENT_BRANCH=$(git branch --show-current)
|
||||
echo "Current branch: $CURRENT_BRANCH"
|
||||
pwd
|
||||
```
|
||||
|
||||
**ABORT CONDITIONS** - If ANY of these are true, STOP IMMEDIATELY:
|
||||
- Branch is `main` or `master`
|
||||
- Branch does not match `bead/[BEAD_ID]`
|
||||
|
||||
If you detect any abort condition:
|
||||
```
|
||||
ABORTING: Branch verification failed.
|
||||
Expected branch: bead/[BEAD_ID]
|
||||
Actual branch: [CURRENT_BRANCH]
|
||||
Working directory: [pwd output]
|
||||
|
||||
DO NOT PROCEED. Report this error to the orchestrator.
|
||||
```
|
||||
|
||||
## After Verification Passes
|
||||
|
||||
3. **Review the bead requirements**:
|
||||
2. **Review the bead requirements**:
|
||||
- Run `bd show [BEAD_ID]` to understand the acceptance criteria
|
||||
- Note any external issue references (GitHub issues, Linear tickets, etc.)
|
||||
|
||||
4. **Extract validation criteria**:
|
||||
3. **Extract validation criteria**:
|
||||
- Check for a plan: `thoughts/beads-[BEAD_ID]/plan.md`
|
||||
- If plan exists:
|
||||
- Read the plan and find the "Automated Verification" section
|
||||
- Extract each verification command (lines starting with `- [ ]` followed by a command)
|
||||
- Example: `- [ ] Tests pass: \`make test\`` → extract `make test`
|
||||
- Note any "Per CONTRIBUTING.md:" requirements for additional validation
|
||||
- Also read the "Manual Verification" section from the plan if present
|
||||
- Save manual verification items for inclusion in the PR description (they won't be executed)
|
||||
- If no plan exists, use best-effort validation:
|
||||
- Check if `Makefile` exists → try `make test` and `make lint`
|
||||
- Check if `flake.nix` exists → try `nix flake check`
|
||||
- Check if `package.json` exists → try `npm test`
|
||||
- **Check for CONTRIBUTING.md** → read and extract testing/linting requirements
|
||||
- Track which requirements can be automated vs need manual review
|
||||
- Automated: commands that can be run (e.g., "run `make test`")
|
||||
- Manual: qualitative checks (e.g., "ensure documentation is updated")
|
||||
- If none found, note "No validation criteria found"
|
||||
|
||||
5. **Implement the changes**:
|
||||
4. **Implement the changes**:
|
||||
- Work in the worktree directory
|
||||
- Complete all acceptance criteria listed in the bead
|
||||
|
||||
After implementation, run validation:
|
||||
- Execute each validation command from step 4
|
||||
- Execute each validation command from step 3
|
||||
- Track results in this format:
|
||||
```
|
||||
VALIDATION_RESULTS:
|
||||
- make test: PASS
|
||||
- make lint: FAIL (exit code 1: src/foo.ts:23 - missing semicolon)
|
||||
- nix flake check: SKIP (not applicable - no flake.nix)
|
||||
- cargo test: ERROR (command not found)
|
||||
- nix flake check: SKIP (command not found)
|
||||
```
|
||||
|
||||
**Status definitions:**
|
||||
- **PASS**: Check executed successfully with no issues
|
||||
- **FAIL**: Check executed but found issues that need attention
|
||||
- **SKIP**: Check not applicable to this project (e.g., no Makefile for `make test`)
|
||||
- **ERROR**: Check could not execute (missing tool, permission error, command not found)
|
||||
|
||||
- If any validation fails:
|
||||
- Continue with PR creation (don't block)
|
||||
- Document failures in bead notes: `bd update [BEAD_ID] --notes="Validation failures: [list]"`
|
||||
|
||||
6. **Commit and push**:
|
||||
5. **Commit and push**:
|
||||
- Stage all changes: `git add -A`
|
||||
- Create a descriptive commit message
|
||||
- Push the branch: `git push -u origin bead/[BEAD_ID]`
|
||||
|
||||
7. **Create a PR**:
|
||||
6. **Create a PR**:
|
||||
- Detect hosting provider from origin URL: `git remote get-url origin`
|
||||
- If URL contains `github.com`, use `gh`; otherwise use `tea` (Gitea/Forgejo)
|
||||
- PR title: "[BEAD_ID] [BEAD_TITLE]"
|
||||
@@ -200,27 +121,14 @@ Worktree path: [WORKTREE_PATH]
|
||||
## Changes
|
||||
- [List of changes made]
|
||||
|
||||
## Validation Steps Completed
|
||||
## Validation
|
||||
[Include validation results from step 4]
|
||||
|
||||
### Automated Checks
|
||||
| Check | Status | Details |
|
||||
|-------|--------|---------|
|
||||
| make test | PASS | |
|
||||
| make lint | FAIL | src/foo.ts:23 - missing semicolon |
|
||||
| nix flake check | SKIP | not applicable - no flake.nix |
|
||||
| cargo test | ERROR | command not found |
|
||||
|
||||
### Manual Verification Required
|
||||
[If plan has Manual Verification items, list them as unchecked boxes:]
|
||||
- [ ] Verify UI changes match design mockups
|
||||
- [ ] Test on mobile viewport sizes
|
||||
[If no manual verification items: "None specified in plan."]
|
||||
|
||||
### CONTRIBUTING.md Compliance
|
||||
[If CONTRIBUTING.md requirements were extracted:]
|
||||
- [x] Tests pass (verified via `make test`)
|
||||
- [ ] Documentation updated (needs manual review)
|
||||
[If no CONTRIBUTING.md: "No contribution guidelines found."]
|
||||
| nix flake check | SKIP | command not found |
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
@@ -240,66 +148,44 @@ Worktree path: [WORKTREE_PATH]
|
||||
## Changes
|
||||
- [List of changes made]
|
||||
|
||||
## Validation Steps Completed
|
||||
## Validation
|
||||
[Include validation results from step 4]
|
||||
|
||||
### Automated Checks
|
||||
| Check | Status | Details |
|
||||
|-------|--------|---------|
|
||||
| make test | PASS | |
|
||||
| make lint | FAIL | src/foo.ts:23 - missing semicolon |
|
||||
| nix flake check | SKIP | not applicable - no flake.nix |
|
||||
| cargo test | ERROR | command not found |
|
||||
|
||||
### Manual Verification Required
|
||||
[If plan has Manual Verification items, list them as unchecked boxes:]
|
||||
- [ ] Verify UI changes match design mockups
|
||||
- [ ] Test on mobile viewport sizes
|
||||
[If no manual verification items: None specified in plan.]
|
||||
|
||||
### CONTRIBUTING.md Compliance
|
||||
[If CONTRIBUTING.md requirements were extracted:]
|
||||
- [x] Tests pass (verified via make test)
|
||||
- [ ] Documentation updated (needs manual review)
|
||||
[If no CONTRIBUTING.md: No contribution guidelines found.]"
|
||||
| nix flake check | SKIP | command not found |"
|
||||
```
|
||||
|
||||
8. **Update bead status**:
|
||||
7. **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]"`
|
||||
|
||||
9. **Report results**:
|
||||
8. **Report results**:
|
||||
- Return:
|
||||
- PR URL
|
||||
- Bead ID
|
||||
- Implementation status (success/failure/blocked)
|
||||
- Validation summary: `X passed, Y failed, Z skipped, W errors`
|
||||
- List of any validation failures or errors with details
|
||||
- Validation summary: `X passed, Y failed, Z skipped`
|
||||
- List of any validation failures with details
|
||||
- If blocked or unable to complete, explain what's blocking progress
|
||||
- If validation failed, include the specific failures so the main agent can summarize them for the user
|
||||
```
|
||||
|
||||
### Launching Subagents
|
||||
|
||||
For each bead, substitute into the template:
|
||||
- `[BEAD_ID]` - the bead ID
|
||||
- `[BEAD_TITLE]` - the bead title
|
||||
- `[WORKTREE_PATH]` - the worktree path created in Phase 2
|
||||
|
||||
Use `subagent_type: "general-purpose"` for implementation subagents. Launch all selected beads' subagents in a single message for parallel execution:
|
||||
|
||||
```
|
||||
<Task calls for each selected bead - all in one message>
|
||||
```
|
||||
|
||||
**Important**: The worktree paths were created in Phase 2. Use the exact paths that were created, e.g.:
|
||||
- `~/wt/nixos-configs/nixos-configs-abc`
|
||||
- `~/wt/nixos-configs/nixos-configs-xyz`
|
||||
|
||||
Collect results from all subagents before proceeding.
|
||||
|
||||
## Phase 4: Parallel Review
|
||||
## Phase 3: Parallel Review
|
||||
|
||||
After all implementation subagents complete, launch review subagents for each PR.
|
||||
|
||||
@@ -334,7 +220,7 @@ Review PR for bead [BEAD_ID]
|
||||
|
||||
Launch all review subagents in parallel.
|
||||
|
||||
## Phase 5: Cleanup and Summary
|
||||
## Phase 4: Cleanup and Summary
|
||||
|
||||
After reviews complete:
|
||||
|
||||
@@ -380,21 +266,9 @@ Example output:
|
||||
|
||||
## Error Handling
|
||||
|
||||
- **Worktree creation failures** (Phase 2):
|
||||
- If `git worktree add` fails (branch exists, path exists), prompt user:
|
||||
- Remove existing and retry
|
||||
- Skip this bead
|
||||
- Use existing (with warning about potential divergence)
|
||||
- Do NOT proceed to subagent launch until worktree is confirmed
|
||||
|
||||
- **Branch verification failures** (subagent reports):
|
||||
- If subagent reports it's on `main` or `master`, do NOT retry
|
||||
- Mark bead as failed with reason "Branch verification failed"
|
||||
- Continue with other beads but flag this as a critical issue
|
||||
- Investigation required: the worktree may have been corrupted or not created properly
|
||||
|
||||
- **Subagent failures**: If a subagent fails or times out, note it in the summary but continue with other beads
|
||||
- **PR creation failures**: Report the error but continue with reviews of successful PRs
|
||||
- **Worktree conflicts**: If a worktree already exists, ask the user if they want to remove it or skip that bead
|
||||
|
||||
## Resource Limits
|
||||
|
||||
@@ -4,13 +4,12 @@ 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 and any linked Gitea issue is also closed.
|
||||
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
|
||||
- `tea` CLI must be configured for closing Gitea issues
|
||||
|
||||
## Workflow
|
||||
|
||||
@@ -53,34 +52,6 @@ If the PR is merged:
|
||||
bd close [BEAD_ID] --reason="PR merged: [PR_URL]"
|
||||
```
|
||||
|
||||
### Step 3.1: Close corresponding Gitea issue (if any)
|
||||
|
||||
After closing a bead, check if it has a linked Gitea issue:
|
||||
|
||||
1. **Check for Gitea issue URL in bead notes**:
|
||||
Look for the pattern `Gitea issue: <URL>` in the notes. Extract the URL.
|
||||
|
||||
2. **Extract issue number from URL**:
|
||||
```bash
|
||||
# Example: https://git.johnogle.info/johno/nixos-configs/issues/16 -> 16
|
||||
echo "$GITEA_URL" | grep -oP '/issues/\K\d+'
|
||||
```
|
||||
|
||||
3. **Close the Gitea issue**:
|
||||
```bash
|
||||
tea issues close [ISSUE_NUMBER]
|
||||
```
|
||||
|
||||
4. **Handle errors gracefully**:
|
||||
- If issue is already closed: Log warning, continue
|
||||
- If issue not found: Log warning, continue
|
||||
- If `tea` fails: Log error, continue with other beads
|
||||
|
||||
Example warning output:
|
||||
```
|
||||
Warning: Could not close Gitea issue #16: issue already closed
|
||||
```
|
||||
|
||||
### Step 4: Report summary
|
||||
|
||||
Present results:
|
||||
@@ -89,17 +60,10 @@ Present results:
|
||||
## Beads Reconciliation Summary
|
||||
|
||||
### Closed (PR Merged)
|
||||
| Bead | PR | Gitea Issue | Title |
|
||||
|------|-----|-------------|-------|
|
||||
| beads-abc | #123 | #16 closed | Feature X |
|
||||
| beads-xyz | #456 | (none) | Bug fix Y |
|
||||
|
||||
### Gitea Issues Closed
|
||||
| Issue | Bead | Status |
|
||||
|-------|------|--------|
|
||||
| #16 | beads-abc | Closed successfully |
|
||||
| #17 | beads-def | Already closed (skipped) |
|
||||
| #99 | beads-ghi | Error: issue not found |
|
||||
| Bead | PR | Title |
|
||||
|------|-----|-------|
|
||||
| beads-abc | #123 | Feature X |
|
||||
| beads-xyz | #456 | Bug fix Y |
|
||||
|
||||
### Still in Review
|
||||
| Bead | PR | Status | Title |
|
||||
@@ -116,14 +80,9 @@ Present results:
|
||||
- **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
|
||||
- **Gitea issue already closed**: Log warning, continue (not an error)
|
||||
- **Gitea issue not found**: Log warning, continue (issue may have been deleted)
|
||||
- **No Gitea issue linked**: Normal case, no action needed
|
||||
- **tea command fails**: Log error with output, continue with other beads
|
||||
|
||||
## 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
|
||||
- Gitea issues are only closed for beads that have a `Gitea issue: <URL>` in their notes
|
||||
@@ -225,16 +225,11 @@
|
||||
mu4e-headers-time-format "%H:%M")
|
||||
|
||||
;; Sending mail via msmtp
|
||||
;; NOTE: message-sendmail-f-is-evil and --read-envelope-from are required
|
||||
;; to prevent msmtp from stripping the email body when processing headers.
|
||||
;; Without these, multipart messages (especially from org-msg) may arrive
|
||||
;; with empty bodies.
|
||||
(setq sendmail-program (executable-find "msmtp")
|
||||
send-mail-function #'message-send-mail-with-sendmail
|
||||
message-send-mail-function #'message-send-mail-with-sendmail
|
||||
message-sendmail-f-is-evil t
|
||||
message-sendmail-extra-arguments '("--read-envelope-from")
|
||||
message-sendmail-envelope-from 'header))
|
||||
(setq message-send-mail-function 'message-send-mail-with-sendmail
|
||||
sendmail-program (executable-find "msmtp")
|
||||
message-sendmail-envelope-from 'header
|
||||
mail-envelope-from 'header
|
||||
mail-specify-envelope-from t))
|
||||
|
||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.email;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.email = {
|
||||
@@ -90,9 +89,8 @@ in
|
||||
account default : proton
|
||||
'';
|
||||
|
||||
# Linux-only: Systemd service for mail sync (Darwin uses launchd instead)
|
||||
systemd.user.services = mkIf isLinux {
|
||||
mbsync = {
|
||||
# Systemd service for mail sync
|
||||
systemd.user.services.mbsync = {
|
||||
Unit = {
|
||||
Description = "Mailbox synchronization service";
|
||||
After = [ "network-online.target" ];
|
||||
@@ -106,11 +104,9 @@ in
|
||||
StandardError = "journal";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Linux-only: Systemd timer for automatic sync
|
||||
systemd.user.timers = mkIf isLinux {
|
||||
mbsync = {
|
||||
# Systemd timer for automatic sync
|
||||
systemd.user.timers.mbsync = {
|
||||
Unit = {
|
||||
Description = "Mailbox synchronization timer";
|
||||
};
|
||||
@@ -124,5 +120,4 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
custom.mcrcon-rbw
|
||||
# Gaming applications would go here
|
||||
# This role is created for future expansion
|
||||
# moonlight-qt is currently in media role but could be moved here
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -4,15 +4,13 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.kdeconnect;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.kdeconnect = {
|
||||
enable = mkEnableOption "Enable KDE Connect for device integration";
|
||||
};
|
||||
|
||||
# KDE Connect services are Linux-only (requires D-Bus and systemd)
|
||||
config = mkIf (cfg.enable && isLinux) {
|
||||
config = mkIf cfg.enable {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.sync;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.sync = {
|
||||
@@ -12,10 +11,9 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Linux-only: syncthingtray requires system tray support
|
||||
home.packages = optionals isLinux (with pkgs; [
|
||||
home.packages = with pkgs; [
|
||||
syncthingtray
|
||||
]);
|
||||
];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
@@ -3,5 +3,4 @@
|
||||
tea-rbw = pkgs.callPackage ./tea-rbw {};
|
||||
app-launcher-server = pkgs.callPackage ./app-launcher-server {};
|
||||
claude-code = pkgs.callPackage ./claude-code {};
|
||||
mcrcon-rbw = pkgs.callPackage ./mcrcon-rbw {};
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "mcrcon" ''
|
||||
set -euo pipefail
|
||||
|
||||
# Configuration - can be overridden with environment variables
|
||||
MINECRAFT_RCON_HOST="''${MCRCON_HOST:-10.0.0.165}"
|
||||
MINECRAFT_RCON_PORT="''${MCRCON_PORT:-25575}"
|
||||
RBW_ENTRY="minecraft-rcon"
|
||||
|
||||
# Check if rbw is available
|
||||
if ! command -v rbw &> /dev/null; then
|
||||
echo "Error: rbw is not available. Please ensure rbw is installed and configured."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Retrieve password from Bitwarden
|
||||
if ! MCRCON_PASS=$(rbw get "$RBW_ENTRY" 2>/dev/null); then
|
||||
echo "Error: Failed to retrieve RCON password from rbw entry '$RBW_ENTRY'"
|
||||
echo "Please ensure the entry exists in Bitwarden and rbw is synced."
|
||||
echo ""
|
||||
echo "To create the entry:"
|
||||
echo " 1. Add 'minecraft-rcon' to Bitwarden with the RCON password"
|
||||
echo " 2. Run 'rbw sync' to refresh the local cache"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Export for mcrcon
|
||||
export MCRCON_HOST="$MINECRAFT_RCON_HOST"
|
||||
export MCRCON_PORT="$MINECRAFT_RCON_PORT"
|
||||
export MCRCON_PASS
|
||||
|
||||
# If no arguments provided, start interactive terminal mode
|
||||
if [[ $# -eq 0 ]]; then
|
||||
exec ${pkgs.mcrcon}/bin/mcrcon -t
|
||||
fi
|
||||
|
||||
# Execute mcrcon with all provided arguments
|
||||
exec ${pkgs.mcrcon}/bin/mcrcon "$@"
|
||||
''
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"timezone": "America/Los_Angeles",
|
||||
"gitAuthor": "Renovate Bot <renovate@ogle.fyi>",
|
||||
"nix": {
|
||||
"enabled": true
|
||||
},
|
||||
"github-actions": {
|
||||
"managerFilePatterns": [
|
||||
"/.gitea/workflows/.+\\.ya?ml$/"
|
||||
]
|
||||
},
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"schedule": [
|
||||
"before 5am on monday"
|
||||
]
|
||||
},
|
||||
"dependencyDashboard": true,
|
||||
"dependencyDashboardAutoclose": false,
|
||||
"dependencyDashboardTitle": "NixOS Configs Dependency Dashboard",
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Group all GitHub Actions updates",
|
||||
"matchManagers": [
|
||||
"github-actions"
|
||||
],
|
||||
"groupName": "github-actions"
|
||||
},
|
||||
{
|
||||
"description": "Group stable NixOS ecosystem inputs",
|
||||
"matchManagers": [
|
||||
"nix"
|
||||
],
|
||||
"groupName": "nix-stable-ecosystem",
|
||||
"matchPackageNames": [
|
||||
"/^nixpkgs$/",
|
||||
"/^home-manager$/",
|
||||
"/^nix-darwin$/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Group unstable NixOS ecosystem inputs",
|
||||
"matchManagers": [
|
||||
"nix"
|
||||
],
|
||||
"groupName": "nix-unstable-ecosystem",
|
||||
"matchPackageNames": [
|
||||
"/nixpkgs-unstable/",
|
||||
"/home-manager-unstable/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Ignore private Gitea inputs (handle separately)",
|
||||
"matchManagers": [
|
||||
"nix"
|
||||
],
|
||||
"enabled": false,
|
||||
"matchPackageNames": [
|
||||
"/google-cookie-retrieval/"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -21,8 +21,6 @@ in
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
glances
|
||||
ghostty.terminfo # So tmux works when SSH'ing from ghostty
|
||||
pciutils
|
||||
tree
|
||||
usbutils
|
||||
vim
|
||||
] ++ lib.optionals pkgs.stdenv.isLinux [
|
||||
ghostty.terminfo # So tmux works when SSH'ing from ghostty
|
||||
];
|
||||
|
||||
nix = {
|
||||
|
||||
@@ -8,21 +8,6 @@ in
|
||||
{
|
||||
options.roles.nfs-mounts = {
|
||||
enable = mkEnableOption "Enable default NFS mounts";
|
||||
server = mkOption {
|
||||
type = types.str;
|
||||
default = "10.0.0.43";
|
||||
description = "IP address or hostname of the NFS server";
|
||||
};
|
||||
remotePath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media";
|
||||
description = "Remote path to mount from the NFS server";
|
||||
};
|
||||
mountPoint = mkOption {
|
||||
type = types.str;
|
||||
default = "/media";
|
||||
description = "Local mount point for the NFS share";
|
||||
};
|
||||
# TODO: implement requireMount
|
||||
requireMount = mkOption {
|
||||
type = types.bool;
|
||||
@@ -33,8 +18,8 @@ in
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
fileSystems.${cfg.mountPoint} = {
|
||||
device = "${cfg.server}:${cfg.remotePath}";
|
||||
fileSystems."/media" = {
|
||||
device = "10.0.0.43:/media";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"defaults"
|
||||
|
||||
@@ -8,21 +8,6 @@ in
|
||||
{
|
||||
options.roles.printing = {
|
||||
enable = mkEnableOption "Enable default printing setup";
|
||||
printerName = mkOption {
|
||||
type = types.str;
|
||||
default = "MFC-L8900CDW_series";
|
||||
description = "Name for the default printer";
|
||||
};
|
||||
printerUri = mkOption {
|
||||
type = types.str;
|
||||
default = "ipp://brother.oglehome/ipp/print";
|
||||
description = "Device URI for the default printer (e.g., ipp://hostname/ipp/print)";
|
||||
};
|
||||
printerModel = mkOption {
|
||||
type = types.str;
|
||||
default = "everywhere";
|
||||
description = "PPD model for the printer (use 'everywhere' for driverless IPP)";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
@@ -36,11 +21,11 @@ in
|
||||
};
|
||||
|
||||
hardware.printers.ensurePrinters = [{
|
||||
name = cfg.printerName;
|
||||
deviceUri = cfg.printerUri;
|
||||
model = cfg.printerModel;
|
||||
name = "MFC-L8900CDW_series";
|
||||
deviceUri = "ipp://brother.oglehome/ipp/print";
|
||||
model = "everywhere";
|
||||
}];
|
||||
hardware.printers.ensureDefaultPrinter = cfg.printerName;
|
||||
hardware.printers.ensureDefaultPrinter = "MFC-L8900CDW_series";
|
||||
|
||||
# Fix ensure-printers service to wait for network availability
|
||||
systemd.services.ensure-printers = {
|
||||
|
||||
@@ -8,11 +8,6 @@ in
|
||||
{
|
||||
options.roles.virtualisation = {
|
||||
enable = mkEnableOption "Enable virtualisation";
|
||||
dockerUsers = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "johno" ];
|
||||
description = "List of users to add to the docker group";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
@@ -20,6 +15,6 @@ in
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
users.extraGroups.docker.members = cfg.dockerUsers;
|
||||
users.extraGroups.docker.members = [ "johno" ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,30 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--help|-h)
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Rotate to the next wallpaper in the configured list."
|
||||
echo ""
|
||||
echo "This script increments the currentIndex in home/wallpapers/default.nix,"
|
||||
echo "cycling through available wallpapers. Rebuild your system to apply"
|
||||
echo "the new wallpaper."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --help, -h Show this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
||||
@@ -1,30 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--help|-h)
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Update Doom Emacs to the latest commit from the doomemacs repository."
|
||||
echo ""
|
||||
echo "This script fetches the latest commit SHA from the default branch,"
|
||||
echo "updates the rev and sha256 in home/roles/emacs/default.nix, and"
|
||||
echo "prepares the configuration for a system rebuild."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --help, -h Show this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
||||
@@ -1,35 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--help|-h)
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Perform a major upgrade of the NixOS configuration."
|
||||
echo ""
|
||||
echo "This script runs the following steps:"
|
||||
echo " 1. Update all flake inputs (nix flake update)"
|
||||
echo " 2. Update Doom Emacs to the latest commit"
|
||||
echo " 3. Update Claude Code to the latest version"
|
||||
echo " 4. Rotate to the next wallpaper"
|
||||
echo ""
|
||||
echo "After completion, review changes with 'git diff' and rebuild"
|
||||
echo "your system with 'sudo nixos-rebuild switch --flake .'"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --help, -h Show this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
||||
Reference in New Issue
Block a user