@codyswann/lisa 1.32.0 → 1.33.0

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.
@@ -185,7 +185,7 @@ Include all required tasks defined in `@.claude/rules/plan-governance.md` (Requi
185
185
 
186
186
  ## Step 10: Implementation Team Instructions
187
187
 
188
- The plan must include explict instructions to "Create an agent team" for implementation. Recommend these specialized agents:
188
+ The plan must include explict instructions to "Create an agent team" for implementation and run the /plan-implement skill. Recommend these specialized agents:
189
189
 
190
190
  | Agent | Use For |
191
191
  |-------|---------|
@@ -1,55 +1,50 @@
1
1
  /**
2
2
  * @file fibonacci.ts
3
- * @description BigInt Fibonacci utilities using a lazy generator pattern.
4
- * Uses BigInt instead of Number to eliminate the precision ceiling at
5
- * fibonacci(78) BigInt supports arbitrarily large integers, so callers
6
- * can compute fibonacci(1000) or beyond without silent corruption.
7
- * The generator pattern enables lazy evaluation, letting consumers pull
8
- * only the values they need without allocating the full sequence upfront.
9
- * @module fibonacci
3
+ * @description BigInt Fibonacci utilities built on a lazy infinite generator.
4
+ * Every public function delegates to `fibonacciGenerator` so the core
5
+ * recurrence relation lives in exactly one place (DRY). BigInt eliminates
6
+ * the precision ceiling that Number hits at fibonacci(78).
7
+ * @module utils
10
8
  */
11
9
  /**
12
- * Infinite lazy generator yielding Fibonacci numbers as BigInt.
13
- *
14
- * @returns Generator that yields successive Fibonacci numbers (0n, 1n, 1n, 2n, 3n, ...)
15
- * @remarks The generator never terminates do not spread or collect without a length limit.
16
- * Each call creates an independent generator instance — safe for concurrent iteration.
10
+ * Infinite generator that lazily yields the Fibonacci sequence as BigInts
11
+ * @yields {bigint} The next Fibonacci number in the sequence (0n, 1n, 1n, 2n, 3n, …)
12
+ * @remarks Each call creates an independent iterator with its own state, so
13
+ * multiple consumers can advance through the sequence without interference.
17
14
  * @example
18
15
  * ```typescript
19
16
  * const gen = fibonacciGenerator();
20
17
  * gen.next().value; // 0n
21
18
  * gen.next().value; // 1n
22
- *
23
- * // Collect first 5 values:
24
- * const first5 = Array.from({ length: 5 }, () => gen.next().value);
19
+ * gen.next().value; // 1n
25
20
  * ```
26
21
  */
27
22
  export declare function fibonacciGenerator(): Generator<bigint, never, unknown>;
28
23
  /**
29
- * Compute the nth Fibonacci number (0-indexed) using BigInt.
30
- *
31
- * @param n - Zero-based index in the Fibonacci sequence (must be a non-negative integer)
32
- * @returns The nth Fibonacci number as a BigInt — compare with `===` against bigint literals (e.g. `55n`), not numbers
33
- * @throws {RangeError} If n is negative, non-integer, NaN, or Infinity
34
- * @remarks Delegates to fibonacciGenerator — O(n) time, consistent with the lazy generator approach
24
+ * Returns the nth Fibonacci number as a BigInt
25
+ * @param n - Zero-based index into the Fibonacci sequence (must be a non-negative integer)
26
+ * @returns The nth Fibonacci number (e.g. fibonacci(5) 5n)
27
+ * @throws {RangeError} When n is negative, non-integer, NaN, or Infinity
28
+ * @remarks Delegates to `fibonacciGenerator` so the recurrence logic is defined once.
35
29
  * @example
36
30
  * ```typescript
37
- * fibonacci(10); // 55n (bigint, not number)
38
- * fibonacci(10) === 55n; // true
39
- * fibonacci(10) === 55; // falsebigint !== number
31
+ * fibonacci(0); // 0n
32
+ * fibonacci(10); // 55n
33
+ * fibonacci(78); // 8944394323791464nbeyond Number.MAX_SAFE_INTEGER
40
34
  * ```
41
35
  */
42
36
  export declare function fibonacci(n: number): bigint;
43
37
  /**
44
- * Generate the first `length` Fibonacci numbers as a readonly BigInt array.
45
- *
46
- * @param length - How many Fibonacci numbers to generate (must be a non-negative integer)
47
- * @returns A readonly array of the first `length` Fibonacci numbers as BigInt
48
- * @throws {RangeError} If length is negative, non-integer, NaN, or Infinity
49
- * @remarks Wraps fibonacciGenerator so the sequence is computed once, not per-element
38
+ * Returns the first `length` Fibonacci numbers as a readonly BigInt array
39
+ * @param length - How many Fibonacci numbers to return (must be a non-negative integer)
40
+ * @returns A new array containing the first `length` Fibonacci numbers
41
+ * @throws {RangeError} When length is negative, non-integer, NaN, or Infinity
42
+ * @remarks Delegates to `fibonacciGenerator` so the recurrence logic is defined once.
43
+ * Returns a fresh array on every call callers can safely mutate the result.
50
44
  * @example
51
45
  * ```typescript
52
- * fibonacciSequence(5); // [0n, 1n, 1n, 2n, 3n]
46
+ * fibonacciSequence(0); // []
47
+ * fibonacciSequence(5); // [0n, 1n, 1n, 2n, 3n]
53
48
  * ```
54
49
  */
55
50
  export declare function fibonacciSequence(length: number): readonly bigint[];
@@ -1 +1 @@
1
- {"version":3,"file":"fibonacci.d.ts","sourceRoot":"","sources":["../../src/utils/fibonacci.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,wBAAiB,kBAAkB,IAAI,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CASvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAY3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAUnE"}
1
+ {"version":3,"file":"fibonacci.d.ts","sourceRoot":"","sources":["../../src/utils/fibonacci.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAiB,kBAAkB,IAAI,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAUvE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAU3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CASnE"}
@@ -1,27 +1,22 @@
1
1
  /**
2
2
  * @file fibonacci.ts
3
- * @description BigInt Fibonacci utilities using a lazy generator pattern.
4
- * Uses BigInt instead of Number to eliminate the precision ceiling at
5
- * fibonacci(78) BigInt supports arbitrarily large integers, so callers
6
- * can compute fibonacci(1000) or beyond without silent corruption.
7
- * The generator pattern enables lazy evaluation, letting consumers pull
8
- * only the values they need without allocating the full sequence upfront.
9
- * @module fibonacci
3
+ * @description BigInt Fibonacci utilities built on a lazy infinite generator.
4
+ * Every public function delegates to `fibonacciGenerator` so the core
5
+ * recurrence relation lives in exactly one place (DRY). BigInt eliminates
6
+ * the precision ceiling that Number hits at fibonacci(78).
7
+ * @module utils
10
8
  */
11
9
  /**
12
- * Infinite lazy generator yielding Fibonacci numbers as BigInt.
13
- *
14
- * @returns Generator that yields successive Fibonacci numbers (0n, 1n, 1n, 2n, 3n, ...)
15
- * @remarks The generator never terminates do not spread or collect without a length limit.
16
- * Each call creates an independent generator instance — safe for concurrent iteration.
10
+ * Infinite generator that lazily yields the Fibonacci sequence as BigInts
11
+ * @yields {bigint} The next Fibonacci number in the sequence (0n, 1n, 1n, 2n, 3n, …)
12
+ * @remarks Each call creates an independent iterator with its own state, so
13
+ * multiple consumers can advance through the sequence without interference.
17
14
  * @example
18
15
  * ```typescript
19
16
  * const gen = fibonacciGenerator();
20
17
  * gen.next().value; // 0n
21
18
  * gen.next().value; // 1n
22
- *
23
- * // Collect first 5 values:
24
- * const first5 = Array.from({ length: 5 }, () => gen.next().value);
19
+ * gen.next().value; // 1n
25
20
  * ```
26
21
  */
27
22
  export function* fibonacciGenerator() {
@@ -35,21 +30,20 @@ export function* fibonacciGenerator() {
35
30
  }
36
31
  }
37
32
  /**
38
- * Compute the nth Fibonacci number (0-indexed) using BigInt.
39
- *
40
- * @param n - Zero-based index in the Fibonacci sequence (must be a non-negative integer)
41
- * @returns The nth Fibonacci number as a BigInt — compare with `===` against bigint literals (e.g. `55n`), not numbers
42
- * @throws {RangeError} If n is negative, non-integer, NaN, or Infinity
43
- * @remarks Delegates to fibonacciGenerator — O(n) time, consistent with the lazy generator approach
33
+ * Returns the nth Fibonacci number as a BigInt
34
+ * @param n - Zero-based index into the Fibonacci sequence (must be a non-negative integer)
35
+ * @returns The nth Fibonacci number (e.g. fibonacci(5) 5n)
36
+ * @throws {RangeError} When n is negative, non-integer, NaN, or Infinity
37
+ * @remarks Delegates to `fibonacciGenerator` so the recurrence logic is defined once.
44
38
  * @example
45
39
  * ```typescript
46
- * fibonacci(10); // 55n (bigint, not number)
47
- * fibonacci(10) === 55n; // true
48
- * fibonacci(10) === 55; // falsebigint !== number
40
+ * fibonacci(0); // 0n
41
+ * fibonacci(10); // 55n
42
+ * fibonacci(78); // 8944394323791464nbeyond Number.MAX_SAFE_INTEGER
49
43
  * ```
50
44
  */
51
45
  export function fibonacci(n) {
52
- if (!Number.isInteger(n) || n < 0) {
46
+ if (!Number.isFinite(n) || !Number.isInteger(n) || n < 0) {
53
47
  throw new RangeError(`Expected a non-negative integer for n, got ${String(n)}`);
54
48
  }
55
49
  const gen = fibonacciGenerator();
@@ -57,19 +51,20 @@ export function fibonacci(n) {
57
51
  return gen.next().value;
58
52
  }
59
53
  /**
60
- * Generate the first `length` Fibonacci numbers as a readonly BigInt array.
61
- *
62
- * @param length - How many Fibonacci numbers to generate (must be a non-negative integer)
63
- * @returns A readonly array of the first `length` Fibonacci numbers as BigInt
64
- * @throws {RangeError} If length is negative, non-integer, NaN, or Infinity
65
- * @remarks Wraps fibonacciGenerator so the sequence is computed once, not per-element
54
+ * Returns the first `length` Fibonacci numbers as a readonly BigInt array
55
+ * @param length - How many Fibonacci numbers to return (must be a non-negative integer)
56
+ * @returns A new array containing the first `length` Fibonacci numbers
57
+ * @throws {RangeError} When length is negative, non-integer, NaN, or Infinity
58
+ * @remarks Delegates to `fibonacciGenerator` so the recurrence logic is defined once.
59
+ * Returns a fresh array on every call callers can safely mutate the result.
66
60
  * @example
67
61
  * ```typescript
68
- * fibonacciSequence(5); // [0n, 1n, 1n, 2n, 3n]
62
+ * fibonacciSequence(0); // []
63
+ * fibonacciSequence(5); // [0n, 1n, 1n, 2n, 3n]
69
64
  * ```
70
65
  */
71
66
  export function fibonacciSequence(length) {
72
- if (!Number.isInteger(length) || length < 0) {
67
+ if (!Number.isFinite(length) || !Number.isInteger(length) || length < 0) {
73
68
  throw new RangeError(`Expected a non-negative integer for length, got ${String(length)}`);
74
69
  }
75
70
  const gen = fibonacciGenerator();
@@ -1 +1 @@
1
- {"version":3,"file":"fibonacci.js","sourceRoot":"","sources":["../../src/utils/fibonacci.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,SAAS,CAAC,CAAC,kBAAkB;IACjC,8GAA8G;IAC9G,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,qFAAqF;IACrF,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,CAAC,CAAC;QACR,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,UAAU,CAClB,8CAA8C,MAAM,CAAC,CAAC,CAAC,EAAE,CAC1D,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;IAEjC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAE5C,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C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;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,UAAU,CAClB,mDAAmD,MAAM,CAAC,MAAM,CAAC,EAAE,CACpE,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;IACjC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC"}
package/package.json CHANGED
@@ -88,7 +88,7 @@
88
88
  "@isaacs/brace-expansion": "^5.0.1"
89
89
  },
90
90
  "name": "@codyswann/lisa",
91
- "version": "1.32.0",
91
+ "version": "1.33.0",
92
92
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
93
93
  "main": "dist/index.js",
94
94
  "bin": {