@slowcook-ai/cli 0.19.0-alpha.1 → 0.19.0-alpha.11

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.
Files changed (49) hide show
  1. package/dist/cli.js +27 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/brew/agent.d.ts +129 -0
  4. package/dist/commands/brew/agent.d.ts.map +1 -1
  5. package/dist/commands/brew/agent.js +132 -0
  6. package/dist/commands/brew/agent.js.map +1 -1
  7. package/dist/commands/brew/index.d.ts.map +1 -1
  8. package/dist/commands/brew/index.js +72 -0
  9. package/dist/commands/brew/index.js.map +1 -1
  10. package/dist/commands/brew/pair-navigator.d.ts +112 -0
  11. package/dist/commands/brew/pair-navigator.d.ts.map +1 -0
  12. package/dist/commands/brew/pair-navigator.js +183 -0
  13. package/dist/commands/brew/pair-navigator.js.map +1 -0
  14. package/dist/commands/chef/orchestrate.d.ts +34 -0
  15. package/dist/commands/chef/orchestrate.d.ts.map +1 -0
  16. package/dist/commands/chef/orchestrate.js +385 -0
  17. package/dist/commands/chef/orchestrate.js.map +1 -0
  18. package/dist/commands/init/mock.d.ts +46 -0
  19. package/dist/commands/init/mock.d.ts.map +1 -1
  20. package/dist/commands/init/mock.js +142 -2
  21. package/dist/commands/init/mock.js.map +1 -1
  22. package/dist/commands/recon/index.d.ts.map +1 -1
  23. package/dist/commands/recon/index.js +288 -5
  24. package/dist/commands/recon/index.js.map +1 -1
  25. package/dist/commands/recon/reuse.d.ts +150 -0
  26. package/dist/commands/recon/reuse.d.ts.map +1 -0
  27. package/dist/commands/recon/reuse.js +335 -0
  28. package/dist/commands/recon/reuse.js.map +1 -0
  29. package/dist/commands/recon/shape-preserve.d.ts +46 -0
  30. package/dist/commands/recon/shape-preserve.d.ts.map +1 -1
  31. package/dist/commands/recon/shape-preserve.js +126 -0
  32. package/dist/commands/recon/shape-preserve.js.map +1 -1
  33. package/dist/commands/recon/stale-stubs.d.ts +62 -0
  34. package/dist/commands/recon/stale-stubs.d.ts.map +1 -0
  35. package/dist/commands/recon/stale-stubs.js +79 -0
  36. package/dist/commands/recon/stale-stubs.js.map +1 -0
  37. package/dist/commands/refactor/index.d.ts +15 -0
  38. package/dist/commands/refactor/index.d.ts.map +1 -0
  39. package/dist/commands/refactor/index.js +126 -0
  40. package/dist/commands/refactor/index.js.map +1 -0
  41. package/dist/commands/refactor/score.d.ts +38 -0
  42. package/dist/commands/refactor/score.d.ts.map +1 -0
  43. package/dist/commands/refactor/score.js +79 -0
  44. package/dist/commands/refactor/score.js.map +1 -0
  45. package/dist/commands/refactor/types.d.ts +64 -0
  46. package/dist/commands/refactor/types.d.ts.map +1 -0
  47. package/dist/commands/refactor/types.js +26 -0
  48. package/dist/commands/refactor/types.js.map +1 -0
  49. package/package.json +4 -4
