Repository navigation
feat: conciv init — one-command project + harness setup, CLI promoted to the bare conciv name - #215
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t tree Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…manager Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eeded fixture corpus Spike decision: @ast-grep/napi wins over magicast. Corpus pass counts (identical 23-assertion table per candidate): - @ast-grep/napi: 23/23 - magicast: 21/23 (failed vite.config.svelte.ts and vite.config.tanstack-start.ts appends) Why ast-grep: recast (under magicast) reprints any modified subtree, so appending to a multiline plugins array reflowed the whole array (svelte), and the variable-declaration default-export path regenerates the config expression and prepends the import at file top (tanstack-start), breaking the byte-preserving-outside-the-edit-span contract. It also emits semicolons and blank lines around inserted imports. ast-grep commits raw byte-offset splices, so everything outside the two insertion spans is preserved by construction, with simpler code: one kind-based node search plus two Edit objects, no proxy navigation, no detached-config write-back. magicast was installed for the spike and removed in this same commit; the lockfile carries only @ast-grep/napi (remaining magicast lockfile entries are pre-existing transitives of c12). Fixtures seed from the seven real e2e configs with their existing conciv wiring stripped (the corpus proves ADDING that wiring; the wired originals would short-circuit the idempotency path), plus the five hand-made shapes: no-plugins, function-form defineConfig, spread plugins, foreign-wrapped next config, mjs default export. Confidence gate: no plugins array, several plugins arrays, or a plugins array inside a function all return matched:false/output:null. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nt widget Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ction Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… native plugin manager Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… name Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds one-command conciv project initialization and promotes the CLI to the bare conciv package.
Changes:
- Adds framework detection, codemods, harness consent, Claude integration, and manual fallbacks.
- Renames the CLI and private application packages and updates consumers.
- Adds unit/E2E coverage and init-first documentation.
Reviewed changes
Copilot reviewed 93 out of 94 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Renames CLI package reference. |
pnpm-lock.yaml |
Updates workspace dependencies. |
packages/vitest-config/test/shards.test.ts |
Updates renamed workspace and init E2E assertions. |
packages/publish/test/cli.test.ts |
Tests bare-package publishing guards. |
packages/publish/src/guards.ts |
Allows publishing conciv. |
packages/plugin/test/bin-shim.it.test.ts |
Tests renamed CLI shim. |
packages/plugin/src/core/bin-shim.ts |
Resolves the bare CLI package. |
packages/plugin/package.json |
Renames the CLI dependency. |
packages/oxlint-plugin/src/banned-vocabulary.js |
Exempts init package-manager terminology. |
packages/harness/tsdown.config.ts |
Builds shared Claude plugin files. |
packages/harness/test/claude-attach.test.ts |
Updates extracted helper imports. |
packages/harness/src/claude/connect-plugin-files.ts |
Extracts Claude plugin generation. |
packages/harness/src/claude/attach.ts |
Uses shared Claude plugin helpers. |
packages/harness/package.json |
Exports Claude connect files. |
packages/extension-compiler/test/conciv-src.it.test.ts |
Tests renamed package handling. |
packages/extension-compiler/src/conciv-src.ts |
Restricts source mapping to scoped packages. |
packages/embed/vite.config.ts |
Inlines the renamed application. |
packages/embed/test/mount-externals.test.ts |
Tests application inlining. |
packages/embed/src/mount-impl.tsx |
Imports from @conciv/app. |
packages/embed/package.json |
Renames the application dependency. |
packages/cli/tsconfig.json |
Excludes fixture sources. |
packages/cli/test/steps/install-it.test.ts |
Tests dependency installation. |
packages/cli/test/steps/harness/claude.test.ts |
Tests Claude setup. |
packages/cli/test/steps/harness/agents-md.test.ts |
Tests agent instruction management. |
packages/cli/test/steps/framework/webpack-family.test.ts |
Tests webpack-family recipes. |
packages/cli/test/steps/framework/vite.test.ts |
Tests Vite wiring. |
packages/cli/test/steps/framework/step-context.ts |
Provides step test context. |
packages/cli/test/steps/framework/nextjs.test.ts |
Tests Next.js wiring. |
packages/cli/test/steps/framework/engine.test.ts |
Tests codemod transforms. |
packages/cli/test/init-run.test.ts |
Tests full initialization flow. |
packages/cli/test/init-preflight.test.ts |
Tests preflight checks. |
packages/cli/test/init-pipeline.test.ts |
Tests pipeline semantics. |
packages/cli/test/init-harness-detect.test.ts |
Tests harness discovery. |
packages/cli/test/init-detect.test.ts |
Tests project detection. |
packages/cli/test/init-command.test.ts |
Tests command registration. |
packages/cli/test/init-cards.test.ts |
Tests prompts and output rendering. |
packages/cli/test/fixtures/webpack.config.esm.js |
Adds ESM webpack fixture. |
packages/cli/test/fixtures/webpack.config.cjs.js |
Adds CJS webpack fixture. |
packages/cli/test/fixtures/webpack.config.cjs-no-plugins.js |
Adds unmatched webpack fixture. |
packages/cli/test/fixtures/vite.config.vanilla.ts |
Adds vanilla Vite fixture. |
packages/cli/test/fixtures/vite.config.tanstack-start.ts |
Adds TanStack Start fixture. |
packages/cli/test/fixtures/vite.config.svelte.ts |
Adds Svelte fixture. |
packages/cli/test/fixtures/vite.config.spread.ts |
Adds spread-array fixture. |
packages/cli/test/fixtures/vite.config.solid-start.ts |
Adds SolidStart fixture. |
packages/cli/test/fixtures/vite.config.react.ts |
Adds React fixture. |
packages/cli/test/fixtures/vite.config.no-plugins.ts |
Adds missing-plugins fixture. |
packages/cli/test/fixtures/vite.config.function.ts |
Adds function-config fixture. |
packages/cli/test/fixtures/rspack.config.esm.js |
Adds Rspack fixture. |
packages/cli/test/fixtures/rollup.config.basic.mjs |
Adds Rollup fixture. |
packages/cli/test/fixtures/next.config.wrapped.ts |
Adds wrapped Next.js fixture. |
packages/cli/test/fixtures/next.config.ts |
Adds basic Next.js fixture. |
packages/cli/test/fixtures/next.config.mjs-default.mjs |
Adds MJS Next.js fixture. |
packages/cli/test/fixtures/astro.config.mjs |
Adds Astro fixture. |
packages/cli/src/init/wizard.ts |
Implements interactive selections. |
packages/cli/src/init/steps/install-it.ts |
Installs @conciv/it. |
packages/cli/src/init/steps/harness/consent.ts |
Persists harness consent. |
packages/cli/src/init/steps/harness/claude.ts |
Installs the Claude plugin. |
packages/cli/src/init/steps/harness/agents-md.ts |
Manages agent instructions. |
packages/cli/src/init/steps/framework/webpack-family.ts |
Wires webpack and Rspack. |
packages/cli/src/init/steps/framework/vite.ts |
Wires Vite-family configs. |
packages/cli/src/init/steps/framework/nextjs.ts |
Adds Next.js integration files. |
packages/cli/src/init/steps/framework/fallback.ts |
Provides unsupported-framework guidance. |
packages/cli/src/init/steps/framework/engine.ts |
Implements AST codemods. |
packages/cli/src/init/steps/framework/config-edit.ts |
Applies and reports config edits. |
packages/cli/src/init/preflight.ts |
Enforces project safety checks. |
packages/cli/src/init/pipeline.ts |
Orchestrates initialization. |
packages/cli/src/init/outro.ts |
Renders completion summaries. |
packages/cli/src/init/harness-detect.ts |
Detects installed harnesses. |
packages/cli/src/init/detect.ts |
Detects frameworks and package managers. |
packages/cli/src/init/cards.ts |
Renders manual setup cards. |
packages/cli/src/init.ts |
Defines the init command. |
packages/cli/src/bin.ts |
Registers init and guards execution. |
packages/cli/package.json |
Promotes CLI to conciv. |
e2e/init/vitest.config.ts |
Configures init E2E tests. |
e2e/init/tsconfig.json |
Configures E2E TypeScript. |
e2e/init/package.json |
Adds the init E2E workspace. |
e2e/init/init.e2e.test.ts |
Tests init against consumer clones. |
apps/site/content/docs/quick-start/webpack.mdx |
Adds init-first webpack guidance. |
apps/site/content/docs/quick-start/vite.mdx |
Adds init-first Vite guidance. |
apps/site/content/docs/quick-start/rspack.mdx |
Adds init-first Rspack guidance. |
apps/site/content/docs/quick-start/rollup.mdx |
Documents Rollup fallback. |
apps/site/content/docs/quick-start/nextjs.mdx |
Adds init-first Next.js guidance. |
apps/site/content/docs/quick-start/meta.json |
Adds the agents page. |
apps/site/content/docs/quick-start/index.mdx |
Promotes one-command setup. |
apps/site/content/docs/quick-start/esbuild.mdx |
Documents esbuild fallback. |
apps/site/content/docs/quick-start/agents.mdx |
Documents agent integration. |
apps/site/content/docs/packages.mdx |
Renames the CLI package. |
apps/examples/tanstack-start/package.json |
Updates the CLI dependency. |
apps/conciv/package.json |
Renames the private application. |
apps/conciv/.cta.json |
Updates application metadata. |
.oxlintrc.json |
Adjusts fixture and timer linting. |
.oxfmtrc.json |
Excludes CLI fixtures. |
.fallowrc.json |
Updates fixture and dependency exclusions. |
.changeset/config.json |
Adds bare CLI to fixed versions. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (2)
packages/cli/src/init/preflight.ts:16
- The repository's hard style rules prohibit em dashes in strings.
packages/cli/test/init-preflight.test.ts:29 - The repository's hard style rules prohibit em dashes in strings; keep this expected message synchronized with the corrected source text.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| framework: 'vite', | ||
| packages: ['vite'], | ||
| configFiles: ['vite.config.ts', 'vite.config.js', 'vite.config.mts', 'vite.config.mjs'], |
| { | ||
| framework: 'rspack', | ||
| packages: ['@rspack/core', '@rspack/cli'], | ||
| configFiles: ['rspack.config.js', 'rspack.config.ts'], | ||
| }, | ||
| {framework: 'webpack', packages: ['webpack'], configFiles: ['webpack.config.js', 'webpack.config.ts']}, |
| function pluginInstalled(home: string): boolean { | ||
| const raw = readFileOrNull(installedPluginsFile(home)) | ||
| if (raw === null) return false | ||
| const parsed = installedPluginsSchema.safeParse(parseJsonOrNull(raw)) | ||
| if (!parsed.success) return false | ||
| return (parsed.data.plugins[CLAUDE_CONNECT_INSTALL_TARGET] ?? []).length > 0 |
| const pairs = root | ||
| .findAll({rule: {kind: 'pair'}}) | ||
| .filter((pair) => pair.field('key')?.text() === 'plugins' && pair.field('value')?.kind() === 'array') | ||
| const pair = pairs[0] | ||
| if (!pair || pairs.length > 1 || insideFunction(pair)) return null | ||
| return pair.field('value') |
| opts: {importStyle: 'default' | 'named'}, | ||
| ): Transform { | ||
| const root = parse(Lang.TypeScript, source).root() | ||
| if (importsFrom(root, importFrom)) return {matched: true, output: source} |
| } | ||
|
|
||
| function frameworkQuestion(framework: Framework): string { | ||
| if (framework === 'unknown') return 'No known framework detected — show manual wiring instructions?' |
| it('refuses without package.json', async () => { | ||
| expect(await preflight(dir(), false)).toEqual({ | ||
| ok: false, | ||
| reason: 'no package.json here — run init from your app directory', |
| - `conciv tools page` — read and drive the live page: snapshot, click, fill, edit, eval | ||
| - `conciv tools react` — inspect and edit live React components | ||
| - `conciv tools server` — inspect and nudge the dev server: config, urls, resolve, reload |
|
|
||
| export async function preflight(cwd: string, force: boolean): Promise<PreflightResult> { | ||
| if (!existsSync(join(cwd, 'package.json'))) { | ||
| return {ok: false, reason: 'no package.json here — run init from your app directory'} |
| "packages/oxlint-plugin/test/fixtures/**", | ||
| "packages/plugin/test/fixtures/**", | ||
| "packages/extensions/tanstack/test/fixtures/**", | ||
| "**/test/fixtures/**", |
…ully covered states Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
#218) Each pipeline step now runs as its own live clack line: a spinner named for the work in flight ("Installing @conciv/it with pnpm…", "Installing the conciv claude plugin…") that resolves in place — green when wired or already wired, amber log.warn with a one-line reason when the step can only card, dim when skipped. Applied config edits print as a clack note titled with the file; manual cards are clack notes too, so the hand-rolled box frame in cards.ts is deleted. The run closes with a colored status summary and a package-manager-aware outro, which is the closing bar the --yes run was missing. Covers the remaining state-matrix rows: a non-interactive terminal without --yes prints the re-run instruction and exits 1 instead of waiting on an invisible prompt (clack isTTY/isCI behind an injectable seam); ctrl-C during apply restores every config the run rewrote, says so, and exits 130 (SIGINT per step plus an exit-time restore, replacing the write-window-only restoreBackupOnExit); preflight refusals keep their exact reason strings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…share the exec helper (#215 review) A global **/test/fixtures/** ignore had silently un-linted 14 packages' fixtures; the two original entries are back, joined by the cli fixtures through a package-level .oxlintrc.json (root-relative patterns do not match the per-package oxlint run). readConsent had no product caller since init started planning from this run's selections, so it is gone and the tests assert the written file. The execFile promise wrapper the claude step test hand-rolled now comes from the product helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| @@ -0,0 +1,6 @@ | |||
| import type {NextConfig} from 'next' | |||
| import {withConciv} from '@conciv/it/plugin/nextjs' | |||
| @@ -0,0 +1,6 @@ | |||
| import {defineConfig} from 'vite' | |||
| import conciv from '@conciv/it/plugin/vite' | |||
| @@ -0,0 +1,6 @@ | |||
| const conciv = require('@conciv/it/plugin/webpack') | |||
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 184 out of 189 changed files in this pull request and generated no new comments.
Suppressed comments (10)
packages/cli/src/init/steps/framework/engine.ts:176
- Checking only the module source loses the import's local binding. With
import cv from '@conciv/it/plugin/vite', this suppresses the new import but still insertsconciv(), producing an undefined identifier; an unrelated localconcivbinding can likewise cause a duplicate import. Resolve and validate the actual import binding before editing.
packages/cli/src/init/steps/framework/engine.ts:217 - The same source-only check breaks aliased Next.js imports. If the module is already imported as
withCv,importsFromprevents addingwithConciv, but the export is rewritten to call undefinedwithConciv. The confidence gate must verify the imported local name, not just the source string.
packages/cli/src/init/harness-detect.ts:22 - Executable discovery is Unix-only: it checks the exact bare filename and mode bits. On Windows, npm-installed harnesses normally expose
claude.cmd,codex.cmd, or.exeshims resolved throughPATHEXT, so init reports no harnesses. Use platform-aware command resolution.
packages/cli/src/init/steps/harness/agents-md.ts:20 - This instruction is false for externally launched agents. The CLI still defaults to
127.0.0.1:5173(packages/cli/src/request.ts:25-27), while Vite can persist an ephemeral core port and Next.js defaults to 41700. A Claude/Codex process that was not spawned by core has noCONCIV_PORT, so these commands target the wrong server. Implement project-local server discovery or stop promising zero-address discovery.
packages/cli/src/init/steps/framework/engine.ts:124 - This accepts a
pluginsarray from any one-level nested object, not specifically Astro'sviteblock. For example, a Vite config with{test: {plugins: []}}is considered matchable and getsconciv()inserted into test plugins while the actual Vite plugin remains unwired. Restrict nested matching to an explicitly allowed property path.
This issue also appears in the following locations of the same file:
- line 172
- line 213
packages/cli/src/init/steps/framework/webpack-family.ts:70
- Once the config plugin is present,
runOnereturnsalreadybeforeapply, so the required widget-injection card is no longer emitted. A user who reruns init before completing that manual work is incorrectly told the framework is already wired, contradicting the stated “always carries the widgetUrl card” behavior. Track widget injection as a separate manual step or otherwise keep this card visible.
packages/cli/src/init/steps/install-it.ts:49 - A package-manager add normally updates a lockfile as well as
package.json, but the plan discloses and the interrupt guard captures only the manifest. Interrupting after pnpm/npm rewrites its lockfile leaves a dirty or partial tree despite the “your config was restored” guarantee. Include the applicable lockfile in both the plan and backup set.
packages/cli/src/init.ts:20 - Cancellation exits 1 here, but the approved plan and PR description say only preflight failures are non-zero and wizard cancellation is a clean no-op. Align the implementation/tests with that contract, or update the stated behavior if cancellation is intentionally an error.
packages/cli/src/init/pipeline.ts:180 - This writes
.conciv/harnesses.jsonoutside the step list, so the “whole plan” shown for approval never discloses this file. Make consent persistence a planned step (or include it in an existing step'swouldEdit) before writing it.
packages/cli/src/init/steps/harness/claude.ts:80 - When detection fails because an existing project's cached plugin is stale, this installs over the existing local installation. The established attach flow explicitly uninstalls first (
packages/harness/src/claude/attach.ts:188-198); otherwise Claude can reject the install as already present, leaving upgrades permanently manual. Mirror the uninstall-before-install refresh path.
… or trusting a config (#215 review) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| @@ -0,0 +1,6 @@ | |||
| import {defineConfig} from 'vite' | |||
| import * as conciv from '@conciv/it/plugin/vite' | |||
…eview) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 196 out of 201 changed files in this pull request and generated 2 comments.
Suppressed comments (7)
packages/cli/src/init/harness-detect.ts:21
- PATH detection does not work on Windows: npm-installed executables are typically
claude.cmd/codex.cmd, and Windows does not represent executability with Unix mode bits. Consequently installed harnesses are omitted unless a config directory happens to exist. Resolve commands using platform-awarePATHEXT/wheresemantics (and ensure the candidate is a file).
packages/cli/src/init/steps/framework/engine.ts:206 - This accepts the only
pluginsarray from any immediate child object, not specifically Astro'sviteobject. A Vite config such asdefineConfig({test: {plugins: [foo()]}})has no top-level Vite plugin list, yet the transform insertsconciv()intotest.pluginsand then verifies that wrong location as wired. Make the allowed path explicit per framework; otherwise degrade to the manual card.
packages/cli/src/init.ts:20 - A wizard cancellation currently exits 1 in human mode, contradicting the approved plan's clean exit-0 no-op and the PR claim that only preflight failures hard-abort. Cancellation writes nothing and should not be treated as a failed command.
packages/cli/src/init/steps/install-it.ts:49 - Only
package.jsonis backed up, but a real package-manager add also changes the workspace lockfile. If SIGINT arrives during a later step, the global restore rewindspackage.jsonwhile leavingpnpm-lock.yaml/package-lock.jsonchanged and still referencing@conciv/it; this violates the interrupt path's clean-tree guarantee and leaves an inconsistent project. Capture the actual package-manager lockfile before installation as well.
packages/cli/src/init/steps/harness/claude.ts:79 - The proven harness install flow uninstalls the existing local plugin before reinstalling, but init calls
plugin installdirectly. When generated plugin contents change, detection returns missing while Claude still has the old local install;plugin installthen reports that it is already installed and every upgrade degrades to a manual card. Add the same best-effort local uninstall used bypackages/harness/src/claude/attach.ts:188-198before reinstalling.
.changeset/small-donuts-shave.md:4 - This changeset enumerates three members of a fixed release group.
.changeset/config.json:10already makes one entry bump every@conciv/*package andconciv, and the repository release procedure requires exactly one fixed-group entry to avoid redundant release declarations.
'@conciv/claude-connect': patch
'@conciv/harness': patch
'conciv': patch
packages/publish/src/guards.ts:106
- The public-set guard still filters out every bare public package except
conciv. If a package is accidentally made public under another bare name, it never reachesunexpected, so the release drift guard passes silently. Keep all named non-private manifests here and letPUBLIC_PACKAGESdecide what is allowed.
| if (next === null) return {kind: 'unknown', command, parent, label, token, known} | ||
| parent = command | ||
| command = next | ||
| rest = rest.slice(index + 1) |
|
|
||
| export const CLAUDE_CONNECT_ROOT = 'claude-connect' | ||
|
|
||
| export const CLAUDE_CONNECT_PLUGIN_VERSION = '0.0.0' |
… shapes (#215 review) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 198 out of 203 changed files in this pull request and generated 1 comment.
Suppressed comments (4)
packages/cli/src/init/steps/framework/nextjs.ts:14
- These fixed root paths do not wire Next.js projects that use the
src/layout: Next expects both instrumentation files alongsidesrc/apporsrc/pages, so init can report success while neither hook is loaded. Resolve the instrumentation directory from the project layout and use it consistently in detection, planning, creation, tests, and docs.
packages/cli/src/init/steps/framework/webpack-family.ts:42 - Classifying module format with a substring is not confidence-gated. An ESM config with no imports but a string/comment containing
module.exportsis treated as CJS; the transform can then insertrequire(...)into an ESM export and produce a config that fails at runtime. Determine the format from the parsed top-level export/assignment (and/or the config extension) instead.
packages/cli/src/init/steps/install-it.ts:50 - Only
package.jsonis backed up before the package manager runs, but npm/pnpm/yarn also mutate their lockfile. If a later step receives SIGINT, the guard restores the manifest while leaving the lockfile changed, contradicting the “working tree pristine” interrupt guarantee and potentially leaving an inconsistent dependency graph. Capture the detected manager's lockfile before installation as well.
packages/cli/src/init/steps/framework/webpack-family.ts:61 - The PR says webpack/rspack “always carries the widgetUrl card,” but after the plugin is inserted this detection returns
present, sorunOneskipsapplyand a rerun reports “already wired” without the still-required widget-injection card. Track/verify the manual widget wire separately, or keep this step manual until it can be proven complete.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 198 out of 203 changed files in this pull request and generated 1 comment.
Suppressed comments (3)
packages/cli/src/init/harness-detect.ts:22
- Executable discovery fails on Windows, where npm-installed CLIs are normally exposed as
claude.cmd,codex.cmd, and similar PATHEXT shims, and Unix execute mode bits are not the lookup contract. As a resultinit --yesreports no harnesses and skips Claude setup even when they are installed. Resolve commands using platform-aware PATH/PATHEXT lookup.
packages/cli/src/init/steps/install-it.ts:49 - Only
package.jsonis registered for rollback, but a realaddDevDependencyalso changes the project lockfile. If the user presses Ctrl-C during a later step, the exit handler restores this manifest while leaving the lockfile with@conciv/it, contradicting the clean-tree rollback guarantee and leaving manifest/lockfile state inconsistent. Capture and restore the detected package manager's lockfile as part of this step as well.
packages/cli/src/arguments.ts:106 - Tokens after
--are positionals, but this return discards all of them. Therefore an extra argument can bypass the new validation, for exampleconciv tools page click '#a' -- '#b'is accepted byargumentProbleminstead of rejecting#b. Add the remaining tokens topositionalsbefore returning.
| function isCommonJs(content: string): boolean { | ||
| return content.includes('module.exports') | ||
| } |
…review) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…iew) A missing git binary, dubious-ownership refusal, or unreadable repo all landed in one catch that reported an empty status, so init read the silence as a clean tree and edited files blind. Classify the failure: 'not a git repository' still proceeds (init supports non-repo projects), every other failure aborts with the git detail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…view) Descending the command tree sliced the flag prefix away unread, so 'conciv tools --bogus page click #a' ran the click instead of rejecting --bogus. Each command level now runs its prefix through the existing argumentProblem path and reports it as a resolution outcome. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The style came from content.includes('module.exports'), so an ESM config
that merely mentioned the string in a comment or literal got a require()
line prepended and broke at runtime under type: module. moduleStyle now
asks ast-grep for real nodes: a module.exports assignment is CJS,
top-level import/export statements are ESM, and both or neither cards
the config instead of guessing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…es offline (#215) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 201 out of 206 changed files in this pull request and generated no new comments.
Suppressed comments (6)
packages/cli/src/init/harness-detect.ts:22
- Harness discovery fails on Windows: PATH executables are normally
claude.exe/claude.cmd, while this only probes the extensionless name and then relies on Unix execute bits. Consequentlyinit --yesdetects no installed harnesses and omits their setup on a supported Node platform. Resolve commands usingPATHEXT/platform-aware executable lookup.
packages/cli/src/init/steps/framework/webpack-family.ts:69 - Once the plugin is inserted,
detectreturnspresent, so subsequent runs skip this step and never show the still-required widget injection card. A project that has the webpack plugin but never served@conciv/widget/globalis therefore reported as already wired even though conciv cannot appear. Model widget injection as a separately unverifiable/manual step (or otherwise keep emitting that card) instead of treating plugin presence as completion of the whole recipe.
packages/cli/src/run.ts:11 - This treats every
--helptoken as an option, even after the standard--end-of-options marker. For example,conciv tools open -- --helpdisplays usage instead of opening a file named--help; the argument scanner already recognizes--, so this global scan bypasses its semantics. Determine help from parsed option positions rather than any raw token.
packages/ui-kit-chat/src/store/story-connection.ts:36 - An already-aborted signal now waits for the full
chunkDelaybefore returning. This happens when the consumer aborts while suspended at the previousyield: on resume, the loop enterssleep()even though the signal is already aborted. Keep the new post-sleep check, but restore a pre-sleep check so cancellation remains immediate.
packages/contract/src/contract.ts:77 - The PR description promises the public 409 error code
RUN_ALREADY_FINISHED, but the contract exposesRUN_ID_TAKEN. Clients written against the documented code will not match this response. Align the contract/handler/tests with the promised name, or update the PR's API declaration before merging.
packages/cli/src/init/steps/harness/claude.ts:94 plan()always claims the Claude plugin directory will be edited, even when Claude was not selected andapply()will returnskipped: not selected. After choosing Adjust and deselecting Claude, the confirmation plan therefore still advertises an install that will not happen. Represent this row as skipped or omit it so the approval plan reflects the selected actions.
What
`npx conciv@latest init` sets a project up for conciv end to end: detects the framework, package manager, and installed agent harnesses, installs `@conciv/it`, wires the bundler config through confidence-gated codemods, teaches consented harnesses the conciv CLI via a marked AGENTS.md section, and installs claude's native connect plugin. Implements the full 16-task plan (docs/superpowers/plans/2026-08-02-conciv-init.md) from the approved spec (docs/superpowers/specs/2026-08-01-conciv-init-design.md).
Highlights
{detect, plan, apply, verify, manualCard}; failures print a styled snippet card and the run exits 0. Hard aborts only for preflight (no package.json, dirty tree without--force).--yesand--dry-runsupported.<!-- conciv:start/end -->section in AGENTS.md (mirrored to CLAUDE.md when present) teachesconciv tools; claude additionally gets the connect plugin through its native plugin manager — plugin-file generation extracted from harness attach.ts into shared@conciv/harness/claude-connect-files.Operational note
First publish of the bare `conciv` name requires the manual npm OIDC trusted-publishing bootstrap — OIDC cannot create new package names. No publish is attempted by this PR (a changeset can follow separately).
Known deferrals
🤖 Generated with Claude Code
Also on this branch: #239 — one TanStack AI stack on the 0.43 line
Closes #239. Ten commits (
dcfc744d..cf29d022):@tanstack/ai0.43.0 set (three-copy 0.40/0.41/0.42 split eliminated, zero old lockfile refs), local-process stdin-EPIPE patch regenerated for 0.2.1, dated release-age exclusions.RunEventLog/InMemoryRunEventLog→RunStore+StreamDurability/memoryStream(these live in@tanstack/ai, not ai-persistence);attach(runId, '-1', signal); narrowed event-union stamping; tools carryoutputSchema: z.unknown()(verified behavior-neutral at every consumption site); hookidoption drop is byte-identical (persistenceKeyfalls back tothreadId).RUN_ALREADY_FINISHED(409, typed{runId}data); run log pre-seeded with upstream's ownRUN_ACCEPTED_EVENTso the reader deadline can't drop subscribers behind a slowfinishRun.dist-externalstest parses dist imports withoxc-parserinstead of regex; run-timing constants module; run-end-probe and openCanvas test fixtures deduped; recordersendToAgentdecomposed (cyclomatic 7→2); format:check green repo-wide; fallow audit passes with 0 introduced findings.docs/superpowers/specs/tanstack-ai-0.43-api-notes.md.Gates: typecheck 87/87, build 56/56, tests green locally (whiteboard suite CI-only by policy), lint 92/92, format clean, fallow 0 introduced.