Compare commits

..

1 Commits

Author SHA1 Message Date
ec47c4bb4f feat(skills): Add batch research+plan skill for multiple beads
All checks were successful
CI / check (pull_request) Successful in 3m4s
2026-01-14 14:00:30 -08:00
12 changed files with 31 additions and 314 deletions

View File

@@ -10,11 +10,9 @@ jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v4
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@main - uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@main
- name: Check flake - name: Check flake
run: nix flake check run: nix flake check
env:
NIX_CONFIG: "access-tokens = git.johnogle.info=${{ secrets.GITEA_ACCESS_TOKEN }}"

View File

@@ -10,7 +10,6 @@
home.roles = { home.roles = {
"3d-printing".enable = true; "3d-printing".enable = true;
base.enable = true; base.enable = true;
gaming.enable = true;
desktop.enable = true; desktop.enable = true;
emacs.enable = true; emacs.enable = true;
email.enable = true; email.enable = true;

View File

@@ -12,7 +12,6 @@
home.roles = { home.roles = {
base.enable = true; base.enable = true;
desktop.enable = true; desktop.enable = true;
gaming.enable = true;
development.enable = true; development.enable = true;
communication.enable = true; communication.enable = true;
email.enable = true; email.enable = true;

View File

@@ -12,7 +12,6 @@
home.roles = { home.roles = {
base.enable = true; base.enable = true;
desktop.enable = true; desktop.enable = true;
gaming.enable = true;
media.enable = true; media.enable = true;
communication.enable = true; communication.enable = true;
kdeconnect.enable = true; kdeconnect.enable = true;

View File

@@ -54,8 +54,6 @@ When this command is invoked:
- Read `thoughts/beads-{bead-id}/plan.md` FULLY - Read `thoughts/beads-{bead-id}/plan.md` FULLY
- Check for any existing checkmarks (- [x]) indicating partial progress - Check for any existing checkmarks (- [x]) indicating partial progress
- Read any research at `thoughts/beads-{bead-id}/research.md` - Read any research at `thoughts/beads-{bead-id}/research.md`
- If plan's Success Criteria references contribution guidelines (e.g., "Per CONTRIBUTING.md:"),
verify the original CONTRIBUTING.md still exists and requirements are current
5. **Mark bead in progress** (if not already): 5. **Mark bead in progress** (if not already):
```bash ```bash
@@ -129,10 +127,6 @@ All phases completed and automated verification passed:
- {List manual verification items from plan} - {List manual verification items from plan}
Let me know when manual testing is complete so I can close the bead. Let me know when manual testing is complete so I can close the bead.
**Contribution guidelines compliance:**
- {List any contribution guideline requirements that were part of Success Criteria}
- {Note if any requirements could not be automated and need manual review}
``` ```
**STOP HERE and wait for user confirmation.** **STOP HERE and wait for user confirmation.**

View File

@@ -51,32 +51,13 @@ When this command is invoked:
- Any linked tickets or docs - Any linked tickets or docs
- Use Read tool WITHOUT limit/offset - Use Read tool WITHOUT limit/offset
2. **Check for contribution guidelines**: 2. **Spawn initial research tasks**:
```bash
# Check standard locations for contribution guidelines
for f in CONTRIBUTING.md .github/CONTRIBUTING.md docs/CONTRIBUTING.md; do
if [ -f "$f" ]; then
echo "Found: $f"
break
fi
done
```
If found:
- Read the file fully
- Extract actionable requirements (testing, code style, documentation, PR conventions)
- These requirements MUST be incorporated into the plan's Success Criteria
If not found, note "No contribution guidelines found" and proceed.
3. **Spawn initial research tasks**:
- **codebase-locator**: Find all files related to the task - **codebase-locator**: Find all files related to the task
- **codebase-analyzer**: Understand current implementation - **codebase-analyzer**: Understand current implementation
- **codebase-pattern-finder**: Find similar features to model after - **codebase-pattern-finder**: Find similar features to model after
- **thoughts-locator**: Find any existing plans or decisions - **thoughts-locator**: Find any existing plans or decisions
4. **Read all files identified by research**: 3. **Read all files identified by research**:
- Read them FULLY into main context - Read them FULLY into main context
- Cross-reference with requirements - Cross-reference with requirements
@@ -292,12 +273,6 @@ Always separate into two categories:
- Performance under real conditions - Performance under real conditions
- Edge cases hard to automate - Edge cases hard to automate
**From Contribution Guidelines** (if CONTRIBUTING.md exists):
- Include any testing requirements specified in guidelines
- Include any code style/linting requirements
- Include any documentation requirements
- Reference the guideline: "Per CONTRIBUTING.md: {requirement}"
## Example Invocation ## Example Invocation
``` ```

View File

@@ -51,18 +51,6 @@ When this command is invoked:
- Use the Read tool WITHOUT limit/offset parameters - Use the Read tool WITHOUT limit/offset parameters
- Read these files yourself in the main context before spawning sub-tasks - Read these files yourself in the main context before spawning sub-tasks
### Step 1.5: Check for contribution guidelines
Before spawning sub-agents, check if the repository has contribution guidelines:
```bash
for f in CONTRIBUTING.md .github/CONTRIBUTING.md docs/CONTRIBUTING.md; do
if [ -f "$f" ]; then echo "Found: $f"; break; fi
done
```
If found, read the file and note key requirements. These should be included in the research document under a "## Contribution Guidelines" section if relevant to the research question.
### Step 2: Analyze and decompose the research question ### Step 2: Analyze and decompose the research question
- Break down the query into composable research areas - Break down the query into composable research areas
- Identify specific components, patterns, or concepts to investigate - Identify specific components, patterns, or concepts to investigate
@@ -155,10 +143,6 @@ status: complete
## Architecture Documentation ## Architecture Documentation
{Current patterns, conventions found in codebase} {Current patterns, conventions found in codebase}
## Contribution Guidelines
{If CONTRIBUTING.md exists, summarize key requirements relevant to the research topic}
{If no guidelines found, omit this section}
## Historical Context (from thoughts/) ## Historical Context (from thoughts/)
{Relevant insights from thoughts/ with references} {Relevant insights from thoughts/ with references}

View File

@@ -42,46 +42,7 @@ AskUserQuestion with:
- options from filtered bd ready output - options from filtered bd ready output
``` ```
## Phase 2: Worktree Setup ## Phase 2: Parallel Implementation
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
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). 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,50 @@ Each implementation subagent should receive these instructions:
``` ```
Work on bead [BEAD_ID]: [BEAD_TITLE] 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) 2. **Review the bead requirements**:
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**:
- Run `bd show [BEAD_ID]` to understand the acceptance criteria - Run `bd show [BEAD_ID]` to understand the acceptance criteria
- Note any external issue references (GitHub issues, Linear tickets, etc.) - 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` - Check for a plan: `thoughts/beads-[BEAD_ID]/plan.md`
- If plan exists: - If plan exists:
- Read the plan and find the "Automated Verification" section - Read the plan and find the "Automated Verification" section
- Extract each verification command (lines starting with `- [ ]` followed by a command) - Extract each verification command (lines starting with `- [ ]` followed by a command)
- Example: `- [ ] Tests pass: \`make test\`` → extract `make test` - 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: - If no plan exists, use best-effort validation:
- Check if `Makefile` exists → try `make test` and `make lint` - Check if `Makefile` exists → try `make test` and `make lint`
- Check if `flake.nix` exists → try `nix flake check` - Check if `flake.nix` exists → try `nix flake check`
- Check if `package.json` exists → try `npm test` - 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" - If none found, note "No validation criteria found"
5. **Implement the changes**: 4. **Implement the changes**:
- Work in the worktree directory - Work in the worktree directory
- Complete all acceptance criteria listed in the bead - Complete all acceptance criteria listed in the bead
After implementation, run validation: After implementation, run validation:
- Execute each validation command from step 4 - Execute each validation command from step 3
- Track results in this format: - Track results in this format:
``` ```
VALIDATION_RESULTS: VALIDATION_RESULTS:
- make test: PASS - make test: PASS
- make lint: FAIL (exit code 1: src/foo.ts:23 - missing semicolon) - make lint: FAIL (exit code 1: src/foo.ts:23 - missing semicolon)
- nix flake check: SKIP (not applicable - no flake.nix) - nix flake check: SKIP (command not found)
- cargo test: ERROR (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: - If any validation fails:
- Continue with PR creation (don't block) - Continue with PR creation (don't block)
- Document failures in bead notes: `bd update [BEAD_ID] --notes="Validation failures: [list]"` - 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` - Stage all changes: `git add -A`
- Create a descriptive commit message - Create a descriptive commit message
- Push the branch: `git push -u origin bead/[BEAD_ID]` - 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` - Detect hosting provider from origin URL: `git remote get-url origin`
- If URL contains `github.com`, use `gh`; otherwise use `tea` (Gitea/Forgejo) - If URL contains `github.com`, use `gh`; otherwise use `tea` (Gitea/Forgejo)
- PR title: "[BEAD_ID] [BEAD_TITLE]" - PR title: "[BEAD_ID] [BEAD_TITLE]"
@@ -200,27 +119,14 @@ Worktree path: [WORKTREE_PATH]
## Changes ## Changes
- [List of changes made] - [List of changes made]
## Validation Steps Completed ## Validation
[Include validation results from step 4]
### Automated Checks
| Check | Status | Details | | Check | Status | Details |
|-------|--------|---------| |-------|--------|---------|
| make test | PASS | | | make test | PASS | |
| make lint | FAIL | src/foo.ts:23 - missing semicolon | | make lint | FAIL | src/foo.ts:23 - missing semicolon |
| nix flake check | SKIP | not applicable - no flake.nix | | nix flake check | SKIP | command not found |
| 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."]
EOF EOF
)" )"
``` ```
@@ -240,66 +146,44 @@ Worktree path: [WORKTREE_PATH]
## Changes ## Changes
- [List of changes made] - [List of changes made]
## Validation Steps Completed ## Validation
[Include validation results from step 4]
### Automated Checks
| Check | Status | Details | | Check | Status | Details |
|-------|--------|---------| |-------|--------|---------|
| make test | PASS | | | make test | PASS | |
| make lint | FAIL | src/foo.ts:23 - missing semicolon | | make lint | FAIL | src/foo.ts:23 - missing semicolon |
| nix flake check | SKIP | not applicable - no flake.nix | | nix flake check | SKIP | command not found |"
| 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.]"
``` ```
8. **Update bead status**: 7. **Update bead status**:
- Mark the bead as "in_review": `bd update [BEAD_ID] --status=in_review` - 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') - Add the PR URL to the bead notes: `bd update [BEAD_ID] --notes="$(bd show [BEAD_ID] --json | jq -r '.notes')
PR: [PR_URL]"` PR: [PR_URL]"`
9. **Report results**: 8. **Report results**:
- Return: - Return:
- PR URL - PR URL
- Bead ID - Bead ID
- Implementation status (success/failure/blocked) - Implementation status (success/failure/blocked)
- Validation summary: `X passed, Y failed, Z skipped, W errors` - Validation summary: `X passed, Y failed, Z skipped`
- List of any validation failures or errors with details - List of any validation failures with details
- If blocked or unable to complete, explain what's blocking progress - 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 - If validation failed, include the specific failures so the main agent can summarize them for the user
``` ```
### Launching Subagents ### 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: 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> <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. 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. After all implementation subagents complete, launch review subagents for each PR.
@@ -334,7 +218,7 @@ Review PR for bead [BEAD_ID]
Launch all review subagents in parallel. Launch all review subagents in parallel.
## Phase 5: Cleanup and Summary ## Phase 4: Cleanup and Summary
After reviews complete: After reviews complete:
@@ -380,21 +264,9 @@ Example output:
## Error Handling ## 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 - **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 - **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 ## Resource Limits

View File

@@ -12,7 +12,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ 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
]; ];
}; };
} }

View File

@@ -3,5 +3,4 @@
tea-rbw = pkgs.callPackage ./tea-rbw {}; tea-rbw = pkgs.callPackage ./tea-rbw {};
app-launcher-server = pkgs.callPackage ./app-launcher-server {}; app-launcher-server = pkgs.callPackage ./app-launcher-server {};
claude-code = pkgs.callPackage ./claude-code {}; claude-code = pkgs.callPackage ./claude-code {};
mcrcon-rbw = pkgs.callPackage ./mcrcon-rbw {};
} }

View File

@@ -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 "$@"
''

View File

@@ -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/"
]
}
]
}