@@ -0,0 +1,64 @@
1
+ /**
2
+ * 0.19.0-alpha.7 (#64) — refactor command data shapes.
3
+ *
4
+ * The refactor command takes a list of candidate refactors (proposals)
5
+ * + computes per-proposal cost/benefit, filters by codebase scope,
6
+ * and ranks them. Proposals come from a source the cli treats as
7
+ * opaque today — could be hand-authored JSON, recon emissions, or a
8
+ * future LLM proposer agent. The scoring + filtering logic stays
9
+ * separate so any source feeds into the same ranking.
10
+ *
11
+ * Goals:
12
+ * - Boundedness: caller specifies scope (e.g. `src/components/**`)
13
+ * so refactors don't sprawl across the repo.
14
+ * - Cheapness-first: prefer high-value low-cost proposals; defer
15
+ * expensive ones until they pay back.
16
+ * - Auditability: each proposal carries a rationale + estimated
17
+ * deltas so the cli can show its work + a PM can sanity-check.
18
+ *
19
+ * Out of scope for α.7 (deferred):
20
+ * - LLM-backed proposer that READS the codebase + suggests
21
+ * refactors. The pure ranking layer ships first; proposer comes
22
+ * when the data shape has settled empirically.
23
+ * - Auto-application. α.7 ranks + reports; a future α may apply.
24
+ */
25
+ /**
26
+ * A single candidate refactor. The cli treats `id` as opaque (caller
27
+ * picks; e.g., a slug or hash). `filesAffected` is canonical (no
28
+ * globs in the proposal itself — globs live in scope filters).
29
+ */
30
+ export interface RefactorProposal {
31
+ /** Stable identifier, caller-chosen. */
32
+ id: string;
33
+ /** One-line summary (≤120 chars). Shown in ranked output. */
34
+ title: string;
35
+ /** What the refactor changes + WHY it's worth doing. */
36
+ rationale: string;
37
+ /** Concrete file paths the refactor would touch. Repo-relative. */
38
+ filesAffected: string[];
39
+ /** Net lines changed estimate (added - removed). Negative is fine
40
+ * (refactors that reduce LOC are usually high-value). */
41
+ estimatedLocDelta: number;
42
+ /** Subjective value score, 0-10. Caller's job to populate. */
43
+ estimatedValueScore: number;
44
+ /** Optional: external value signals (e.g., dup-count eliminated,
45
+ * cyclomatic-complexity drop). Surface-only; no scoring weight
46
+ * applied unless the caller folds them into estimatedValueScore. */
47
+ evidence?: Record<string, number | string>;
48
+ }
49
+ /**
50
+ * The cost/benefit assessment of a single proposal. Pure: derived
51
+ * from the proposal alone (no IO).
52
+ */
53
+ export interface ProposalAssessment {
54
+ proposalId: string;
55
+ /** Cost: |estimatedLocDelta| × number of files (handwave, but
56
+ * monotonic with reviewer effort). Higher = more expensive. */
57
+ costScore: number;
58
+ /** Benefit: estimatedValueScore as-is. */
59
+ benefitScore: number;
60
+ /** Ratio: benefit / max(cost, 1). Higher = better return per unit
61
+ * effort. Used as the default ranking key. */
62
+ benefitPerCost: number;
63
+ }
64
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/refactor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;8DAC0D;IAC1D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;yEAEqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC5C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB;oEACgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB;mDAC+C;IAC/C,cAAc,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 0.19.0-alpha.7 (#64) — refactor command data shapes.
3
+ *
4
+ * The refactor command takes a list of candidate refactors (proposals)
5
+ * + computes per-proposal cost/benefit, filters by codebase scope,
6
+ * and ranks them. Proposals come from a source the cli treats as
7
+ * opaque today — could be hand-authored JSON, recon emissions, or a
8
+ * future LLM proposer agent. The scoring + filtering logic stays
9
+ * separate so any source feeds into the same ranking.
10
+ *
11
+ * Goals:
12
+ * - Boundedness: caller specifies scope (e.g. `src/components/**`)
13
+ * so refactors don't sprawl across the repo.
14
+ * - Cheapness-first: prefer high-value low-cost proposals; defer
15
+ * expensive ones until they pay back.
16
+ * - Auditability: each proposal carries a rationale + estimated
17
+ * deltas so the cli can show its work + a PM can sanity-check.
18
+ *
19
+ * Out of scope for α.7 (deferred):
20
+ * - LLM-backed proposer that READS the codebase + suggests
21
+ * refactors. The pure ranking layer ships first; proposer comes
22
+ * when the data shape has settled empirically.
23
+ * - Auto-application. α.7 ranks + reports; a future α may apply.
24
+ */
25
+ export {};
26
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commands/refactor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slowcook-ai/cli",
3
- "version": "0.19.0-alpha.1",
3
+ "version": "0.19.0-alpha.11",
4
4
  "description": "CLI for the slowcook brewing harness",
5
5
  "license": "MIT",
6
6
  "author": "aminazar",
@@ -40,10 +40,10 @@
40
40
  "zod": "^3.23.8",
41
41
  "@slowcook-ai/core": "^0.13.0",
42
42
  "@slowcook-ai/stack-ts": "^0.9.9-alpha.0",
43
- "@slowcook-ai/forge-github": "^0.12.0",
44
- "@slowcook-ai/llm-anthropic": "^0.16.0-alpha.0",
45
43
  "@slowcook-ai/review-overlay": "^0.5.5",
46
- "@slowcook-ai/recorder": "^0.9.1"
44
+ "@slowcook-ai/llm-anthropic": "^0.16.0-alpha.1",
45
+ "@slowcook-ai/recorder": "^0.9.1",
46
+ "@slowcook-ai/forge-github": "^0.12.0"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"