@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
@@ -0,0 +1,18 @@
1
+ # CapInt core rules
2
+
3
+ <!-- capint:managed:start -->
4
+ ## Session
5
+
6
+ 1. Read `AGENT.md` and `design.md` before non-trivial edits.
7
+ 2. Emit Execution Intent + Confirm for medium/heavy tasks.
8
+
9
+ ## Safety
10
+
11
+ - No blind overwrite of existing docs.
12
+ - No claiming done without verification evidence on medium/heavy tasks.
13
+ - Memory/graph providers default off unless policy activates them.
14
+
15
+ ## Routing
16
+
17
+ - Capability-first; slash commands are override only.
18
+ <!-- capint:managed:end -->
@@ -0,0 +1,26 @@
1
+ # AGENT.md — {{project_name}}
2
+
3
+ CapInt capability-first orchestration contract for this project.
4
+
5
+ <!-- capint:managed:start -->
6
+ ## Task contract
7
+
8
+ For every task:
9
+ 1. Build Execution Intent
10
+ 2. Ask confirm options (`apply_now | plan_first | analyze_only`)
11
+ 3. Route via capability + provider resolution
12
+
13
+ ## Runtime chain
14
+
15
+ `parseIntent -> routeCapability -> resolveMemoryStrategy -> buildExecutionPolicy -> formatOutput`
16
+
17
+ ## Scope
18
+
19
+ - Chat-first UX; no skill name memorization.
20
+ - Memory strategy is silent (`none|optional|required`).
21
+ - Verification required on medium/heavy before claiming done.
22
+ <!-- capint:managed:end -->
23
+
24
+ ## Project notes
25
+
26
+ Add project-specific agent guidance below this line (never overwritten by scaffold).
@@ -0,0 +1,9 @@
1
+ <!-- capint:managed:start -->
2
+ <!-- source: capint init | AGENTS.md stub -->
3
+ # AGENTS.md — {{project_name}}
4
+
5
+ Entry point for Codex / Cursor agents. Session protocol: **AGENT.md**
6
+
7
+ - Router: `capint route "<task>"`
8
+ - Health: `capint doctor`
9
+ <!-- capint:managed:end -->
@@ -0,0 +1,25 @@
1
+ # design.md — {{project_name}}
2
+
3
+ <!-- capint:managed:start -->
4
+ ## Goal
5
+
6
+ Describe the primary outcome this project must deliver.
7
+
8
+ ## Boundaries
9
+
10
+ - In scope:
11
+ - Out of scope:
12
+
13
+ ## Success criteria
14
+
15
+ - [ ] Measurable outcome 1
16
+ - [ ] Measurable outcome 2
17
+
18
+ ## Updated
19
+
20
+ {{date}}
21
+ <!-- capint:managed:end -->
22
+
23
+ ## Notes
24
+
25
+ Project-specific design decisions (safe from scaffold overwrite unless managed block updated).
@@ -0,0 +1,7 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "core": [],
4
+ "recommended": [],
5
+ "optional": [],
6
+ "project_added": []
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "capint_version": "0.2.0",
3
+ "preset": "prismx-compatible",
4
+ "updated_at": "{{date}}",
5
+ "event_log": false,
6
+ "memory_providers_enabled": false,
7
+ "graph_providers_enabled": false
8
+ }
@@ -0,0 +1,19 @@
1
+ ---
2
+ session_date: {{date}}
3
+ ---
4
+
5
+ # HANDOFF — {{project_name}}
6
+
7
+ <!-- capint:managed:start -->
8
+ ## Where we left off
9
+
10
+ -
11
+
12
+ ## Next steps
13
+
14
+ 1.
15
+
16
+ ## Blockers
17
+
18
+ -
19
+ <!-- capint:managed:end -->
@@ -0,0 +1,51 @@
1
+ # /forge
2
+
3
+ Default implementation workflow for medium/heavy tasks after confirm.
4
+
5
+ Inspired by harness-style phased orchestration; CapInt router selects this workflow for debug/refactor capabilities.
6
+
7
+ ## Execution modes (from confirm option)
8
+
9
+ | Confirm option | Mode | Behavior |
10
+ |----------------|------|----------|
11
+ | `apply_now` | subagent | Single focused pass, minimal ceremony |
12
+ | `plan_first` | pipeline | Phased plan before edits |
13
+ | `analyze_only` | explore | Read-only analysis, no file writes |
14
+
15
+ ## Phase 0 — Context
16
+
17
+ 1. Read `AGENT.md`, `design.md`, optional `HANDOFF.md`
18
+ 2. Use `context_pack` from Execution Intent when memory is optional/required
19
+ 3. If ambiguous, stop and ask one clarifying question
20
+
21
+ ## Phase 1 — Intent lock
22
+
23
+ 1. Restate capability + resolution from Execution Intent
24
+ 2. List assumptions and success criteria
25
+ 3. Wait for confirm unless `apply_now` on light tasks
26
+
27
+ ## Phase 2 — Execute
28
+
29
+ 1. Apply smallest correct change set
30
+ 2. Match project conventions; no drive-by refactors
31
+ 3. For `producer_reviewer` pattern: implement then self-review before claiming done
32
+
33
+ ## Phase 3 — Verify
34
+
35
+ 1. Run verification hints from Execution Intent
36
+ 2. Evidence before claims — no "done" without command output
37
+ 3. If verification fails, return to Phase 2 (max 2 retries)
38
+
39
+ ## Phase 4 — Handoff
40
+
41
+ 1. Summarize what changed and why
42
+ 2. Note follow-on capabilities from `orchestration.chains` if any
43
+ 3. Update `HANDOFF.md` when session material decisions were made
44
+
45
+ ## Error handling
46
+
47
+ | Situation | Action |
48
+ |-----------|--------|
49
+ | Blocked on missing info | `NEEDS_CONTEXT` — ask user, do not guess |
50
+ | Verification failed | Fix and re-verify; do not skip |
51
+ | Scope creep detected | Split task; route again via `capint consult` |