@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
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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
|
|
13
|
-
*
|
|
14
|
-
* @
|
|
15
|
-
*
|
|
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
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
33
|
-
* @
|
|
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(
|
|
38
|
-
* fibonacci(10)
|
|
39
|
-
* fibonacci(
|
|
31
|
+
* fibonacci(0); // 0n
|
|
32
|
+
* fibonacci(10); // 55n
|
|
33
|
+
* fibonacci(78); // 8944394323791464n — beyond Number.MAX_SAFE_INTEGER
|
|
40
34
|
* ```
|
|
41
35
|
*/
|
|
42
36
|
export declare function fibonacci(n: number): bigint;
|
|
43
37
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* @
|
|
47
|
-
* @
|
|
48
|
-
* @
|
|
49
|
-
*
|
|
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(
|
|
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
|
|
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"}
|
package/dist/utils/fibonacci.js
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file fibonacci.ts
|
|
3
|
-
* @description BigInt Fibonacci utilities
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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
|
|
13
|
-
*
|
|
14
|
-
* @
|
|
15
|
-
*
|
|
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
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @
|
|
41
|
-
* @
|
|
42
|
-
* @
|
|
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(
|
|
47
|
-
* fibonacci(10)
|
|
48
|
-
* fibonacci(
|
|
40
|
+
* fibonacci(0); // 0n
|
|
41
|
+
* fibonacci(10); // 55n
|
|
42
|
+
* fibonacci(78); // 8944394323791464n — beyond 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
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @
|
|
63
|
-
* @
|
|
64
|
-
* @
|
|
65
|
-
*
|
|
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(
|
|
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
|
|
1
|
+
{"version":3,"file":"fibonacci.js","sourceRoot":"","sources":["../../src/utils/fibonacci.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,SAAS,CAAC,CAAC,kBAAkB;IACjC,8GAA8G;IAC9G,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,qFAAqF;IAErF,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;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,UAAU,CAClB,8CAA8C,MAAM,CAAC,CAAC,CAAC,EAAE,CAC1D,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;IACjC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5C,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;;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.
|
|
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": {
|