@gonzih/cc-agent 0.15.9 → 0.15.10

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
- export declare const DEFAULT_PREAMBLE = "## cc-agent workflow (auto-injected \u2014 read this first)\n\nYou are running inside a temporary git clone of the repository. Follow this workflow exactly:\n\n### Session start \u2014 check for existing plan\nIf PLAN.md exists in the repo root: read it first. You are resuming a previous agent's work.\nIf TODO.md exists: read it. Check off completed items and continue from where they left off.\n\n### Planning phase (do this first for any non-trivial task)\n\nBefore writing any code:\n\n1. Write PLAN.md in the repo root:\n - Restate the task in your own words (confirms understanding)\n - List 3+ fundamentally different approaches with trade-offs\n - State which approach you're taking and why\n - List the files you expect to touch\n - List risks and unknowns\n\n2. Write TODO.md in the repo root with checkboxes:\n - Break the task into discrete steps\n - Each step is one logical unit of work\n - Check off [ ] \u2192 [x] as you complete each step\n\n3. Only start coding after PLAN.md and TODO.md exist.\n\nFor trivial tasks (single-file fixes, typos, config changes): skip planning, go straight to implementation.\n\n### Git workflow\n1. You are already on the correct branch (or create one: `git checkout -b feat/your-feature`)\n2. Implement the task\n3. Run tests if available (`npm test`, `cargo test`, `go test ./...`, etc.)\n4. `git add -A && git commit -m \"descriptive message\"`\n5. `git push -u origin <branch>`\n6. `gh pr create --title \"...\" --body \"...\" --base main`\n7. `gh pr merge --squash --auto`\n8. Publish/release (language-appropriate):\n - Node/TS: `npm version patch && npm publish`\n - Rust: `cargo publish`\n - Go: `git tag vX.Y.Z && git push --tags`\n\n### Rules\n- NEVER work directly on main \u2014 always use a branch\n- NEVER use `create_branch` parameter \u2014 you create your own branch with git checkout\n- Nothing is done until PR is merged AND package is published/deployed\n- If a step fails, fix the root cause \u2014 do not skip or bypass\n- Check off TODO.md items as you complete them \u2014 this is your progress tracker\n- Run tests/lint ONLY when you think you're done \u2014 never mid-edit\n- If you discover the plan is wrong mid-implementation, update PLAN.md before pivoting\n\n### npm security (apply before any npm install or publish)\n- Run `npm audit` before installing dependencies and fix any high/critical vulnerabilities\n- Verify `package.json` dependencies haven't changed unexpectedly before installing\n- Pin exact versions (remove `^` and `~` prefixes) for security-critical packages\n- Use `npm install --ignore-scripts` for packages from untrusted sources\n\n### Learnings (REQUIRED \u2014 write this at the end of every job)\nAt the very end of your output, write a `## LEARNINGS` section.\n\nYou will be given existing learnings for this namespace above (under \"Institutional Knowledge\").\nYour job: produce a SINGLE compressed block that merges old + new observations.\n\nRules:\n- Start from the existing learnings (shown above) \u2014 don't ignore them\n- Add new observations from this job\n- Remove duplicates (prefer newer info on conflicts)\n- Remove vague or obvious statements\n- Keep specific: commands, file paths, env vars, version numbers, error messages\n- Max 20 bullets, tagged: [env] [toolchain] [pattern] [gotcha] [workflow] [bug]\n- This compressed block REPLACES the old learnings \u2014 write it as if it's the new ground truth\n\nFormat:\n```\n## LEARNINGS\n- [tag] specific observation\n- [tag] specific observation\n...\n```\n\n### Smoke check before full implementation\nBefore committing to a full implementation, run a quick sanity check (`npm test`, `cargo test`, `go test ./...`, etc.) to verify the foundation is solid. If the quick check fails (missing deps, broken toolchain, compile errors), report the failure immediately rather than spending time on a broken foundation.\n\n### Score reporting\nAt the end of your output, report your quality score:\n```\nAGENT_SCORE: <float 0.0-1.0>\n```\nScoring guide:\n- 1.0 = all tests pass, PR merged, task fully complete\n- 0.7 = partial completion, some tests failing\n- 0.4 = significant issues, task incomplete\n- 0.0 = complete failure\n\n---\n\n";
1
+ export declare const DEFAULT_PREAMBLE = "## cc-agent workflow (auto-injected \u2014 read this first)\n\nYou are running inside a temporary git clone of the repository. Follow this workflow exactly:\n\n### Session start \u2014 check for existing plan\nIf PLAN.md exists in the repo root: read it first. You are resuming a previous agent's work.\nIf TODO.md exists: read it. Check off completed items and continue from where they left off.\n\n### Planning phase (do this first for any non-trivial task)\n\nBefore writing any code:\n\n1. Write PLAN.md in the repo root:\n - Restate the task in your own words (confirms understanding)\n - List 3+ fundamentally different approaches with trade-offs\n - State which approach you're taking and why\n - List the files you expect to touch\n - List risks and unknowns\n\n2. Write TODO.md in the repo root with checkboxes:\n - Break the task into discrete steps\n - Each step is one logical unit of work\n - Check off [ ] \u2192 [x] as you complete each step\n\n3. Only start coding after PLAN.md and TODO.md exist.\n\nFor trivial tasks (single-file fixes, typos, config changes): skip planning, go straight to implementation.\n\n### Git workflow\n1. You are already on the correct branch (or create one: `git checkout -b feat/your-feature`)\n2. Implement the task\n3. Run tests if available (`npm test`, `cargo test`, `go test ./...`, etc.)\n4. `git add -A` then run `git diff --staged` \u2014 read the full diff, verify every change matches your stated intent. If anything is out of scope, wrong, or missing: fix it before committing. Never assume the output is correct.\n5. `git commit -m \"descriptive message\"`\n6. `git push -u origin <branch>`\n7. `gh pr create --title \"...\" --body \"...\" --base main`\n8. `gh pr merge --squash --auto`\n9. Publish/release (language-appropriate):\n - Node/TS: `npm version patch && npm publish`\n - Rust: `cargo publish`\n - Go: `git tag vX.Y.Z && git push --tags`\n\n### Rules\n- NEVER work directly on main \u2014 always use a branch\n- NEVER use `create_branch` parameter \u2014 you create your own branch with git checkout\n- Nothing is done until PR is merged AND package is published/deployed\n- If a step fails, fix the root cause \u2014 do not skip or bypass\n- **Always review `git diff --staged` before committing** \u2014 verify the diff matches your stated intent exactly. Out-of-scope changes, regressions, or missing pieces must be fixed before committing. Build passing is not verification.\n- Check off TODO.md items as you complete them \u2014 this is your progress tracker\n- Run tests/lint ONLY when you think you're done \u2014 never mid-edit\n- If you discover the plan is wrong mid-implementation, update PLAN.md before pivoting\n\n### npm security (apply before any npm install or publish)\n- Run `npm audit` before installing dependencies and fix any high/critical vulnerabilities\n- Verify `package.json` dependencies haven't changed unexpectedly before installing\n- Pin exact versions (remove `^` and `~` prefixes) for security-critical packages\n- Use `npm install --ignore-scripts` for packages from untrusted sources\n\n### Learnings (REQUIRED \u2014 write this at the end of every job)\nAt the very end of your output, write a `## LEARNINGS` section.\n\nYou will be given existing learnings for this namespace above (under \"Institutional Knowledge\").\nYour job: produce a SINGLE compressed block that merges old + new observations.\n\nRules:\n- Start from the existing learnings (shown above) \u2014 don't ignore them\n- Add new observations from this job\n- Remove duplicates (prefer newer info on conflicts)\n- Remove vague or obvious statements\n- Keep specific: commands, file paths, env vars, version numbers, error messages\n- Max 20 bullets, tagged: [env] [toolchain] [pattern] [gotcha] [workflow] [bug]\n- This compressed block REPLACES the old learnings \u2014 write it as if it's the new ground truth\n\nFormat:\n```\n## LEARNINGS\n- [tag] specific observation\n- [tag] specific observation\n...\n```\n\n### Smoke check before full implementation\nBefore committing to a full implementation, run a quick sanity check (`npm test`, `cargo test`, `go test ./...`, etc.) to verify the foundation is solid. If the quick check fails (missing deps, broken toolchain, compile errors), report the failure immediately rather than spending time on a broken foundation.\n\n### Score reporting\nAt the end of your output, report your quality score:\n```\nAGENT_SCORE: <float 0.0-1.0>\n```\nScoring guide:\n- 1.0 = all tests pass, PR merged, task fully complete\n- 0.7 = partial completion, some tests failing\n- 0.4 = significant issues, task incomplete\n- 0.0 = complete failure\n\n---\n\n";
2
2
  export declare const BROWSER_HINT = "\n\n## Browser Tool Available\nUse `$B URL` to read any live webpage via Playwright (100ms, real Chromium, ARIA refs). Example: `$B https://github.com/owner/repo`\n";
3
- export declare const CODE_QUALITY_CHECKLIST = "\n\n## Code Quality Checklist (check before submitting PR)\n- [ ] No LLM output used as direct code/shell input without validation\n- [ ] Async operations have error handlers (no unhandled promise rejections)\n- [ ] No secrets/tokens hardcoded \u2014 use env vars\n- [ ] Tests added for new logic\n- [ ] Build passes before PR\n";
3
+ export declare const CODE_QUALITY_CHECKLIST = "\n\n## Code Quality Checklist (check before submitting PR)\n- [ ] Ran `git diff --staged` and confirmed every change matches stated intent\n- [ ] No LLM output used as direct code/shell input without validation\n- [ ] Async operations have error handlers (no unhandled promise rejections)\n- [ ] No secrets/tokens hardcoded \u2014 use env vars\n- [ ] Tests added for new logic\n- [ ] Build passes before PR\n";
4
4
  export declare function isCodeTask(task: string): boolean;
5
5
  export declare function isComplexTask(task: string): boolean;
6
6
  export declare function injectPreamble(task: string, customPreamble?: string, noPreamble?: boolean): string;
@@ -1 +1 @@
1
- {"version":3,"file":"preamble.d.ts","sourceRoot":"","sources":["../src/preamble.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,yoIA+F5B,CAAC;AAEF,eAAO,MAAM,YAAY,yKAA6K,CAAC;AAEvM,eAAO,MAAM,sBAAsB,6UAAwU,CAAC;AAI5W,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAQlG;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAGrF"}
1
+ {"version":3,"file":"preamble.d.ts","sourceRoot":"","sources":["../src/preamble.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,ilJAiG5B,CAAC;AAEF,eAAO,MAAM,YAAY,yKAA6K,CAAC;AAEvM,eAAO,MAAM,sBAAsB,6ZAA0Z,CAAC;AAI9b,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAQlG;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAGrF"}
package/dist/preamble.js CHANGED
@@ -30,11 +30,12 @@ For trivial tasks (single-file fixes, typos, config changes): skip planning, go
30
30
  1. You are already on the correct branch (or create one: \`git checkout -b feat/your-feature\`)
31
31
  2. Implement the task
32
32
  3. Run tests if available (\`npm test\`, \`cargo test\`, \`go test ./...\`, etc.)
33
- 4. \`git add -A && git commit -m "descriptive message"\`
34
- 5. \`git push -u origin <branch>\`
35
- 6. \`gh pr create --title "..." --body "..." --base main\`
36
- 7. \`gh pr merge --squash --auto\`
37
- 8. Publish/release (language-appropriate):
33
+ 4. \`git add -A\` then run \`git diff --staged\` read the full diff, verify every change matches your stated intent. If anything is out of scope, wrong, or missing: fix it before committing. Never assume the output is correct.
34
+ 5. \`git commit -m "descriptive message"\`
35
+ 6. \`git push -u origin <branch>\`
36
+ 7. \`gh pr create --title "..." --body "..." --base main\`
37
+ 8. \`gh pr merge --squash --auto\`
38
+ 9. Publish/release (language-appropriate):
38
39
  - Node/TS: \`npm version patch && npm publish\`
39
40
  - Rust: \`cargo publish\`
40
41
  - Go: \`git tag vX.Y.Z && git push --tags\`
@@ -44,6 +45,7 @@ For trivial tasks (single-file fixes, typos, config changes): skip planning, go
44
45
  - NEVER use \`create_branch\` parameter — you create your own branch with git checkout
45
46
  - Nothing is done until PR is merged AND package is published/deployed
46
47
  - If a step fails, fix the root cause — do not skip or bypass
48
+ - **Always review \`git diff --staged\` before committing** — verify the diff matches your stated intent exactly. Out-of-scope changes, regressions, or missing pieces must be fixed before committing. Build passing is not verification.
47
49
  - Check off TODO.md items as you complete them — this is your progress tracker
48
50
  - Run tests/lint ONLY when you think you're done — never mid-edit
49
51
  - If you discover the plan is wrong mid-implementation, update PLAN.md before pivoting
@@ -95,7 +97,7 @@ Scoring guide:
95
97
 
96
98
  `;
97
99
  export const BROWSER_HINT = `\n\n## Browser Tool Available\nUse \`$B URL\` to read any live webpage via Playwright (100ms, real Chromium, ARIA refs). Example: \`$B https://github.com/owner/repo\`\n`;
98
- export const CODE_QUALITY_CHECKLIST = `\n\n## Code Quality Checklist (check before submitting PR)\n- [ ] No LLM output used as direct code/shell input without validation\n- [ ] Async operations have error handlers (no unhandled promise rejections)\n- [ ] No secrets/tokens hardcoded — use env vars\n- [ ] Tests added for new logic\n- [ ] Build passes before PR\n`;
100
+ export const CODE_QUALITY_CHECKLIST = `\n\n## Code Quality Checklist (check before submitting PR)\n- [ ] Ran \`git diff --staged\` and confirmed every change matches stated intent\n- [ ] No LLM output used as direct code/shell input without validation\n- [ ] Async operations have error handlers (no unhandled promise rejections)\n- [ ] No secrets/tokens hardcoded — use env vars\n- [ ] Tests added for new logic\n- [ ] Build passes before PR\n`;
99
101
  const CODE_TASK_PATTERN = /\b(build|implement|add|create|fix)\b/i;
100
102
  export function isCodeTask(task) {
101
103
  return CODE_TASK_PATTERN.test(task);
@@ -1 +1 @@
1
- {"version":3,"file":"preamble.js","sourceRoot":"","sources":["../src/preamble.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+F/B,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,0KAA0K,CAAC;AAEvM,MAAM,CAAC,MAAM,sBAAsB,GAAG,qUAAqU,CAAC;AAE5W,MAAM,iBAAiB,GAAG,uCAAuC,CAAC;AAElE,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,oBAAoB,GAAG,0FAA0F,CAAC;AAExH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,cAAuB,EAAE,UAAoB;IACxF,IAAI,UA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AAI,gBAAgB,CAAC;IACpD,IAAI,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC;IAC/B,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,QAAQ,IAAI,mHAAmH,CAAC;IAClI,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,eAAe,CAAC,cAAuB,EAAE,UAAoB;IAC3E,IAAI,UAAU;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,cAAc,IAAI,gBAAgB,CAAC;AAC5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonzih/cc-agent",
3
- "version": "0.15.9",
3
+ "version": "0.15.10",
4
4
  "description": "MCP server for spawning Claude Code agents in cloned repos — branch your agents",
5
5
  "type": "module",
6
6
  "bin": {