AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-354
  5. plan
  6. context.json
context.json(3.1 KB)· Apr 8, 2026
{
  "meta": {
    "agent": "planner",
    "task_id": "354",
    "title": "MT-10: Make WorktreeService config-driven (base branch, branch prefix)",
    "created_at": "2026-04-08T12:00:00Z"
  },
  "inputs": [
    {
      "name": "issue-354",
      "type": "context",
      "ref": "https://github.com/AgentSDE/agent-core/issues/354",
      "notes": "Replace hardcoded origin/master and default feat prefix in WorktreeService with TenantConfigService values"
    },
    {
      "name": "worktree.service.ts",
      "type": "file",
      "ref": "src/worktree/worktree.service.ts",
      "notes": "Contains hardcoded origin/master (line 130) and default branchPrefix='feat' (lines 27, 149)"
    },
    {
      "name": "worktree.module.ts",
      "type": "file",
      "ref": "src/worktree/worktree.module.ts",
      "notes": "Needs TenantModule import"
    },
    {
      "name": "worktree.service.spec.ts",
      "type": "file",
      "ref": "src/worktree/worktree.service.spec.ts",
      "notes": "Needs TenantConfigService mock and new test cases"
    },
    {
      "name": "issue-348",
      "type": "link",
      "ref": "https://github.com/AgentSDE/agent-core/issues/348",
      "notes": "Dependency — TenantConfigService must exist first"
    }
  ],
  "outputs": [
    {
      "name": "plan",
      "type": "plan",
      "format": "md",
      "content": "plan.md"
    }
  ],
  "files": [
    {
      "path": "src/worktree/worktree.service.ts",
      "action": "modify",
      "reason": "Inject TenantConfigService, replace hardcoded origin/master and default branchPrefix"
    },
    {
      "path": "src/worktree/worktree.module.ts",
      "action": "modify",
      "reason": "Import TenantModule"
    },
    {
      "path": "src/worktree/worktree.service.spec.ts",
      "action": "modify",
      "reason": "Add TenantConfigService mock, test with non-default base branch"
    }
  ],
  "steps": [
    {
      "id": "S1",
      "summary": "Inject TenantConfigService into WorktreeService and replace hardcoded origin/master with config-driven value",
      "acceptance": [
        "TenantConfigService injected via constructor",
        "No hardcoded origin/master remaining in worktree.service.ts",
        "origin/${defaultBaseBranch} used in git worktree add -b call"
      ],
      "depends_on": []
    },
    {
      "id": "S2",
      "summary": "Make default branchPrefix config-driven, update WorktreeModule imports, and update unit tests",
      "acceptance": [
        "Default branchPrefix reads from TenantConfigService.branchPrefix when caller does not pass explicit value",
        "Explicit caller-provided branchPrefix still takes precedence",
        "TenantModule imported in WorktreeModule",
        "Unit tests include TenantConfigService mock",
        "Test case with defaultBaseBranch='main' verifies origin/main is used",
        "tsc --noEmit passes",
        "npm run lint passes",
        "npm run test passes"
      ],
      "depends_on": [
        "S1"
      ]
    }
  ],
  "risks": [
    {
      "risk": "Blocked by #348 — TenantConfigService does not exist yet",
      "mitigation": "Wait for #348 to merge into rc/multi-tenant before starting implementation"
    }
  ],
  "assumptions": [
    "TenantConfigService.getConfig() returns an object with defaultBaseBranch (string) and branchPrefix (string) fields",
    "TenantModule exports TenantConfigService and can be imported by other modules"
  ],
  "open_questions": []
}
Plan