Harness Intelligence Wiki
SpecsCLIIssue 46 Repo-Specific Subagent Guidance

Spec: Repo-Specific Subagent Guidance

Spec: Repo-Specific Subagent Guidance

Initial Situation

dp update and scaffolded maintenance scripts generate subagent files for multiple harnesses from neutral manifest and AGENTS.md sources. Those files are supposed to carry the consumer repo's actual app, package, infra, wiki, and docs boundaries into worker prompts.

Issue 46 reports a consumer repo where scoped AGENTS.md files were authored for app/backend, app/frontend/*, app/lambda, app/wiki, and infra/*, with no root docs tree. Generated subagent files still contained Harness-shaped fallback guidance that names apps/web, packages/api, packages/auth, and docs/README.md.

Issue

The generated subagent sync path can preserve or introduce generic Harness boundary text where repo-specific neutral guidance should be embedded. That makes worker contracts stale for non-Harness repo shapes.

Solution

Add regression coverage for a non-Harness consumer repo shape, then adjust the sync script/template source so generated subagent output uses authored neutral AGENTS.md guidance when present and reserves missing-source fallback text only for genuinely missing guidance files.

Non-Goals

  • Encoding Traevolution-specific product rules into Harness.
  • Rewriting the subagent manifest model.
  • Reconciling unrelated current dp update baseline drift.
  • Changing missing-guidance repair prompts except where needed for correctness.

Acceptance Criteria

  • A focused fixture reproduces issue 46 with authored neutral AGENTS.md guidance.
  • Generated .claude, .codex, .cursor, and .opencode subagent files do not contain the generic apps/web, packages/api, packages/auth, or docs/README.md fallback text when guidance exists.
  • Missing scoped guidance still produces an actionable missing-source prompt.
  • Existing CLI scaffold/update tests for generated sync scripts pass.
  • The debt file is marked resolved with validation evidence after delivery.

On this page