feat(config): ingest maintainer focus manifests for repo-specific guidance - #74
feat(config): ingest maintainer focus manifests for repo-specific guidance#74Khaostica wants to merge 3 commits into
Conversation
JSONbored
left a comment
There was a problem hiding this comment.
@Khaostica the parser/guidance layer is good, but this does not yet satisfy the issue.
Required:
- Resolve the conflict in
src/api/routes.ts. - Actually ingest repo-owned config (
.gittensory.yml/JSON or persisted repo settings), not only caller-suppliedfocusManifestin local branch input. - Feed the manifest into decision packs and agent planning, not only local branch analysis.
- Keep maintainer-private notes out of public packets and add regression coverage for that boundary.
97bf45b to
84cc50c
Compare
JSONbored
left a comment
There was a problem hiding this comment.
@Khaostica This remains blocked by merge conflicts and typecheck failures.
A few notes:
- The maintainer focus manifest direction makes sense: repo-specific guidance can help keep public/private behavior, review expectations, and decision-pack recommendations aligned with maintainer intent.
- The current branch conflicts with
src/api/routes.ts,src/mcp/server.ts, andsrc/services/agent-orchestrator.ts. - CI fails at typecheck because
test/unit/focus-manifest.test.tsimportsfast-check, butfast-checkis not installed, and the property test callback parameters are implicitlyany.
Required changes:
- Rebase onto current
mainand resolve the API/MCP/orchestrator conflicts. - Either add
fast-checkintentionally with package and lockfile updates, or rewrite the property-style test using the existing Vitest test stack. - Fix the implicit
anyparameters intest/unit/focus-manifest.test.ts.
Expected validation:
npm run typechecknpm run test:coverage
…dance Add a deterministic focus-manifest parser that normalizes a repo-owned manifest (repo file or API-backed record) into wanted/blocked paths, preferred labels, linked-issue policy, test expectations, issue-discovery policy, and maintainer notes. Missing or malformed config degrades to safe defaults with warnings instead of throwing. Feed the manifest into local-branch analysis so guidance can explain why a path is preferred or discouraged: blocked paths become branch-quality blockers, wanted paths and preferred labels surface as findings, and a public-safe "Maintainer Focus" packet section is added. Maintainer-private notes never reach public next steps, and all public text passes the forbidden-language redaction guard. Accept focusManifest on the local branch-analysis API and MCP tool inputs and expose manifestGuidance in the OpenAPI response schema. Closes JSONbored#34.
…d agent Add a repo-owned focus manifest loader (`.gittensory.json` or `.github/gittensory.json`, plus a persisted "api_record" path via upsertRepoFocusManifest) on top of the signal_snapshots table; missing, malformed, or network-erroring sources degrade to a safe empty manifest with warnings instead of throwing. Wire the loader through every consumer: - /v1/local/branch-analysis and the MCP localBranch tool fall back to the repo-owned manifest when no caller-supplied focusManifest is present. - The agent orchestrator's analyzeLocalBranch path does the same so base-agent runs reuse maintainer-declared guidance. - buildAndPersistContributorDecisionPack bulk-loads per-repo manifests and attaches a public-safe RepoDecisionManifestSummary plus manifest-driven whyThisHelps / nextActions / publicNextActions / riskReasons to each RepoDecision. Privacy boundary: RepoDecisionManifestSummary intentionally excludes maintainerNotes, and publicNextActions are run through the existing forbidden-language guard. New regression tests in decision-pack.test.ts JSON-stringify a manifested RepoDecision and assert "ping @owner" / "Internal:" never appear, alongside loader tests that stub the public GitHub fetcher to cover the file-fetch, error, and api-record paths.
Add tests for the previously-uncovered branches flagged by CI: the preferred linked-issue and encouraged issue-discovery manifest arms in buildRepoDecisionManifestReasons, the loader's refresh bypass and missing/unparseable snapshot-timestamp staleness paths, and the string-list de-duplication branch in the manifest normalizer.
8747813 to
90108bc
Compare
|
Heads up: this PR was auto-closed when I renamed the head branch off the |
Summary
src/signals/focus-manifest.tstolerantly parses/normalizes the manifest. Missing or malformed config degrades to safe deterministic defaults with warnings instead of crashes, and never throws.focusManifeston the/v1/local/branch-analysisAPI and the MCP local-branch tool, and exposesmanifestGuidancein the OpenAPI response schema.Validation
npm run test:ciVerified locally:
git diff --check,typecheck,build:mcp,test:workers, andnpm auditall pass; new focus-manifest, local-branch, OpenAPI, and API/route suites pass;src/signals/focus-manifest.tsis at 100% line / 99% branch coverage. Fulltest:ci(incl.test:mcp-pack, parallel coverage, docs build) runs green in CI on push.New/updated tests cover the required scenarios: valid config, missing config, malformed config, blocked-path preflight, preferred-path recommendation, and a public-sanitizer regression (including a fast-check property test asserting public next steps never contain forbidden language for arbitrary manifests).
Safety