Files
boshu2__agentops/hooks/ao-feedback-loop.sh
T
Boden Fuller 4fd2512c87 refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.

Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)

Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script

All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00

17 lines
555 B
Bash
Executable File

#!/usr/bin/env bash
# AgentOps Hook: ao feedback-loop
# Runs feedback loop analysis for the current session at session end.
set -euo pipefail
[ "${AGENTOPS_HOOKS_DISABLED:-0}" = "1" ] && exit 0
if command -v ao >/dev/null 2>&1; then
ao feedback-loop --session "${CLAUDE_SESSION_ID:-}" 2>/dev/null || {
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo .)"
mkdir -p "$ROOT/.agents/ao" 2>/dev/null
echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) HOOK_FAIL: ao feedback-loop" >> "$ROOT/.agents/ao/hook-errors.log"
}
fi
exit 0