Generic Constructor-Pattern agent kit for Claude Code. Zero personal data, fully English, MIT-licensed. Contents: - 34 reusable blocks (baseline, rules, stack/deploy/domain/api/scraper) - 14 cross-project agent manifests (code/ml/infra/researcher/critic/...) - 6 portable skills (/new-agent, /research, /test-gen, /debug-deep, /pr-review, /refactor) - Rust assembler (single binary, ~500 KB) - 3 hooks (auto-reassemble, pre-commit validate, no-hand-edit) - install.sh (idempotent, cargo-builds on first run) - MIT LICENSE All 6 sanity greps pass: 0 Russian text, 0 specific project names, 0 incident numbers, 0 user paths, 0 hardcoded IPs, 0 API keys. cargo check + assemble --validate: both pass on 14 manifests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
1 KiB
Bash
Executable file
35 lines
1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# PostToolUse(Edit|Write) — auto-regenerate agent .md files.
|
|
#
|
|
# Trigger logic:
|
|
# - manifest edited (_manifests/<name>.toml) → rebuild that one agent
|
|
# - block edited (_blocks/<name>.md) → rebuild ALL agents
|
|
# - otherwise → no-op
|
|
#
|
|
# Stdin: JSON with tool_input.file_path
|
|
# Exit 0 always (non-blocking advisory)
|
|
|
|
set -eu
|
|
|
|
ASSEMBLER="$HOME/.claude/agents/_assembler/target/release/assemble"
|
|
[ -x "$ASSEMBLER" ] || exit 0
|
|
|
|
FILE=$(cat | jq -r '.tool_input.file_path // empty')
|
|
[ -n "$FILE" ] || exit 0
|
|
|
|
case "$FILE" in
|
|
*/agents/_manifests/*.toml)
|
|
# Single-manifest rebuild
|
|
"$ASSEMBLER" --in-place "$FILE" 2>&1 | sed 's/^/[assemble-agents] /'
|
|
;;
|
|
*/agents/_blocks/*.md)
|
|
# Block changed → rebuild everything (block is shared)
|
|
echo "[assemble-agents] block changed, rebuilding all agents..."
|
|
"$ASSEMBLER" --in-place 2>&1 | sed 's/^/[assemble-agents] /' | head -40
|
|
;;
|
|
*)
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
exit 0
|