godmode:observability-as-infrastructure
Skill1 starsChanged 57 days agoMITView on GitHub
Structured tracing for all godmode helpers and subagents. Every script invocation, branching decision, and agent lifecycle transition is recorded as a JSONL event. Use when diagnosing session failures, auditing agent convergence, or reviewing cross-session continuity.
In this repository76 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- godmode:agent-governanceSkill
- godmode:agent-improvement-loopSkill
- agents-skill-saveSkill
- baml-add-typesSkill
- godmode:brainstormSkill
- godmode:capSkill
- godmode:changelogSkill
- godmode:ci-fixSkill
- godmode:code-reviewSkill
- godmode:context-mapSkill
- godmode:cross-issueSkill
- godmode:crs-discoverSkill
- godmode:crs-hook-testingSkill
- godmode:crs-installSkill
- godmode:crs-propose-rulesSkill
- godmode:crs-validateSkill
- godmode:dead-codeSkill
- godmode:decomposeSkill
- godmode:dep-auditSkill
- godmode:dep-bumpSkill
- godmode:designSkill
- devloop-session-primerSkill
- godmode:dialecticSkill
- godmode:doc-maintainerSkill
- godmode:doc-reviewSkill
- godmode:doc-syncSkill
- godmode:doc-writerSkill
- doob-db-inspectorSkill
- doob-release-managerSkill
- godmode:doublecheckSkill
- dual-forge-pr-mergeSkill
- gh-bulk-issuesSkill
- godmode:health-scoreSkill
- godmode:ingestSkill
- godmode:introspectionSkill
- godmode:issue-triageSkill
- godmode:memory-bankingSkill
- godmode:mergeSkill
- godmode:mini-context-graphSkill
- godmode:mistake-trackerSkill
- godmode:moaSkill
- notfiles-release-workflowSkill
- godmode:parallel-agentsSkill
- godmode:pattern-learnerSkill
- planning-with-cruxSkill
- godmode:pr-authorSkill
- godmode:receiving-reviewSkill
- godmode:refactoringSkill
- godmode:release-notesSkill
- release-readiness-checkSkill
- remote-upstream-triageSkill
- repo-gap-backlogSkill
- godmode:rust-conventionsSkill
- rustqualSkill
- rustqual-workspaceSkill
- rust-release-workflow-authorSkill
- godmode:self-reflectSkill
- session-wrap-commit-pushSkill
- godmode:systematic-debuggingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
All events share a common envelope:
- Very specific: line 49
All helpers source skills/_lib/trace.nu:
- Very specific: line 93
Call trace-start before any work.
- Very specific: line 95
Call trace-error on non-zero exit before calling exit.
- Very specific: line 96
Call trace-end on success.
- Very specific: line 104
Never delete .ctx/godmode/traces/trace.jsonl — archive it instead.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Observability as Infrastructure
The trace file is the infrastructure. No external monitoring needed — every
helper and agent emits structured events to .ctx/godmode/traces/trace.jsonl, the
same append-only file used by the core CLI's start_traced/complete_traced.
Event Schema
All events share a common envelope:
| Field | Type | Description |
event | string | Event kind (see below) |
session_id | string | <git-short-sha>-<epoch-ms> — stable for the lifetime of one Claude session |
ts | string | ISO-8601 timestamp |
Event kinds
| Event | Emitted by | Key fields |
skill.start | every helper | skill, helper, args, trace_id |
skill.complete | every helper | trace_id, duration_ms |
skill.error | every helper | trace_id, exit_code, stderr_tail |
decision | branching helpers | skill, helper, kind, value |
agent.start | parallel-agents | agent_id, slot, crate |
agent.complete | parallel-agents | agent_id, slot, commits |
agent.blocked | parallel-agents | agent_id, slot, reason |
Session identity
Session state lives at .ctx/godmode/session.json. It is created on the first
trace write and reused for all subsequent events. session_id = git short SHA
- epoch ms.
session-summary.nuuses this to correlate work across sessions.
Shared library
All helpers source skills/_lib/trace.nu:
use ($"(repo-root)/skills/_lib/trace.nu") *
def main [...] {
let tid = (trace-start "skill-name" "helper.nu" ...$args)
# ... do work, capture results via | complete ...
if $result.exit_code != 0 {
trace-error $tid $result.exit_code $result.stderr
exit $result.exit_code
}
trace-end $tid
}Branching decisions:
trace-decision "ci-fix" "fetch-failure.nu" "ci_class" "test_failure"
trace-decision "tackle-issues" "integrate-branches.nu" "skip_reason" "BLOCKED.md found for #7"Agent lifecycle (called by the orchestrator, not the subagent):
trace-agent-start $agent_id $slot $crate
trace-agent-complete $agent_id $slot $commits
trace-agent-blocked $agent_id $slot $reasonQuery helpers
| Helper | Purpose |
trace-tail.nu | Last N events; --session <id> to scope |
trace-failures.nu | All skill.error and agent.blocked events |
trace-stats.nu | Duration histogram, agent convergence, decision log |
session-summary.nu | Cross-session triage: errors, blocked agents, unresolved work |
Instrumentation contract
Every helper must:
- Call
trace-startbefore any work; capture the returnedtrace_id. - Wrap every
run-externalcall with| completeand checkexit_code. - Call
trace-erroron non-zero exit before callingexit. - Call
trace-endon success. - Emit
trace-decisionat every branching point that affects outcome.
Trace writes are non-fatal — a failed append must never abort the helper.
Wrap in try { ... } if the .ctx/ directory may not exist.
Guardrails
- Never delete
.ctx/godmode/traces/trace.jsonl— archive it instead. session_idis read-only after creation. Never mutate.ctx/godmode/session.json.- Trace writes must not block the main workflow — keep event payloads small.
stderr_tailis capped at 10 lines to avoid bloating the trace file.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

