Compare commits
26 Commits
bead/nixos
...
polecat/ru
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41bd72fc40 | ||
| 2cdc15163c | |||
| a77b1230fe | |||
| 623a387127 | |||
| 737f2b09e4 | |||
| cddc9de14a | |||
| 53e3bbe78f | |||
| c258eafe34 | |||
| 03d0b76f97 | |||
| b5f7233214 | |||
| 1203662237 | |||
| 6ad714b57c | |||
| 5440214295 | |||
| cc305af899 | |||
| c06adec7d8 | |||
| 7903b2dfd0 | |||
| f472aa9b3d | |||
| 2e07454ffa | |||
| daf963b290 | |||
| c3c8688f31 | |||
| 1cee1cd365 | |||
| 66c27da142 | |||
| 7d6f71f4e4 | |||
| 7091ee3ad5 | |||
| d78e089695 | |||
| 28b7a0fda9 |
5
.beads/.gitignore
vendored
5
.beads/.gitignore
vendored
@@ -32,6 +32,11 @@ beads.left.meta.json
|
|||||||
beads.right.jsonl
|
beads.right.jsonl
|
||||||
beads.right.meta.json
|
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.
|
# NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here.
|
||||||
# They would override fork protection in .git/info/exclude, allowing
|
# They would override fork protection in .git/info/exclude, allowing
|
||||||
# contributors to accidentally commit upstream issue databases.
|
# contributors to accidentally commit upstream issue databases.
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"database": "beads.db",
|
|
||||||
"jsonl_export": "sync_base.jsonl"
|
|
||||||
}
|
|
||||||
@@ -10,9 +10,9 @@ jobs:
|
|||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@main
|
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@v1
|
||||||
|
|
||||||
- name: Check flake
|
- name: Check flake
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
|
|||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,3 +1,8 @@
|
|||||||
result
|
result
|
||||||
thoughts
|
thoughts
|
||||||
.beads
|
.beads
|
||||||
|
|
||||||
|
# Gas Town (added by gt)
|
||||||
|
.runtime/
|
||||||
|
.claude/
|
||||||
|
.logs/
|
||||||
|
|||||||
23
flake.lock
generated
23
flake.lock
generated
@@ -8,11 +8,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767911810,
|
"lastModified": 1769020852,
|
||||||
"narHash": "sha256-0L4ATr01UsmBC0rSW62VIMVVSUihAQu2+ZOoHk9BQnA=",
|
"narHash": "sha256-MR6evuoa8w6mjYTesTAa3bsRH+c3IB7EOEDTCjsiAp8=",
|
||||||
"owner": "steveyegge",
|
"owner": "steveyegge",
|
||||||
"repo": "beads",
|
"repo": "beads",
|
||||||
"rev": "28ff9fe9919a9665a0f00f5b3fcd084b43fb6cc3",
|
"rev": "cb46db603d34c0190605eecb8724a6c581119f09",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -78,6 +78,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"gastown": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769031452,
|
||||||
|
"narHash": "sha256-tTvtLvTr38okqbpNnr5exfurI6VkVKNLcnM+A6O7DGY=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "93e22595cd59802a24253b100dcfae98a6849428",
|
||||||
|
"revCount": 2938,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@git.johnogle.info:2222/johno/gastown.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@git.johnogle.info:2222/johno/gastown.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"google-cookie-retrieval": {
|
"google-cookie-retrieval": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -306,6 +322,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"beads": "beads",
|
"beads": "beads",
|
||||||
|
"gastown": "gastown",
|
||||||
"google-cookie-retrieval": "google-cookie-retrieval",
|
"google-cookie-retrieval": "google-cookie-retrieval",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"home-manager-unstable": "home-manager-unstable",
|
"home-manager-unstable": "home-manager-unstable",
|
||||||
|
|||||||
30
flake.nix
30
flake.nix
@@ -47,6 +47,11 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gastown = {
|
||||||
|
url = "git+ssh://git@git.johnogle.info:2222/johno/gastown.git";
|
||||||
|
flake = false; # No flake.nix upstream yet
|
||||||
|
};
|
||||||
|
|
||||||
nix-doom-emacs-unstraightened = {
|
nix-doom-emacs-unstraightened = {
|
||||||
url = "github:marienz/nix-doom-emacs-unstraightened";
|
url = "github:marienz/nix-doom-emacs-unstraightened";
|
||||||
# Don't follow nixpkgs to avoid rebuild issues with emacs-overlay
|
# Don't follow nixpkgs to avoid rebuild issues with emacs-overlay
|
||||||
@@ -84,11 +89,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Shared unstable overlays for custom package builds
|
||||||
|
customUnstableOverlays = [
|
||||||
|
# Override claude-code in unstable to use our custom GCS-based build
|
||||||
|
# (needed for corporate networks that block npm registry)
|
||||||
|
(ufinal: uprev: {
|
||||||
|
claude-code = uprev.callPackage ./packages/claude-code {};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nixosModules = [
|
nixosModules = [
|
||||||
./roles
|
./roles
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ (mkBaseOverlay {}) ];
|
nixpkgs.overlays = [ (mkBaseOverlay { unstableOverlays = customUnstableOverlays; }) ];
|
||||||
}
|
}
|
||||||
(mkHomeManagerConfig {
|
(mkHomeManagerConfig {
|
||||||
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
||||||
@@ -101,7 +115,7 @@
|
|||||||
inputs.home-manager-unstable.nixosModules.home-manager
|
inputs.home-manager-unstable.nixosModules.home-manager
|
||||||
inputs.jovian.nixosModules.jovian
|
inputs.jovian.nixosModules.jovian
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ (mkBaseOverlay {}) ];
|
nixpkgs.overlays = [ (mkBaseOverlay { unstableOverlays = customUnstableOverlays; }) ];
|
||||||
}
|
}
|
||||||
(mkHomeManagerConfig {
|
(mkHomeManagerConfig {
|
||||||
sharedModules = [ inputs.plasma-manager-unstable.homeModules.plasma-manager ];
|
sharedModules = [ inputs.plasma-manager-unstable.homeModules.plasma-manager ];
|
||||||
@@ -112,17 +126,7 @@
|
|||||||
./roles/darwin.nix
|
./roles/darwin.nix
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [ (mkBaseOverlay { unstableOverlays = customUnstableOverlays; }) ];
|
||||||
(mkBaseOverlay {
|
|
||||||
# Override claude-code in unstable to use our custom GCS-based build
|
|
||||||
# (needed for corporate networks that block npm registry)
|
|
||||||
unstableOverlays = [
|
|
||||||
(ufinal: uprev: {
|
|
||||||
claude-code = uprev.callPackage ./packages/claude-code {};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
(mkHomeManagerConfig { sharedModules = []; })
|
(mkHomeManagerConfig { sharedModules = []; })
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
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;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
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;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
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;
|
||||||
|
|||||||
@@ -5,6 +5,29 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.home.roles.development;
|
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=";
|
||||||
|
});
|
||||||
|
|
||||||
|
# Gastown - multi-agent workspace manager (no upstream flake.nix yet)
|
||||||
|
# Source is tracked via flake input for renovate updates
|
||||||
|
gastownPackage = pkgs.buildGoModule {
|
||||||
|
pname = "gastown";
|
||||||
|
version = "unstable-${builtins.substring 0 8 globalInputs.gastown.rev or "unknown"}";
|
||||||
|
src = globalInputs.gastown;
|
||||||
|
vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU=";
|
||||||
|
subPackages = [ "cmd/gt" ];
|
||||||
|
doCheck = false;
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Gas Town - multi-agent workspace manager by Steve Yegge";
|
||||||
|
homepage = "https://github.com/steveyegge/gastown";
|
||||||
|
license = licenses.mit;
|
||||||
|
mainProgram = "gt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Fetch the claude-plugins repository (for humanlayer commands/agents)
|
# Fetch the claude-plugins repository (for humanlayer commands/agents)
|
||||||
# Update the rev to get newer versions of the commands
|
# Update the rev to get newer versions of the commands
|
||||||
claudePluginsRepo = builtins.fetchGit {
|
claudePluginsRepo = builtins.fetchGit {
|
||||||
@@ -37,10 +60,12 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
globalInputs.beads.packages.${system}.default
|
beadsPackage
|
||||||
|
gastownPackage
|
||||||
pkgs.unstable.claude-code
|
pkgs.unstable.claude-code
|
||||||
pkgs.unstable.claude-code-router
|
pkgs.unstable.claude-code-router
|
||||||
pkgs.unstable.codex
|
pkgs.unstable.codex
|
||||||
|
pkgs.sqlite
|
||||||
|
|
||||||
# Custom packages
|
# Custom packages
|
||||||
pkgs.custom.tea-rbw
|
pkgs.custom.tea-rbw
|
||||||
@@ -84,8 +109,8 @@ in
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy local skills from this repo (with retry for race conditions with running Claude)
|
# Copy local commands from this repo (with retry for race conditions with running Claude)
|
||||||
for file in ${./skills}/*.md; do
|
for file in ${./commands}/*.md; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
filename=$(basename "$file" .md)
|
filename=$(basename "$file" .md)
|
||||||
dest="$HOME/.claude/commands/''${filename}.md"
|
dest="$HOME/.claude/commands/''${filename}.md"
|
||||||
@@ -98,11 +123,36 @@ in
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
$DRY_RUN_CMD echo "Claude Code humanlayer commands and agents installed successfully${
|
# Copy local skills (reference materials) to skills subdirectory
|
||||||
if cfg.allowArbitraryClaudeCodeModelSelection
|
mkdir -p ~/.claude/commands/skills
|
||||||
then " (model specifications preserved)"
|
for file in ${./skills}/*.md; do
|
||||||
else " (model selection removed)"
|
if [ -f "$file" ]; then
|
||||||
} + local skills"
|
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"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Set up beads Claude Code integration (hooks for SessionStart/PreCompact)
|
# Set up beads Claude Code integration (hooks for SessionStart/PreCompact)
|
||||||
@@ -110,11 +160,51 @@ in
|
|||||||
home.activation.claudeCodeBeadsSetup = lib.hm.dag.entryAfter ["writeBoundary" "claudeCodeCommands"] ''
|
home.activation.claudeCodeBeadsSetup = lib.hm.dag.entryAfter ["writeBoundary" "claudeCodeCommands"] ''
|
||||||
# Run bd setup claude to install hooks into ~/.claude/settings.json
|
# Run bd setup claude to install hooks into ~/.claude/settings.json
|
||||||
# This is idempotent - safe to run multiple times
|
# This is idempotent - safe to run multiple times
|
||||||
${globalInputs.beads.packages.${system}.default}/bin/bd setup claude 2>/dev/null || true
|
${beadsPackage}/bin/bd setup claude 2>/dev/null || true
|
||||||
|
|
||||||
$DRY_RUN_CMD echo "Claude Code beads integration configured (hooks installed)"
|
$DRY_RUN_CMD echo "Claude Code beads integration configured (hooks installed)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Beads timer gate checker (Linux only - uses systemd)
|
||||||
|
# Runs every 5 minutes to auto-resolve expired timer gates across all beads projects
|
||||||
|
# This enables self-scheduling molecules (watchers, patrols, etc.)
|
||||||
|
systemd.user.services.beads-gate-check = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
Unit = {
|
||||||
|
Description = "Check and resolve expired beads timer gates";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
# Check gates in all workspaces that have running daemons
|
||||||
|
ExecStart = pkgs.writeShellScript "beads-gate-check-all" ''
|
||||||
|
# Get list of workspaces from daemon registry
|
||||||
|
workspaces=$(${beadsPackage}/bin/bd daemon list --json 2>/dev/null | ${pkgs.jq}/bin/jq -r '.[].workspace // empty' 2>/dev/null)
|
||||||
|
|
||||||
|
if [ -z "$workspaces" ]; then
|
||||||
|
exit 0 # No beads workspaces, nothing to do
|
||||||
|
fi
|
||||||
|
|
||||||
|
for ws in $workspaces; do
|
||||||
|
if [ -d "$ws" ]; then
|
||||||
|
cd "$ws" && ${beadsPackage}/bin/bd gate check --type=timer --quiet 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.timers.beads-gate-check = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
Unit = {
|
||||||
|
Description = "Periodic beads timer gate check";
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnBootSec = "5min";
|
||||||
|
OnUnitActiveSec = "5min";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Note: modules must be imported at top-level home config
|
# Note: modules must be imported at top-level home config
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
115
home/roles/development/formulas/quick-fix.formula.toml
Normal file
115
home/roles/development/formulas/quick-fix.formula.toml
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
# 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
|
||||||
|
"""
|
||||||
124
home/roles/development/formulas/rpi.formula.toml
Normal file
124
home/roles/development/formulas/rpi.formula.toml
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# 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
|
||||||
|
"""
|
||||||
230
home/roles/development/skills/bd_workflow.md
Normal file
230
home/roles/development/skills/bd_workflow.md
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
123
home/roles/development/skills/micro/artifact-format.md
Normal file
123
home/roles/development/skills/micro/artifact-format.md
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
121
home/roles/development/skills/micro/planning.md
Normal file
121
home/roles/development/skills/micro/planning.md
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
---
|
||||||
|
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.
|
||||||
68
home/roles/development/skills/micro/pr-description.md
Normal file
68
home/roles/development/skills/micro/pr-description.md
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
49
home/roles/development/skills/micro/research-agents.md
Normal file
49
home/roles/development/skills/micro/research-agents.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
@@ -12,9 +12,7 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Gaming applications would go here
|
custom.mcrcon-rbw
|
||||||
# This role is created for future expansion
|
|
||||||
# moonlight-qt is currently in media role but could be moved here
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,28 +1,29 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, autoPatchelfHook
|
, patchelf
|
||||||
|
, glibc
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "2.0.76";
|
version = "2.1.12";
|
||||||
|
|
||||||
srcs = {
|
srcs = {
|
||||||
aarch64-darwin = {
|
aarch64-darwin = {
|
||||||
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/darwin-arm64/claude";
|
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/darwin-arm64/claude";
|
||||||
sha256 = "b76f6d4d09233e67295897b0a1ed2e22d7afa406431529d8b1b532b63b8cbcbd";
|
sha256 = "40be59519a84bd35eb1111aa46f72aa6b3443866d3f6336252a198fdcaefbbe5";
|
||||||
};
|
};
|
||||||
x86_64-darwin = {
|
x86_64-darwin = {
|
||||||
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/darwin-x64/claude";
|
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/darwin-x64/claude";
|
||||||
sha256 = "9d94582f0af5d2201f1c907bf24ff8d216104b897ee0b24795a6c081f40e08d7";
|
sha256 = "0eee4b46c91749480bf856f88e49b15a3e944faa9d346679c5f0c0d7fa6f2f54";
|
||||||
};
|
};
|
||||||
x86_64-linux = {
|
x86_64-linux = {
|
||||||
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/linux-x64/claude";
|
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/linux-x64/claude";
|
||||||
sha256 = "5dcdb480f91ba0df0bc8bd6aff148d3dfd3883f0899eeb5b9427a8b0abe7a687";
|
sha256 = "3fe979215489dc1b31463fadf95ed2d2d5473a9969447bb7a46431f4578847d4";
|
||||||
};
|
};
|
||||||
aarch64-linux = {
|
aarch64-linux = {
|
||||||
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/linux-arm64/claude";
|
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/linux-arm64/claude";
|
||||||
sha256 = "f64a994c8e5bfb84d7242cebbec75d6919db2ee46d50b8fc7a88d5066db193f9";
|
sha256 = "e214b1d3b5afd4cd2de9177359001d41a3eb98cb1e3665fe97edc592f5aa132f";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -38,8 +39,14 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
# Bun standalone binaries have JS code appended after the ELF sections
|
||||||
|
# stripping/patching would remove or corrupt this appended data
|
||||||
|
dontStrip = true;
|
||||||
|
dontPatchELF = true;
|
||||||
|
|
||||||
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
# Don't use autoPatchelfHook - it rewrites the ELF and strips the appended
|
||||||
|
# bun bundle (the JS code is appended after the ELF sections)
|
||||||
|
nativeBuildInputs = lib.optionals stdenv.isLinux [ patchelf ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
@@ -49,6 +56,14 @@ in stdenv.mkDerivation {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Manually patch the interpreter for bun standalone binaries
|
||||||
|
# patchelf --set-interpreter modifies in-place without rewriting the entire ELF,
|
||||||
|
# preserving the appended JS bundle that bun needs at runtime
|
||||||
|
postFixup = lib.optionalString stdenv.isLinux ''
|
||||||
|
interpreter="${glibc}/lib/${if stdenv.hostPlatform.system == "aarch64-linux" then "ld-linux-aarch64.so.1" else "ld-linux-x86-64.so.2"}"
|
||||||
|
patchelf --set-interpreter "$interpreter" $out/bin/claude
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Terminal-based AI coding assistant from Anthropic";
|
description = "Terminal-based AI coding assistant from Anthropic";
|
||||||
homepage = "https://www.anthropic.com/claude-code";
|
homepage = "https://www.anthropic.com/claude-code";
|
||||||
|
|||||||
90
renovate.json
Normal file
90
renovate.json
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
{
|
||||||
|
"$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/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Gastown is under active development - check for updates daily",
|
||||||
|
"matchManagers": [
|
||||||
|
"nix"
|
||||||
|
],
|
||||||
|
"matchPackageNames": [
|
||||||
|
"/gastown/"
|
||||||
|
],
|
||||||
|
"schedule": [
|
||||||
|
"before 6am every day"
|
||||||
|
],
|
||||||
|
"automerge": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Beads is under active development - check for updates daily",
|
||||||
|
"matchManagers": [
|
||||||
|
"nix"
|
||||||
|
],
|
||||||
|
"matchPackageNames": [
|
||||||
|
"/beads/"
|
||||||
|
],
|
||||||
|
"schedule": [
|
||||||
|
"before 6am every day"
|
||||||
|
],
|
||||||
|
"automerge": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -8,11 +8,12 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
glances
|
glances
|
||||||
ghostty.terminfo # So tmux works when SSH'ing from ghostty
|
|
||||||
pciutils
|
pciutils
|
||||||
tree
|
tree
|
||||||
usbutils
|
usbutils
|
||||||
vim
|
vim
|
||||||
|
] ++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
|
ghostty.terminfo # So tmux works when SSH'ing from ghostty
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|||||||
Reference in New Issue
Block a user