{"record":{"id":"cc21e4facd0fa5d4","repo":"ruvnet/ruflo","slug":"project-local-flywheel-anchor-required-create-d","errorCode":null,"errorMessage":"project-local flywheel anchor required; create ${DEFAULT_PROJECT_ANCHOR_MANIFEST} or pass anchorPath + anchorHash","messagePattern":"project-local flywheel anchor required; create (.+?) or pass anchorPath \\+ anchorHash","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/services/harness-project-anchor.ts","lineNumber":185,"sourceCode":"    const requested = existsSync(manifestRelative) ? manifestRelative : resolve(root, manifest.path);\n    return toSelection(containedPath(root, requested), manifest.sha256);\n  }\n\n  if (isRufloRepository(root) || process.env.RUFLO_FLYWHEEL_ALLOW_BUILTIN_ANCHOR === '1') {\n    const frozen = loadFrozenHumanEval();\n    return {\n      version: frozen.version,\n      anchorRef: FROZEN_HUMAN_EVAL_HASH,\n      source: 'ruflo-built-in',\n      tasks: frozen.tasks.map((task) => ({\n        id: task.id,\n        input: { id: task.id, q: task.q },\n        expected: task.labels,\n      })),\n    };\n  }\n\n  throw new Error(\n    `project-local flywheel anchor required; create ${DEFAULT_PROJECT_ANCHOR_MANIFEST} or pass anchorPath + anchorHash`,\n  );\n}\n","sourceCodeStart":167,"sourceCodeEnd":189,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/services/harness-project-anchor.ts#L167-L189","documentation":"Thrown as the terminal fall-through of loadEffectiveFlywheelAnchor(): no explicit anchorPath/anchorHash pair was supplied, no manifest file exists at the default location (.claude/eval/flywheel-anchor.manifest.json) or the given manifestPath, AND the current project is not the Ruflo repository itself (nor has RUFLO_FLYWHEEL_ALLOW_BUILTIN_ANCHOR=1). This is the fail-closed design from issue #2840: foreign projects MUST supply their own pinned anchor rather than silently inheriting Ruflo's development-history benchmark, because evaluating against Ruflo's tasks makes the objective flat and indistinguishable from 'already optimal'.","triggerScenarios":"Running the flywheel/harness in any repository other than ruflo/claude-flow without first creating a manifest at .claude/eval/flywheel-anchor.manifest.json, and without passing anchorPath+anchorHash to loadEffectiveFlywheelAnchor(). Also fires when manifestPath points to a non-existent custom location.","commonSituations":"First-time flywheel run in a downstream repo that hasn't been onboarded; CI running the harness in a fresh checkout before the manifest was committed; a monorepo where the manifest exists in a different package root than the one passed as projectRoot; a contributor who deleted the manifest thinking it was generated.","solutions":["Create .claude/eval/flywheel-anchor.manifest.json with the manifest schema, pointing at a tasks JSON and its pinned sha256 (see errors 388/389 for the shape).","Alternatively, call loadEffectiveFlywheelAnchor with both anchorPath and anchorHash set explicitly.","For local experimentation only, set RUFLO_FLYWHEEL_ALLOW_BUILTIN_ANCHOR=1 to opt into the frozen built-in anchor (do not use this for real benchmarking of foreign projects)."],"exampleFix":"// before — no manifest, no explicit anchor, in a non-Ruflo repo\nloadEffectiveFlywheelAnchor(process.cwd())\n// after — create .claude/eval/flywheel-anchor.manifest.json:\n// { \"schemaVersion\":\"ruflo.flywheel-anchor-manifest/v1\",\n//   \"path\":\"tasks.json\", \"sha256\":\"sha256:<humanEvalHash of tasks.json>\" }\n// or pass both options:\nloadEffectiveFlywheelAnchor(process.cwd(), {\n  anchorPath: '.claude/eval/tasks.json',\n  anchorHash: 'sha256:<hash>',\n})","handlingStrategy":"validation","validationCode":"import { existsSync } from 'fs';\nimport { DEFAULT_PROJECT_ANCHOR_MANIFEST } from './harness-project-anchor.js';\nfunction ensureAnchorAvailable(root: string, opts: { anchorPath?: string; anchorHash?: string; manifestPath?: string }) {\n  const hasExplicit = !!opts.anchorPath && !!opts.anchorHash;\n  const manifest = opts.manifestPath ?? `${root}/${DEFAULT_PROJECT_ANCHOR_MANIFEST}`;\n  if (!hasExplicit && !existsSync(manifest) && process.env.RUFLO_FLYWHEEL_ALLOW_BUILTIN_ANCHOR !== '1') {\n    throw new Error(`No anchor configured. Create ${manifest} (schema 'ruflo.flywheel-anchor-manifest/v1', path+sha256) or pass anchorPath+anchorHash.`);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  loadEffectiveFlywheelAnchor(root, opts);\n} catch (e) {\n  if (e instanceof Error && /project-local flywheel anchor required/.test(e.message)) {\n    // onboard the repo: author a tasks JSON, compute its hash, write the manifest, then retry\n  }\n  throw e;\n}","preventionTips":["Commit .claude/eval/flywheel-anchor.manifest.json to every repo that runs the flywheel.","Onboard new repos as part of project init, not when the harness first runs.","Reserve RUFLO_FLYWHEEL_ALLOW_BUILTIN_ANCHOR=1 for local experiments only; never use it in CI of foreign repos."],"tags":["flywheel-anchor","onboarding","fail-closed","configuration","manifest"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}