@bcelep/capint 0.4.2

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 (69) hide show
  1. package/AGENT.md +28 -0
  2. package/CHANGELOG.md +58 -0
  3. package/README.md +94 -0
  4. package/bin/capint.js +90 -0
  5. package/design.md +23 -0
  6. package/docs/architecture-decisions.md +95 -0
  7. package/docs/execution-intent-contract.md +81 -0
  8. package/docs/manifest-schema.md +36 -0
  9. package/docs/release-checklist.md +31 -0
  10. package/package.json +33 -0
  11. package/projections/session-start.md +32 -0
  12. package/registry.json +12 -0
  13. package/scripts/release-check.mjs +40 -0
  14. package/scripts/validate-matrix.mjs +83 -0
  15. package/skill-routing-matrix.json +150 -0
  16. package/skills/capability-router/SKILL.md +3 -0
  17. package/skills/context-memory-bridge/SKILL.md +17 -0
  18. package/skills/localization-hub/SKILL.md +17 -0
  19. package/skills/refactor/SKILL.md +17 -0
  20. package/skills/systematic-debugging/SKILL.md +19 -0
  21. package/src/commands/audit.js +32 -0
  22. package/src/commands/consult.js +64 -0
  23. package/src/commands/doctor.js +36 -0
  24. package/src/commands/ide.js +62 -0
  25. package/src/commands/init.js +50 -0
  26. package/src/commands/memory.js +60 -0
  27. package/src/commands/route.js +30 -0
  28. package/src/commands/scaffold.js +37 -0
  29. package/src/commands/status.js +22 -0
  30. package/src/commands/uninstall.js +46 -0
  31. package/src/commands/upgrade.js +69 -0
  32. package/src/lib/audit.js +107 -0
  33. package/src/lib/capability-router.js +118 -0
  34. package/src/lib/context-memory-bridge.js +87 -0
  35. package/src/lib/context-pack.js +39 -0
  36. package/src/lib/contract.js +71 -0
  37. package/src/lib/doctor.js +115 -0
  38. package/src/lib/event-log.js +40 -0
  39. package/src/lib/execution-policy.js +168 -0
  40. package/src/lib/ide-sync.js +277 -0
  41. package/src/lib/intent-parser.js +116 -0
  42. package/src/lib/orchestration.js +25 -0
  43. package/src/lib/providers/activation-policy.js +93 -0
  44. package/src/lib/providers/graph-provider.js +35 -0
  45. package/src/lib/providers/local-graph-adapter.js +40 -0
  46. package/src/lib/providers/local-memory-adapter.js +41 -0
  47. package/src/lib/providers/memory-provider.js +35 -0
  48. package/src/lib/route-engine.js +191 -0
  49. package/src/lib/scaffold/file-policy.js +92 -0
  50. package/src/lib/scaffold/index.js +29 -0
  51. package/src/lib/scaffold/manifest-schema.js +116 -0
  52. package/src/lib/scaffold/manifest.js +34 -0
  53. package/src/lib/scaffold/presets.js +132 -0
  54. package/src/lib/uninstall.js +126 -0
  55. package/src/lib/upgrade-matrix.js +120 -0
  56. package/templates/bundle/skills/capability-router/SKILL.md +12 -0
  57. package/templates/bundle/skills/context-memory-bridge/SKILL.md +17 -0
  58. package/templates/bundle/skills/localization-hub/SKILL.md +17 -0
  59. package/templates/bundle/skills/refactor/SKILL.md +17 -0
  60. package/templates/bundle/skills/systematic-debugging/SKILL.md +19 -0
  61. package/templates/bundle/workflows/forge.md +51 -0
  62. package/templates/minimal/.capint/rules/core.md +18 -0
  63. package/templates/minimal/AGENT.md +26 -0
  64. package/templates/minimal/AGENTS.md +9 -0
  65. package/templates/minimal/design.md +25 -0
  66. package/templates/minimal/registry.json +7 -0
  67. package/templates/prismx-compatible/.capint/context.json +8 -0
  68. package/templates/prismx-compatible/HANDOFF.md +19 -0
  69. package/workflows/forge.md +51 -0
