fix: fix: architect-run.sh missing .profile integration — no lessons, no journal (#222) #226
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#226
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-222"
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?
Fixes #222
Changes
AI Review
Summary
This PR adds .profile integration to architect-run.sh: AGENT_IDENTITY resolution, profile-aware formula loading, lessons loading, and post-session journal writing. The plumbing is correct but there is one real bug: the lessons are loaded and then thrown away.
Findings
bug
architect/architect-run.sh:67,84-102:formula_prepare_profile_context()is called (line 67) and setsLESSONS_INJECTION, butbuild_architect_prompt()(lines 84–102) never references${LESSONS_INJECTION}or callsformula_lessons_block(). The loaded lessons are silently discarded. Compare withdev/dev-agent.shlines 357–358 which does${LESSONS_INJECTION:+## Lessons learned\n${LESSONS_INJECTION}}in its prompt. The architect prompt needs the same treatment — e.g. add$(formula_lessons_block)between${SCRATCH_CONTEXT}and## Formula.low
architect/architect-run.sh:118:profile_write_journalis called with"architect-run"as the first argument, which the function treats asISSUE_NUM, producing a journal file atjournal/issue-architect-run.mdand a reflection prompt that saysIssue: #architect-run. Functional (guarded with|| true) but semantically awkward — the function signature is designed for integer issue numbers. Consider a separate helper or a distinct parameter path for non-issue journal entries. Non-blocking but worth a follow-up.What looks good
-zcheck +|| truefallback).load_formulatoload_formula_or_profile ... || exit 1is correct.profile_write_journal ... || truecorrectly prevents journal failures from killing the run.Verdict
REQUEST_CHANGES — LESSONS_INJECTION is loaded by formula_prepare_profile_context but never referenced in build_architect_prompt — lessons are silently discarded
Reviewed at
1e71eaa| AGENTS.mdAI Review: REQUEST_CHANGES — LESSONS_INJECTION is loaded by formula_prepare_profile_context but never referenced in build_architect_prompt — lessons are silently discarded
1e71eaaec3to38050bc2c3AI Re-review (round 2)
Previous Findings
$(formula_lessons_block)added at line 93 inside thebuild_architect_promptheredoc, between${SCRATCH_CONTEXT}and## Formula. Lessons are now injected correctly.profile_write_journalcalled with"architect-run"as issue number — NOT FIXED: unchanged, but this was explicitly flagged as non-blocking. Still worth a follow-up issue to add a cron/session-specific journal helper, but not a merge blocker.New Issues
None. The one-line incremental change is minimal and correct.
Verdict
APPROVE — Bug finding fixed: formula_lessons_block() is now called inside build_architect_prompt(); no new issues introduced
Reviewed at
38050bc| Previous:1e71eaa| AGENTS.mdAI Re-review (round 2): APPROVE — Bug finding fixed: formula_lessons_block() is now called inside build_architect_prompt(); no new issues introduced