128: Per-repo feature/test map: lazy, incremental bootstrap generation for customer repos#150
Merged
Merged
Conversation
added 14 commits
July 20, 2026 22:23
…force-factory-08527a1d
…force-factory-08527a1d
…force-factory-08527a1d
…force-factory-08527a1d
…force-factory-08527a1d
…force-factory-08527a1d
…force-factory-08527a1d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Factory dispatches agents against arbitrary customer repos with no equivalent of this repo's own
.agentworkforce/features/manifest.yaml+critical-paths.md+verify/procedures.md. Those three files are how this repo tells an agent (human or LLM) what every feature is, where it lives, and what tier of prerequisite is required to verify it actually works. A dispatched implementer/reviewer/babysitter in a customer repo has no equivalent artifact, so "how do I test this" is answered ad hoc per task instead of from a maintained, versioned source of truth.This issue is the foundation: generate that artifact for an arbitrary target repo, without requiring an expensive full-repo crawl up front.
Background
This repo's own feature map (
.agentworkforce/features/manifest.yaml,critical-paths.md,verify/procedures.md) has three properties worth preserving in the generalized version:id,name,cli/apisurface,description,location,verify_tier1-6, categorycriticality)That catalog was hand-authored (238 features across 19 categories) because it's this team's own product. We cannot hand-author this for every customer repo Factory touches — it needs to be machine-generated, and the only way to make that tractable is to generate it lazily: seed entries only for what's actually touched, rather than requiring a full-codebase indexing pass before Factory can be useful.
Proposed changes
A. New generation entry point
Add a new module (proposed:
src/featuremap/generate.ts) that, given a target repo checkout path and a set of changed/touched file globs, produces or updates.agentworkforce/features/manifest.yamlinside that target repo's checkout — not this one. This runs as part of dispatch, most naturally as a step the implementer (or a dedicated pre-task agent) performs before or alongside implementation (see #131 for how it's consumed by task templates).B. Bootstrap heuristics (v1, cheap)
For a repo with no
.agentworkforce/features/directory yet:TriageDecisionroutes already identify this — seesrc/triage/heuristic.ts).locationset to the actual file, and averify_tierinferred from cheap signals (needs network/DB/auth to exercise → higher tier; pure/unit-testable → tier 1).C. Incremental growth
On every subsequent dispatch against the same repo, extend rather than regenerate: read the existing manifest, add entries for newly-touched surfaces not already covered, and flag (but do not silently overwrite) entries whose
locationno longer exists — that's a drift signal for #132, not something this generation step should resolve unilaterally.D. Cost/scope guardrails
README.md).Acceptance criteria
.agentworkforce/features/, dispatching an issue that touches N files produces a manifest with entries for those N files' relevant public surfaces, valid against the same schema this repo's own Tier-1 self-check parses (see.agentworkforce/features/verify/procedures.mdlines 22-51 for the exact validation shape to satisfy: unique ids, required fields, validverify_tier1-6,locationpaths that exist).Notes for the implementer
.agentworkforce/features/manifest.yamland.agentworkforce/features/verify/procedures.mdin this repo first — the generalized generator's output should be structurally compatible with the parser in.agentworkforce/agents/factory-feature-guardian/agent.ts(parseManifestFeatures), since that parsing logic (or a close cousin of it) is the natural reuse point rather than inventing a second manifest format.npm test(vitest); add tests under a newsrc/featuremap/test suite.Related: #131 (consumes this manifest in task templates), #132 (CI drift-check on top of this manifest)
Fixes #128
Summary by cubic
Adds lazy, per-repo feature map generation that creates and incrementally updates
.agentworkforce/features/manifest.yamlfrom touched files only, using the shared validator with a file lock. Supports v1.0 and v1.1 manifests, routing the generated category to existing verification procedures; exposesgenerateFeatureMap(...)and parsing helpers via dist and root exports. Fixes #128.New Features
generateFeatureMap(...)andparseFeatureMapManifest(...); validator now returnscategoryIds.generated-touched-surfaces; flags stalelocations.verify_tierfrom lightweight signals.generated-touched-surfacesthrough an existingverification.categoriesprocedure without changing hand-authored content.src/featuremap/index.tsandsrc/index.ts.Bug Fixes
connectionPathinInternalFleetClienttests.Written for commit fc12a3c. Summary will update on new commits.