feat(20g): migrate all remaining agents to .profile + remove ops repo journal dirs #90

Closed
opened 2026-04-01 06:32:43 +00:00 by dev-bot · 2 comments
Collaborator

Parent

Part of #20 — agent .profile repo.

What to do

  1. First: extract shared context setup into lib/formula-session.sh

    The PR branch adds profile_load_lessons / profile_write_journal calls to every agent script, creating duplicate boilerplate. Instead, add a single shared function that each agent calls once:

    # lib/formula-session.sh
    formula_prepare_profile_context() {
      # Load lessons from .profile (if agent has one)
      profile_load_lessons
      LESSONS_INJECTION="${LESSONS_CONTEXT:-}"
    }
    

    Similarly, wrap the post-session journal into a single call each agent makes at the end. The goal: each agent script has ONE call to the shared function, not 3-4 lines of repeated variable assignments.

    This avoids the duplicate-detection CI failure that blocked the previous attempt.

  2. Run disinto hire-an-agent for each remaining agent:

    • disinto hire-an-agent review-bot review
    • disinto hire-an-agent planner-bot planner
    • disinto hire-an-agent gardener-bot gardener
    • disinto hire-an-agent supervisor-bot supervisor
    • disinto hire-an-agent predictor-bot predictor
  3. Wire each agent script to call the shared function (one line per script, not boilerplate)

  4. Remove ops repo journal directories:

    • Delete journal/planner/ and journal/supervisor/ from disinto-ops
    • Update bin/disinto init to stop creating these dirs
  5. Update AGENTS.md to document the .profile model

Why the previous PR failed

PR #106 introduced 14 new duplicate code blocks — the same LESSONS_INJECTION, SCRATCH_CONTEXT, profile_load_lessons setup repeated across planner-run.sh, gardener-run.sh, predictor-run.sh, supervisor-run.sh, and review scripts. The duplicate-detection CI step correctly flagged these.

The fix: extract the common pattern into a shared function in lib/formula-session.sh so each agent script calls one function instead of repeating the boilerplate.

Verification

  • Each agent has a .profile repo on Forgejo
  • Each agent reads formula from .profile at session start
  • Each agent calls formula_prepare_profile_context() (one line, no duplication)
  • Ops repo has no journal/ directories
  • AGENTS.md reflects the new model
  • duplicate-detection CI step passes (zero new duplicates)
  • CI green

Dependencies

Depends on #85 (formula loading), #87 (branch protection), #97 (generic journal aspect). #86 and #89 were absorbed into #97.

## Parent Part of #20 — agent .profile repo. ## What to do 1. **First: extract shared context setup into `lib/formula-session.sh`** The PR branch adds `profile_load_lessons` / `profile_write_journal` calls to every agent script, creating duplicate boilerplate. Instead, add a single shared function that each agent calls once: ```bash # lib/formula-session.sh formula_prepare_profile_context() { # Load lessons from .profile (if agent has one) profile_load_lessons LESSONS_INJECTION="${LESSONS_CONTEXT:-}" } ``` Similarly, wrap the post-session journal into a single call each agent makes at the end. The goal: each agent script has ONE call to the shared function, not 3-4 lines of repeated variable assignments. This avoids the duplicate-detection CI failure that blocked the previous attempt. 2. Run `disinto hire-an-agent` for each remaining agent: - `disinto hire-an-agent review-bot review` - `disinto hire-an-agent planner-bot planner` - `disinto hire-an-agent gardener-bot gardener` - `disinto hire-an-agent supervisor-bot supervisor` - `disinto hire-an-agent predictor-bot predictor` 3. Wire each agent script to call the shared function (one line per script, not boilerplate) 4. Remove ops repo journal directories: - Delete `journal/planner/` and `journal/supervisor/` from disinto-ops - Update `bin/disinto` init to stop creating these dirs 5. Update AGENTS.md to document the .profile model ## Why the previous PR failed PR #106 introduced 14 new duplicate code blocks — the same `LESSONS_INJECTION`, `SCRATCH_CONTEXT`, `profile_load_lessons` setup repeated across planner-run.sh, gardener-run.sh, predictor-run.sh, supervisor-run.sh, and review scripts. The duplicate-detection CI step correctly flagged these. The fix: extract the common pattern into a shared function in `lib/formula-session.sh` so each agent script calls one function instead of repeating the boilerplate. ## Verification - Each agent has a `.profile` repo on Forgejo - Each agent reads formula from `.profile` at session start - Each agent calls `formula_prepare_profile_context()` (one line, no duplication) - Ops repo has no `journal/` directories - AGENTS.md reflects the new model - **duplicate-detection CI step passes** (zero new duplicates) - CI green ## Dependencies Depends on #85 (formula loading), #87 (branch protection), #97 (generic journal aspect). #86 and #89 were absorbed into #97.
dev-bot added the
backlog
label 2026-04-01 06:32:43 +00:00
dev-qwen self-assigned this 2026-04-01 09:35:39 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-01 09:35:39 +00:00
Collaborator

Blocked — issue #90

Field Value
Exit reason ci_exhausted
Timestamp 2026-04-01T09:50:01Z
### Blocked — issue #90 | Field | Value | |---|---| | Exit reason | `ci_exhausted` | | Timestamp | `2026-04-01T09:50:01Z` |
dev-qwen added
blocked
and removed
in-progress
labels 2026-04-01 09:50:02 +00:00
dev-bot added
backlog
and removed
blocked
labels 2026-04-01 12:58:36 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-01 13:01:30 +00:00
Collaborator

Blocked — issue #90

Field Value
Exit reason ci_exhausted
Timestamp 2026-04-01T13:18:56Z
### Blocked — issue #90 | Field | Value | |---|---| | Exit reason | `ci_exhausted` | | Timestamp | `2026-04-01T13:18:56Z` |
dev-qwen added
blocked
and removed
in-progress
labels 2026-04-01 13:18:56 +00:00
dev-bot added
backlog
and removed
blocked
labels 2026-04-01 13:55:53 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-01 14:11:43 +00:00
dev-qwen removed their assignment 2026-04-01 14:46:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: johba/disinto#90
No description provided.