@delorenj/pjangler 1.1.5 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mise/scripts/link-agentfiles.sh +9 -0
- package/dist/index.js +1492 -358
- package/dist/mcp-server.js +2391 -290
- package/package.json +5 -2
- package/templates/commonproject/.mise/scripts/create-plane-project.sh +26 -0
- package/templates/commonproject/copier.yml +2 -0
- package/templates/commonproject/template/.agents/hooks/README.md +151 -0
- package/templates/commonproject/template/.agents/hooks/hermes/hindsight-hook.sh +63 -0
- package/templates/commonproject/template/.agents/hooks/hindsight/hindsight-journal-write.sh +327 -0
- package/templates/commonproject/template/.agents/hooks/hindsight/hindsight-recall.sh +180 -0
- package/templates/commonproject/template/.agents/hooks/hindsight/hindsight-retain.sh +74 -0
- package/templates/commonproject/template/.agents/hooks/hindsight/hindsight-session-end.sh +57 -0
- package/templates/commonproject/template/.agents/hooks/hindsight/lib/hindsight-bank.sh +57 -0
- package/templates/commonproject/template/.agents/hooks/hindsight/lib/hindsight-journal.sh +48 -0
- package/templates/commonproject/template/.agents/hooks/hooks.master.json +97 -0
- package/templates/commonproject/template/.agents/hooks/lib/hook-guard.sh +30 -0
- package/templates/commonproject/template/.agents/hooks/lib/local-config.sh +51 -0
- package/templates/commonproject/template/.agents/hooks/reminder-for-skill-check.sh +20 -0
- package/templates/commonproject/template/.agents/hooks/sync.py +618 -0
- package/templates/commonproject/template/.agents/local.example.json +15 -0
- package/templates/commonproject/template/.mise/scripts/hindsight-setup.sh +62 -0
- package/templates/commonproject/template/.mise/scripts/link-project-skills-to-clis.sh +110 -0
- package/templates/commonproject/template/.mise/scripts/unlink-project-skills-from-clis.sh +45 -0
- package/templates/commonproject/template/mise.toml.jinja +42 -0
- package/templates/hermes-agent/.codegraph/daemon.pid +6 -0
- package/templates/hermes-agent/.omo/run-continuation/ses_0e5b28303ffeXxL53hZjKggXDW.json +10 -0
- package/templates/hermes-agent/README.md +16 -14
- package/templates/hermes-agent/copier.yml +7 -25
- package/templates/hermes-agent/docs/architecture.md +16 -18
- package/templates/hermes-agent/docs/fleet-control-plane/README.md +35 -0
- package/templates/hermes-agent/docs/fleet-control-plane/architecture.md +253 -0
- package/templates/hermes-agent/docs/fleet-control-plane/epics-and-stories.md +280 -0
- package/templates/hermes-agent/docs/fleet-control-plane/implementation-readiness-report-2026-06-27.md +118 -0
- package/templates/hermes-agent/docs/fleet-control-plane/prd.md +141 -0
- package/templates/hermes-agent/docs/operations.md +17 -19
- package/templates/hermes-agent/docs/runbooks/runtime-checkpoint-repair.md +17 -13
- package/templates/hermes-agent/docs/{scrum-master → sentinel}/README.md +47 -46
- package/templates/hermes-agent/docs/{scrum-master → sentinel}/architecture.md +39 -38
- package/templates/hermes-agent/docs/{scrum-master → sentinel}/development.md +63 -99
- package/templates/hermes-agent/docs/{scrum-master → sentinel}/providers.md +2 -2
- package/templates/hermes-agent/docs/sentinel.md +18 -0
- package/templates/hermes-agent/install-local.sh +22 -20
- package/templates/hermes-agent/runtime-scaffold/README.md +10 -9
- package/templates/hermes-agent/scripts/backfill-fleet-sot.sh +12 -21
- package/templates/hermes-agent/scripts/fleet-sync.sh +369 -0
- package/templates/hermes-agent/scripts/migrate-unify.sh +252 -0
- package/templates/hermes-agent/scripts/unify-pm.sh +148 -0
- package/templates/hermes-agent/template/.runtime-scaffold/README.md +10 -9
- package/templates/hermes-agent/template/.scripts/01-config.sh +2 -3
- package/templates/hermes-agent/template/.scripts/05-fleet-env.sh +0 -2
- package/templates/hermes-agent/template/.scripts/10-hermes-profile.sh +47 -19
- package/templates/hermes-agent/template/.scripts/20-runtime-repo.sh +71 -27
- package/templates/hermes-agent/template/.scripts/30-telegram.sh +3 -3
- package/templates/hermes-agent/template/.scripts/42-ticket-provider.sh +3 -3
- package/templates/hermes-agent/template/.scripts/70-systemd.sh +48 -43
- package/templates/hermes-agent/template/.scripts/80-registry.sh +2 -2
- package/templates/hermes-agent/template/.scripts/99-summary.sh +3 -4
- package/templates/hermes-agent/template/.scripts/_lib.sh +4 -19
- package/templates/hermes-agent/template/.scripts/checkpoint.sh +36 -0
- package/templates/hermes-agent/template/.scripts/config.example.toml +11 -5
- package/templates/hermes-agent/template/.scripts/{scrum-master/continuous-ticket-sentinel.sh → heartbeat.sh} +84 -31
- package/templates/hermes-agent/template/.scripts/lib/ticket-provider.sh +1 -1
- package/templates/hermes-agent/template/.scripts/providers/plane.sh +9 -3
- package/templates/hermes-agent/template/.scripts/{scrum-master → sentinel}/bin/emit-event.py +5 -5
- package/templates/hermes-agent/template/.scripts/{scrum-master → sentinel}/bin/issue-autonomous-review.sh +6 -6
- package/templates/hermes-agent/template/.scripts/{scrum-master → sentinel}/bin/issue-close-gate.sh +2 -2
- package/templates/hermes-agent/template/.scripts/{scrum-master → sentinel}/docs/autonomous-delegated-review.md +7 -7
- package/templates/hermes-agent/template/.scripts/{scrum-master → sentinel}/docs/bloodbank-events.md +3 -3
- package/templates/hermes-agent/template/.scripts/{scrum-master → sentinel}/docs/continuous-ticket-orchestration.md +6 -6
- package/templates/hermes-agent/template/.scripts/{scrum-master/continuous-ticket-sentinel.prompt.md.jinja → sentinel.prompt.md.jinja} +5 -4
- package/templates/hermes-agent/template/SOUL.md.jinja +3 -6
- package/templates/hermes-agent/template/hermes.jinja +6 -15
- package/templates/hermes-agent/template/role.yaml.jinja +9 -8
- package/templates/commonproject/.claude/commands/bmad/bmb/agents/agent-builder.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmb/agents/module-builder.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmb/agents/workflow-builder.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmb/workflows/agent.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmb/workflows/module.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmb/workflows/workflow.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/analyst.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/architect.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/dev.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/pm.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/quick-flow-solo-dev.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/sm.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/tea.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/tech-writer.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/agents/ux-designer.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/check-implementation-readiness.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/code-review.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/correct-course.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-architecture.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-epics-and-stories.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-excalidraw-dataflow.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-excalidraw-diagram.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-excalidraw-flowchart.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-excalidraw-wireframe.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-product-brief.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-story.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/create-ux-design.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/dev-story.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/document-project.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/generate-project-context.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/prd.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/quick-dev.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/quick-spec.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/research.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/retrospective.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/sprint-planning.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/sprint-status.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-atdd.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-automate.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-ci.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-framework.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-nfr.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-test-design.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-test-review.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/testarch-trace.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/workflow-init.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/bmm/workflows/workflow-status.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/cis/agents/brainstorming-coach.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/cis/agents/creative-problem-solver.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/cis/agents/design-thinking-coach.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/cis/agents/innovation-strategist.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/cis/agents/presentation-master.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/cis/agents/storyteller.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/cis/workflows/design-thinking.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/cis/workflows/innovation-strategy.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/cis/workflows/problem-solving.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/cis/workflows/storytelling.md +0 -13
- package/templates/commonproject/.claude/commands/bmad/core/agents/bmad-master.md +0 -14
- package/templates/commonproject/.claude/commands/bmad/core/tasks/index-docs.md +0 -9
- package/templates/commonproject/.claude/commands/bmad/core/tasks/shard-doc.md +0 -9
- package/templates/commonproject/.claude/commands/bmad/core/workflows/brainstorming.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/core/workflows/party-mode.md +0 -5
- package/templates/commonproject/.claude/commands/bmad/custom/workflows/ticket-lifecycle.md +0 -5
- package/templates/hermes-agent/docs/scrum-master-sentinel.md +0 -17
- package/templates/hermes-agent/template/.scripts/75-scrum-master.sh +0 -117
- package/templates/hermes-agent/template/.scripts/90-chain-scrum-master.sh +0 -45
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Provision this dev's Hindsight credentials for this project's bank.
|
|
3
|
+
#
|
|
4
|
+
# Strategy (chosen 2026-06-12): ONE shared CAF-scoped API key lives in the
|
|
5
|
+
# DeLoSecrets 1Password vault. This task resolves it via `op` and writes
|
|
6
|
+
# HINDSIGHT_API_URL + HINDSIGHT_API_KEY into the gitignored .env, which mise
|
|
7
|
+
# already loads — so every agent hook that shells out to `hindsight` picks the
|
|
8
|
+
# key up automatically (env vars outrank ~/.hindsight/config).
|
|
9
|
+
#
|
|
10
|
+
# Idempotent: updates the two HINDSIGHT_ lines in place, leaves the rest of
|
|
11
|
+
# .env untouched. Never prints the secret.
|
|
12
|
+
#
|
|
13
|
+
# Override the 1Password reference if the item path differs:
|
|
14
|
+
# HINDSIGHT_OP_KEY_REF="op://DeLoSecrets/<item>/<field>" mise run hindsight-setup
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
18
|
+
ENV_FILE="${REPO_ROOT}/.env"
|
|
19
|
+
API_URL="${HINDSIGHT_API_URL:-https://api.hs.delo.sh}"
|
|
20
|
+
OP_KEY_REF="${HINDSIGHT_OP_KEY_REF:-op://DeLoSecrets/hindsight-PROJECT/credential}"
|
|
21
|
+
|
|
22
|
+
note() { printf ' %s\n' "$*"; }
|
|
23
|
+
|
|
24
|
+
echo "Hindsight setup for this project"
|
|
25
|
+
note "API URL : ${API_URL}"
|
|
26
|
+
note "op ref : ${OP_KEY_REF}"
|
|
27
|
+
|
|
28
|
+
if ! command -v op >/dev/null 2>&1; then
|
|
29
|
+
echo "ERROR: 1Password CLI (op) not found." >&2
|
|
30
|
+
note "Install it, then re-run, OR set the key manually:" >&2
|
|
31
|
+
note " hindsight configure --api-url ${API_URL} --api-key <key>" >&2
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Resolve the secret (op handles its own auth / biometric unlock).
|
|
36
|
+
if ! API_KEY="$(op read "${OP_KEY_REF}" 2>/dev/null)" || [[ -z "${API_KEY}" ]]; then
|
|
37
|
+
echo "ERROR: could not read ${OP_KEY_REF} from 1Password." >&2
|
|
38
|
+
note "Sign in (\`op signin\`) or fix HINDSIGHT_OP_KEY_REF, then re-run." >&2
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
touch "${ENV_FILE}"
|
|
43
|
+
|
|
44
|
+
# upsert KEY=VALUE in .env without echoing the value to the terminal.
|
|
45
|
+
upsert() {
|
|
46
|
+
local key="$1" val="$2" tmp
|
|
47
|
+
tmp="$(mktemp)"
|
|
48
|
+
grep -v -E "^${key}=" "${ENV_FILE}" > "${tmp}" 2>/dev/null || true
|
|
49
|
+
printf '%s=%s\n' "${key}" "${val}" >> "${tmp}"
|
|
50
|
+
# keep file perms tight — it now holds a secret
|
|
51
|
+
cat "${tmp}" > "${ENV_FILE}"
|
|
52
|
+
rm -f "${tmp}"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
chmod 600 "${ENV_FILE}" 2>/dev/null || true
|
|
56
|
+
upsert "HINDSIGHT_API_URL" "${API_URL}"
|
|
57
|
+
upsert "HINDSIGHT_API_KEY" "${API_KEY}"
|
|
58
|
+
chmod 600 "${ENV_FILE}" 2>/dev/null || true
|
|
59
|
+
|
|
60
|
+
echo "✓ Wrote HINDSIGHT_API_URL + HINDSIGHT_API_KEY to .env (gitignored)."
|
|
61
|
+
note "New shells in this repo will load them via mise. Verify now with:"
|
|
62
|
+
note " HINDSIGHT_API_KEY=\"\$(op read ${OP_KEY_REF})\" hindsight health"
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Fan the project's enabled skill set out to every agent CLI that does NOT read
|
|
3
|
+
# .agents/ natively, as per-skill symlinks.
|
|
4
|
+
#
|
|
5
|
+
# SSOT: .agents/skills/ (committed inherited skills + on-enter ./skills/* links)
|
|
6
|
+
# Targets: a table of per-CLI skill dirs, each with a SCOPE:
|
|
7
|
+
# global -> a shared per-user dir (e.g. ~/.codex/skills): link ours in, never
|
|
8
|
+
# clobber foreign entries, removed on leave (unlink-*-from-clis.sh).
|
|
9
|
+
# local -> a project-scoped mirror dir (e.g. ./.kimi-code/skills) that is fully
|
|
10
|
+
# ours: stale real copies / foreign symlinks are replaced, and
|
|
11
|
+
# disabled/deferred skills are pruned. Persists across leave.
|
|
12
|
+
#
|
|
13
|
+
# Per-dev controls — .agents/local.json (see .agents/local.example.json):
|
|
14
|
+
# skills.disabled[] never link these
|
|
15
|
+
# skills.defer_to_global if true, skip any skill that ALSO exists in your global
|
|
16
|
+
# SSOT (~/.agents/skills) so your global copy wins and you
|
|
17
|
+
# get zero duplicates. Teammates omit it → inherit all.
|
|
18
|
+
#
|
|
19
|
+
# Add a CLI: append one "dir|scope" line to SKILL_TARGETS. That's the whole change.
|
|
20
|
+
set -euo pipefail
|
|
21
|
+
|
|
22
|
+
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
23
|
+
project_root="$(cd "${script_dir}/../.." && pwd)"
|
|
24
|
+
agents_skills="${project_root}/.agents/skills"
|
|
25
|
+
|
|
26
|
+
SKILL_TARGETS=(
|
|
27
|
+
"${CODEX_HOME:-$HOME/.codex}/skills|global"
|
|
28
|
+
"${project_root}/.kimi-code/skills|local"
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
local_config="${project_root}/.agents/hooks/lib/local-config.sh"
|
|
32
|
+
if [ -f "$local_config" ]; then
|
|
33
|
+
# shellcheck source=/dev/null
|
|
34
|
+
source "$local_config"
|
|
35
|
+
else
|
|
36
|
+
skill_disabled() { return 1; }
|
|
37
|
+
skills_defer_to_global() { return 1; }
|
|
38
|
+
skill_is_global() { return 1; }
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
if [ ! -d "$agents_skills" ]; then
|
|
42
|
+
echo "No .agents/skills/ found. Nothing to fan out."
|
|
43
|
+
exit 0
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
defer=0
|
|
47
|
+
skills_defer_to_global && defer=1
|
|
48
|
+
|
|
49
|
+
# Should this skill be skipped (disabled, or deferred to the dev's global system)?
|
|
50
|
+
is_skipped() {
|
|
51
|
+
local name="$1"
|
|
52
|
+
skill_disabled "$name" && return 0
|
|
53
|
+
[ "$defer" = "1" ] && skill_is_global "$name" && return 0
|
|
54
|
+
return 1
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
# readlink with any trailing slash stripped (older links were stored with one).
|
|
58
|
+
_readlink_norm() {
|
|
59
|
+
local l; l="$(readlink "$1" 2>/dev/null || echo "")"
|
|
60
|
+
printf '%s' "${l%/}"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
link_into() {
|
|
64
|
+
local dir="$1" scope="$2" linked=0 skipped=0 pruned=0
|
|
65
|
+
mkdir -p "$dir"
|
|
66
|
+
for skill_path in "$agents_skills"/*; do
|
|
67
|
+
[ -d "$skill_path" ] || continue
|
|
68
|
+
local name target
|
|
69
|
+
name="$(basename "$skill_path")"
|
|
70
|
+
[[ "$name" == ".system" ]] && continue
|
|
71
|
+
target="${dir}/${name}"
|
|
72
|
+
|
|
73
|
+
if is_skipped "$name"; then
|
|
74
|
+
# Yield the slot: remove a link WE previously made (so the dev's global copy
|
|
75
|
+
# can claim it), and prune stale entries from our fully-managed mirror.
|
|
76
|
+
if [ -L "$target" ] && [ "$(_readlink_norm "$target")" = "$skill_path" ]; then
|
|
77
|
+
rm -f "$target"
|
|
78
|
+
pruned=$((pruned + 1))
|
|
79
|
+
elif [ "$scope" = "local" ] && { [ -L "$target" ] || [ -e "$target" ]; }; then
|
|
80
|
+
rm -rf "$target"
|
|
81
|
+
pruned=$((pruned + 1))
|
|
82
|
+
fi
|
|
83
|
+
skipped=$((skipped + 1))
|
|
84
|
+
continue
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
if [ -L "$target" ] && [ "$(_readlink_norm "$target")" = "$skill_path" ]; then
|
|
88
|
+
linked=$((linked + 1))
|
|
89
|
+
continue
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
if [ -e "$target" ] || [ -L "$target" ]; then
|
|
93
|
+
if [ "$scope" = "local" ]; then
|
|
94
|
+
rm -rf "$target" # our mirror: replace stale copy / foreign link
|
|
95
|
+
else
|
|
96
|
+
skipped=$((skipped + 1)) # shared dir: leave foreign entries untouched
|
|
97
|
+
continue
|
|
98
|
+
fi
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
ln -s "$skill_path" "$target"
|
|
102
|
+
linked=$((linked + 1))
|
|
103
|
+
done
|
|
104
|
+
echo " ${dir} (${scope}): ${linked} linked, ${skipped} skipped, ${pruned} pruned"
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
echo "Fanning .agents/skills -> agent CLIs (defer_to_global=${defer})"
|
|
108
|
+
for entry in "${SKILL_TARGETS[@]}"; do
|
|
109
|
+
link_into "${entry%%|*}" "${entry##*|}"
|
|
110
|
+
done
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Remove this project's skill symlinks from shared (global-scope) per-CLI dirs on
|
|
3
|
+
# leave, so other projects / your global setup aren't polluted. Project-scoped
|
|
4
|
+
# (local-scope) mirrors like ./.kimi-code/skills are left in place — they belong
|
|
5
|
+
# to the repo and cost nothing to keep.
|
|
6
|
+
#
|
|
7
|
+
# Mirrors the SKILL_TARGETS table in link-project-skills-to-clis.sh.
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
|
+
project_root="$(cd "${script_dir}/../.." && pwd)"
|
|
12
|
+
agents_skills="${project_root}/.agents/skills"
|
|
13
|
+
|
|
14
|
+
SKILL_TARGETS=(
|
|
15
|
+
"${CODEX_HOME:-$HOME/.codex}/skills|global"
|
|
16
|
+
"${project_root}/.kimi-code/skills|local"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
[ -d "$agents_skills" ] || exit 0
|
|
20
|
+
|
|
21
|
+
_readlink_norm() {
|
|
22
|
+
local l; l="$(readlink "$1" 2>/dev/null || echo "")"
|
|
23
|
+
printf '%s' "${l%/}"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
for entry in "${SKILL_TARGETS[@]}"; do
|
|
27
|
+
dir="${entry%%|*}"
|
|
28
|
+
scope="${entry##*|}"
|
|
29
|
+
[ "$scope" = "global" ] || continue
|
|
30
|
+
[ -d "$dir" ] || continue
|
|
31
|
+
|
|
32
|
+
unlinked=0
|
|
33
|
+
for skill_path in "$agents_skills"/*; do
|
|
34
|
+
[ -e "$skill_path" ] || continue
|
|
35
|
+
name="$(basename "$skill_path")"
|
|
36
|
+
[[ "$name" == ".system" ]] && continue
|
|
37
|
+
target="${dir}/${name}"
|
|
38
|
+
if [ -L "$target" ] && [ "$(_readlink_norm "$target")" = "$skill_path" ]; then
|
|
39
|
+
rm "$target"
|
|
40
|
+
unlinked=$((unlinked + 1))
|
|
41
|
+
fi
|
|
42
|
+
done
|
|
43
|
+
[ "$unlinked" -gt 0 ] && echo "Unlinked ${unlinked} project skill(s) from ${dir}"
|
|
44
|
+
done
|
|
45
|
+
exit 0
|
|
@@ -15,12 +15,54 @@ _.file = [".env"]
|
|
|
15
15
|
enter = [
|
|
16
16
|
"{% raw %}{{config_root}}{% endraw %}/.mise/scripts/link-agentfiles.sh",
|
|
17
17
|
"op inject -i .env.op > .env",
|
|
18
|
+
"codegraph sync",
|
|
19
|
+
"{% raw %}{{config_root}}{% endraw %}/.mise/scripts/link-project-skills-to-clis.sh",
|
|
20
|
+
"{% raw %}{{config_root}}{% endraw %}/.agents/hooks/sync.py --install --quiet",
|
|
21
|
+
]
|
|
22
|
+
leave = [
|
|
23
|
+
"{% raw %}{{config_root}}{% endraw %}/.mise/scripts/unlink-project-skills-from-clis.sh",
|
|
24
|
+
"{% raw %}{{config_root}}{% endraw %}/.agents/hooks/sync.py --uninstall --quiet",
|
|
18
25
|
]
|
|
19
26
|
|
|
20
27
|
[[watch_files]]
|
|
21
28
|
patterns = ["AGENTS.md"]
|
|
22
29
|
task = "link-agentfiles"
|
|
23
30
|
|
|
31
|
+
# Re-fan-out the agent hooks whenever the single source of truth changes.
|
|
32
|
+
[[watch_files]]
|
|
33
|
+
patterns = [".agents/hooks/hooks.master.json"]
|
|
34
|
+
task = "hooks-sync"
|
|
35
|
+
|
|
24
36
|
[tasks.link-agentfiles]
|
|
25
37
|
description = "Symlink all agent files to AGENTS.md"
|
|
26
38
|
run = "{% raw %}{{config_root}}{% endraw %}/.mise/scripts/link-agentfiles.sh"
|
|
39
|
+
|
|
40
|
+
# --- Project-scoped agent hooks + skill fan-out (see .agents/hooks/README.md) ---
|
|
41
|
+
|
|
42
|
+
[tasks.hooks-sync]
|
|
43
|
+
description = "Fan out .agents/hooks/hooks.master.json to each agent CLI (claude committed; codex/kimi injected; hermes adapter)"
|
|
44
|
+
run = "{% raw %}{{config_root}}{% endraw %}/.agents/hooks/sync.py --install"
|
|
45
|
+
|
|
46
|
+
[tasks.hooks-check]
|
|
47
|
+
description = "Drift gate: verify generated hook configs match hooks.master.json (CI-safe, read-only)"
|
|
48
|
+
run = "{% raw %}{{config_root}}{% endraw %}/.agents/hooks/sync.py --check"
|
|
49
|
+
|
|
50
|
+
[tasks.hooks-uninstall]
|
|
51
|
+
description = "Remove per-user agent-hook injections (codex/kimi/hermes)"
|
|
52
|
+
run = "{% raw %}{{config_root}}{% endraw %}/.agents/hooks/sync.py --uninstall"
|
|
53
|
+
|
|
54
|
+
[tasks.link-project-skills-to-clis]
|
|
55
|
+
description = "Fan .agents/skills out to each agent CLI; honors local.json defer_to_global + disabled"
|
|
56
|
+
run = "{% raw %}{{config_root}}{% endraw %}/.mise/scripts/link-project-skills-to-clis.sh"
|
|
57
|
+
|
|
58
|
+
[tasks.unlink-project-skills-from-clis]
|
|
59
|
+
description = "Remove project skill symlinks from shared per-CLI dirs"
|
|
60
|
+
run = "{% raw %}{{config_root}}{% endraw %}/.mise/scripts/unlink-project-skills-from-clis.sh"
|
|
61
|
+
|
|
62
|
+
[tasks.skills-relink]
|
|
63
|
+
description = "Re-fan the project skill set to all CLIs"
|
|
64
|
+
run = "{% raw %}{{config_root}}{% endraw %}/.mise/scripts/link-project-skills-to-clis.sh"
|
|
65
|
+
|
|
66
|
+
[tasks.hindsight-setup]
|
|
67
|
+
description = "Provision this dev's shared project Hindsight key from 1Password into .env (op inject)"
|
|
68
|
+
run = "{% raw %}{{config_root}}{% endraw %}/.mise/scripts/hindsight-setup.sh"
|
|
@@ -18,13 +18,16 @@ runs second (for each agent role you want) to drop agents into it.
|
|
|
18
18
|
|
|
19
19
|
## Roles
|
|
20
20
|
|
|
21
|
-
The template provisions
|
|
22
|
-
and triage
|
|
23
|
-
|
|
24
|
-
wait).
|
|
21
|
+
The template provisions a single Hermes role per invocation. The `pm` role
|
|
22
|
+
handles project management and triage, and also runs the continuous ticket
|
|
23
|
+
sentinel out-of-band: a provider-agnostic board-reconciliation pass (Linear,
|
|
24
|
+
Plane, or Trello) with an autonomous adversarial review (act, do not wait). The
|
|
25
|
+
sentinel runs as the PM's **heartbeat** — a fused systemd timer tick that does
|
|
26
|
+
the reconciliation pass and then a gated runtime checkpoint. (There is no
|
|
27
|
+
separate `scrum-master` role; its duties folded into the PM heartbeat.)
|
|
25
28
|
|
|
26
|
-
To work on or extend the
|
|
27
|
-
guide](docs/
|
|
29
|
+
To work on or extend the heartbeat sentinel, start with the [sentinel handoff
|
|
30
|
+
guide](docs/sentinel/README.md).
|
|
28
31
|
|
|
29
32
|
## Quickstart
|
|
30
33
|
|
|
@@ -39,13 +42,13 @@ The template will:
|
|
|
39
42
|
|
|
40
43
|
1. Seed `~/.config/hermes-agent-template/config.toml` from the shipped example (see [Configuration](#configuration))
|
|
41
44
|
2. Ensure `~/.hermes/fleet.env` exists (single source of truth for shared Hermes binary/repo/registry)
|
|
42
|
-
3. Create the
|
|
45
|
+
3. Create the hermes profile `<repo>-pm` via `hermes profile create --clone`
|
|
43
46
|
4. Create a new private GitHub repo `<owner>/agent-hm-<repo>-pm` for the runtime
|
|
44
|
-
5. Populate it with the runtime scaffold (
|
|
45
|
-
6. Add it as a git submodule at `agents/hermes/pm/runtime/`
|
|
47
|
+
5. Populate it with the runtime scaffold (config.yaml, SOUL.md, memories, consumer.py)
|
|
48
|
+
6. Add it as a git submodule at `agents/hermes/pm/runtime/` (== HERMES_HOME)
|
|
46
49
|
7. Prompt for a BotFather token, store it in `runtime/.env`
|
|
47
50
|
8. Create a Plane project in your configured workspace
|
|
48
|
-
9. Install systemd `--user` units: gateway, consumer,
|
|
51
|
+
9. Install systemd `--user` units: gateway, consumer, heartbeat timer (reconcile + checkpoint)
|
|
49
52
|
10. Append the agent to `~/.hermes/agents-registry.yaml`
|
|
50
53
|
|
|
51
54
|
## Configuration
|
|
@@ -85,12 +88,11 @@ your-project/
|
|
|
85
88
|
│ ├── hermes ← launcher
|
|
86
89
|
│ ├── .scripts/ ← provisioning scripts (idempotent re-run)
|
|
87
90
|
│ └── runtime/ ← git submodule → agent-hm-<repo>-pm
|
|
88
|
-
│ (
|
|
91
|
+
│ (HERMES_HOME for this agent)
|
|
89
92
|
└── ...
|
|
90
93
|
|
|
91
94
|
github.com/delorenj/agent-hm-<repo>-pm/ ← new private repo, this agent's state
|
|
92
|
-
├──
|
|
93
|
-
├── config.yaml ← local overrides only
|
|
95
|
+
├── config.yaml ← cloned from global ~/.hermes
|
|
94
96
|
├── SOUL.md ← evolves over time
|
|
95
97
|
├── memories/{MEMORY,USER}.md
|
|
96
98
|
├── sessions/sessions.db ← LFS-tracked
|
|
@@ -100,7 +102,7 @@ github.com/delorenj/agent-hm-<repo>-pm/ ← new private repo, this agent's s
|
|
|
100
102
|
|
|
101
103
|
~/.hermes/agents-registry.yaml ← fleet roster
|
|
102
104
|
~/.hermes/fleet.env ← shared Hermes binary/repo pointer
|
|
103
|
-
~/.config/systemd/user/ ← gateway, consumer,
|
|
105
|
+
~/.config/systemd/user/ ← gateway, consumer, heartbeat timer
|
|
104
106
|
```
|
|
105
107
|
|
|
106
108
|
## Fleet single source-of-truth
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
# What it does:
|
|
12
12
|
# 1. Renders agents/hermes/<role>/{role.yaml, SOUL.md, hermes, .scripts/}
|
|
13
13
|
# 2. Creates a per-agent runtime repo gh:delorenj/agent-hm-<repo>-<role>
|
|
14
|
-
# 3. Submodules it at agents/hermes/<role>/runtime/
|
|
15
|
-
# 4. Creates
|
|
16
|
-
# with profile.yaml opting config.yaml into inherited default config
|
|
17
|
-
# 5. Creates a Plane project in 33god workspace
|
|
14
|
+
# 3. Submodules it at agents/hermes/<role>/runtime/ (this is HERMES_HOME)
|
|
15
|
+
# 4. Creates a Plane project in 33god workspace
|
|
18
16
|
# 6. Prompts for a BotFather Telegram token, stores in runtime/.env
|
|
19
|
-
# 7. Installs a Bloodbank consumer +
|
|
17
|
+
# 7. Installs a Bloodbank consumer + heartbeat timer (reconcile + checkpoint)
|
|
20
18
|
# 8. Appends to ~/.hermes/agents-registry.yaml
|
|
21
19
|
#
|
|
22
20
|
# Environment-specific defaults (Hermes binary path, runtime repo owner, Plane
|
|
@@ -50,7 +48,6 @@ role:
|
|
|
50
48
|
default: pm
|
|
51
49
|
choices:
|
|
52
50
|
"Project Manager (pm)": pm
|
|
53
|
-
"Scrum Master — continuous ticket sentinel (scrum-master)": scrum-master
|
|
54
51
|
"Developer (dev)": dev
|
|
55
52
|
"Reviewer (review)": review
|
|
56
53
|
"Ops (ops)": ops
|
|
@@ -66,25 +63,19 @@ ticket_provider:
|
|
|
66
63
|
"Plane": plane
|
|
67
64
|
"Trello": trello
|
|
68
65
|
|
|
69
|
-
with_scrum_master:
|
|
70
|
-
type: bool
|
|
71
|
-
help: "Also provision a paired Scrum Master (continuous ticket sentinel) for this repo?"
|
|
72
|
-
default: false
|
|
73
|
-
when: "{{ role == 'pm' }}"
|
|
74
|
-
|
|
75
66
|
agent_purpose:
|
|
76
67
|
type: str
|
|
77
68
|
help: "One-line description of what this agent does in this repo"
|
|
78
|
-
default: "
|
|
69
|
+
default: "Project management, triage, and continuous board reconciliation"
|
|
79
70
|
|
|
80
71
|
model_provider:
|
|
81
72
|
type: str
|
|
82
|
-
help: "Inference provider
|
|
73
|
+
help: "Inference provider (empty = inherit from global ~/.hermes config)"
|
|
83
74
|
default: ""
|
|
84
75
|
|
|
85
76
|
model_name:
|
|
86
77
|
type: str
|
|
87
|
-
help: "Model name
|
|
78
|
+
help: "Model name (empty = inherit from global ~/.hermes config)"
|
|
88
79
|
default: ""
|
|
89
80
|
|
|
90
81
|
soul_tone:
|
|
@@ -104,11 +95,6 @@ agent_id:
|
|
|
104
95
|
default: "{{ target_repo }}-{{ role }}"
|
|
105
96
|
when: false
|
|
106
97
|
|
|
107
|
-
profile_name:
|
|
108
|
-
type: str
|
|
109
|
-
default: "{{ agent_id }}"
|
|
110
|
-
when: false
|
|
111
|
-
|
|
112
98
|
display_name:
|
|
113
99
|
type: str
|
|
114
100
|
# Short roles (pm, dev, ops, qa, ci) get uppercased; longer ones get title-cased.
|
|
@@ -145,7 +131,7 @@ plane_workspace:
|
|
|
145
131
|
# All scripts are idempotent — safe to re-run if a step fails.
|
|
146
132
|
|
|
147
133
|
_tasks:
|
|
148
|
-
- "chmod +x .scripts/*.sh hermes 2>/dev/null || true"
|
|
134
|
+
- "chmod +x .scripts/*.sh .scripts/sentinel/bin/*.sh hermes 2>/dev/null || true"
|
|
149
135
|
- "./.scripts/00-banner.sh"
|
|
150
136
|
- "./.scripts/01-config.sh"
|
|
151
137
|
- "./.scripts/05-fleet-env.sh"
|
|
@@ -155,12 +141,8 @@ _tasks:
|
|
|
155
141
|
- "./.scripts/42-ticket-provider.sh"
|
|
156
142
|
- "./.scripts/60-bloodbank.sh"
|
|
157
143
|
- "./.scripts/70-systemd.sh"
|
|
158
|
-
- command: "./.scripts/75-scrum-master.sh"
|
|
159
|
-
when: "{{ role == 'scrum-master' }}"
|
|
160
144
|
- "./.scripts/80-registry.sh"
|
|
161
145
|
- "./.scripts/99-summary.sh"
|
|
162
|
-
- command: "./.scripts/90-chain-scrum-master.sh"
|
|
163
|
-
when: "{{ role == 'pm' and with_scrum_master }}"
|
|
164
146
|
|
|
165
147
|
_skip_if_exists:
|
|
166
148
|
- hermes
|
|
@@ -26,12 +26,11 @@
|
|
|
26
26
|
┌────────────────────────────────────────┐
|
|
27
27
|
│ gh:delorenj/agent-hm-<project>-<role> │ ← NEW repo per agent
|
|
28
28
|
│ ───────────────────────────────────── │ private
|
|
29
|
-
│ ├──
|
|
30
|
-
│ ├── config.yaml (local overrides) │
|
|
29
|
+
│ ├── config.yaml │
|
|
31
30
|
│ ├── SOUL.md (evolving) │
|
|
32
31
|
│ ├── memories/ │ auto-checkpointed
|
|
33
|
-
│ ├── sessions/sessions.db (LFS) │
|
|
34
|
-
│ ├── decisions/ │ session end
|
|
32
|
+
│ ├── sessions/sessions.db (LFS) │ by the heartbeat
|
|
33
|
+
│ ├── decisions/ │ + on session end
|
|
35
34
|
│ └── bloodbank-consumer.py │
|
|
36
35
|
└────────────────────────────────────────┘
|
|
37
36
|
```
|
|
@@ -52,12 +51,6 @@ A third file ties the fleet together: `~/.hermes/fleet.env`.
|
|
|
52
51
|
It is the single source-of-truth pointer for the shared Hermes executable/repo
|
|
53
52
|
that every generated launcher uses.
|
|
54
53
|
|
|
55
|
-
Each runtime is also exposed as a named Hermes profile:
|
|
56
|
-
`~/.hermes/profiles/<repo>-<role>` symlinks to `agents/hermes/<role>/runtime/`.
|
|
57
|
-
The runtime's `profile.yaml` opts only `config.yaml` into inheriting shared
|
|
58
|
-
defaults from the fleet default profile; secrets, memories, sessions, skills,
|
|
59
|
-
gateway state, and other runtime files stay local.
|
|
60
|
-
|
|
61
54
|
## Why git-tracked runtime
|
|
62
55
|
|
|
63
56
|
The runtime is the agent's "subjective experience" — its memory of every
|
|
@@ -70,17 +63,22 @@ emitted. Putting it in git gives:
|
|
|
70
63
|
- **Forkability**: experiment with a copy on a branch, merge if it works out.
|
|
71
64
|
- **Cross-machine**: same agent state on big-chungus and on the laptop.
|
|
72
65
|
|
|
73
|
-
##
|
|
66
|
+
## Heartbeat cadence (reconcile + checkpoint)
|
|
74
67
|
|
|
75
|
-
A systemd `--user` timer runs `.scripts/
|
|
68
|
+
A systemd `--user` timer runs `.scripts/heartbeat.sh` frequently (about once a
|
|
69
|
+
minute). Each tick fuses two jobs into one:
|
|
76
70
|
|
|
77
|
-
1.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
1. **Board-reconciliation sentinel pass** — the PM's continuous ticket sentinel.
|
|
72
|
+
The runner's own cooldown/lock logic decides whether a full, LLM-backed
|
|
73
|
+
reconciliation pass is worth running (it rate-limits the expensive Hermes
|
|
74
|
+
call); see [the sentinel docs](sentinel/README.md).
|
|
75
|
+
2. **Gated runtime checkpoint** — after the sentinel decision, the runner calls
|
|
76
|
+
`.scripts/checkpoint.sh`, gated to at most once an hour. The checkpoint:
|
|
77
|
+
`cd`s into the runtime submodule, `git add -A`, commits only if dirty (exits
|
|
78
|
+
clean otherwise), and pushes to `origin`.
|
|
81
79
|
|
|
82
|
-
On session end, a hermes hook (TBD path)
|
|
83
|
-
|
|
80
|
+
On session end, a hermes hook (TBD path) checkpoints immediately so nothing
|
|
81
|
+
in-flight is lost between heartbeat ticks.
|
|
84
82
|
|
|
85
83
|
Sensitive state — `.env`, `auth.json`, OAuth tokens — never enters git.
|
|
86
84
|
They're in `.gitignore` and live only on the host machine.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
workflowType: fleet-control-plane-artifacts
|
|
3
|
+
date: 2026-06-27
|
|
4
|
+
status: draft-ready
|
|
5
|
+
source: adapted-bmad
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Fleet Control Plane Implementation Artifacts
|
|
9
|
+
|
|
10
|
+
This folder captures the implementation plan for tightening the Fleet without
|
|
11
|
+
collapsing its repos into one codebase.
|
|
12
|
+
|
|
13
|
+
The Fleet remains a set of independently useful parts:
|
|
14
|
+
|
|
15
|
+
- `CommonProject` owns the base project scaffold.
|
|
16
|
+
- `hermes-agent-template` owns agent-role provisioning.
|
|
17
|
+
- `~/.hermes` owns live runtime state.
|
|
18
|
+
- `~/.hermes/hermes-agent` owns the Hermes engine checkout and binary.
|
|
19
|
+
- `pjangler` becomes the explicit Fleet control plane.
|
|
20
|
+
- n8n becomes the visual orchestration layer, backed by local systemd fallback.
|
|
21
|
+
|
|
22
|
+
## Artifacts
|
|
23
|
+
|
|
24
|
+
- [prd.md](./prd.md) - Functional and non-functional requirements.
|
|
25
|
+
- [architecture.md](./architecture.md) - Technical architecture and ADRs.
|
|
26
|
+
- [epics-and-stories.md](./epics-and-stories.md) - Implementation backlog with acceptance criteria.
|
|
27
|
+
- [implementation-readiness-report-2026-06-27.md](./implementation-readiness-report-2026-06-27.md) - Readiness assessment and launch gates.
|
|
28
|
+
|
|
29
|
+
## Adapted BMAD Note
|
|
30
|
+
|
|
31
|
+
The formal BMAD workflow expects a project-local `_bmad` runtime, PRD, and
|
|
32
|
+
step-by-step user confirmations. This repo does not currently contain `_bmad`.
|
|
33
|
+
These artifacts preserve the BMAD intent and structure while using the live
|
|
34
|
+
architecture review and advanced elicitation decisions as input.
|
|
35
|
+
|