fix(kyberforge): require git-log commit verification and forbid self-spawned rechecks #74

Merged
Defame1297 merged 8 commits from fix/69-71-factory-authoring-fixes into main 2026-07-05 13:24:52 +00:00
Collaborator

Summary

Fixes two bugs in kyberforge's own authoring skills, surfaced by a postmortem after a session with many parallel authoring subagents.

Issue #69 — commit-hash verification. Several authoring runs reported task completion after only git add-staging changes, verified only via git diff main --stat, and never actually ran git commit. Staged-but-uncommitted work is silently lost when a subagent's worktree is cleaned up. plugins/kyberforge/skills/skill-author/SKILL.md and plugins/kyberforge/skills/agent-author/SKILL.md now require capturing git log --oneline -1 before and after the authoring pass and asserting the hash actually changed via a real commit, in both their create and improve flows — git diff --stat is now explicitly called out as insufficient.

Issue #71 — no self-spawned rechecks. In the same session, skill-author's authoring fork self-spawned its own "independent recheck" subagent instead of leaving that responsibility to forge's outer loop. The stray subagent's worktree was torn down mid-run by concurrent cleanup, destroying an uncommitted draft. plugins/kyberforge/skills/skill-author/SKILL.md now states as a hard rule (Gotcha) that it must never spawn further subagents for auditing/rechecking during its own authoring pass — that responsibility belongs solely to /forge's outer loop.

Both fixes were produced by dogfooding kyberforge:forge → kyberforge:skill-author/kyberforge:agent-author itself, including each route's inline audit and forge's independent clean-context recheck loop — which surfaced and resolved several additional pre-existing gaps along the way (a genuine YAML-frontmatter-comment verification gap in agent-author's closing checklist, an incomplete Copilot-CLI field-exclusion list, a missing agent-audit-availability check in agent-author's improve flow, and assorted checklist/wording nits). The kyberforge plugin version was bumped 1.2.2 → 1.2.3 (patch) to reflect the fixes.

Refs #69, #71

Note: Gitea does not auto-close linked issues on merge — #69 and #71 will need to be closed manually after this merges.

## Summary Fixes two bugs in kyberforge's own authoring skills, surfaced by a postmortem after a session with many parallel authoring subagents. **Issue #69 — commit-hash verification.** Several authoring runs reported task completion after only `git add`-staging changes, verified only via `git diff main --stat`, and never actually ran `git commit`. Staged-but-uncommitted work is silently lost when a subagent's worktree is cleaned up. `plugins/kyberforge/skills/skill-author/SKILL.md` and `plugins/kyberforge/skills/agent-author/SKILL.md` now require capturing `git log --oneline -1` before and after the authoring pass and asserting the hash actually changed via a real commit, in both their create and improve flows — `git diff --stat` is now explicitly called out as insufficient. **Issue #71 — no self-spawned rechecks.** In the same session, `skill-author`'s authoring fork self-spawned its own "independent recheck" subagent instead of leaving that responsibility to `forge`'s outer loop. The stray subagent's worktree was torn down mid-run by concurrent cleanup, destroying an uncommitted draft. `plugins/kyberforge/skills/skill-author/SKILL.md` now states as a hard rule (Gotcha) that it must never spawn further subagents for auditing/rechecking during its own authoring pass — that responsibility belongs solely to `/forge`'s outer loop. Both fixes were produced by dogfooding `kyberforge:forge` → `kyberforge:skill-author`/`kyberforge:agent-author` itself, including each route's inline audit and forge's independent clean-context recheck loop — which surfaced and resolved several additional pre-existing gaps along the way (a genuine YAML-frontmatter-comment verification gap in agent-author's closing checklist, an incomplete Copilot-CLI field-exclusion list, a missing `agent-audit`-availability check in agent-author's improve flow, and assorted checklist/wording nits). The kyberforge plugin version was bumped 1.2.2 → 1.2.3 (patch) to reflect the fixes. Refs #69, #71 Note: Gitea does not auto-close linked issues on merge — #69 and #71 will need to be closed manually after this merges.
Claude added 8 commits 2026-07-05 13:21:10 +00:00
Prior sessions had authoring subagents report completion after only
staging changes (git diff --stat showing output, but no git commit),
and one run self-spawned its own audit/recheck subagent instead of
leaving that to forge's outer loop, losing an uncommitted draft when
the stray subagent's worktree was torn down.

Refs #69, #71
Independent /skill-audit recheck flagged the git-log-capture instructions
as discoverable only at close-out (Step 6/Step 5), long after the step
where the hash should actually be snapshotted. Adds the capture checklist
item to Prerequisites (create flow) and Step 1 (improve flow) instead of
leaving it as a retrospective-only note. Also drops a sentence in the
improve flow's Step 4 that duplicated the preceding one on editing
scripts/reference files directly.

Refs #69
Address round-2 independent-audit suggestions: single-item checklist
misuse in the improve flow, inaccurate "before Step 1" phrasing, and an
unbackticked cross-skill reference to kyberforge:forge.

Refs #69, #71
Refs #69, #71
Prior sessions had authoring subagents report completion after only
staging changes (git diff --stat showing output, but no git commit).
agent-author's create and improve flows now require capturing
git log --oneline -1 before and after the authoring pass and asserting
the hash actually changed via a real commit, matching the fix already
applied to skill-author.

Refs #69
Independent skill-audit found that agent-author's closing checklists never
verified template <!-- --> comments were stripped from frontmatter (produces
invalid YAML if left in), the Copilot field-exclusion checklist omitted two
fields present in the authoritative list, and the improve flow had no
agent-audit availability check unlike the create flow.
The Prerequisites checklist mixed items to confirm (preconditions) with an
action to perform (capturing git log), so the following "stop and ask if
missing" gate didn't logically apply to the git-log step. The improve flow
also had no reminder to update source_keys/sources.md when an edit touches
research-sourced content, unlike the create flow's explicit step for it.

Refs #69
skill-author and agent-author SKILL.md files received bug fixes (git-log
commit-hash verification before reporting completion, skill-author now
forbids self-spawning audit/recheck subagents during its authoring pass,
and agent-author closed checklist/coverage gaps). Patch bump to reflect
fixed behavior, not new capability.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FNJWdVvdgvZCHi1hZGqgVQ
Defame1297 approved these changes 2026-07-05 13:24:49 +00:00
Defame1297 merged commit c395acfa57 into main 2026-07-05 13:24:52 +00:00
Defame1297 deleted branch fix/69-71-factory-authoring-fixes 2026-07-05 13:24:52 +00:00
Sign in to join this conversation.