You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define the TypeScript type surface for the MinerGoalSpec — the per-repo config a maintainer/repo-owner drops as .gittensory-miner.yml to tell a miner what to look for and how to behave when targeting their repo. This issue is types-only (the parser is a separate follow-up issue), analogous to how src/signals/focus-manifest.ts's FocusManifest type is defined ahead of/alongside its parser. Scope the fields to what the phase's existing .gittensory.yml already models for the REVIEW side (wantedPaths, blockedPaths, preferredLabels, linkedIssuePolicy, issueDiscoveryPolicy) plus miner-specific additions the roadmap implies are needed (a max-concurrent-claims-per-repo cap, an opt-in/opt-out flag since a repo owner may not want autonomous miners targeting them at all, and a pointer to which lanes/labels a miner should prefer) — keep the field list intentionally small for this foundation phase; it is easy to add fields later, hard to remove ones a contributor already started relying on.
Deliverables
packages/gittensory-engine/src/miner-goal-spec.ts (or src/signals/miner-goal-spec.ts if the team prefers keeping config-schema types alongside focus-manifest.ts rather than in the engine package — pick whichever the reviewing maintainer confirms, defaulting to the engine package per the phase's "shared logic lives in gittensory-engine" principle) exporting a MinerGoalSpec type with: minerEnabled: boolean (default true — explicit opt-out, not opt-in, since a public repo with no file should still be minable by default, mirroring .gittensory.yml's own "safe by default" stance), wantedPaths: string[], blockedPaths: string[], preferredLabels: string[], maxConcurrentClaims: number (a sane default, e.g. 1), issueDiscoveryPolicy: "encouraged" | "neutral" | "discouraged".
A DEFAULT_MINER_GOAL_SPEC constant with the safe defaults, analogous to how focus-manifest.ts documents each field's default in a comment.
JSDoc on every field, matching the density and "Default: X" comment convention used throughout .gittensory.yml.example.
No parsing logic yet — this issue is the type contract only; a unit test simply asserts DEFAULT_MINER_GOAL_SPEC type-checks against MinerGoalSpec and that every field has a documented default in a co-located comment (a lightweight "every field is documented" lint-style test, not full parser coverage).
References
src/signals/focus-manifest.ts (FocusManifest type family, and its gate/features/review sub-configs) — the type-shape precedent to mirror in spirit (small typed config object with an explicit defaults constant).
.gittensory.yml.example (wantedPaths, blockedPaths, preferredLabels, linkedIssuePolicy, issueDiscoveryPolicy fields, lines 30-80) — the exact field names/semantics to carry over from the review-side manifest where they overlap.
New path: .gittensory-miner.yml (the file this type models) and its type-definition module (path TBD per the note above).
Define the TypeScript type surface for the
MinerGoalSpec— the per-repo config a maintainer/repo-owner drops as.gittensory-miner.ymlto tell a miner what to look for and how to behave when targeting their repo. This issue is types-only (the parser is a separate follow-up issue), analogous to howsrc/signals/focus-manifest.ts'sFocusManifesttype is defined ahead of/alongside its parser. Scope the fields to what the phase's existing.gittensory.ymlalready models for the REVIEW side (wantedPaths,blockedPaths,preferredLabels,linkedIssuePolicy,issueDiscoveryPolicy) plus miner-specific additions the roadmap implies are needed (a max-concurrent-claims-per-repo cap, an opt-in/opt-out flag since a repo owner may not want autonomous miners targeting them at all, and a pointer to which lanes/labels a miner should prefer) — keep the field list intentionally small for this foundation phase; it is easy to add fields later, hard to remove ones a contributor already started relying on.Deliverables
packages/gittensory-engine/src/miner-goal-spec.ts(orsrc/signals/miner-goal-spec.tsif the team prefers keeping config-schema types alongsidefocus-manifest.tsrather than in the engine package — pick whichever the reviewing maintainer confirms, defaulting to the engine package per the phase's "shared logic lives in gittensory-engine" principle) exporting aMinerGoalSpectype with:minerEnabled: boolean(defaulttrue— explicit opt-out, not opt-in, since a public repo with no file should still be minable by default, mirroring.gittensory.yml's own "safe by default" stance),wantedPaths: string[],blockedPaths: string[],preferredLabels: string[],maxConcurrentClaims: number(a sane default, e.g.1),issueDiscoveryPolicy: "encouraged" | "neutral" | "discouraged".DEFAULT_MINER_GOAL_SPECconstant with the safe defaults, analogous to howfocus-manifest.tsdocuments each field's default in a comment..gittensory.yml.example.DEFAULT_MINER_GOAL_SPECtype-checks againstMinerGoalSpecand that every field has a documented default in a co-located comment (a lightweight "every field is documented" lint-style test, not full parser coverage).References
src/signals/focus-manifest.ts(FocusManifesttype family, and its gate/features/review sub-configs) — the type-shape precedent to mirror in spirit (small typed config object with an explicit defaults constant)..gittensory.yml.example(wantedPaths,blockedPaths,preferredLabels,linkedIssuePolicy,issueDiscoveryPolicyfields, lines 30-80) — the exact field names/semantics to carry over from the review-side manifest where they overlap..gittensory-miner.yml(the file this type models) and its type-definition module (path TBD per the note above).