halfcycle 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "halfcycle",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Halfcycle Method bundle — resolution-stub slash commands, remote method-delivery registration, and governance-hook wiring for a Halfcycle engagement repo. It ships NO worker role files: a project's roles are authored from that project's own recorded decisions at orchestration kickoff (FX-2, W3-F-27).",
5
5
  "commands": [
6
6
  {
File without changes
package/dist/bin.js CHANGED
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"cli-contract.d.ts","sourceRoot":"","sources":["../src/cli-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAIH,iFAAiF;AACjF,eAAO,MAAM,SAAS,oSAAqS,CAAC;AAE5T,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,sDAAsD;AACtD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,iDAAiD;AACjD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY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D,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAElE;AAED,iDAAiD;AACjD,MAAM,WAAW,SAAS;IACxB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAAE,CAyBxF;AAuBD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMvE;AASD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;CAErB,CAAC;AA2BX;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAa1F"}
package/dist/cli.js CHANGED
@@ -5295,7 +5295,7 @@ var PROJECT_SIZE_DESCRIPTION_MAX = 200;
5295
5295
  var projectSizeDescriptionSchema = statementText(PROJECT_SIZE_DESCRIPTION_MAX).refine((v) => v.trim().length > 0, { message: "must say what the project is" });
5296
5296
  var projectSizeRequestSchema = z17.object({
5297
5297
  description: projectSizeDescriptionSchema,
5298
- estimate: projectSizeEstimateSchema,
5298
+ estimate: projectSizeEstimateSchema.optional(),
5299
5299
  existingCode: z17.boolean(),
5300
5300
  signIn: z17.boolean(),
5301
5301
  sharedData: z17.boolean(),
@@ -5327,15 +5327,15 @@ var PROJECT_SIZE_FACT_REASON = Object.freeze({
5327
5327
  moreThanThreeParts: "more-than-three-parts"
5328
5328
  });
5329
5329
  var PROJECT_SIZE_REASON_WORDS = Object.freeze({
5330
- days: "you expect it to take days",
5331
- weeks: "you expect it to take weeks or longer",
5330
+ days: "it was said to take days",
5331
+ weeks: "it was said to take weeks or longer",
5332
5332
  "existing-code": "it builds on existing code",
5333
5333
  "sign-in": "it has sign-in or user accounts",
5334
5334
  "shared-data": "it stores data other people rely on",
5335
5335
  "paid-services": "it takes payments or uses outside services that cost money",
5336
5336
  "more-than-three-parts": "it has more than three parts"
5337
5337
  });
5338
- var PROJECT_SIZE_MOVE_UP_OFFER = 'To make it bigger at any time, say "make it a medium project" or "make it a full project". A project never moves to a smaller size.';
5338
+ var PROJECT_SIZE_MOVE_UP_OFFER = 'If the project is bigger than this, say "make it a medium project" or "make it a full project", now or at any time. A project never moves to a smaller size.';
5339
5339
  var PROJECT_SIZE_NEVER_SMALLER = "A project never moves to a smaller size.";
5340
5340
  function projectSizeMovedUpLineOf(size) {
5341
5341
  return `This project is now ${size}. The next step it is served is the full method's next step.`;
@@ -13467,6 +13467,7 @@ var LOCAL_ALLOW_RECORD_REL = ".halfcycle/local-allow.json";
13467
13467
  var LOCAL_ALLOW_EDIT_MODE = "acceptEdits";
13468
13468
  var SCRIPTS = ["test", "build", "lint", "typecheck"];
13469
13469
  var SCRIPT_RUNNERS = ["npm run", "pnpm", "pnpm run", "yarn", "bun run"];
13470
+ var HALFCYCLE_TOOLS_RULE = `mcp__${MCP_SERVER_KEY}`;
13470
13471
  var bash = (command) => `Bash(${command}:*)`;
13471
13472
  var LOCAL_ALLOW_RULES = [
13472
13473
  ...SCRIPT_RUNNERS.flatMap((runner) => SCRIPTS.map((script) => bash(`${runner} ${script}`))),
@@ -13532,7 +13533,8 @@ var LOCAL_ALLOW_RULES = [
13532
13533
  bash("sort"),
13533
13534
  bash("uniq"),
13534
13535
  bash("cut"),
13535
- bash("tr")
13536
+ bash("tr"),
13537
+ HALFCYCLE_TOOLS_RULE
13536
13538
  ];
13537
13539
  var LOCAL_ALLOW_QUESTION = "Let your coding agent work without asking on this computer? It would run your tests and builds, install packages, run local tools, make and move files, use git locally, run Halfcycle, and edit files in this project without a permission prompt. Pushing, publishing, deploying to production, deleting and changing anything on GitHub still ask. This is saved only on this computer, in .claude/settings.local.json, which is not committed.\nType yes to allow it, or press Enter to keep asking: ";
13538
13540
  var LOCAL_ALLOW_ON_LINE = "Your coding agent can now work without asking on this computer. To undo it, run: npx halfcycle@latest allow --remove";
@@ -15449,11 +15451,6 @@ var CONTRACTS = [
15449
15451
  flag: "--description",
15450
15452
  takesValue: true,
15451
15453
  missingMessage: "halfcycle size sort: --description is required \u2014 one line, in your own words, saying what you want to build."
15452
- },
15453
- {
15454
- flag: "--estimate",
15455
- takesValue: true,
15456
- missingMessage: "halfcycle size sort: --estimate is required \u2014 how long you expect it to take: hours, days or weeks."
15457
15454
  }
15458
15455
  ],
15459
15456
  conditional: []
@@ -19987,7 +19984,7 @@ function safeBasename(dir) {
19987
19984
  }
19988
19985
 
19989
19986
  // dist/size.js
19990
- var SIZE_USAGE = `${HALFCYCLE_COMMAND} size sort --description "<one line>" --estimate <hours|days|weeks> [--existing-code] [--sign-in] [--shared-data] [--paid-services] [--more-than-three-parts] [--repo <root>]
19987
+ var SIZE_USAGE = `${HALFCYCLE_COMMAND} size sort --description "<one line>" [--existing-code] [--sign-in] [--shared-data] [--paid-services] [--more-than-three-parts] [--repo <root>]
19991
19988
  ${HALFCYCLE_COMMAND} size up <medium|full> [--repo <root>]`;
19992
19989
  function usage2(line) {
19993
19990
  return { ok: false, line: `${line}
@@ -20019,7 +20016,6 @@ function parseSizeArgs(rest) {
20019
20016
  };
20020
20017
  if (form === "sort") {
20021
20018
  let description = null;
20022
- let estimate = null;
20023
20019
  const facts = { existingCode: false, signIn: false, sharedData: false, paidServices: false, moreThanThreeParts: false };
20024
20020
  for (let i = 0; i < words.length; i++) {
20025
20021
  const w = words[i];
@@ -20029,9 +20025,7 @@ function parseSizeArgs(rest) {
20029
20025
  return usage2(`halfcycle size sort: ${w} needs a value after it.`);
20030
20026
  if (w === "--description")
20031
20027
  description = v;
20032
- else if (w === "--estimate")
20033
- estimate = v;
20034
- else
20028
+ else if (w === "--repo")
20035
20029
  repoRoot = v;
20036
20030
  i++;
20037
20031
  } else if (FACT_SWITCHES[w] !== void 0) {
@@ -20042,10 +20036,7 @@ function parseSizeArgs(rest) {
20042
20036
  }
20043
20037
  if (description === null)
20044
20038
  return usage2(missingRequirements("size", ["sort"])[0].message);
20045
- if (estimate === null || !PROJECT_SIZE_ESTIMATES.includes(estimate)) {
20046
- return usage2(`halfcycle size sort: --estimate says how long you expect it to take: ${PROJECT_SIZE_ESTIMATES.join(", ")}.`);
20047
- }
20048
- const request = projectSizeRequestSchema.safeParse({ description, estimate, ...facts });
20039
+ const request = projectSizeRequestSchema.safeParse({ description, ...facts });
20049
20040
  if (!request.success) {
20050
20041
  const n = request.error.issues.length;
20051
20042
  return {
@@ -21589,6 +21580,23 @@ ${DOCTOR_LINE}
21589
21580
  if (result.notShared)
21590
21581
  process.stdout.write(`${renderNotShared(result.notShared)}
21591
21582
  `);
21583
+ const consoleUrl = credential?.consoleUrl ?? (reusedWithoutFreshAnswer ? readBundlePin(targetRepo)?.projectPage : void 0);
21584
+ if (consoleUrl !== void 0) {
21585
+ const colour = decideColour(currentEnvironment(quiet));
21586
+ process.stdout.write(`${ink("key", `[halfcycle] Your project's console: ${consoleUrl}`, colour)}
21587
+ `);
21588
+ }
21589
+ const methodVersion = credential?.methodVersion ?? (reusedWithoutFreshAnswer ? readBundlePin(targetRepo)?.methodVersion : void 0);
21590
+ if (methodVersion !== void 0) {
21591
+ process.stdout.write(`[halfcycle] Method version: ${methodVersion}
21592
+ `);
21593
+ }
21594
+ process.stdout.write(`[halfcycle] ${localAllowClosingLine(targetRepo, wantsLocalAllow)}
21595
+ `);
21596
+ if (checks.gitInstalled) {
21597
+ process.stdout.write(`[halfcycle] Git for Windows is installed. Open a new terminal before starting Claude Code.
21598
+ `);
21599
+ }
21592
21600
  if (credential && isGitWorkTree(targetRepo)) {
21593
21601
  process.stdout.write(`[halfcycle] Commit the files Halfcycle set up here, including ${BUNDLE_PIN_REL} and ${PROJECT_IDENTITY_REL}, so every copy of this project joins it and runs the same checks.
21594
21602
  `);
@@ -21607,25 +21615,12 @@ ${DOCTOR_LINE}
21607
21615
  process.stdout.write(`${codexLine2}
21608
21616
  `);
21609
21617
  }
21610
- const consoleUrl = credential?.consoleUrl ?? (reusedWithoutFreshAnswer ? readBundlePin(targetRepo)?.projectPage : void 0);
21611
- if (consoleUrl !== void 0) {
21612
- const colour = decideColour(currentEnvironment(quiet));
21613
- process.stdout.write(`${ink("key", `[halfcycle] Your project's console: ${consoleUrl}`, colour)}
21614
- `);
21615
- }
21616
- const methodVersion = credential?.methodVersion ?? (reusedWithoutFreshAnswer ? readBundlePin(targetRepo)?.methodVersion : void 0);
21617
- if (methodVersion !== void 0) {
21618
- process.stdout.write(`[halfcycle] Method version: ${methodVersion}
21619
- `);
21620
- }
21621
- process.stdout.write(`[halfcycle] ${localAllowClosingLine(targetRepo, wantsLocalAllow)}
21618
+ process.stdout.write(`[halfcycle] Start Claude Code from this project folder: ${targetRepo}
21622
21619
  `);
21623
- if (checks.gitInstalled) {
21624
- process.stdout.write(`[halfcycle] Git for Windows is installed. Open a new terminal before starting Claude Code.
21620
+ if (credential) {
21621
+ process.stdout.write(`[halfcycle] After that, Halfcycle asks what to call your product and what you want to build, then sets the project up.
21625
21622
  `);
21626
21623
  }
21627
- process.stdout.write(`[halfcycle] Start Claude Code from this project folder: ${targetRepo}
21628
- `);
21629
21624
  process.exit(0);
21630
21625
  } catch (err) {
21631
21626
  const stop = (message) => {