package/AGENT.md ADDED
@@ -0,0 +1,28 @@
1
+ # AGENT.md — CapInt
2
+
3
+ CapInt is an IDE-native, capability-first orchestration engine.
4
+
5
+ ## Task contract
6
+
7
+ For every task:
8
+ 1. Build Execution Intent
9
+ 2. Ask confirm options (`apply_now | plan_first | analyze_only`)
10
+ 3. Route via capability + provider resolution
11
+
12
+ ## Runtime chain
13
+
14
+ `parseIntent -> routeCapability -> resolveMemoryStrategy -> buildExecutionPolicy -> formatOutput`
15
+
16
+ ## Scope
17
+
18
+ - Keep user UX minimal and chat-first.
19
+ - Do not force users to remember skill/workflow names.
20
+ - Memory strategy is silent and additive (`none|optional|required`); providers default off.
21
+ - Medium/heavy tasks require verification evidence before claiming done.
22
+
23
+ ## Commands
24
+
25
+ - `capint route` — execution intent
26
+ - `capint consult` — dry-run recommendation
27
+ - `capint status` / `capint doctor` / `capint audit` — health (no auto-fix)
28
+ - `capint init` / `capint scaffold` — hybrid project bootstrap
package/CHANGELOG.md ADDED
@@ -0,0 +1,58 @@
1
+ # Changelog
2
+
3
+ ## 0.4.2 — 2026-05-30
4
+
5
+ Optional local context layer (flag-gated).
6
+
7
+ ### Added
8
+ - `local-memory-adapter`, `local-graph-adapter`
9
+ - `capint memory status`
10
+ - `local_adapters` in Execution Intent when `CAPINT_LOCAL_CONTEXT=1`
11
+
12
+ ## 0.4.1 — 2026-05-30
13
+
14
+ Lifecycle management.
15
+
16
+ ### Added
17
+ - `capint uninstall` (manifest-driven, dry-run, keep flags)
18
+ - `capint upgrade` (matrix merge, backup, visible conflict report)
19
+
20
+ ## 0.4.0 — 2026-05-30
21
+
22
+ Productization release: install → route → IDE.
23
+
24
+ ### Added
25
+ - Manifest schema v2 (`docs/manifest-schema.md`)
26
+ - Init skill/workflow bundle; registry derived from matrix
27
+ - `resolution_status` / `resolution_hint` for not_installed
28
+ - `capint ide sync|check`, projections/session-start.md
29
+ - Default `--ide-sync` on init; AGENTS.md stub; `.gitignore` fragment
30
+
31
+ ### Changed
32
+ - Init copies bundle skills so `capint route "i18n"` resolves installed
33
+
34
+ ## 0.3.0 — 2026-05-30
35
+
36
+ Plan phases 1–5 complete + orchestration extension.
37
+
38
+ ### Added
39
+ - `capint consult`, `status`, `doctor`, `audit` (read-only operational surface)
40
+ - `capint init` / `scaffold` hybrid bootstrap with safe-merge conflict policy
41
+ - Provider activation policy (memory/graph default off)
42
+ - Local `context_pack`, `orchestration` patterns, `capability_chains`
43
+ - Optional append-only event log
44
+ - Verification gates for medium/heavy tasks
45
+ - `docs/architecture-decisions.md`, `docs/execution-intent-contract.md`, `docs/release-checklist.md`
46
+
47
+ ### Changed
48
+ - Matrix schema 1.2 with `orchestration_pattern` per task type
49
+ - `capint init` now scaffolds `skill-routing-matrix.json` + `registry.json`
50
+ - `/forge` workflow expanded to phased template
51
+
52
+ ## 0.2.0 — 2026-05-30
53
+
54
+ Initial modular orchestrator (intent parser, capability router, execution policy, memory bridge).
55
+
56
+ ## 0.1.0 — 2026-05-29
57
+
58
+ Minimal `capint route` prototype.
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # CapInt
2
+
3
+ Capability-first orchestration engine for IDE agents.
4
+
5
+ Package: `@bcelep/capint`
6
+ CLI: `capint`
7
+
8
+ ## Quick start
9
+
10
+ ```bash
11
+ cd your-project
12
+ npx @bcelep/capint init
13
+ npx @bcelep/capint route "i18n çeviri lang file hub"
14
+ ```
15
+
16
+ Init scaffolds docs, matrix, registry (derived from matrix), skill/workflow bundle, and runs `capint ide sync` by default.
17
+ Skip IDE sync: `capint init --no-ide-sync` then `capint ide sync` manually.
18
+
19
+ ## Install flow
20
+
21
+ 1. `npx @bcelep/capint init` — scaffold + bundle + IDE projections
22
+ 2. `capint route "<task>"` — Execution Intent with `resolution_status: installed|not_installed`
23
+ 3. `capint doctor` — drift check (read-only)
24
+ 4. Optional: `capint upgrade --dry-run` / `capint uninstall --dry-run`
25
+
26
+ ## Commands
27
+
28
+ ### Routing
29
+
30
+ - `capint route "<task>"`
31
+ - `capint route --json "<task>"`
32
+ - `capint route --verbose "<task>"`
33
+ - `capint route --list`
34
+
35
+ ### Operational (read-only / dry-run)
36
+
37
+ - `capint consult "<task>" [--json]` — recommendation only
38
+ - `capint status [--json]` — matrix/registry health
39
+ - `capint doctor [--json]` — drift diagnosis
40
+ - `capint audit [--json]` — project + contract audit
41
+
42
+ ### Scaffold
43
+
44
+ - `capint init [--preset minimal] [--name Project] [--no-ide-sync]`
45
+ - `capint scaffold --list`
46
+ - `capint scaffold --preset minimal|prismx-compatible`
47
+
48
+ Init writes `AGENT.md`, `AGENTS.md`, `design.md`, `.gitignore` (managed fragment), matrix, registry, skills bundle, workflows.
49
+ Conflicts → `*.capint.new.md`. Manifest: `.capint/scaffold-manifest.json` (schema v2).
50
+
51
+ ### IDE integration
52
+
53
+ - `capint ide sync [--dry-run] [--targets cursor,claude,gemini,antigravity]`
54
+ - `capint ide check [--json]`
55
+
56
+ ### Lifecycle
57
+
58
+ - `capint uninstall [--dry-run] [--yes] [--keep-agent] [--keep-ide] [--include-sidecars]`
59
+ - `capint upgrade [--dry-run] [--apply]`
60
+
61
+ ### Optional context (v0.4.2)
62
+
63
+ - `capint memory status [--json]` — local file availability (read-only)
64
+ - Route hot path unchanged unless `CAPINT_LOCAL_CONTEXT=1`
65
+
66
+ ## Documentation
67
+
68
+ - [docs/manifest-schema.md](docs/manifest-schema.md) — scaffold manifest v2
69
+ - [docs/architecture-decisions.md](docs/architecture-decisions.md)
70
+ - [docs/execution-intent-contract.md](docs/execution-intent-contract.md)
71
+ - [docs/release-checklist.md](docs/release-checklist.md)
72
+ - [CHANGELOG.md](CHANGELOG.md)
73
+
74
+ ## Architecture
75
+
76
+ Core chain:
77
+
78
+ - `src/lib/intent-parser.js`
79
+ - `src/lib/capability-router.js`
80
+ - `src/lib/execution-policy.js`
81
+ - `src/lib/context-memory-bridge.js`
82
+ - `src/lib/route-engine.js`
83
+
84
+ ## Execution Intent contract
85
+
86
+ Every route produces:
87
+
88
+ - `intent`, `capability`, `resolution`, `memory`, `plan`
89
+ - `resolution_status`, `resolution_hint` when skill/workflow missing
90
+ - `confirm` block with `apply_now | plan_first | analyze_only`
91
+ - `verification_required` on medium/heavy or `not_installed`
92
+ - `orchestration`, `context_pack`, optional `local_adapters` (flag-gated)
93
+
94
+ Maintainer verification: `npm run release-check`
package/bin/capint.js ADDED
@@ -0,0 +1,90 @@
1
+ #!/usr/bin/env node
2
+
3
+ const args = process.argv.slice(2);
4
+ const command = args[0];
5
+ const flags = {};
6
+ for (let i = 0; i < args.length; i++) {
7
+ if (args[i].startsWith("--")) {
8
+ const key = args[i].slice(2);
9
+ if (args[i + 1] && !args[i + 1].startsWith("--")) {
10
+ flags[key] = args[i + 1];
11
+ i++;
12
+ } else {
13
+ flags[key] = true;
14
+ }
15
+ }
16
+ }
17
+
18
+ async function main() {
19
+ switch (command) {
20
+ case "route":
21
+ return require("../src/commands/route")(args.slice(1), flags);
22
+ case "consult":
23
+ return require("../src/commands/consult")(args.slice(1), flags);
24
+ case "status":
25
+ return require("../src/commands/status")(args.slice(1), flags);
26
+ case "doctor":
27
+ return require("../src/commands/doctor")(args.slice(1), flags);
28
+ case "init":
29
+ return require("../src/commands/init")(args.slice(1), flags);
30
+ case "scaffold":
31
+ return require("../src/commands/scaffold")(args.slice(1), flags);
32
+ case "audit":
33
+ return require("../src/commands/audit")(args.slice(1), flags);
34
+ case "ide":
35
+ return require("../src/commands/ide")(args.slice(1), flags);
36
+ case "uninstall":
37
+ return require("../src/commands/uninstall")(args.slice(1), flags);
38
+ case "upgrade":
39
+ return require("../src/commands/upgrade")(args.slice(1), flags);
40
+ case "memory":
41
+ return require("../src/commands/memory")(args.slice(1), flags);
42
+ case "version":
43
+ case "--version":
44
+ case "-v":
45
+ console.log(`capint v${require("../package.json").version}`);
46
+ return;
47
+ case "help":
48
+ case "--help":
49
+ case "-h":
50
+ case undefined:
51
+ showHelp();
52
+ return;
53
+ default:
54
+ console.error(`Unknown command: ${command}`);
55
+ showHelp();
56
+ process.exit(1);
57
+ }
58
+ }
59
+
60
+ function showHelp() {
61
+ console.log(`
62
+ capint ${require("../package.json").version}
63
+
64
+ Usage:
65
+ capint route "<task>"
66
+ capint route --json "<task>"
67
+ capint route --verbose "<task>"
68
+ capint route --list
69
+
70
+ capint consult "<task>" [--json] dry-run recommendation (no side effects)
71
+ capint status [--json] read-only project health
72
+ capint doctor [--json] diagnose drift (no auto-fix)
73
+ capint audit [--json] project + contract audit (read-only)
74
+
75
+ capint init [--preset minimal] [--name Project] [--no-ide-sync] [--json]
76
+ capint scaffold [--preset minimal|prismx-compatible] [--list] [--json]
77
+
78
+ capint ide sync|check [--dry-run] [--json] [--targets cursor,claude,...]
79
+ capint uninstall [--dry-run] [--yes] [--keep-agent] [--keep-ide] [--include-sidecars]
80
+ capint upgrade [--dry-run] [--apply]
81
+ capint memory status [--json]
82
+
83
+ capint version
84
+ `);
85
+ }
86
+
87
+ main().catch((err) => {
88
+ console.error(err.message);
89
+ process.exit(1);
90
+ });
package/design.md ADDED
@@ -0,0 +1,23 @@
1
+ # design.md — CapInt
2
+
3
+ <!-- capint:managed:start -->
4
+ ## Goal
5
+
6
+ Capability-first orchestration engine for IDE agents: route natural language to capability + provider without skill-name memorization.
7
+
8
+ ## Boundaries
9
+
10
+ - In scope: routing, execution policy, hybrid scaffold, optional memory/graph adapters
11
+ - Out of scope: skill catalog inflation, bundled vector DB, autonomous multi-agent armies
12
+
13
+ ## Success criteria
14
+
15
+ - [ ] Deterministic `capint route` for same input + matrix
16
+ - [ ] Execution Intent contract stable across releases
17
+ - [ ] Scaffold never blind-overwrites existing docs
18
+ - [ ] Memory/graph providers default off
19
+
20
+ ## Updated
21
+
22
+ 2026-05-30
23
+ <!-- capint:managed:end -->
@@ -0,0 +1,95 @@
1
+ # CapInt Architecture Decisions
2
+
3
+ ## Positioning
4
+
5
+ CapInt is a **capability-first runtime router** for IDE agents — not a skill catalog, not a multi-agent factory, not a memory engine.
6
+
7
+ | Layer | CapInt | Neighbor repos |
8
+ |-------|--------|----------------|
9
+ | Routing | Yes (core) | skill-gateway, agent-skills |
10
+ | Team generation | No | revfactory/harness, agency-agents |
11
+ | Memory/graph engine | No (adapters only) | mempalace, agentmemory, graphify |
12
+ | Cross-harness standardization | Partial (project scaffold) | affaan-m/ECC |
13
+ | Verification discipline | Yes (policy gates) | obra/superpowers |
14
+
15
+ ## Adopted patterns
16
+
17
+ - **Invisible gateway** (skill-gateway): route without ceremony; user sees Execution Intent, not skill names.
18
+ - **Confirm triad** (PrismX lesson): `apply_now | plan_first | analyze_only` on medium+.
19
+ - **Operational hygiene** (ECC): `consult`, `status`, `doctor` — read-only / dry-run, no auto-fix.
20
+ - **Verification gate** (superpowers): medium/heavy requires evidence before "done".
21
+ - **Hybrid scaffold**: minimal first, `prismx-compatible` only on explicit opt-in.
22
+
23
+ ## Explicitly avoided
24
+
25
+ - Bundling memory/graph runtimes in core (Docker, vector DB, MCP tool floods).
26
+ - Self-mutating skills / instinct evolution.
27
+ - Full autonomous PM→Architect→Dev→QA pipelines.
28
+ - Markdown-only routing tables as source of truth (matrix JSON is SoT).
29
+ - Blind overwrite of existing project docs.
30
+
31
+ ## Provider activation policy
32
+
33
+ Default: **off** for memory and graph providers.
34
+
35
+ Activation requires (any):
36
+
37
+ 1. Capability `requires_memory: required`, or
38
+ 2. High-risk capability (memory-retrieval, incident-response, threat-modeling), or
39
+ 3. Explicit env flag (`CAPINT_MEMORY=1`, `CAPINT_GRAPH=1`)
40
+
41
+ Blocked when:
42
+
43
+ - `light` weight and capability does not require memory
44
+ - `doctor` has not passed (unless feature flag set)
45
+
46
+ Fallback: always `local` (HANDOFF, AGENT.md, design.md, project files).
47
+
48
+ ## Event log (optional)
49
+
50
+ Route events append to `.capint/logs/route-events.ndjson` only when:
51
+
52
+ - `CAPINT_EVENT_LOG=1`, or
53
+ - `.capint/context.json` has `"event_log": true`
54
+
55
+ Default: off. Does not block route hot-path when disabled.
56
+
57
+ ## Schema versioning
58
+
59
+ | Change | Version bump |
60
+ |--------|----------------|
61
+ | `execution_intent` breaking field change | package major |
62
+ | matrix field addition | matrix minor (e.g. 1.0 → 1.1) |
63
+ | matrix field removal or semantic break | matrix major |
64
+
65
+ ## Scaffold conflict policy
66
+
67
+ - Missing file → create
68
+ - File with `<!-- capint:managed:start/end -->` → merge inner block only
69
+ - File without managed markers → write `*.capint.new.md`, never overwrite
70
+ - `--force` opt-in only
71
+
72
+ ## Operational command contracts
73
+
74
+ | Command | Side effects | Auto-fix |
75
+ |---------|--------------|----------|
76
+ | `consult` | None | No |
77
+ | `status` | None | No |
78
+ | `doctor` | None | No |
79
+ | `audit` | None | No |
80
+ | `init` / `scaffold` | Creates/merges files | No (safe-merge only) |
81
+ | `route` | None | No |
82
+
83
+ ## Inspiration map (repos reviewed)
84
+
85
+ | Repo | Take | Skip |
86
+ |------|------|------|
87
+ | addyosmani/agent-skills | lifecycle phases, verification | mandatory 15-step for all tasks |
88
+ | buraksu42/skill-gateway | invisible router, quality tiers | web search on miss, install links in chat |
89
+ | multica-ai/andrej-karpathy-skills | constitutional layer | CLAUDE.md-only routing |
90
+ | affaan-m/ECC | doctor/status/install state | 249 skills default, daemon/TUI |
91
+ | obra/superpowers | evidence-before-claims | full subagent army on light tasks |
92
+ | msitarzewski/agency-agents | convert/install UX | 144 persona default bundle |
93
+ | MemPalace / agentmemory / graphify | adapter contracts | core embedding, hooks, MCP surfaces |
94
+ | giancarloerra/SocratiCode | provider boundary | AGPL docker stack in core |
95
+ | revfactory/harness | orchestration patterns reference | team factory in router core |
@@ -0,0 +1,81 @@
1
+ # Execution Intent Contract
2
+
3
+ Stable output from `capint route --json`. Package major bumps only on breaking changes to required fields.
4
+
5
+ ## Required fields
6
+
7
+ | Field | Type | Values |
8
+ |-------|------|--------|
9
+ | `intent` | string | Original task text |
10
+ | `capability` | string | Resolved capability id |
11
+ | `resolution` | string | `provider/resource` e.g. `skill/localization-hub` |
12
+ | `memory` | string | `none` \| `optional` \| `required` |
13
+ | `plan` | string | `auto` \| `confirm` \| `override` |
14
+ | `confirm` | object | `{ enabled, mode, prompt, options, default_option }` |
15
+ | `confirm_question` | string \| null | Human prompt |
16
+ | `confirm_options` | array | `{ id, label }[]` |
17
+ | `confirm_default_option` | string \| null | e.g. `plan_first` |
18
+ | `fallback` | object \| null | `{ capability, override }` when ambiguous |
19
+
20
+ ## Optional fields (v0.3+)
21
+
22
+ | Field | Description |
23
+ |-------|-------------|
24
+ | `verification_required` | boolean |
25
+ | `verification_hints` | string[] |
26
+ | `verification_profile` | string |
27
+ | `provider_activation` | memory/graph gating result |
28
+ | `context_pack` | local file snippets when memory active |
29
+ | `orchestration` | `{ pattern, execution_mode, chains[] }` |
30
+ | `route_explain` | verbose routing debug |
31
+ | `resolution_status` | `installed` \| `not_installed` |
32
+ | `resolution_hint` | string when not installed |
33
+ | `local_adapters` | optional; only when `CAPINT_LOCAL_CONTEXT=1` |
34
+
35
+ ## Example: medium debug task
36
+
37
+ ```json
38
+ {
39
+ "intent": "debug login hatasi var",
40
+ "capability": "systematic-debugging",
41
+ "resolution": "skill/systematic-debugging",
42
+ "memory": "optional",
43
+ "plan": "confirm",
44
+ "confirm": {
45
+ "enabled": true,
46
+ "mode": "always_confirm",
47
+ "default_option": "plan_first"
48
+ },
49
+ "verification_required": true,
50
+ "orchestration": {
51
+ "pattern": "producer_reviewer",
52
+ "execution_mode": "pipeline",
53
+ "chains": [{ "then_capability": "refactor-simplify", "when": "plan_first" }]
54
+ }
55
+ }
56
+ ```
57
+
58
+ ## Example: memory lookup
59
+
60
+ ```json
61
+ {
62
+ "capability": "memory-retrieval",
63
+ "memory": "required",
64
+ "context_pack": {
65
+ "source": "local",
66
+ "snippets": [{ "source": "AGENT.md", "confidence": "verbatim" }]
67
+ },
68
+ "provider_activation": {
69
+ "memory": { "activated": true, "default": "off" },
70
+ "graph": { "activated": true, "default": "off" }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ## Confirm options
76
+
77
+ | Option | Agent behavior |
78
+ |--------|----------------|
79
+ | `apply_now` | Execute immediately (subagent mode) |
80
+ | `plan_first` | Short plan, then execute (pipeline mode) |
81
+ | `analyze_only` | Read-only analysis (explore mode) |
@@ -0,0 +1,36 @@
1
+ # Scaffold manifest schema (v2.0)
2
+
3
+ `.capint/scaffold-manifest.json` is the shared source-of-truth for init, uninstall, and upgrade file tracking.
4
+
5
+ ## Top-level
6
+
7
+ | Field | Type | Description |
8
+ |-------|------|-------------|
9
+ | `schema_version` | `"2.0"` | Manifest schema version |
10
+ | `last_run` | ISO string | Last scaffold/ide-sync run timestamp |
11
+ | `preset` | string | Preset id used |
12
+ | `summary` | object | `{ created, updated, skipped, conflict }` |
13
+ | `files` | array | File entries (see below) |
14
+ | `history` | array | Last 10 run summaries |
15
+
16
+ ## File entry
17
+
18
+ | Field | Type | Required | Description |
19
+ |-------|------|----------|-------------|
20
+ | `path` | string | yes | Project-relative path |
21
+ | `action` | enum | yes | `created` \| `updated` \| `skipped` \| `conflict` |
22
+ | `source` | enum | yes | `capint` (managed) \| `user` |
23
+ | `removable` | boolean | yes | Safe for `capint uninstall` when `source: capint` |
24
+ | `kind` | enum | yes | `doc` \| `skill` \| `workflow` \| `matrix` \| `registry` \| `ide_projection` |
25
+ | `marker` | string \| null | no | IDE sync marker when `kind: ide_projection` |
26
+ | `sidecar` | string \| null | no | Conflict sidecar path |
27
+
28
+ ## Rules
29
+
30
+ - Bundle skills/workflows: `source: capint`, `removable: true`, kind inferred from path.
31
+ - User-edited docs without capint marker: never auto-deleted; uninstall respects `removable` and marker.
32
+ - IDE projections must include marker: `<!-- source: capint/projections/session-start.md | capint ide sync -->`
33
+
34
+ ## Validation
35
+
36
+ Run `node tests/manifest-schema.test.mjs` for schema round-trip fixtures.
@@ -0,0 +1,31 @@
1
+ # CapInt Release Checklist
2
+
3
+ Use before tagging a new `@bcelep/capint` version.
4
+
5
+ ## Pre-release
6
+
7
+ - [ ] `skill-routing-matrix.json` schema_version bumped if matrix shape changed
8
+ - [ ] Package version bumped (major = breaking `execution_intent`, minor = features, patch = fixes)
9
+ - [ ] `node scripts/validate-matrix.mjs` passes
10
+ - [ ] `node scripts/release-check.mjs` passes (all phases)
11
+ - [ ] README + `docs/architecture-decisions.md` reflect new commands/fields
12
+ - [ ] Scaffold templates updated if init output changed
13
+
14
+ ## Matrix policy changes
15
+
16
+ - [ ] New task_types have unique `id` and `orchestration_pattern`
17
+ - [ ] `provider_activation_policy` defaults remain `off`
18
+ - [ ] Breaking field removal → major matrix version + migration note
19
+ - [ ] Field addition only → minor matrix version
20
+
21
+ ## Contract stability
22
+
23
+ - [ ] `execution_intent` required keys unchanged OR major package bump
24
+ - [ ] Snapshot fixtures updated if intentional behavior change
25
+ - [ ] `capint route --json` output reviewed against `docs/execution-intent-contract.md`
26
+
27
+ ## Publish (manual)
28
+
29
+ - [ ] `npm login` (maintainer)
30
+ - [ ] `npm publish --access public`
31
+ - [ ] Git tag `vX.Y.Z` on `Pegarose/capint`
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@bcelep/capint",
3
+ "version": "0.4.2",
4
+ "description": "Capability-first orchestration engine for IDE agents",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "capint": "bin/capint.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "src/",
12
+ "templates/",
13
+ "projections/",
14
+ "workflows/",
15
+ "skills/",
16
+ "scripts/",
17
+ "AGENT.md",
18
+ "skill-routing-matrix.json",
19
+ "registry.json",
20
+ "README.md",
21
+ "CHANGELOG.md",
22
+ "design.md",
23
+ "docs/"
24
+ ],
25
+ "scripts": {
26
+ "test": "node tests/contract-snapshot.test.mjs",
27
+ "validate": "node scripts/validate-matrix.mjs",
28
+ "release-check": "node scripts/release-check.mjs"
29
+ },
30
+ "engines": {
31
+ "node": ">=18.0.0"
32
+ }
33
+ }
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: "CapInt session start + Execution Intent — projected via capint ide sync"
3
+ ---
4
+
5
+ # Session start (all IDEs)
6
+
7
+ Every **new conversation**, before editing files:
8
+
9
+ 1. Read root `AGENT.md` + `design.md` (+ `HANDOFF.md` if present).
10
+ 2. Keep startup output short (2–5 lines).
11
+
12
+ # Task received
13
+
14
+ When the user assigns work:
15
+
16
+ 1. User does not need to know skill names; you select capability.
17
+ 2. Before code, show short **Execution Intent**:
18
+ - `Intent: ...`
19
+ - `Capability: ...`
20
+ - `Resolution: provider/resource`
21
+ - `Memory: none|optional|required`
22
+ - `Plan: auto|confirm|override`
23
+ 3. Ask **one** short confirm question when plan is `confirm`:
24
+ - `Confirm: how should I proceed?`
25
+ - `Options: apply_now | plan_first | analyze_only`
26
+ 4. If ambiguous: `Capability: X (default)` + `Override: /workflow`
27
+
28
+ # Paths
29
+
30
+ - Session: `AGENT.md`
31
+ - Matrix: `skill-routing-matrix.json`
32
+ - CLI preview: `capint route "<task>"`
package/registry.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "core": ["capability-router"],
4
+ "recommended": [
5
+ "context-memory-bridge",
6
+ "localization-hub",
7
+ "refactor",
8
+ "systematic-debugging"
9
+ ],
10
+ "optional": [],
11
+ "project_added": []
12
+ }
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "child_process";
3
+ import path from "path";
4
+ import { fileURLToPath } from "url";
5
+
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const root = path.join(__dirname, "..");
8
+
9
+ const steps = [
10
+ ["validate-matrix", ["node", "scripts/validate-matrix.mjs"]],
11
+ ["manifest-schema", ["node", "tests/manifest-schema.test.mjs"]],
12
+ ["contract-snapshot", ["node", "tests/contract-snapshot.test.mjs"]],
13
+ ["scaffold-policy", ["node", "tests/scaffold-policy.test.mjs"]],
14
+ ["event-log", ["node", "tests/event-log.test.mjs"]],
15
+ ["faz6", ["node", "tests/faz6.test.mjs"]],
16
+ ["not-installed", ["node", "tests/not-installed.test.mjs"]],
17
+ ["init-integration", ["node", "tests/init-integration.test.mjs"]],
18
+ ["ide-sync", ["node", "tests/ide-sync.test.mjs"]],
19
+ ["uninstall", ["node", "tests/uninstall.test.mjs"]],
20
+ ["upgrade", ["node", "tests/upgrade.test.mjs"]],
21
+ ["local-adapters", ["node", "tests/local-adapters.test.mjs"]],
22
+ ["route-smoke", ["node", "bin/capint.js", "route", "i18n çeviri"]],
23
+ ["doctor-smoke", ["node", "bin/capint.js", "doctor"]],
24
+ ["audit-smoke", ["node", "bin/capint.js", "audit", "--json"]]
25
+ ];
26
+
27
+ let failed = 0;
28
+ for (const [name, cmd] of steps) {
29
+ const r = spawnSync(cmd[0], cmd.slice(1), { cwd: root, encoding: "utf-8" });
30
+ if (r.status === 0) {
31
+ console.log(`ok ${name}`);
32
+ } else {
33
+ console.error(`fail ${name}`);
34
+ if (r.stdout) process.stdout.write(r.stdout);
35
+ if (r.stderr) process.stderr.write(r.stderr);
36
+ failed++;
37
+ }
38
+ }
39
+
40
+ process.exit(failed > 0 ? 1 : 0);