refactor: extract disinto_hire_an_agent() from bin/disinto into lib/hire-agent.sh #300

Closed
opened 2026-04-06 17:53:31 +00:00 by dev-bot · 1 comment
Collaborator

Context

Part of #284 — incremental extraction of bin/disinto into focused lib/ modules.

What to extract

The disinto_hire_an_agent() function (~301 lines) handles user creation, .profile repo setup, formula copying, branch protection, state marker creation.

How

  1. Create lib/hire-agent.sh with disinto_hire_an_agent()
  2. Globals expected: FORGE_URL, FORGE_TOKEN, FACTORY_ROOT, PROJECT_NAME. Assert they are set.
  3. In bin/disinto, replace the function body with: source "${FACTORY_ROOT}/lib/hire-agent.sh"
  4. The CLI dispatcher case statement stays in bin/disinto
  5. smoke-init CI must pass

Affected files

  • bin/disinto (remove disinto_hire_an_agent body, add source)
  • lib/hire-agent.sh (new file)

Acceptance criteria

  • lib/hire-agent.sh contains disinto_hire_an_agent()
  • bin/disinto sources lib/hire-agent.sh
  • disinto hire-an-agent command still works
  • ShellCheck passes
## Context Part of #284 — incremental extraction of bin/disinto into focused lib/ modules. ## What to extract The disinto_hire_an_agent() function (~301 lines) handles user creation, .profile repo setup, formula copying, branch protection, state marker creation. ## How 1. Create lib/hire-agent.sh with disinto_hire_an_agent() 2. Globals expected: FORGE_URL, FORGE_TOKEN, FACTORY_ROOT, PROJECT_NAME. Assert they are set. 3. In bin/disinto, replace the function body with: source "${FACTORY_ROOT}/lib/hire-agent.sh" 4. The CLI dispatcher case statement stays in bin/disinto 5. smoke-init CI must pass ## Affected files - bin/disinto (remove disinto_hire_an_agent body, add source) - lib/hire-agent.sh (new file) ## Acceptance criteria - [ ] lib/hire-agent.sh contains disinto_hire_an_agent() - [ ] bin/disinto sources lib/hire-agent.sh - [ ] disinto hire-an-agent command still works - [ ] ShellCheck passes
dev-bot added the
backlog
label 2026-04-06 17:53:31 +00:00
dev-qwen self-assigned this 2026-04-06 18:26:53 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-06 18:26:53 +00:00
dev-bot added
blocked
and removed
in-progress
labels 2026-04-06 18:29:02 +00:00
Author
Collaborator

Stale in-progress issue detected

Field Value
Detection reason no_active_session_no_open_pr
Timestamp 2026-04-06T18:29:03Z

Status: This issue was labeled in-progress but no active tmux session exists.
Action required: A maintainer should triage this issue.

### Stale in-progress issue detected | Field | Value | |---|---| | Detection reason | `no_active_session_no_open_pr` | | Timestamp | `2026-04-06T18:29:03Z` | **Status:** This issue was labeled `in-progress` but no active tmux session exists. **Action required:** A maintainer should triage this issue.
dev-qwen removed their assignment 2026-04-06 18:48:46 +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: disinto-admin/disinto#300
No description provided.