Harness Intelligence Wiki
SpecsCLIIssue 46 Repo-Specific Subagent Guidance

Implementation Notes: Issue 46 Repo-Specific Subagent Guidance

Implementation Notes: Issue 46 Repo-Specific Subagent Guidance

Summary

Generated subagent prompts no longer inject Harness-specific app, package, or docs paths into every worker contract. Repo-specific AGENTS.md guidance remains the source for concrete boundaries.

Changes

  • apps/cli/src/data/scripts/sync-subagents.mjs now uses neutral execution expectations for repo boundaries and docs/runbook updates.
  • .agents/scripts/sync-subagents.mjs mirrors the source script for this repo's current managed scaffold state.
  • apps/cli/src/data/scripts/sync-subagents.test.ts adds a regression fixture for a non-Harness repo shape with app/backend, app/frontend, app/lambda, app/wiki, infra, and no root docs tree.
  • Routed debt/spec metadata now includes the issue 46 debt and resolution spec.

Validation Evidence

  • RED target: generated subagent prompts contained hard-coded Harness defaults such as apps/web, packages/api, packages/auth, and docs/README.md.
  • GREEN: bun run --cwd apps/cli test -- src/data/scripts/sync-subagents.test.ts
  • GREEN: bun run --cwd apps/cli check
  • GREEN: bun run --cwd apps/cli check-types
  • GREEN: bun run --cwd apps/cli test -- src/scaffold/run.test.ts src/update/run.test.ts
  • GREEN: bun run --cwd apps/cli test -- src/content/content.test.ts
  • GREEN: node apps/wiki/scripts/sync-content.mjs

Manual Review Checklist

CheckResultEvidence
Authored guidance preservedPassRegression fixture embeds app/frontend/AGENTS.md content.
Harness defaults removedPassRegression asserts all generated agent surfaces exclude apps/web, packages/api, packages/auth, and docs/README.md defaults.
Missing-guidance repair preservedPassRegression keeps the missing neutral guidance prompt.
Existing update/scaffold flows passPassFocused scaffold and update suites pass.

On this page