feat(20b): dev-agent reads formula from .profile repo #85

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

Parent

Part of #20 — agent .profile repo.

What to do

Modify formula loading in lib/formula-session.sh (or dev/dev-agent.sh):

  1. At session start, clone or pull the agent .profile repo to a local cache dir (e.g. /home/agent/data/.profile/)
  2. Read formula.toml from the cached .profile instead of formulas/<role>.toml
  3. If .profile repo does not exist or clone fails, fall back to formulas/<role>.toml (graceful degradation)
  4. Log which formula source was used: .profile vs fallback

The agent identity (user login) is already known from the FORGE_TOKEN. Use the Forgejo API to resolve the .profile repo URL.

Considerations

  • The .profile repo is on the local Forgejo, so cloning is fast (localhost)
  • Cache the clone between sessions — git pull at session start, not full clone each time
  • The formula.toml in .profile may diverge from formulas/ — that is intentional

Verification

  • dev-qwen reads formula from dev-qwen/.profile/formula.toml
  • Logs show "formula source: .profile" (not fallback)
  • If .profile repo is deleted, agent falls back to formulas/ and logs a warning

Dependencies

Depends on #84 (hire-an-agent + dev-qwen retrofit).

Lessons context

When loading the .profile, also call profile_load_lessons() from #97 to inject knowledge/lessons-learned.md into the agent context. This is part of the generic journal aspect and does not require .profile-specific code beyond ensuring the cache is available.

## Parent Part of #20 — agent .profile repo. ## What to do Modify formula loading in `lib/formula-session.sh` (or `dev/dev-agent.sh`): 1. At session start, clone or pull the agent `.profile` repo to a local cache dir (e.g. `/home/agent/data/.profile/`) 2. Read `formula.toml` from the cached `.profile` instead of `formulas/<role>.toml` 3. If `.profile` repo does not exist or clone fails, fall back to `formulas/<role>.toml` (graceful degradation) 4. Log which formula source was used: `.profile` vs fallback The agent identity (user login) is already known from the FORGE_TOKEN. Use the Forgejo API to resolve the `.profile` repo URL. ## Considerations - The .profile repo is on the local Forgejo, so cloning is fast (localhost) - Cache the clone between sessions — `git pull` at session start, not full clone each time - The formula.toml in .profile may diverge from formulas/ — that is intentional ## Verification - dev-qwen reads formula from `dev-qwen/.profile/formula.toml` - Logs show "formula source: .profile" (not fallback) - If .profile repo is deleted, agent falls back to formulas/ and logs a warning ## Dependencies Depends on #84 (hire-an-agent + dev-qwen retrofit). ## Lessons context When loading the .profile, also call `profile_load_lessons()` from #97 to inject `knowledge/lessons-learned.md` into the agent context. This is part of the generic journal aspect and does not require .profile-specific code beyond ensuring the cache is available.
dev-bot added the
backlog
label 2026-04-01 06:32:42 +00:00
dev-qwen self-assigned this 2026-04-01 07:50:26 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-01 07:50:27 +00:00
dev-qwen removed their assignment 2026-04-01 08:19:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#85
No description provided.