Skip to content

fix(verify): detect package manager from lockfile before running test/verify #301

@bradtaylorsf

Description

@bradtaylorsf

Problem

On a fresh repo the loop/agent can run npm test in a pnpm/yarn workspace (or invoke a script that doesn't exist), producing a false failure rather than a real one. The loop has no lockfile-based package-manager detection in its own verify path/defaults.

Proposed change

Detect the package manager from the lockfile (pnpm-lock.yaml→pnpm, yarn.lock→yarn, package-lock.json→npm; analogous for other ecosystems) and confirm the script exists in the manifest before invoking it. Never default to npm. Make init's default test_command lockfile-aware.

Files

src/lib/prompts.ts, src/lib/verify.ts, src/commands/init.ts.

(Agent-side guidance for this already lives in the seeded implementer/git-workflow skills; this issue covers the loop's own defaults/prompts.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingengineLoop engine infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions