@planu/cli 5.3.17 → 5.3.19

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 (27) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/config/runtime-policy.json +2 -2
  3. package/dist/engine/planu-core.darwin-arm64.node.manifest.json +7 -7
  4. package/dist/engine/planu-core.darwin-arm64.node.sbom.json +4 -4
  5. package/dist/engine/planu-core.darwin-x64.node.manifest.json +7 -7
  6. package/dist/engine/planu-core.darwin-x64.node.sbom.json +4 -4
  7. package/dist/engine/planu-core.linux-arm64-gnu.node.manifest.json +7 -7
  8. package/dist/engine/planu-core.linux-arm64-gnu.node.sbom.json +4 -4
  9. package/dist/engine/planu-core.linux-arm64-musl.node.manifest.json +7 -7
  10. package/dist/engine/planu-core.linux-arm64-musl.node.sbom.json +4 -4
  11. package/dist/engine/planu-core.linux-x64-gnu.node.manifest.json +7 -7
  12. package/dist/engine/planu-core.linux-x64-gnu.node.sbom.json +4 -4
  13. package/dist/engine/planu-core.linux-x64-musl.node.manifest.json +7 -7
  14. package/dist/engine/planu-core.linux-x64-musl.node.sbom.json +4 -4
  15. package/dist/engine/planu-core.win32-arm64-msvc.node.manifest.json +7 -7
  16. package/dist/engine/planu-core.win32-arm64-msvc.node.sbom.json +4 -4
  17. package/dist/engine/planu-core.win32-x64-msvc.node.manifest.json +7 -7
  18. package/dist/engine/planu-core.win32-x64-msvc.node.sbom.json +4 -4
  19. package/dist/tools/challenge-spec/scenarios-data.js +15 -2
  20. package/dist/tools/validate-lint.js +16 -4
  21. package/dist/types/plugin-configs.d.ts +0 -14
  22. package/package.json +9 -9
  23. package/planu-native.json +1 -1
  24. package/planu-plugin.json +1 -1
  25. package/dist/config/challenge-scenarios.json +0 -114
  26. package/dist/engine/challenge-scenarios-loader.d.ts +0 -46
  27. package/dist/engine/challenge-scenarios-loader.js +0 -83
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [5.3.19] - 2026-08-11
2
+
3
+ ### Bug Fixes
4
+ - fix(spec-1492): size release budgets to the longest child chain per test
5
+ - fix(spec-1492): coordinate release-harness spawn and test budgets
6
+ - fix(spec-1486): raise load-tolerant timeout budgets in script-gate and heartbeat tests
7
+ - fix(spec-1482): update validate.test.ts lint timeout and message assertions per review
8
+ - fix(spec-1482): honor mid-run lint evidence on timeout and right-size lint caps
9
+
10
+ ### Chores
11
+ - chore(spec-1492): record done transition with review and traceability evidence
12
+ - chore(spec-1486): record done transition with traceability and validation evidence
13
+ - chore(spec-1486): approve arbitrated script-gate timeout spec with dual-review evidence
14
+ - chore(spec-1486): add durable-job-heartbeat beforeAll hookTimeout reproducer
15
+ - chore(spec-1482): record done transition with traceability and validation evidence
16
+ - chore(spec-1482): approve arbitrated lint-gate timeout spec with dual-review evidence
17
+
18
+
19
+ ## [5.3.18] - 2026-08-11
20
+
21
+ ### Bug Fixes
22
+ - fix(spec-1476): phrase-bind data-consistency scenario signals and drop dead catalog
23
+
24
+ ### Chores
25
+ - chore(spec-1476): record done transition with validation and review evidence
26
+ - chore(spec-1476): approve spec with arbitrated dual-review evidence and start implementing
27
+
28
+
1
29
  ## [5.3.17] - 2026-08-11
2
30
 
3
31
  ### Bug Fixes
@@ -14,7 +14,7 @@
14
14
  "maximumOutputBufferBytes": 67108864
15
15
  },
