Improve ledger format #4
Labels
No labels
agent
build
agent
dev
agent
new
agent
release
agent
review
agent
test
agent
working
priority
high
priority
low
priority
medium
risk
high
risk
low
risk
medium
type
bug
type
chore
type
feature
type
security
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tfks/fjx#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Agents are duplicating status details in their ledgers. Let simplify for them. Instead of giving them the full comment text, let's split a ledger in two:
That first
---is the separator (similar to how yaml frontmatter is handled). fjx should always only show the agent-managed text. Agent prompts should be updated (hopefully simplified) so that they do not worry about managing that metadata. Instead, the ledger commands will require astatusarg. fjx will use that status and current time for checkpoint. To review, all ledgers have this metadata item in common:The PM is currently only one with extra Briefs metadata.
Brief — Developer
Phase: simple. Read
wiki/workflow/prompts/dev-simple.mdfor the cycle protocol.Ledger for: agent-pm
Status: watchingclosed @ 2026-05-14T08:37:06.922Z
Briefs:
Activity
_(none)_1. i4/closed : applied
Bugs Found
/noteparsing gap:/notecommands in issue comments are not captured inactivityEntries. This breaks the workflow where/noteshould route throughpm closefornotes_for_review[]and wiki promotion. The/noteon this issue (id#984, "I over-rode @agent-test...") was present in Forgejo but not captured by the sweep at 09:16:19Z.Ledger for: agent-dev
Status: review @ 2026-05-14T08:31:37.344Z
Tasks
5dd35e65dd35e65dd35e6Summary
Completed Issue #4: Improve Ledger Format. Split ledgers into fjx-managed (metadata) and agent-managed (content) sections separated by
---. Updated ledger commands to require--statusarg; fjx handles checkpoint computation. Simplified agent prompts to not manage metadata. All tests pass.Handoff: PR #8 created and marked agent/review.
Brief — Tester
Phase: review. Read
wiki/workflow/prompts/test.mdfor the cycle protocol.Ledger for: agent-test
Status: concerns @ 2026-05-14T08:49:48.385Z
Ledger for: agent-test
Status: concerns @ 2026-05-14T08:49:24.597Z
Action Summary
Gap Analysis: Untested Ledger Format Changes
The PR introduces a critical feature — splitting ledgers into fjx-managed and agent-managed sections separated by
---— but the test coverage exposes significant gaps:1. Missing Tests for
extractAgentManagedSection()(NEW FUNCTION)"fjx\n---\nagent"→"agent"---in content (must only split on\n---\n)2. Missing Tests for Ledger Format with Separator
fjx-managed\n\n---\n\nagent-managed3. Missing Test for
--statusRequirement--statusflag is required when writing (line 55–58 ledger.ts)--statusis missing4. No Integration Test of ledger read path
upsertCommentByMarker(marker layer) but NOT the ledger command layer with new formatfjx dev ledger --body-file X --status workingfjx dev ledgerConfirmed Issues
None detected. Behavior observed in actions matches implementation; no runtime errors or assertion failures.
Untested Assumptions
---are handled gracefully by agents reading them. Not verified end-to-end.---on its own line. Current code splits on\n---\n(literal string), so it should work, but never tested.Verdict
concerns — Actions pass and code quality is solid, but the ledger format refactor introduces untested code paths critical to agent workflows. The
extractAgentManagedSection()function exists but is never exercised, suggesting incomplete implementation or dead code. Gap-filling tests would catch issues agents will hit in production.Recommend: Add unit tests for separator parsing and --status validation before merge. Add integration test of round-trip ledger write → read → extract cycle.
/note I over-rode @agent-test since extractAgentManagedSection() is so simple and an e2e round-trip test is not worth hassle at this point.