gemstack-ai 1.3.0 → 2.0.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.
Files changed (71) hide show
  1. package/.agents/rules/03-gemstack-security.md +2 -2
  2. package/.gemstack/state.json +7 -8
  3. package/CHANGELOG.md +87 -0
  4. package/CONTRIBUTING.md +1 -1
  5. package/README.md +113 -22
  6. package/RELEASE_NOTES.md +80 -1
  7. package/handoff.md +33 -19
  8. package/package.json +4 -3
  9. package/scripts/ci/check-package-contents.js +1 -1
  10. package/scripts/ci/check-secrets.js +84 -0
  11. package/specs/009-context-capsule/context-capsule.json +4 -4
  12. package/specs/010-agent-swarm-visual-qa/.gemstack.json +5 -0
  13. package/specs/010-agent-swarm-visual-qa/closure.json +59 -0
  14. package/specs/010-agent-swarm-visual-qa/plan.md +759 -0
  15. package/specs/010-agent-swarm-visual-qa/spec.md +842 -0
  16. package/specs/010-agent-swarm-visual-qa/swarm.json +49 -0
  17. package/specs/010-agent-swarm-visual-qa/tasks.md +873 -0
  18. package/specs/010-agent-swarm-visual-qa/visual-qa.json +41 -0
  19. package/specs/011-gemstack-2.0-hardening/.gemstack.json +5 -0
  20. package/specs/011-gemstack-2.0-hardening/closure.json +58 -0
  21. package/specs/011-gemstack-2.0-hardening/plan.md +210 -0
  22. package/specs/011-gemstack-2.0-hardening/spec.md +277 -0
  23. package/specs/011-gemstack-2.0-hardening/tasks.md +59 -0
  24. package/specs/012-gemstack-2.0-honest-evidence/.gemstack.json +5 -0
  25. package/specs/012-gemstack-2.0-honest-evidence/closure.json +58 -0
  26. package/specs/012-gemstack-2.0-honest-evidence/plan.md +202 -0
  27. package/specs/012-gemstack-2.0-honest-evidence/spec.md +222 -0
  28. package/specs/012-gemstack-2.0-honest-evidence/tasks.md +99 -0
  29. package/specs/013-gemstack-2.0-adaptable-sdd/.gemstack.json +9 -0
  30. package/specs/013-gemstack-2.0-adaptable-sdd/closure.json +58 -0
  31. package/specs/013-gemstack-2.0-adaptable-sdd/context-capsule.json +227 -0
  32. package/specs/013-gemstack-2.0-adaptable-sdd/plan.md +179 -0
  33. package/specs/013-gemstack-2.0-adaptable-sdd/spec.md +212 -0
  34. package/specs/013-gemstack-2.0-adaptable-sdd/tasks.md +90 -0
  35. package/specs/014-gemstack-2.0-context-memory/.gemstack.json +9 -0
  36. package/specs/014-gemstack-2.0-context-memory/closure.json +58 -0
  37. package/specs/014-gemstack-2.0-context-memory/plan.md +161 -0
  38. package/specs/014-gemstack-2.0-context-memory/spec.md +163 -0
  39. package/specs/014-gemstack-2.0-context-memory/tasks.md +79 -0
  40. package/src/cli.js +11 -0
  41. package/src/commands/context.js +1 -1
  42. package/src/commands/doctor.js +18 -0
  43. package/src/commands/hooks.js +98 -14
  44. package/src/commands/init.js +1 -1
  45. package/src/commands/install.js +174 -49
  46. package/src/commands/spec.js +105 -0
  47. package/src/commands/swarm.js +111 -0
  48. package/src/commands/update.js +1 -1
  49. package/src/commands/verify.js +48 -0
  50. package/src/commands/visual.js +82 -0
  51. package/src/lib/backup.js +3 -3
  52. package/src/lib/closure-context.js +9 -1
  53. package/src/lib/context-fatigue.js +165 -0
  54. package/src/lib/contract-amendments.js +109 -0
  55. package/src/lib/dependency-audit.js +202 -0
  56. package/src/lib/filesystem-safe.js +85 -15
  57. package/src/lib/memory-audit.js +121 -0
  58. package/src/lib/provider-boundary.js +5 -1
  59. package/src/lib/provider-registry.js +6 -4
  60. package/src/lib/safety-gates.js +176 -8
  61. package/src/lib/sdd-rigor.js +181 -0
  62. package/src/lib/spec-delta.js +194 -0
  63. package/src/lib/spec-merge.js +168 -0
  64. package/src/lib/swarm.js +639 -0
  65. package/src/lib/visual-qa.js +652 -0
  66. package/template/.agents/rules/03-gemstack-security.md +2 -2
  67. package/.github/workflows/main-ci.yml +0 -32
  68. package/.github/workflows/pr-ci.yml +0 -31
  69. package/.github/workflows/publish.yml +0 -52
  70. package/.github/workflows/release-readiness.yml +0 -43
  71. package/gemstack-ai-1.3.0.tgz +0 -0
@@ -0,0 +1,84 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const { detectSecrets } = require('../../src/commands/hooks');
4
+
5
+ const rootDir = path.resolve(__dirname, '../../');
6
+
7
+ const IGNORED_DIRS = new Set([
8
+ '.git',
9
+ 'node_modules',
10
+ '.gemstack',
11
+ 'tests'
12
+ ]);
13
+
14
+ const IGNORED_FILES = new Set([
15
+ 'package-lock.json',
16
+ 'check-secrets.js',
17
+ 'security-p0-hardening.test.js' // Contains test patterns
18
+ ]);
19
+
20
+ const BINARY_EXTENSIONS = new Set([
21
+ '.png', '.jpg', '.jpeg', '.gif', '.ico', '.pdf', '.zip', '.tar', '.gz', '.tgz', '.sqlite', '.db'
22
+ ]);
23
+
24
+ function walkDirectory(dir, fileList = []) {
25
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
26
+ for (const entry of entries) {
27
+ const fullPath = path.join(dir, entry.name);
28
+ const relPath = path.relative(rootDir, fullPath).replace(/\\/g, '/');
29
+
30
+ if (entry.isDirectory()) {
31
+ if (!IGNORED_DIRS.has(entry.name)) {
32
+ walkDirectory(fullPath, fileList);
33
+ }
34
+ } else if (entry.isFile()) {
35
+ if (!IGNORED_FILES.has(entry.name) && !BINARY_EXTENSIONS.has(path.extname(entry.name).toLowerCase())) {
36
+ fileList.push(fullPath);
37
+ }
38
+ }
39
+ }
40
+ return fileList;
41
+ }
42
+
43
+ function runSecretsCheck() {
44
+ const files = walkDirectory(rootDir);
45
+ let violations = [];
46
+
47
+ for (const filePath of files) {
48
+ const relPath = path.relative(rootDir, filePath).replace(/\\/g, '/');
49
+ // Skip demo-app test fixtures or node_modules
50
+ if (relPath.includes('node_modules/') || relPath.includes('fixtures/')) {
51
+ continue;
52
+ }
53
+
54
+ try {
55
+ const content = fs.readFileSync(filePath, 'utf8');
56
+ const detected = detectSecrets(content);
57
+ if (detected.length > 0) {
58
+ for (const d of detected) {
59
+ violations.push({
60
+ file: relPath,
61
+ line: d.lineNumber,
62
+ type: d.type,
63
+ description: d.description,
64
+ snippet: d.lineSnippet
65
+ });
66
+ }
67
+ }
68
+ } catch (e) {
69
+ // Non-text file or read error, skip
70
+ }
71
+ }
72
+
73
+ if (violations.length > 0) {
74
+ console.error(`\n❌ [FAIL] ${violations.length} secret(s) detected in repository files:`);
75
+ for (const v of violations) {
76
+ console.error(` - ${v.file}:${v.line} [${v.type}] ${v.description}`);
77
+ }
78
+ process.exit(1);
79
+ } else {
80
+ console.log('[OK] Zero secrets detected in repository.');
81
+ }
82
+ }
83
+
84
+ runSecretsCheck();
@@ -316,7 +316,7 @@
316
316
  "value": true
