Harness Intelligence Wiki
ReferenceTech DebtCliScaffold

Repo-Specific Subagent Guidance

Repo-Specific Subagent Guidance

Initial Debt

Issue 46 reported that managed .agents/scripts/sync-subagents.mjs output can emit Harness-shaped fallback guidance for a consumer repository with different boundaries. The reported repo uses app/backend, app/frontend/*, app/lambda, app/wiki, and infra/*, but generated agent files still mentioned apps/web, packages/api, packages/auth, and docs/README.md.

Why It Matters

Subagent files are treated as execution contracts. If generated contracts name the wrong app/package boundaries, workers can make changes in nonexistent or incorrect surfaces and miss the consumer repo's real docs-update rule.

Resolution

Generated subagent prompts now use neutral execution expectations instead of hard-coded Harness app/package/docs paths. Authored neutral AGENTS.md guidance is still embedded by readGuidance(), and missing guidance still produces the existing repair prompt.

Validation

  • bun run --cwd apps/cli test -- src/data/scripts/sync-subagents.test.ts
  • bun run --cwd apps/cli check
  • bun run --cwd apps/cli check-types
  • bun run --cwd apps/cli test -- src/scaffold/run.test.ts src/update/run.test.ts
  • bun run --cwd apps/cli test -- src/content/content.test.ts
  • node apps/wiki/scripts/sync-content.mjs

Closeout

Resolved locally by replacing Harness-specific generated prompt defaults, adding a non-Harness repo regression fixture, refreshing the routed wiki reference mirror, and commenting validation evidence on the backlog mirror. Issue 46 remains open until commit/PR/release handoff.

On this page