sinapse-ai 1.12.1 → 1.13.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.
- package/.claude/CLAUDE.md +2 -2
- package/.claude/rules/agent-memory-imports.md +2 -0
- package/.sinapse-ai/cli/commands/pro/index.js +8 -48
- package/.sinapse-ai/constitution.md +6 -2
- package/.sinapse-ai/core-config.yaml +5 -1
- package/.sinapse-ai/data/entity-registry.yaml +95 -95
- package/.sinapse-ai/development/agents/architect/MEMORY.md +35 -0
- package/.sinapse-ai/development/agents/data-engineer/MEMORY.md +38 -0
- package/.sinapse-ai/development/agents/developer/MEMORY.md +36 -0
- package/.sinapse-ai/development/agents/devops/MEMORY.md +39 -0
- package/.sinapse-ai/development/agents/devops.md +0 -1
- package/.sinapse-ai/development/agents/product-lead/MEMORY.md +36 -0
- package/.sinapse-ai/development/agents/project-lead/MEMORY.md +36 -0
- package/.sinapse-ai/development/agents/quality-gate/MEMORY.md +35 -0
- package/.sinapse-ai/development/agents/quality-gate.md +1 -1
- package/.sinapse-ai/development/agents/snps-orqx.md +4 -0
- package/.sinapse-ai/development/agents/sprint-lead/MEMORY.md +36 -0
- package/.sinapse-ai/development/templates/chrome-brain/knowledge-base/chrome-brain.md +2 -2
- package/.sinapse-ai/infrastructure/scripts/ide-sync/index.js +15 -0
- package/.sinapse-ai/infrastructure/scripts/validate-agents.js +159 -8
- package/.sinapse-ai/install-manifest.yaml +20 -156
- package/AGENTS.md +13 -2
- package/CHANGELOG.md +119 -4
- package/README.en.md +1 -1
- package/README.md +6 -26
- package/bin/cli.js +2 -7
- package/bin/commands/install.js +19 -257
- package/bin/commands/update.js +18 -78
- package/bin/lib/command-generator.js +261 -0
- package/bin/lib/prompts.js +2 -65
- package/bin/modules/chrome-brain-installer.js +2 -1
- package/bin/postinstall.js +6 -6
- package/docs/getting-started.md +0 -1
- package/docs/pt/getting-started.md +1 -1
- package/docs/security/dependabot-triage.md +17 -17
- package/package.json +6 -3
- package/packages/installer/src/wizard/i18n.js +3 -204
- package/packages/installer/src/wizard/index.js +1 -1
- package/packages/installer/src/wizard/questions.js +5 -368
- package/packages/installer/src/wizard/wizard.js +0 -9
- package/scripts/generate-install-manifest.js +6 -0
- package/scripts/validate-changelog-tags.js +97 -0
- package/scripts/validate-no-personal-leaks.js +184 -28
- package/scripts/validate-schemas.js +55 -10
- package/scripts/validate-story-meta.js +25 -12
- package/squads/claude-code-mastery/agents/claude-mastery-chief.md +1 -1
- package/squads/claude-code-mastery/agents/hooks-architect.md +12 -20
- package/squads/claude-code-mastery/tasks/audit-setup.md +1 -1
- package/squads/squad-product/agents/product-orqx.md +0 -1
- package/squads/squad-product/agents/ps-client-product-manager.md +0 -1
- package/squads/squad-product/agents/ps-delivery-manager.md +0 -1
- package/squads/squad-product/agents/ps-discovery-lead.md +0 -1
- package/squads/squad-product/agents/ps-product-analyst.md +0 -1
- package/squads/squad-product/agents/ps-product-ops-specialist.md +0 -1
- package/squads/squad-product/agents/ps-product-strategist.md +0 -1
- package/.sinapse-ai/core/grounding/README.md +0 -83
- package/.sinapse-ai/core/grounding/brand.cjs +0 -29
- package/.sinapse-ai/core/grounding/config-loader.cjs +0 -52
- package/.sinapse-ai/core/grounding/design-system.cjs +0 -29
- package/.sinapse-ai/core/grounding/vault.cjs +0 -36
- package/.sinapse-ai/development/scripts/approval-workflow.js +0 -643
- package/.sinapse-ai/development/scripts/backup-manager.js +0 -607
- package/.sinapse-ai/development/scripts/branch-manager.js +0 -390
- package/.sinapse-ai/development/scripts/code-quality-improver.js +0 -1329
- package/.sinapse-ai/development/scripts/commit-message-generator.js +0 -850
- package/.sinapse-ai/development/scripts/conflict-resolver.js +0 -675
- package/.sinapse-ai/development/scripts/dependency-analyzer.js +0 -638
- package/.sinapse-ai/development/scripts/diff-generator.js +0 -352
- package/.sinapse-ai/development/scripts/git-wrapper.js +0 -462
- package/.sinapse-ai/development/scripts/modification-validator.js +0 -555
- package/.sinapse-ai/development/scripts/performance-analyzer.js +0 -758
- package/.sinapse-ai/development/scripts/refactoring-suggester.js +0 -1148
- package/.sinapse-ai/development/scripts/rollback-handler.js +0 -531
- package/.sinapse-ai/development/scripts/security-checker.js +0 -359
- package/.sinapse-ai/development/scripts/template-engine.js +0 -240
- package/.sinapse-ai/development/scripts/template-validator.js +0 -279
- package/.sinapse-ai/development/scripts/test-generator.js +0 -844
- package/.sinapse-ai/development/scripts/transaction-manager.js +0 -590
- package/.sinapse-ai/development/scripts/yaml-validator.js +0 -397
- package/.sinapse-ai/hooks/sinapse-brand-grounding.cjs +0 -162
- package/.sinapse-ai/hooks/sinapse-ds-grounding.cjs +0 -211
- package/.sinapse-ai/hooks/sinapse-vault-grounding.cjs +0 -194
- package/bin/lib/register-grounding-hooks.js +0 -145
- package/docs/guides/agents/traces/execution-traces.zip +0 -0
- package/docs/guides/grounding-setup.md +0 -154
- package/docs/guides/workflows/SINAPSE-WORKFLOWS.zip +0 -0
- package/packages/installer/src/pro/pro-scaffolder.js +0 -449
- package/packages/installer/src/wizard/grounding-config.js +0 -131
- package/packages/installer/src/wizard/pro-setup.js +0 -1439
- package/packages/installer/templates/README.md +0 -16
- package/packages/installer/templates/brand-routing.example.json +0 -12
- package/packages/installer/templates/ds-routing.example.json +0 -12
- package/packages/installer/templates/vault-routing.example.json +0 -12
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Grounding Hooks (Story 10.47 + GA-1.6)
|
|
2
|
-
|
|
3
|
-
Hooks shipped by SINAPSE-AI that read user-supplied grounding sources and
|
|
4
|
-
inject relevant context into agent prompts. Each hook is **opt-in**:
|
|
5
|
-
absence of `~/.claude/sinapse-ai-config.yaml` or `enabled: false` in the
|
|
6
|
-
matching section means the hook is a complete no-op (no I/O, no warnings,
|
|
7
|
-
no errors).
|
|
8
|
-
|
|
9
|
-
## Architecture: Two layers
|
|
10
|
-
|
|
11
|
-
### Layer 1 — Executable hooks (`.sinapse-ai/hooks/`, story GA-1.6) ✅ ACTIVE
|
|
12
|
-
|
|
13
|
-
These are the hooks Claude Code actually runs via `UserPromptSubmit`. They
|
|
14
|
-
read real files and inject context into prompts. Registered automatically
|
|
15
|
-
during `npx sinapse-ai install` into `~/.claude/settings.json`.
|
|
16
|
-
|
|
17
|
-
| Executable hook | Reads | Injects |
|
|
18
|
-
|-----------------|-------|---------|
|
|
19
|
-
| `sinapse-vault-grounding.cjs` | `grounding.vault.path` → top-5 `.md` notes | `<vault-grounding>` |
|
|
20
|
-
| `sinapse-ds-grounding.cjs` | `grounding.designSystem.rootPath` → DS law file | `<ds-grounding>` |
|
|
21
|
-
| `sinapse-brand-grounding.cjs` | `grounding.brand.brandbookPath` → brandbook | `<brand-grounding>` |
|
|
22
|
-
|
|
23
|
-
**Caller:** `bin/lib/register-grounding-hooks.js` (invoked by `bin/commands/install.js`
|
|
24
|
-
phase 6b). Hook registration is idempotent and non-destructive.
|
|
25
|
-
|
|
26
|
-
### Layer 2 — Library resolvers (`core/grounding/`, story 10.47) — DEFER
|
|
27
|
-
|
|
28
|
-
These library stubs (`vault.cjs`, `design-system.cjs`, `brand.cjs`) are
|
|
29
|
-
shallow wrappers around `config-loader.cjs`. They return a structured envelope
|
|
30
|
-
describing what is configured, but do **not** inject context into prompts.
|
|
31
|
-
|
|
32
|
-
**Why defer:** The executable hooks in Layer 1 (GA-1.6) already implement
|
|
33
|
-
the concrete content injection logic directly. The library resolvers were
|
|
34
|
-
designed as the "integration point" for future use cases where something
|
|
35
|
-
other than the Claude Code hook chain needs to consume grounding data
|
|
36
|
-
(e.g., a CLI command, a report generator, or a programmatic API). No such
|
|
37
|
-
consumer exists today.
|
|
38
|
-
|
|
39
|
-
**Trigger to activate library resolvers:** a concrete caller (e.g., a new
|
|
40
|
-
CLI sub-command `sinapse grounding status`, or a report generator) that
|
|
41
|
-
needs to query grounding config programmatically. At that point, extend
|
|
42
|
-
`vault.cjs` / `design-system.cjs` / `brand.cjs` to read actual files and
|
|
43
|
-
return rich structured data. Do **not** create a caller just to justify
|
|
44
|
-
activating these resolvers (Article XI — no orphans).
|
|
45
|
-
|
|
46
|
-
**Current callers of library resolvers:** `bin/lib/prompts.js` and
|
|
47
|
-
`bin/commands/update.js` import `grounding-config` (the wizard package, not
|
|
48
|
-
these library hooks). The library hooks themselves have no production caller
|
|
49
|
-
beyond their own test suite.
|
|
50
|
-
|
|
51
|
-
| Library resolver | Status | Defer trigger |
|
|
52
|
-
|-----------------|--------|---------------|
|
|
53
|
-
| `vault.cjs` | stub — returns config envelope | new CLI/API consumer |
|
|
54
|
-
| `design-system.cjs` | stub — returns config envelope | new CLI/API consumer |
|
|
55
|
-
| `brand.cjs` | stub — returns config envelope | new CLI/API consumer |
|
|
56
|
-
| `config-loader.cjs` | functional — reads YAML | used by all three stubs |
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Configuration
|
|
61
|
-
|
|
62
|
-
Configure interactively via `npx sinapse-ai install` (Story 10.46+10.47
|
|
63
|
-
wizard) or by editing the YAML file directly. See
|
|
64
|
-
`docs/guides/grounding-setup.md` for the full guide.
|
|
65
|
-
|
|
66
|
-
`~/.claude/sinapse-ai-config.yaml` schema:
|
|
67
|
-
|
|
68
|
-
```yaml
|
|
69
|
-
version: '1'
|
|
70
|
-
grounding:
|
|
71
|
-
vault:
|
|
72
|
-
enabled: true
|
|
73
|
-
path: /abs/path/to/vault
|
|
74
|
-
domains: [sinapse, personal]
|
|
75
|
-
designSystem:
|
|
76
|
-
enabled: true
|
|
77
|
-
profileName: SINAPSE
|
|
78
|
-
rootPath: /abs/path/to/brandbook
|
|
79
|
-
brand:
|
|
80
|
-
enabled: true
|
|
81
|
-
profileName: SINAPSE
|
|
82
|
-
brandbookPath: /abs/path/to/brandbook/0.0-guidelines.md
|
|
83
|
-
```
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Brand grounding hook — opt-in BYO.
|
|
3
|
-
*
|
|
4
|
-
* @story 10.47
|
|
5
|
-
*
|
|
6
|
-
* Reads the user's brandbook path from `~/.claude/sinapse-ai-config.yaml`
|
|
7
|
-
* (`grounding.brand`). Returns a stub envelope when configured, `null`
|
|
8
|
-
* otherwise. Concrete brandbook parser (positioning, MVV, tone-of-voice
|
|
9
|
-
* extraction) lands in a follow-up.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
|
-
const configLoader = require('./config-loader.cjs');
|
|
15
|
-
|
|
16
|
-
function brandGroundingHook(_context = {}) {
|
|
17
|
-
const section = configLoader.getSection('brand');
|
|
18
|
-
if (!section || !section.enabled || !section.brandbookPath) return null;
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
source: 'brand',
|
|
22
|
-
profileName: section.profileName || '',
|
|
23
|
-
brandbookPath: section.brandbookPath,
|
|
24
|
-
note: 'Brand grounding configured. Concrete brandbook parser ships in a follow-up story.',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
module.exports = brandGroundingHook;
|
|
29
|
-
module.exports.brandGroundingHook = brandGroundingHook;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared config loader for grounding hooks.
|
|
3
|
-
*
|
|
4
|
-
* @story 10.47
|
|
5
|
-
*
|
|
6
|
-
* Reads `~/.claude/sinapse-ai-config.yaml` once per call. Pure function: no
|
|
7
|
-
* caching, no side effects, never throws — returns `null` on any error so
|
|
8
|
-
* each hook can short-circuit cleanly.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
const fs = require('fs');
|
|
14
|
-
const os = require('os');
|
|
15
|
-
const path = require('path');
|
|
16
|
-
|
|
17
|
-
const CONFIG_PATH = path.join(os.homedir(), '.claude', 'sinapse-ai-config.yaml');
|
|
18
|
-
|
|
19
|
-
function loadGroundingConfig(configPath = CONFIG_PATH) {
|
|
20
|
-
try {
|
|
21
|
-
if (!fs.existsSync(configPath)) return null;
|
|
22
|
-
const raw = fs.readFileSync(configPath, 'utf8');
|
|
23
|
-
// Lazy-require so absence of js-yaml in a downstream consumer never
|
|
24
|
-
// crashes the hook chain — yaml is shipped via packages/installer
|
|
25
|
-
// dependency tree but downstream installs may strip dev deps.
|
|
26
|
-
let yaml;
|
|
27
|
-
try { yaml = require('js-yaml'); } catch { return null; }
|
|
28
|
-
const parsed = yaml.load(raw);
|
|
29
|
-
if (!parsed || typeof parsed !== 'object') return null;
|
|
30
|
-
return parsed;
|
|
31
|
-
} catch {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function isSectionEnabled(section, configPath = CONFIG_PATH) {
|
|
37
|
-
const cfg = loadGroundingConfig(configPath);
|
|
38
|
-
return Boolean(cfg && cfg.grounding && cfg.grounding[section] && cfg.grounding[section].enabled);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function getSection(section, configPath = CONFIG_PATH) {
|
|
42
|
-
const cfg = loadGroundingConfig(configPath);
|
|
43
|
-
if (!cfg || !cfg.grounding) return null;
|
|
44
|
-
return cfg.grounding[section] || null;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = {
|
|
48
|
-
CONFIG_PATH,
|
|
49
|
-
loadGroundingConfig,
|
|
50
|
-
isSectionEnabled,
|
|
51
|
-
getSection,
|
|
52
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Design system grounding hook — opt-in BYO.
|
|
3
|
-
*
|
|
4
|
-
* @story 10.47
|
|
5
|
-
*
|
|
6
|
-
* Reads the user's design-system root from
|
|
7
|
-
* `~/.claude/sinapse-ai-config.yaml` (`grounding.designSystem`). Returns a
|
|
8
|
-
* stub envelope when configured, `null` otherwise. The concrete DS resolver
|
|
9
|
-
* (token lookup, component registry, brandbook diff) lands in a follow-up.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
|
-
const configLoader = require('./config-loader.cjs');
|
|
15
|
-
|
|
16
|
-
function designSystemGroundingHook(_context = {}) {
|
|
17
|
-
const section = configLoader.getSection('designSystem');
|
|
18
|
-
if (!section || !section.enabled || !section.rootPath) return null;
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
source: 'designSystem',
|
|
22
|
-
profileName: section.profileName || '',
|
|
23
|
-
rootPath: section.rootPath,
|
|
24
|
-
note: 'Design system grounding configured. Concrete DS resolver ships in a follow-up story.',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
module.exports = designSystemGroundingHook;
|
|
29
|
-
module.exports.designSystemGroundingHook = designSystemGroundingHook;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vault grounding hook — opt-in BYO.
|
|
3
|
-
*
|
|
4
|
-
* @story 10.47
|
|
5
|
-
*
|
|
6
|
-
* Reads the user's vault path from `~/.claude/sinapse-ai-config.yaml`
|
|
7
|
-
* (`grounding.vault`) and is the entry point for future context injection
|
|
8
|
-
* from a markdown notes vault.
|
|
9
|
-
*
|
|
10
|
-
* Today this hook is a **structural no-op**: when the section is enabled
|
|
11
|
-
* it returns a stub envelope describing the available vault path so
|
|
12
|
-
* downstream tooling can detect the integration point. When disabled or
|
|
13
|
-
* missing config, returns `null` silently. The concrete vault parser and
|
|
14
|
-
* relevance scorer land in a follow-up story.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
'use strict';
|
|
18
|
-
|
|
19
|
-
// Use module reference (not destructuring) so tests can stub
|
|
20
|
-
// configLoader.getSection at runtime via jest mocks.
|
|
21
|
-
const configLoader = require('./config-loader.cjs');
|
|
22
|
-
|
|
23
|
-
function vaultGroundingHook(_context = {}) {
|
|
24
|
-
const section = configLoader.getSection('vault');
|
|
25
|
-
if (!section || !section.enabled || !section.path) return null;
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
source: 'vault',
|
|
29
|
-
path: section.path,
|
|
30
|
-
domains: Array.isArray(section.domains) ? section.domains : [],
|
|
31
|
-
note: 'Vault grounding configured. Concrete content injection ships in a follow-up story.',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
module.exports = vaultGroundingHook;
|
|
36
|
-
module.exports.vaultGroundingHook = vaultGroundingHook;
|