fix: remove non-functional --domains flag; wire run trend detection
Problem
Two defects in the analysis pipeline:
-
The
--domainscount flag was inert.scoreAllUsershardcodes all six scorers and iteratesAllDomainsregardless of the flag value. The count was only defaulted to 6 and printed in one log line. The same dead count lived in three layers:RunOptions.Domains(analyzer),AnalyzeConfig.Domains(config, never read by any command), and the--domainsflag plusMANIFOLD_DOMAINSvariable (command line anddeploy.yml). It looked configurable but changed nothing. -
The
runall-in-one command never passedRunOptionstoanalyzer.Run, so a fullmanifold runcould never do trend detection even thoughanalyze --previous-dircould.
Real variable-domain scoring would ripple through the hardcoded six-domain assumption in the normalizer, archetype, and summary code. That is a methodology change deferred to later. The honest fix now is to remove the non-functional flag.
Fix
Remove the count flag across all three layers:
cmd/manifold/analyze.go: drop the--domainsflag and its plumbing.internal/analyzer/analyze.go: dropRunOptions.Domains, its default, and thedomains=log argument. The log line now reports the reallen(AllDomains).internal/config/config.go: drop the inertAnalyzeConfigstruct, its default, and its merge branch.deploy.yml: dropMANIFOLD_DOMAINSand the--domainsargument.manifold.example.yml,docs/configuration.md: drop thedomainsrows.internal/config/config_test.go: drop assertions and fixtures that setAnalyze.Domains.
Wire run trend detection:
- Add a
--previous-dirflag torun, buildRunOptions{PreviousDir}, and pass it toanalyzer.Run.manifold run --previous-dir DIRnow performs trend and momentum detection.
The six-domain model (AllDomains, the six scorers, DomainScores) is unchanged. Only the user-facing count flag is removed.
Validation
make check(go vet + full test suite) passes on Go 1.24.2.go test -race ./...passes on Go 1.24.2.- New
cmd/manifold/run_test.goasserts the--previous-dirflag flows through to a non-emptyRunOptions.PreviousDir(trend detection wiring), and that an empty value leaves it empty (trends off). - Existing
analyzertrend tests, includingTestRunEndToEnd_WithTrends, still pass after theRunOptions.Domainsremoval. - Post-removal grep for
--domains,MANIFOLD_DOMAINS,RunOptions.Domains, andAnalyzeConfigreturns nothing.