16
16
  "lintValidation": {
17
- "defaultTimeoutMs": 90000,
17
+ "defaultTimeoutMs": 180000,
18
18
  "minimumTimeoutMs": 1000,
19
19
  "maximumTimeoutMs": 1800000
20
20
  },
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "validation": {
30
30
  "defaultDeadlineMs": 1800000,
31
- "durableLintTimeoutMs": 150000,
31
+ "durableLintTimeoutMs": 170000,
32
32
  "perGateTimeoutMs": 180000,
33
33
  "complianceCommandTimeoutMs": 900000,
34
34
  "noProgressTimeoutMs": 960000,
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-aarch64-apple-darwin",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-aarch64-apple-darwin",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -17,15 +17,15 @@
17
17
  "platform": "darwin",
18
18
  "arch": "arm64",
19
19
  "libc": null,
20
- "artifactSha256": "bdc99fce3b870c27eafdd54b37d2822c37255eb3694c425ad6b651c6f5b97ac8",
20
+ "artifactSha256": "1f29dabb50c539571c4cd0faa56ddf0229692c0ec2542a15e9ea9124f9ca74e7",
21
21
  "sbom": {
22
22
  "format": "CycloneDX-1.5",
23
23
  "path": "planu-core.darwin-arm64.node.sbom.json",
24
- "sha256": "11343948562c3b7f3bd3c819a0656a2fa9321431e1022850cda9e9ba5320f90c"
24
+ "sha256": "620c8503c3912de3e6b75075689ee5b649c8f6be9962bc21fc8276280b09e279"
25
25
  },
26
26
  "provenance": {
27
27
  "builder": "scripts/build-rust-local.sh",
28
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
28
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
29
29
  "sourceTreeDirty": false,
30
30
  "sourceDateEpoch": 1,
31
31
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -34,6 +34,6 @@
34
34
  "signature": {
35
35
  "algorithm": "Ed25519",
36
36
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
37
- "value": "VfCh5vWrZxDxMM6pCO1dpKf/FxS8hZDqFZlvpwtTd6GweAYf2mzdaWMZkNA/a6r0y7gzGfUVuzplXQ64t2w3Cg=="
37
+ "value": "k9AVxzI04bgfuND1J5nY8MpjxvR6HhT3NGf79eXCj3e0LPkesc0thPA18JeZhiSV7rhHzAG3carMNNCiZ1vfCg=="
38
38
  }
39
39
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "bdc99fce3b870c27eafdd54b37d2822c37255eb3694c425ad6b651c6f5b97ac8"
14
+ "content": "1f29dabb50c539571c4cd0faa56ddf0229692c0ec2542a15e9ea9124f9ca74e7"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-x86_64-apple-darwin",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-x86_64-apple-darwin",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -17,15 +17,15 @@
17
17
  "platform": "darwin",
18
18
  "arch": "x64",
19
19
  "libc": null,
20
- "artifactSha256": "bae60566a531f74f27a61531acb737a62c0b4d2c5d748cd8619421452c355d5e",
20
+ "artifactSha256": "5bebf7e10b2ee79d20a9ceba9312fbb67cfdd73ab79f95097df688d5a265d2e5",
21
21
  "sbom": {
22
22
  "format": "CycloneDX-1.5",
23
23
  "path": "planu-core.darwin-x64.node.sbom.json",
24
- "sha256": "817d459d6609a5434eb192614d137f2fa63e3fd9908587d05207b584eba246eb"
24
+ "sha256": "e089459f8b41d8a9ef8c0e64c5a9b6d862f693c8b1db0cb3415471bf96051f38"
25
25
  },
26
26
  "provenance": {
27
27
  "builder": "scripts/build-rust-local.sh",
28
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
28
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
29
29
  "sourceTreeDirty": false,
30
30
  "sourceDateEpoch": 1,
31
31
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -34,6 +34,6 @@
34
34
  "signature": {
35
35
  "algorithm": "Ed25519",
36
36
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
37
- "value": "HYqjCJjOvAVvkaW7hxI5rJ57eE+48Dd58M+y2/+RU+Qt+ddPDofOh1syhVCQmAHb/1IqORN+/sHSFy/bLK/bAg=="
37
+ "value": "RoGPcSKkwm8KAccKoWPJDVP4us/idkZTkcoEGHIppoLstMsOhsul77ttEVUimGQQGwW3dEsgPYbppsHiRqBDDA=="
38
38
  }
39
39
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "bae60566a531f74f27a61531acb737a62c0b4d2c5d748cd8619421452c355d5e"
14
+ "content": "5bebf7e10b2ee79d20a9ceba9312fbb67cfdd73ab79f95097df688d5a265d2e5"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-aarch64-unknown-linux-gnu",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-aarch64-unknown-linux-gnu",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "arm64",
18
18
  "libc": "glibc",
19
- "artifactSha256": "6079ee86b8ee1e650cfd2602f039eb28d3d91e15d8377e712eb851b3ec4746c4",
19
+ "artifactSha256": "3bae36e956b7ae1000706731713917fdaa24c65ae12907b6852eba1a705accac",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-arm64-gnu.node.sbom.json",
23
- "sha256": "c0fd691552bdaa6095d5c8220a3d7e5679d6f38ddc22919a552c0e98ad53d734"
23
+ "sha256": "171d4acf8dccf16b0bf0748ed4fed01a9448fa43a4e50deb007b3cd52185feac"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
27
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "85bAzK82CMXtjrkBbdc3D8X+9wN4/tsyeTzr/MZ5BmyWAe1D4jikLwJ4SW+ioyS+dDshLRCUgrUXSIUsjj0PAg=="
36
+ "value": "XxTKMBfrdh1tWiGdgZ4bKrI8Ky5c/nP/vuxbK7EC1Aq+YZtioEgCgfBdBI5w4uyw8p1GXoBBhQx9fTIq2pL0Bg=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "6079ee86b8ee1e650cfd2602f039eb28d3d91e15d8377e712eb851b3ec4746c4"
14
+ "content": "3bae36e956b7ae1000706731713917fdaa24c65ae12907b6852eba1a705accac"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-aarch64-unknown-linux-musl",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-aarch64-unknown-linux-musl",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "arm64",
18
18
  "libc": "musl",
19
- "artifactSha256": "e6ee0ad20445313dbed5b14cbd5333a49ae08197ba4fa642e7292ff23bcbb2cf",
19
+ "artifactSha256": "b8ea8cacc4350859fd4fb3bd81c6101e649137c65b6bb5440909bb51d0c37fcb",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-arm64-musl.node.sbom.json",
23
- "sha256": "e2a76a395f0d058a97fd17388b74530059c4c80800515463480c73849b01659a"
23
+ "sha256": "fd28a7413c135a39576a1056a5deead78338371e8073fd20b6abd199845411a2"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
27
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "LUWtVfzWce5DbAtjGkmxVudiKCoD8sqcxuzz7wG1uUCyrZ8rMN7foWoytKdNdID7if12WlSVvFDME63D9Ls/BA=="
36
+ "value": "o7uTG1xKYJ+riU+mv007RF+WYaEjDsRaO4IZcSe5WPixwGPpRWvwlpLfR48jcAq3WvnLl2a4mgV32OJNiFgRCw=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "e6ee0ad20445313dbed5b14cbd5333a49ae08197ba4fa642e7292ff23bcbb2cf"
14
+ "content": "b8ea8cacc4350859fd4fb3bd81c6101e649137c65b6bb5440909bb51d0c37fcb"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-x86_64-unknown-linux-gnu",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-x86_64-unknown-linux-gnu",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "x64",
18
18
  "libc": "glibc",
19
- "artifactSha256": "b10b9708c07c07e43b9acc098dc7887b4940bedad5e4e85ac4062b554100cd59",
19
+ "artifactSha256": "24e74e2c669c2a68b3b35874d6bd65d2b22c51ecc308dde4e203727b45af34ac",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-x64-gnu.node.sbom.json",
23
- "sha256": "b05d18430dca3a6fb1ba1c2e493326d2cd2f6072d469721c31088811efb6274d"
23
+ "sha256": "276a8cafd588761c52939bb47de450d95227b6059768760f20a8897ca4738f3e"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
27
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "1R1IPcr3P53ndUQe0CtgdHIKbrMFWNMDTNiPjcabQavBBnisW6crL1EcueYHY+1hiMMcRRX8j3OXCrzteE/wAw=="
36
+ "value": "y2qW0O1YsGy1zVa9o85ZsxfAkvkMH1qez8hihVbF2HSoeDoZCKpHBEC3gODewKem4FcerHydbf22hJzw8fQ7Ag=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "b10b9708c07c07e43b9acc098dc7887b4940bedad5e4e85ac4062b554100cd59"
14
+ "content": "24e74e2c669c2a68b3b35874d6bd65d2b22c51ecc308dde4e203727b45af34ac"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-x86_64-unknown-linux-musl",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-x86_64-unknown-linux-musl",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "linux",
17
17
  "arch": "x64",
18
18
  "libc": "musl",
19
- "artifactSha256": "e32cde49858959e41c0df273dcb2e7c49412c4432ae983f358c19c6f8f705796",
19
+ "artifactSha256": "bcf8d3bb268ed20fe1c1b2619e284445303c049108270dc594904f4c962dfd5d",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.linux-x64-musl.node.sbom.json",
23
- "sha256": "2d4f452d04f8d5e536ae26d5e0321d0bc3d61a87b62b4833edd80ed2a6a5e98f"
23
+ "sha256": "95d23130209a76b4f1110c40e0a80480edc7e01470b0a8022b486e169ade12dd"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
27
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "hl7v/J/DAlDB3yKZ6KPCBz78JEXS6/Y77mT7dM3Q5xABC13P6gTFl4/ts6HFQBC/ILPBJAIe+M2jjNVXPTJRAg=="
36
+ "value": "n8r1wcRsd2/3j03/G6HQsvBfozDUGYh4r2um6IJY9Lt9fi8DjmQZh8tTDxkIN4AspCa7+ZzLv2w7xGSHd4CnCw=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "e32cde49858959e41c0df273dcb2e7c49412c4432ae983f358c19c6f8f705796"
14
+ "content": "bcf8d3bb268ed20fe1c1b2619e284445303c049108270dc594904f4c962dfd5d"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-aarch64-pc-windows-msvc",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-aarch64-pc-windows-msvc",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "win32",
17
17
  "arch": "arm64",
18
18
  "libc": null,
19
- "artifactSha256": "abe713832d59d280780993de17bfe271501f3c6e368cc7660fd73cfe448f855b",
19
+ "artifactSha256": "cd4ce0597447372d8e88d0e4f64e02d249691e956775f7f37d5688f0f5bb2c96",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.win32-arm64-msvc.node.sbom.json",
23
- "sha256": "fedb07ccec7d0db216ee7cf665995024312f4222579437d1b2f4dd99f024f6d9"
23
+ "sha256": "e6d80cbdbac2a647206fa053b628d045a5529393cb44821d67cd35e569ced76d"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
27
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "cvRigJR42Bz/XnqcHBVMdkfCDTUK3468XFQxFJfwA+dgdffXXne/hZYvu2+Qtc5VDPh+VI/gDgy4S+JjNjXIAw=="
36
+ "value": "Q6ts91GmwqdSwLe1GvNRHFSsCGykhIzWc5O3IwpHnNZFfDz3LTH2Ja0Fxb/k7FSHpz4UyYnmPt3HwB/6j7y/AQ=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "abe713832d59d280780993de17bfe271501f3c6e368cc7660fd73cfe448f855b"
14
+ "content": "cd4ce0597447372d8e88d0e4f64e02d249691e956775f7f37d5688f0f5bb2c96"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
- "cliVersion": "5.3.17",
4
- "engineVersion": "5.3.17",
5
- "buildId": "1-5.3.17-x86_64-pc-windows-msvc",
3
+ "cliVersion": "5.3.19",
4
+ "engineVersion": "5.3.19",
5
+ "buildId": "1-5.3.19-x86_64-pc-windows-msvc",
6
6
  "protocolAbi": 1,
7
7
  "capabilityAbi": 2,
8
8
  "nodeApiAbi": 4,
@@ -16,15 +16,15 @@
16
16
  "platform": "win32",
17
17
  "arch": "x64",
18
18
  "libc": null,
19
- "artifactSha256": "142bcb2e061e280bf04929920bd88189ad37b14913f39bdd499bf45e287a53eb",
19
+ "artifactSha256": "52f66ae85f8307c276934133b19976072b258cdb4f94d961d57576236ab3022c",
20
20
  "sbom": {
21
21
  "format": "CycloneDX-1.5",
22
22
  "path": "planu-core.win32-x64-msvc.node.sbom.json",
23
- "sha256": "e2345850af3b261c8eac493694d218e9b770c1deeac3131bf62e55655054b29f"
23
+ "sha256": "bb2a21e048c3c9eaa0b97a637028c4380383188ea5250744970b5e7e7951deb1"
24
24
  },
25
25
  "provenance": {
26
26
  "builder": "scripts/build-rust-local.sh",
27
- "sourceCommit": "903b141393635e71607722637a08977e153b8b56",
27
+ "sourceCommit": "e9af0aeaf88c4328b735fb324d518b1b1804e948",
28
28
  "sourceTreeDirty": false,
29
29
  "sourceDateEpoch": 1,
30
30
  "rustToolchain": "rustc 1.95.0 (59807616e 2026-04-14)",
@@ -33,6 +33,6 @@
33
33
  "signature": {
34
34
  "algorithm": "Ed25519",
35
35
  "keyId": "e2ee765cb5ad9fbdc433ece332bce26d746d5e350b3acde0721a4c8c6337ff7b",
36
- "value": "IQNeo8h8MLaX/wTJMVV3zdR1F1gX7oV9gLw58botIZo4c/OKtyXpiTQ3iRhXu/hpNQ1rs+hSb7C0AWCt+u6nAA=="
36
+ "value": "gP3XXy5qnghDAD21CrkLi1sw/adG+TqD1e/bxdAucDMc9+piwOyosQZe3+Ou/wYTZKgZddL2iZnHJzUA1FlDAA=="
37
37
  }
38
38
  }
@@ -4,14 +4,14 @@
4
4
  "version": 1,
5
5
  "metadata": {
6
6
  "component": {
7
- "bom-ref": "pkg:cargo/planu-core@5.3.17",
7
+ "bom-ref": "pkg:cargo/planu-core@5.3.19",
8
8
  "type": "library",
9
9
  "name": "planu-core",
10
- "version": "5.3.17",
10
+ "version": "5.3.19",
11
11
  "hashes": [
12
12
  {
13
13
  "alg": "SHA-256",
14
- "content": "142bcb2e061e280bf04929920bd88189ad37b14913f39bdd499bf45e287a53eb"
14
+ "content": "52f66ae85f8307c276934133b19976072b258cdb4f94d961d57576236ab3022c"
15
15
  }
16
16
  ]
17
17
  }
@@ -1106,7 +1106,7 @@
1106
1106
  "dependsOn": []
1107
1107
  },
1108
1108
  {
1109
- "ref": "pkg:cargo/planu-core@5.3.17",
1109
+ "ref": "pkg:cargo/planu-core@5.3.19",
1110
1110
  "dependsOn": [
1111
1111
  "pkg:cargo/core-foundation@0.10.1",
1112
1112
  "pkg:cargo/hmac@0.12.1",
@@ -1,12 +1,25 @@
1
1
  // tools/challenge-spec/scenarios-data.ts — Data consistency and partial write scenarios
2
2
  import { contentMentions, hasAnyAffirmedMatch } from './scenarios-utils.js';
3
+ const GIT_CHECKOUT_PREFIX = '(?<!\\b(?:git|branch|worktree|main)\\s)';
3
4
  const WRITE_SIGNALS = [
4
5
  /\b(transaction|persist|database write|save record|create record|update record|delete record)\b/i,
5
- /\b(order|checkout|submit form|mutation|multi-step write)\b/i,
6
+ /\bsubmit\s+form\b/i,
7
+ /\bmulti-step\s+write\b/i,
8
+ /\bdata\s+mutation\b/i,
9
+ /\bplaces?\s+an\s+order\b/i,
10
+ new RegExp(`${GIT_CHECKOUT_PREFIX}\\bcheckout\\s+(?:flow|process|order|endpoint)\\b`, 'i'),
6
11
  ];
7
12
  const CACHE_SIGNALS = [/\b(cache|cached|real-time|realtime|websocket|stale data)\b/i];
8
13
  const DUPLICATE_OPERATION_SIGNALS = [
9
- /\b(submit|form|checkout|order|payment|create record|mutation|button click)\b/i,
14
+ /\bsubmit(?:s|ted|ting)?\s+(?:a\s+|the\s+)?form\b/i,
15
+ /\bform\s+submission\b/i,
16
+ /\bbutton\s+click\b/i,
17
+ /\bdouble[ -]?click\b/i,
18
+ /\buser\s+submits?\b/i,
19
+ /\b(?:order|submit|checkout|payment|purchase)\s+button\b/i,
20
+ /\bplaces?\s+an\s+order\b/i,
21
+ new RegExp(`${GIT_CHECKOUT_PREFIX}\\bcheckout\\s+(?:flow|page|process|endpoint|order)\\b`, 'i'),
22
+ /\bpayment\s+(?:flow|submission|mutation)\b/i,
10
23
  /\bduplicate\s+(?:request|submission|operation|record)\b/i,
11
24
  ];
12
25
  export function generateDataConsistencyScenarios(_spec, content, _knowledge) {
@@ -110,9 +110,21 @@ export async function runLintCheck(projectPath, lintCommand, context = {}) {
110
110
  catch (err) {
111
111
  if (isCommandTimeout(err)) {
112
112
  const seconds = Math.round(timeoutMs / 1000);
113
- const output = `Lint command timed out after ${String(seconds)}s and was skipped so validate can complete within MCP request limits. ` +
114
- `Run \`${plan.executedCommand}\` manually before marking the spec done, or set PLANU_VALIDATE_LINT_TIMEOUT_MS for an explicit full lint pass.`;
115
113
  console.warn(`[Planu] lintCheck timed out: command="${plan.executedCommand}" cwd="${projectPath}" timeoutMs=${String(timeoutMs)}`);
114
+ if (context.projectId) {
115
+ const receipt = readMatchingValidationEvidence(context.projectId, evidenceInput);
116
+ if (receipt) {
117
+ return {
118
+ passed: true,
119
+ command,
120
+ issueCount: 0,
121
+ output: `(reused lint evidence ${receipt.key} recorded ${receipt.completedAt} after in-run timeout)`,
122
+ };
123
+ }
124
+ }
125
+ const output = `Lint gate failed: lint timed out after ${String(seconds)}s and could not be verified. ` +
126
+ 'Validate reuses recorded lint evidence for an unchanged tree on the next run, so re-running validate after a successful in-process lint pass clears the gate. ' +
127
+ 'PLANU_VALIDATE_LINT_TIMEOUT_MS only applies when the MCP server process is started with it set.';
116
128
  if (context.projectId) {
117
129
  recordValidationOutcome({
118
130
  projectId: context.projectId,
@@ -123,8 +135,8 @@ export async function runLintCheck(projectPath, lintCommand, context = {}) {
123
135
  durationMs: timeoutMs,
124
136
  output,
125
137
  reason: context.specId
126
- ? `Lint exceeded its deadline while validating ${context.specId}; the degraded result is non-blocking.`
127
- : 'Lint exceeded its canonical deadline; the degraded result is non-blocking.',
138
+ ? `Lint exceeded its deadline while validating ${context.specId}; the gate remains failing until lint evidence exists.`
139
+ : 'Lint exceeded its canonical deadline; the gate remains failing until lint evidence exists.',
128
140
  source: 'local:planu-validate',
129
141
  });
130
142
  }
@@ -5,20 +5,6 @@ export interface AcGapKeywordGroup {
5
5
  language: string;
6
6
  keywords: string[];
7
7
  }
8
- export interface ChallengeScenarioPattern {
9
- id: string;
10
- category: string;
11
- triggerKeywords: string[];
12
- scenario: string;
13
- probability: 'low' | 'medium' | 'high';
14
- impact: 'low' | 'medium' | 'high' | 'critical';
15
- handlingKeywords: string[];
16
- handlingFound: string;
17
- handlingMissing: string;
18
- requiredHandling: string;
19
- dataConsistency: string;
20
- userExperience: string;
21
- }
22
8
  export interface CodeQualityThreshold {
23
9
  id: string;
24
10
  language: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "5.3.17",
3
+ "version": "5.3.19",
4
4
  "description": "Planu — MCP Server for Spec Driven Development with native Rust acceleration for hot paths. Cross-platform (Linux/macOS/Windows, x64/arm64, glibc/musl).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,14 +35,14 @@
35
35
  "packageName": "@planu/core"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@planu/core-darwin-arm64": "5.3.17",
39
- "@planu/core-darwin-x64": "5.3.17",
40
- "@planu/core-linux-arm64-gnu": "5.3.17",
41
- "@planu/core-linux-arm64-musl": "5.3.17",
42
- "@planu/core-linux-x64-gnu": "5.3.17",
43
- "@planu/core-linux-x64-musl": "5.3.17",
44
- "@planu/core-win32-arm64-msvc": "5.3.17",
45
- "@planu/core-win32-x64-msvc": "5.3.17"
38
+ "@planu/core-darwin-arm64": "5.3.19",
39
+ "@planu/core-darwin-x64": "5.3.19",
40
+ "@planu/core-linux-arm64-gnu": "5.3.19",
41
+ "@planu/core-linux-arm64-musl": "5.3.19",
42
+ "@planu/core-linux-x64-gnu": "5.3.19",
43
+ "@planu/core-linux-x64-musl": "5.3.19",
44
+ "@planu/core-win32-arm64-msvc": "5.3.19",
45
+ "@planu/core-win32-x64-msvc": "5.3.19"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=24.0.0"
package/planu-native.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dev.planu.native",
3
3
  "displayName": "Planu Native Lightweight Surface",
4
- "version": "5.3.17",
4
+ "version": "5.3.19",
5
5
  "packageName": "@planu/cli",
6
6
  "modes": {
7
7
  "lightweight": {
package/planu-plugin.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dev.planu.cli",
3
3
  "displayName": "Planu — Spec Driven Development",
4
4
  "description": "Manage software specs, estimations, and autonomous SDD workflows. Language-agnostic MCP server for Claude Code.",
5
- "version": "5.3.17",
5
+ "version": "5.3.19",
6
6
  "icon": "assets/plugin/icon.svg",
7
7
  "command": ["npx", "@planu/cli@latest"],
8
8
  "packageName": "@planu/cli",
@@ -1,114 +0,0 @@
1
- [
2
- {
3
- "id": "data-partial-write",
4
- "category": "data-consistency",
5
- "triggerKeywords": ["transaction", "update", "create", "modify", "save"],
6
- "scenario": "Partial write: server crashes mid-transaction",
7
- "probability": "low",
8
- "impact": "critical",
9
- "handlingKeywords": ["transaction", "atomic", "rollback"],
10
- "handlingFound": "Transactions mentioned",
11
- "handlingMissing": "Not addressed",
12
- "requiredHandling": "Wrap multi-step writes in database transactions. Implement saga pattern for distributed operations.",
13
- "dataConsistency": "ACID properties must be maintained. No orphaned records.",
14
- "userExperience": "Transparent: user sees either success or clean failure with clear error message."
15
- },
16
- {
17
- "id": "data-stale-cache",
18
- "category": "data-consistency",
19
- "triggerKeywords": ["cache", "real-time", "concurrent"],
20
- "scenario": "Stale data served from cache after underlying data changes",
21
- "probability": "high",
22
- "impact": "medium",
23
- "handlingKeywords": ["invalidat", "ttl", "websocket", "real-time"],
24
- "handlingFound": "Some cache strategy mentioned",
25
- "handlingMissing": "Not addressed",
26
- "requiredHandling": "Implement cache invalidation on writes. Use TTL for time-sensitive data. Consider event-driven invalidation.",
27
- "dataConsistency": "Define acceptable staleness window per data type. Document cache strategy.",
28
- "userExperience": "Show \"last updated\" timestamp. Offer manual refresh option."
29
- },
30
- {
31
- "id": "data-duplicate-submit",
32
- "category": "data-consistency",
33
- "triggerKeywords": [],
34
- "scenario": "User double-clicks submit, causing duplicate records",
35
- "probability": "high",
36
- "impact": "medium",
37
- "handlingKeywords": ["idempoten", "debounce", "disable", "lock"],
38
- "handlingFound": "Some prevention mentioned",
39
- "handlingMissing": "Not addressed",
40
- "requiredHandling": "Implement idempotency keys for mutations. Disable submit button on click. Use unique constraints in DB.",
41
- "dataConsistency": "No duplicate records from repeated submissions.",
42
- "userExperience": "Button disabled during submission. Clear success/error feedback."
43
- },
44
- {
45
- "id": "security-auth-bypass",
46
- "category": "security",
47
- "triggerKeywords": ["auth", "login", "user", "permission", "role"],
48
- "scenario": "Unauthorized access attempt / authentication bypass",
49
- "probability": "high",
50
- "impact": "critical",
51
- "handlingKeywords": ["auth", "jwt", "session", "middleware"],
52
- "handlingFound": "Authentication mentioned",
53
- "handlingMissing": "No explicit auth handling",
54
- "requiredHandling": "Validate auth tokens on every request. Implement RBAC. Never trust client-side auth state.",
55
- "dataConsistency": "Ensure RLS policies are enabled. No data leak through unauthorized queries.",
56
- "userExperience": "Redirect to login on 401. Clear error messages without leaking implementation details."
57
- },
58
- {
59
- "id": "security-injection",
60
- "category": "security",
61
- "triggerKeywords": ["input", "form", "query", "search", "user"],
62
- "scenario": "SQL injection / XSS / command injection via user input",
63
- "probability": "high",
64
- "impact": "critical",
65
- "handlingKeywords": ["sanitiz", "escap", "parameterized", "prepared"],
66
- "handlingFound": "Some sanitization mentioned",
67
- "handlingMissing": "Not explicitly addressed",
68
- "requiredHandling": "Use parameterized queries (never string concatenation). Sanitize HTML output. Use CSP headers.",
69
- "dataConsistency": "Injection can corrupt or exfiltrate data. Use least-privilege DB connections.",
70
- "userExperience": "Transparent to user. Invalid input is silently sanitized."
71
- },
72
- {
73
- "id": "scale-high-traffic",
74
- "category": "scale",
75
- "triggerKeywords": ["user", "request", "api", "endpoint"],
76
- "scenario": "Traffic spike: 10x normal load in 60 seconds",
77
- "probability": "medium",
78
- "impact": "critical",
79
- "handlingKeywords": ["rate-limit", "throttl", "queue", "cache", "cdn", "auto-scal"],
80
- "handlingFound": "Some scaling strategy mentioned",
81
- "handlingMissing": "No scaling strategy defined",
82
- "requiredHandling": "Define rate limits per user and per IP. Implement request queuing for expensive operations. Use CDN for static assets.",
83
- "dataConsistency": "Eventual consistency acceptable under load. No data loss.",
84
- "userExperience": "Graceful degradation. Show 'service busy' instead of 500 errors."
85
- },
86
- {
87
- "id": "failure-network-timeout",
88
- "category": "failure",
89
- "triggerKeywords": ["api", "external", "service", "http", "fetch"],
90
- "scenario": "External API or service becomes unavailable / times out",
91
- "probability": "medium",
92
- "impact": "high",
93
- "handlingKeywords": ["timeout", "retry", "fallback", "circuit-breaker", "circuit breaker"],
94
- "handlingFound": "Timeout/retry strategy mentioned",
95
- "handlingMissing": "No timeout or fallback defined",
96
- "requiredHandling": "Set explicit timeouts on all external calls. Implement exponential backoff. Define fallback behavior (cached data, graceful degradation).",
97
- "dataConsistency": "Operations that fail mid-way must be idempotent or rolled back.",
98
- "userExperience": "Show cached/stale data with staleness indicator. Never hang indefinitely."
99
- },
100
- {
101
- "id": "failure-disk-full",
102
- "category": "failure",
103
- "triggerKeywords": ["file", "upload", "storage", "media", "image"],
104
- "scenario": "Storage exhaustion: disk full or quota exceeded",
105
- "probability": "low",
106
- "impact": "high",
107
- "handlingKeywords": ["quota", "limit", "storage", "disk"],
108
- "handlingFound": "Storage limits mentioned",
109
- "handlingMissing": "No storage limit handling",
110
- "requiredHandling": "Check available space before writes. Implement quota enforcement. Alert when approaching limits.",
111
- "dataConsistency": "Partial uploads must be cleaned up. No orphaned files.",
112
- "userExperience": "Clear error: 'Storage quota exceeded. Please free up space.' with actionable next step."
113
- }
114
- ]
@@ -1,46 +0,0 @@
1
- import { z } from 'zod';
2
- import type { ChallengeScenarioPattern } from '../types/index.js';
3
- export declare const ChallengeScenarioPatternSchema: z.ZodObject<{
4
- id: z.ZodString;
5
- category: z.ZodString;
6
- triggerKeywords: z.ZodArray<z.ZodString>;
7
- scenario: z.ZodString;
8
- probability: z.ZodEnum<{
9
- high: "high";
10
- low: "low";
11
- medium: "medium";
12
- }>;
13
- impact: z.ZodEnum<{
14
- critical: "critical";
15
- high: "high";
16
- low: "low";
17
- medium: "medium";
18
- }>;
19
- handlingKeywords: z.ZodArray<z.ZodString>;
20
- handlingFound: z.ZodString;
21
- handlingMissing: z.ZodString;
22
- requiredHandling: z.ZodString;
23
- dataConsistency: z.ZodString;
24
- userExperience: z.ZodString;
25
- }, z.core.$strip>;
26
- export type { ChallengeScenarioPattern };
27
- /**
28
- * Load all challenge scenario patterns from the 3-layer config system.
29
- */
30
- export declare function loadScenarioPatterns(projectHash?: string): ChallengeScenarioPattern[];
31
- /**
32
- * Filter patterns that are triggered by content of the spec.
33
- * A pattern is triggered if ANY of its triggerKeywords appear in specContent,
34
- * OR if it has no trigger keywords (always-on scenarios).
35
- */
36
- export declare function getTriggeredPatterns(specContent: string, projectHash?: string): ChallengeScenarioPattern[];
37
- /**
38
- * Get patterns filtered by category.
39
- */
40
- export declare function getPatternsByCategory(category: string, projectHash?: string): ChallengeScenarioPattern[];
41
- /**
42
- * Determine currentHandling label based on whether the spec content
43
- * includes any of the pattern's handlingKeywords.
44
- */
45
- export declare function resolveHandlingLabel(pattern: ChallengeScenarioPattern, specContent: string): string;
46
- //# sourceMappingURL=challenge-scenarios-loader.d.ts.map
@@ -1,83 +0,0 @@
1
- // engine/challenge-scenarios-loader.ts — Challenge scenario pattern library (SPEC-214)
2
- //
3
- // Loads challenge scenario patterns from the 3-layer config system.
4
- // Source: src/config/challenge-scenarios.json (system defaults)
5
- // Override: data/global/challenge-scenarios-custom.json
6
- // data/projects/{hash}/config/challenge-scenarios-overrides.json
7
- //
8
- // Scenarios can be extended via JSON without modifying TypeScript source files.
9
- import { z } from 'zod';
10
- import { ConfigLoader } from './config-loader.js';
11
- // ---------------------------------------------------------------------------
12
- // Schema
13
- // ---------------------------------------------------------------------------
14
- export const ChallengeScenarioPatternSchema = z.object({
15
- id: z.string().min(1).describe('Unique scenario pattern identifier'),
16
- category: z
17
- .string()
18
- .min(1)
19
- .describe('Scenario category: data-consistency, security, scale, failure, etc.'),
20
- triggerKeywords: z
21
- .array(z.string())
22
- .describe('Keywords in spec content that activate this scenario'),
23
- scenario: z.string().min(1).describe('Short description of the failure scenario'),
24
- probability: z.enum(['low', 'medium', 'high']).describe('Probability of this failure occurring'),
25
- impact: z.enum(['low', 'medium', 'high', 'critical']).describe('Impact if this failure occurs'),
26
- handlingKeywords: z
27
- .array(z.string())
28
- .describe('Keywords that indicate the spec already addresses this scenario'),
29
- handlingFound: z.string().describe('Message when handling is detected in spec'),
30
- handlingMissing: z.string().describe('Message when handling is absent from spec'),
31
- requiredHandling: z.string().describe('What the spec should implement to handle this scenario'),
32
- dataConsistency: z.string().describe('Data consistency requirements for this scenario'),
33
- userExperience: z.string().describe('Expected user experience for this scenario'),
34
- });
35
- const patternsArraySchema = z.array(ChallengeScenarioPatternSchema);
36
- // ---------------------------------------------------------------------------
37
- // Loader singleton
38
- // ---------------------------------------------------------------------------
39
- let _loader = null;
40
- function getLoader() {
41
- _loader ??= new ConfigLoader('challenge-scenarios', patternsArraySchema);
42
- return _loader;
43
- }
44
- // ---------------------------------------------------------------------------
45
- // Public API
46
- // ---------------------------------------------------------------------------
47
- /**
48
- * Load all challenge scenario patterns from the 3-layer config system.
49
- */
50
- export function loadScenarioPatterns(projectHash) {
51
- return getLoader().load(projectHash);
52
- }
53
- /**
54
- * Filter patterns that are triggered by content of the spec.
55
- * A pattern is triggered if ANY of its triggerKeywords appear in specContent,
56
- * OR if it has no trigger keywords (always-on scenarios).
57
- */
58
- export function getTriggeredPatterns(specContent, projectHash) {
59
- const lower = specContent.toLowerCase();
60
- const all = loadScenarioPatterns(projectHash);
61
- return all.filter((pattern) => {
62
- if (pattern.triggerKeywords.length === 0) {
63
- return true; // always-on pattern
64
- }
65
- return pattern.triggerKeywords.some((kw) => lower.includes(kw.toLowerCase()));
66
- });
67
- }
68
- /**
69
- * Get patterns filtered by category.
70
- */
71
- export function getPatternsByCategory(category, projectHash) {
72
- return loadScenarioPatterns(projectHash).filter((p) => p.category === category);
73
- }
74
- /**
75
- * Determine currentHandling label based on whether the spec content
76
- * includes any of the pattern's handlingKeywords.
77
- */
78
- export function resolveHandlingLabel(pattern, specContent) {
79
- const lower = specContent.toLowerCase();
80
- const addressed = pattern.handlingKeywords.some((kw) => lower.includes(kw.toLowerCase()));
81
- return addressed ? pattern.handlingFound : pattern.handlingMissing;
82
- }
83
- //# sourceMappingURL=challenge-scenarios-loader.js.map