317
317
  }
318
318
  ],
319
- "generated_at": "2026-09-11T18:39:24.919Z",
319
+ "generated_at": "2026-09-11T19:51:55.434Z",
320
320
  "generator": {
321
321
  "name": "gemstack",
322
322
  "version": "1.2.0"
@@ -352,16 +352,16 @@
352
352
  ],
353
353
  "project": {
354
354
  "active_feature": "specs/009-context-capsule",
355
- "current_phase": "shipped",
355
+ "current_phase": "closure",
356
356
  "lifecycle_status": "SHIPPED",
357
357
  "name": "gemstack-ai",
358
358
  "next_permitted_phase": "PLAN"
359
359
  },
360
360
  "provenance": {
361
- "source_set_hash": "c4f41904cf21ad6f8621e310650de48b7012c40a4a73010a62b37ea633d576b5",
361
+ "source_set_hash": "cb553121ecd975b8c39e1378e0ff07c9adb2d12ef323f2088c34c6780ca33077",
362
362
  "sources": [
363
363
  {
364
- "hash": "a38e279e94ee6bcfb8bae4e9bf407277cdc1c16491539ae6a66bc179befb0ab6",
364
+ "hash": "e7b3f8427fd31ef9d591b6752716ebbf1831d669c5000297a8816eeeaf5e6936",
365
365
  "path": ".gemstack/state.json",
366
366
  "role": "LIFECYCLE_STATE"
367
367
  },
@@ -0,0 +1,5 @@
1
+ {
2
+ "phase_hashes": {},
3
+ "historical_findings": [],
4
+ "accepted_exceptions": []
5
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "schema": "gemstack-closure",
3
+ "version": 1,
4
+ "feature": "specs/010-agent-swarm-visual-qa",
5
+ "generated_at": "2026-09-11T19:52:14.736Z",
6
+ "status": "VERIFIED",
7
+ "closure_context": {
8
+ "closure_context_hash": "8be65c934d6f21da5ea49237613ef80705121c7006061a55f6db2fa24216ef41",
9
+ "repository_type": "git",
10
+ "git_commit": "832550278fa95d3ed571c8ec2f7db9830ddd9ebc",
11
+ "working_tree_clean": false,
12
+ "relevant_files_digest": "d02611dc5c123f386294bb6807b2c424fbc1c4666586a3284686cfd99452a905"
13
+ },
14
+ "acceptance_signature": "4c62312b07e949480087e1bced495abfe44f137bf5a04ac5d87c8ef4ccd3fbeb",
15
+ "canonical_summary": {
16
+ "required_total": 20,
17
+ "required_passed": 20,
18
+ "supplemental_total": 0,
19
+ "supplemental_passed": 0
20
+ },
21
+ "physical_summary": {
22
+ "supporting_total": 6,
23
+ "supporting_passed": 6,
24
+ "total_executed": 26,
25
+ "total_passed": 26,
26
+ "total_failed": 0,
27
+ "total_skipped": 0
28
+ },
29
+ "reconciliation": {
30
+ "math_valid": true,
31
+ "phantoms_detected": 0,
32
+ "orphans_detected": 0,
33
+ "missing_canonical_ids": []
34
+ },
35
+ "task_traceability_summary": {
36
+ "tasks_total": 29,
37
+ "tasks_with_validation": 29,
38
+ "tasks_documentation_only": 0,
39
+ "unmapped_canonical_tests": []
40
+ },
41
+ "required_gates": {
42
+ "project-tests": "PASS",
43
+ "gate-ci-frontmatter": "PASS",
44
+ "gate-ci-mojibake": "PASS"
45
+ },
46
+ "supplemental_gates": {},
47
+ "exceptions": [],
48
+ "evidence_sources": [
49
+ {
50
+ "type": "PACKAGE_SCRIPT",
51
+ "script": "test",
52
+ "runner": "node:test",
53
+ "exit_code": 0,
54
+ "duration_ms": 351
55
+ }
56
+ ],
57
+ "blockers": [],
58
+ "warnings": []
59
+ }