Skip to content

fix: first-run consumer friction after npm setup (consumer proof) - #131

Open
PatrickSys wants to merge 1 commit into
mainfrom
cursor/consumer-friction-fixes-5196
Open

PatrickSys wants to merge 1 commit into
mainfrom
cursor/consumer-friction-fixes-5196

Conversation

@PatrickSys

Copy link
Copy Markdown
Owner

Consumer proof (Task A)

Target repo: fresh clone of sindresorhus/is (~2.3MB). Workspine: npx -y workspine@0.35.3 setup -y, then the same loop using a npm pack from this branch. Agent CLI: none on the VM (no Claude/Codex/Cursor agent binary); I ran the brownfield ceremony manually as the agent (work-plan content → lifecycle-transition plan/approve/execute/verify helpers).

Change under proof: add is.nonZeroNumber (+ assert, readme, tests). Result: typecheck + 119/119 node tests pass; brownfield plan approved with consumer-proof-owner-5196, execute + verify transitions completed (posture/verify steps needed a second verify after CHANGE edits—worth documenting).

Friction observed (ranked)

  1. gsdd next --json pointed at a non-existent file — artifacts_to_read included hardcoded .work/research/2026-06-20-long-term-agent-harness-consistency.md on a fresh setup.
  2. Noisy repo risk after setup — repo_warnings reported ~79 untracked files immediately after Workspine init (mostly .work/ / .agents/ / goal.md).
  3. Vendored .work/bin/ broke the host linter — xo scanned copied bin/lib/*.mjs and reported thousands of errors; npm test failed until running tsc/tests without xo.
  4. Setup banner said init while the user ran npx workspine setup (cosmetic but confusing).
  5. Published npm next copy in .work/bin still uses the harsher “incomplete lifecycle truth” copy vs main’s brownfield lane hint (helpers pinned at install time).

Fixes in this PR (top 3 + banner)

Fix Change
Missing research pointer next only lists artifact paths that exist on disk (drops phantom research file).
Bootstrap dirty noise control-map ignores Workspine bootstrap paths (.work/**, .agents/**, goal.md, AGENTS.md) when emitting canonical_dirty.
Linter pollution Init/setup appends .work/bin/ to root .gitignore so repo-wide JS linters skip vendored helpers.
Banner setup passes --invoked-as setup so the banner reads workspine setup - setting up your workspace.

Tests

  • node tests/run-all.cjs — 30/30 GREEN on this branch.

Task B (PR comments posted)

Open in Web Open in Cursor 

Filter bootstrap paths from canonical_dirty warnings, stop next from
pointing at a missing hardcoded research file, gitignore vendored
.work/bin helpers so repo linters ignore them, and print setup (not
init) in the setup entry banner.

Co-authored-by: Patrick Rosselló Colom <PatrickSys@users.noreply.github.com>
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
workspine Ready Ready Preview Oct 30, 2026 10:39pm UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T22:40:42.705936Z 59267f5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59267f5b91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/lib/init-flow.mjs
ensureGitignoreEntry(initCtx.cwd, `${stateDirName}/`, ` - ensured ${stateDirName}/ is gitignored`);
}
ensureGitignoreEntry(initCtx.cwd, `${stateDirName}/.local/`, ` - ensured ${stateDirName}/.local/ is gitignored`);
ensureGitignoreEntry(initCtx.cwd, `${stateDirName}/bin/`, ` - ensured ${stateDirName}/bin/ is gitignored`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the helper runtime for cloned workspaces

With the default commitDocs: true, this ignore entry causes a committed workspace to retain its skills and configuration but lose the runtime those skills invoke when cloned. I reproduced this with setup → commit → clone: .agents/skills/work-plan/SKILL.md and .work/config.json exist in the clone, but .work/bin/gsdd.mjs does not. Generated workflows such as distilled/workflows/verify.md require node .work/bin/gsdd.mjs lifecycle-preflight ..., which now fails with MODULE_NOT_FOUND until someone manually reruns setup/update. Keep the runtime trackable or provide a bootstrap mechanism before making the generated workflows depend on ignored files.

Useful? React with 👍 / 👎.

Comment thread bin/lib/control-map.mjs

function nonBootstrapDirtyCounts(worktree) {
const tracked = (worktree.dirty?.tracked || []).filter((entry) => !isWorkspineBootstrapRepoPath(entry)).length;
const untracked = (worktree.dirty?.untracked || []).filter((entry) => !isWorkspineBootstrapRepoPath(entry)).length;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count non-bootstrap changes before truncating dirty buckets

When more than 200 untracked bootstrap files precede an application file in Git status, this calculation silently loses the application change: readGitWorktree caps each displayed bucket at MAX_DIRTY_BUCKET_ENTRIES, so filtering that array is not a reliable dirty count. I reproduced this with 201 untracked .work/ files plus production.js: the map reports 202 untracked files and two omitted entries, but emits no canonical_dirty warning or intervention. Compute the filtered count from the complete status data before capping the output, or conservatively account for omitted entries.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — 59267f5b Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants