@jigyasudham/veto 0.8.2 → 1.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 (111) hide show
  1. package/README.md +209 -52
  2. package/dist/agents/executor.js +36 -3
  3. package/dist/cli.js +350 -51
  4. package/dist/context/reader.js +113 -0
  5. package/dist/council/index.js +3 -1
  6. package/dist/plugins/loader.js +49 -0
  7. package/dist/router/index.js +2 -2
  8. package/dist/router/learning-updater.js +45 -1
  9. package/dist/server.js +478 -14
  10. package/dist/watcher/index.js +77 -0
  11. package/dist/workflow/pipeline.js +64 -0
  12. package/package.json +12 -3
  13. package/.claude/settings.local.json +0 -9
  14. package/src/adapters/claude.ts +0 -70
  15. package/src/adapters/codex.ts +0 -71
  16. package/src/adapters/gemini.ts +0 -71
  17. package/src/adapters/index.ts +0 -217
  18. package/src/agents/development/api.ts +0 -120
  19. package/src/agents/development/backend.ts +0 -85
  20. package/src/agents/development/coder.ts +0 -213
  21. package/src/agents/development/database.ts +0 -83
  22. package/src/agents/development/debugger.ts +0 -238
  23. package/src/agents/development/devops.ts +0 -86
  24. package/src/agents/development/frontend.ts +0 -85
  25. package/src/agents/development/migration.ts +0 -144
  26. package/src/agents/development/performance.ts +0 -144
  27. package/src/agents/development/refactor.ts +0 -86
  28. package/src/agents/development/reviewer.ts +0 -268
  29. package/src/agents/development/tester.ts +0 -151
  30. package/src/agents/executor.ts +0 -158
  31. package/src/agents/memory/context-manager.ts +0 -171
  32. package/src/agents/memory/decision-logger.ts +0 -160
  33. package/src/agents/memory/knowledge-base.ts +0 -124
  34. package/src/agents/memory/pattern-learner.ts +0 -143
  35. package/src/agents/memory/project-mapper.ts +0 -118
  36. package/src/agents/quality/accessibility.ts +0 -99
  37. package/src/agents/quality/code-quality.ts +0 -115
  38. package/src/agents/quality/compatibility.ts +0 -58
  39. package/src/agents/quality/documentation.ts +0 -105
  40. package/src/agents/quality/error-handling.ts +0 -96
  41. package/src/agents/research/competitor-analyzer.ts +0 -45
  42. package/src/agents/research/cost-analyzer.ts +0 -54
  43. package/src/agents/research/estimator.ts +0 -60
  44. package/src/agents/research/ethics-bias.ts +0 -113
  45. package/src/agents/research/researcher.ts +0 -114
  46. package/src/agents/research/risk-assessor.ts +0 -63
  47. package/src/agents/research/tech-advisor.ts +0 -55
  48. package/src/agents/security/auth.ts +0 -287
  49. package/src/agents/security/dependency-audit.ts +0 -337
  50. package/src/agents/security/penetration.ts +0 -262
  51. package/src/agents/security/privacy.ts +0 -285
  52. package/src/agents/security/scanner.ts +0 -322
  53. package/src/agents/security/secrets.ts +0 -249
  54. package/src/agents/types.ts +0 -66
  55. package/src/agents/workflow/automation.ts +0 -59
  56. package/src/agents/workflow/file-manager.ts +0 -52
  57. package/src/agents/workflow/git-agent.ts +0 -55
  58. package/src/agents/workflow/reporter.ts +0 -51
  59. package/src/agents/workflow/search-agent.ts +0 -40
  60. package/src/agents/workflow/task-coordinator.ts +0 -41
  61. package/src/agents/workflow/task-planner.ts +0 -47
  62. package/src/cli.ts +0 -135
  63. package/src/council/decision-engine.ts +0 -171
  64. package/src/council/devil-advocate.ts +0 -116
  65. package/src/council/index.ts +0 -44
  66. package/src/council/lead-developer.ts +0 -118
  67. package/src/council/legal-compliance.ts +0 -152
  68. package/src/council/product-manager.ts +0 -102
  69. package/src/council/security.ts +0 -172
  70. package/src/council/system-architect.ts +0 -132
  71. package/src/council/types.ts +0 -33
  72. package/src/council/ux-designer.ts +0 -121
  73. package/src/memory/local.ts +0 -305
  74. package/src/memory/schema.ts +0 -174
  75. package/src/memory/sync.ts +0 -274
  76. package/src/router/complexity-scorer.ts +0 -96
  77. package/src/router/context-compressor.ts +0 -74
  78. package/src/router/index.ts +0 -60
  79. package/src/router/learning-updater.ts +0 -271
  80. package/src/router/model-selector.ts +0 -83
  81. package/src/router/rate-monitor.ts +0 -103
  82. package/src/server.ts +0 -1038
  83. package/src/skills/development/skill-api-design.ts +0 -329
  84. package/src/skills/development/skill-auth.ts +0 -271
  85. package/src/skills/development/skill-ci-cd.ts +0 -0
  86. package/src/skills/development/skill-crud.ts +0 -209
  87. package/src/skills/development/skill-db-schema.ts +0 -0
  88. package/src/skills/development/skill-docker.ts +0 -0
  89. package/src/skills/development/skill-env-setup.ts +0 -0
  90. package/src/skills/development/skill-scaffold.ts +0 -323
  91. package/src/skills/intelligence/skill-complexity-score.ts +0 -69
  92. package/src/skills/intelligence/skill-cost-track.ts +0 -39
  93. package/src/skills/intelligence/skill-learning-loop.ts +0 -69
  94. package/src/skills/intelligence/skill-pattern-detect.ts +0 -38
  95. package/src/skills/intelligence/skill-rate-watch.ts +0 -61
  96. package/src/skills/memory/skill-context-compress.ts +0 -98
  97. package/src/skills/memory/skill-cross-sync.ts +0 -104
  98. package/src/skills/memory/skill-decision-log.ts +0 -119
  99. package/src/skills/memory/skill-session-restore.ts +0 -59
  100. package/src/skills/memory/skill-session-save.ts +0 -94
  101. package/src/skills/quality/skill-accessibility.ts +0 -0
  102. package/src/skills/quality/skill-code-review.ts +0 -84
  103. package/src/skills/quality/skill-docs-gen.ts +0 -0
  104. package/src/skills/quality/skill-perf-audit.ts +0 -0
  105. package/src/skills/quality/skill-security-scan.ts +0 -91
  106. package/src/skills/quality/skill-test-suite.ts +0 -290
  107. package/src/skills/workflow/skill-deploy.ts +0 -0
  108. package/src/skills/workflow/skill-git-workflow.ts +0 -0
  109. package/src/skills/workflow/skill-rollback.ts +0 -0
  110. package/src/skills/workflow/skill-task-breakdown.ts +0 -0
  111. package/tsconfig.json +0 -20
@@ -1,69 +0,0 @@
1
- // Skill: learning-loop — how to feed outcome data back into the router and agents
2
-
3
- export interface SkillInput { task: string; context?: string; options?: Record<string, unknown>; }
4
- export interface SkillOutput { skill: string; template?: string; checklist: string[]; patterns: string[]; gotchas: string[]; resources: string[]; }
5
-
6
- export function run(input: SkillInput): SkillOutput {
7
- return {
8
- skill: 'learning-loop',
9
- template: `
10
- // ── Learning Loop Protocol ────────────────────────────────────────────────
11
- //
12
- // The router gets smarter when you record task outcomes.
13
- // Without outcome data, thresholds stay at the default 30/70 forever.
14
- //
15
- // Step 1: Complete a task
16
- //
17
- // Step 2: Score the output quality (0–100):
18
- // 90–100 Excellent — exactly what was needed, no revision required
19
- // 70–89 Good — minor revisions needed
20
- // 50–69 Acceptable — significant revision needed but usable
21
- // 30–49 Poor — required a full rewrite
22
- // 0–29 Failed — output was wrong or harmful
23
- //
24
- // Step 3: Record via veto_record_outcome:
25
- // {
26
- // task_type: "write-auth-middleware", // short label, consistent naming helps
27
- // complexity: 58, // from veto_route_task result
28
- // model_tier: 2, // tier that was actually used
29
- // agent: "coder", // agent type used
30
- // output_quality: 87, // your score
31
- // tokens_used: 1240 // optional but useful
32
- // }
33
- //
34
- // Step 4: After 20+ outcomes: call veto_learning_apply
35
- // The router reads the quality data and adjusts tier1_max and tier2_max
36
- // Adjustment is conservative — it needs 20+ data points to act
37
- //
38
- // Step 5: Check veto_learning_stats to see what changed
39
- `.trim(),
40
- checklist: [
41
- 'Record every task outcome, not just the bad ones — the loop needs both successes and failures',
42
- 'Use consistent task_type labels across sessions (e.g. "write-unit-tests" not "tests")',
43
- 'Score output quality honestly — over-reporting quality prevents threshold improvement',
44
- 'Include tokens_used when possible — this feeds cost/quality optimisation',
45
- 'Call veto_learning_apply after every 10 new outcomes to keep thresholds current',
46
- 'Call veto_learning_stats monthly to review the tier distribution and agent performance',
47
- 'If an agent consistently scores below 70%: check veto_agent_performance_stats for patterns',
48
- 'Council insights: review veto_council_insights monthly to see if any GREEN verdicts led to debugging',
49
- ],
50
- patterns: [
51
- 'Consistent labelling: task_type labels that vary prevent pattern detection ("test" vs "write-tests" vs "unit-tests" are invisible to the loop)',
52
- 'Regular application: apply thresholds every 10 outcomes — waiting for 100 delays improvement by months',
53
- 'Quality honesty: the loop self-corrects only when quality scores reflect reality',
54
- 'Council correlation: the council insights loop needs decisions logged with veto_memory_store to work',
55
- ],
56
- gotchas: [
57
- 'Only recording failures — a loop trained on failures sees everything as over-tiered',
58
- 'Inconsistent task_type labels — "auth", "authentication", "write-auth" look like three different task types',
59
- 'Not calling veto_learning_apply — recording outcomes without applying has zero effect on routing',
60
- 'Applying thresholds with fewer than 20 data points — results will be noisy and unreliable',
61
- ],
62
- resources: [
63
- 'veto_record_outcome — record a task quality score',
64
- 'veto_learning_apply — apply recorded outcomes to adjust tier thresholds',
65
- 'veto_learning_stats — view tier distribution, agent performance, and suggested thresholds',
66
- 'veto_council_insights — review council decisions correlated with debugging sessions',
67
- ],
68
- };
69
- }
@@ -1,38 +0,0 @@
1
- // Skill: pattern-detect — find repeated patterns and anti-patterns in a codebase
2
-
3
- export interface SkillInput { task: string; context?: string; options?: Record<string, unknown>; }
4
- export interface SkillOutput { skill: string; checklist: string[]; patterns: string[]; gotchas: string[]; resources: string[]; }
5
-
6
- export function run(input: SkillInput): SkillOutput {
7
- return {
8
- skill: 'pattern-detect',
9
- checklist: [
10
- 'Call veto_patterns_list to load all stored coding patterns before scanning',
11
- 'Scan the 5 most recently modified files for structural patterns (not style — structure)',
12
- 'Look for: repeated try/catch shapes, recurring if/else chains, duplicated utility logic',
13
- 'Look for anti-patterns: N+1 loops, empty catch blocks, hardcoded magic strings/numbers',
14
- 'Compare found patterns against stored patterns — update confidence via veto_pattern_store',
15
- 'New patterns not yet stored: add via veto_pattern_store with a category.name key format',
16
- 'Anti-patterns found: flag them via veto_memory_store (type="pattern", title="Anti-pattern: X")',
17
- 'After scanning: call veto_agent_plan with agent="pattern-learner" for deeper style analysis',
18
- ],
19
- patterns: [
20
- 'Structure over style: detect structural patterns (how code is organised) not style (how it is formatted)',
21
- 'Frequency threshold: a pattern seen in 3+ files is established; seen in 1–2 files is tentative',
22
- 'Anti-pattern distinction: store anti-patterns separately with "Anti-pattern:" title prefix',
23
- 'Confidence accumulation: every confirmed observation of a pattern increments its confidence score',
24
- ],
25
- gotchas: [
26
- 'Detecting style instead of structure — style is enforced by a linter; pattern detection adds no value there',
27
- 'Flagging intentional deviations as anti-patterns — some files deliberately break the pattern (e.g. test fixtures)',
28
- 'Not updating stored patterns when the codebase evolves — stale patterns mislead future agents',
29
- 'Storing too-specific patterns ("function X uses this exact shape") vs. too-generic ("uses functions")',
30
- ],
31
- resources: [
32
- 'veto_patterns_list — list all stored patterns with confidence scores',
33
- 'veto_pattern_store — add or update a pattern',
34
- 'veto_memory_store (type="pattern") — store anti-patterns and architectural patterns',
35
- 'veto_agent_plan with agent="pattern-learner" — deeper coding style analysis',
36
- ],
37
- };
38
- }
@@ -1,61 +0,0 @@
1
- // Skill: rate-watch — monitor AI rate limits and trigger platform switches proactively
2
-
3
- export interface SkillInput { task: string; context?: string; options?: Record<string, unknown>; }
4
- export interface SkillOutput { skill: string; template?: string; checklist: string[]; patterns: string[]; gotchas: string[]; resources: string[]; }
5
-
6
- export function run(input: SkillInput): SkillOutput {
7
- return {
8
- skill: 'rate-watch',
9
- template: `
10
- // ── Rate Limit Thresholds ─────────────────────────────────────────────────
11
- //
12
- // 0–69% Green zone — normal routing, no action needed
13
- // 70–89% Warning — Tier 1/2 auto-routes to Gemini/Codex
14
- // Tier 3 stays on Claude (too important to downgrade)
15
- // 90%+ Critical — all tasks routed to Gemini/Codex
16
- // Non-urgent work queued for reset
17
- //
18
- // Cross-platform switch (manual):
19
- //
20
- // Claude at 90%+ mid-task?
21
- // 1. Call veto_session_save (capture current state)
22
- // 2. Note the session ID
23
- // 3. Open Gemini terminal
24
- // 4. Call veto_session_restore {session_id}
25
- // 5. Continue — Gemini has full context
26
- // Total interruption: under 10 seconds
27
- //
28
- // All platforms at limit simultaneously?
29
- // Check veto_rate_status for reset times
30
- // Work on tasks that don't need AI (docs, planning, code review checklists)
31
- // Auto-resumes when first platform resets
32
- `.trim(),
33
- checklist: [
34
- 'Call veto_rate_status at the start of long sessions to check headroom',
35
- 'At 70%: start Tier 1/2 tasks on Gemini/Codex proactively instead of waiting for auto-routing',
36
- 'At 80%: save the current session via veto_session_save as a precaution',
37
- 'At 90%: switch platform manually using veto_session_save → veto_session_restore',
38
- 'At 100%: check reset times from veto_rate_status, switch to non-AI tasks until reset',
39
- 'After a platform switch: verify the session restored correctly before continuing',
40
- 'Prefer Gemini for T1/T2 overflow — it has higher rate limits on the free tier',
41
- ],
42
- patterns: [
43
- 'Proactive switch at 80%: switching before hitting 90% avoids a mid-task interruption',
44
- 'Session save at 70%: ensures context is preserved if a hard limit is hit unexpectedly',
45
- 'Platform diversity: using two platforms in parallel halves the effective rate limit pressure',
46
- 'Tier-based overflow: only T1/T2 overflow — never route T3 to a lower-capability model',
47
- ],
48
- gotchas: [
49
- 'Switching platforms without saving the session — the receiving platform starts blind',
50
- 'Routing Tier 3 tasks to Gemini Flash or Haiku to avoid rate limits — quality loss is not worth it',
51
- 'Not checking rate status before a long task — hitting the limit mid-migration is high risk',
52
- 'Forgetting that rate limits reset daily at midnight UTC — a limit today may reset in 2 hours',
53
- ],
54
- resources: [
55
- 'veto_rate_status — current usage % and advisory for all platforms',
56
- 'veto_route_task — routes tasks to the least-loaded platform automatically',
57
- 'veto_session_save — save context before switching platforms',
58
- 'veto_session_restore — restore on the receiving platform',
59
- ],
60
- };
61
- }
@@ -1,98 +0,0 @@
1
- // Skill: context-compress — when and how to compress context before model calls
2
-
3
- export interface SkillInput {
4
- task: string;
5
- context?: string;
6
- options?: Record<string, unknown>;
7
- }
8
-
9
- export interface SkillOutput {
10
- skill: string;
11
- template?: string;
12
- checklist: string[];
13
- patterns: string[];
14
- gotchas: string[];
15
- resources: string[];
16
- }
17
-
18
- const TEMPLATE = `
19
- // ── Context Compression Protocol ─────────────────────────────────────────
20
- //
21
- // Apply when token count > 8,000 or before any cross-platform handoff.
22
- // Target: < 30% of original token count, zero loss of active constraints.
23
- //
24
- // Compression tiers:
25
- //
26
- // TIER 1 — Keep verbatim (never compress):
27
- // - Active blockers that require human input
28
- // - Open decisions that have not been resolved
29
- // - File paths of files currently being modified
30
- // - The single next action
31
- // - Error messages that have not been diagnosed
32
- //
33
- // TIER 2 — Compress to 1–3 sentences:
34
- // - Completed subtasks (collapse to "✓ Implemented X")
35
- // - Read-back confirmations ("confirmed the file exists")
36
- // - Resolved blockers ("fixed: dependency conflict — used --legacy-peer-deps")
37
- // - Prior session context (collapse to a 2-sentence progress summary)
38
- //
39
- // TIER 3 — Drop entirely:
40
- // - Superseded decisions (replaced by a newer ADR)
41
- // - Files read but not modified and not needed going forward
42
- // - Exploratory steps that led to dead ends and have been abandoned
43
- // - Console output that has already been analyzed
44
- //
45
- // Compressed context shape:
46
- {
47
- "phase": "implementing",
48
- "completed": ["Brief one-liner per completed subtask"],
49
- "inProgress": "The exact current subtask in one sentence",
50
- "remaining": ["Ordered list of remaining subtasks"],
51
- "activeConstraints": ["Each constraint in one sentence"],
52
- "openDecisions": [{ "question": "...", "options": ["A", "B"] }],
53
- "blockers": ["Any current blocker with full detail"],
54
- "keyFiles": ["Only files still needed going forward"],
55
- "nextAction": "Single concrete step — unambiguous"
56
- }
57
- `.trim();
58
-
59
- export function run(input: SkillInput): SkillOutput {
60
- return {
61
- skill: 'context-compress',
62
- template: TEMPLATE,
63
- checklist: [
64
- 'Measure the current context token estimate before compressing',
65
- 'Apply compression only when token count exceeds 8,000 or before a platform handoff',
66
- 'Identify Tier 1 items first — these are never touched',
67
- 'Identify Tier 3 items — drop them completely without summarising',
68
- 'For Tier 2 items: write one sentence per completed subtask; the reader does not need the history',
69
- 'Preserve the full text of any active blocker — the receiving agent must understand it in full',
70
- 'Preserve the nextAction as a concrete step, not "continue the task"',
71
- 'After compressing: verify the compressed context is complete by simulating a cold-start agent reading it',
72
- 'Save the compressed context via veto_session_save before switching context',
73
- 'Target a compression ratio of at least 3:1 — if you cannot achieve this, you have too many Tier 1 items',
74
- 'Do not compress active error messages — they need full context to diagnose',
75
- 'Do not summarise open decisions — they need all options preserved',
76
- ],
77
- patterns: [
78
- 'Tier-based compression: verbatim | summarise | drop — never binary keep/delete',
79
- 'Cold-start test: can a fresh agent read the compressed context and continue the task without questions?',
80
- 'Constraint-first ordering: active constraints at the top, history at the bottom',
81
- 'Forward-only compression: compress backward-looking content, not forward-looking content',
82
- ],
83
- gotchas: [
84
- 'Compressing active constraints as if they were completed work — causes silent violations in the next session',
85
- 'Summarising blockers instead of preserving them verbatim — the receiving agent gets a vague summary and cannot resolve the blocker',
86
- 'Dropping unresolved error messages — the receiving agent restarts diagnosis from scratch',
87
- 'Targeting a fixed token count without checking completeness — may cut load-bearing context',
88
- 'Not saving the compressed context — the compression is lost on the next context switch',
89
- 'Treating all prior session content as droppable — some prior-session decisions are still active constraints',
90
- ],
91
- resources: [
92
- 'Use veto_route_task with context= to get the router\'s compression estimate',
93
- 'Use veto_session_save to persist the compressed context',
94
- 'Use veto_memory_store to permanently record key decisions before they are compressed away',
95
- 'The compression target is based on the router\'s context-compressor module heuristics',
96
- ],
97
- };
98
- }
@@ -1,104 +0,0 @@
1
- // Skill: cross-sync — how to move veto memory between machines using file export/import
2
-
3
- export interface SkillInput {
4
- task: string;
5
- context?: string;
6
- options?: Record<string, unknown>;
7
- }
8
-
9
- export interface SkillOutput {
10
- skill: string;
11
- template?: string;
12
- checklist: string[];
13
- patterns: string[];
14
- gotchas: string[];
15
- resources: string[];
16
- }
17
-
18
- const TEMPLATE = `
19
- // ── Cross-Machine Memory Transfer ────────────────────────────────────────
20
- //
21
- // Veto stores everything in ~/.veto/veto.db (SQLite).
22
- // To continue work on another machine: export → copy → import.
23
- //
24
- // No external services. No accounts. No env vars.
25
- //
26
- // ── Step 1: Export on Machine A ───────────────────────────────────────────
27
- //
28
- // veto_memory_export
29
- // → writes to ~/.veto/veto-export.json by default
30
- // → or specify output_path to write directly to shared storage
31
- //
32
- // Example with shared storage:
33
- // veto_memory_export { output_path: "/Users/you/Dropbox/veto-export.json" }
34
- //
35
- // ── Step 2: Copy the file ─────────────────────────────────────────────────
36
- //
37
- // Options (pick any):
38
- // • Dropbox / OneDrive / Google Drive — put output_path in your sync folder
39
- // • USB drive
40
- // • scp / rsync over SSH
41
- // • Email / messaging app
42
- // • AirDrop (Mac)
43
- //
44
- // ── Step 3: Import on Machine B ───────────────────────────────────────────
45
- //
46
- // veto_memory_import { input_path: "/path/to/veto-export.json" }
47
- // → merges into local ~/.veto/veto.db
48
- // → INSERT OR IGNORE — local rows are never overwritten
49
- // → returns { merged: {...}, skipped: {...} } showing what was added
50
- //
51
- // ── Step 4: Verify and resume ─────────────────────────────────────────────
52
- //
53
- // veto_sessions_list — confirm sessions arrived
54
- // veto_session_restore { id } — load the session you want to continue
55
- // veto_memory_search { query } — confirm knowledge base arrived
56
- //
57
- // ── What gets exported ────────────────────────────────────────────────────
58
- //
59
- // sessions — all saved sessions with task state and context
60
- // decisions — all logged decisions and rationale
61
- // knowledge_base — all stored solutions, patterns, errors, references
62
- // patterns — coding style and convention patterns
63
- // project_map — codebase structure maps
64
- // council_outcomes — all council debate results
65
- `.trim();
66
-
67
- export function run(input: SkillInput): SkillOutput {
68
- return {
69
- skill: 'cross-sync',
70
- template: TEMPLATE,
71
- checklist: [
72
- 'Before leaving Machine A: call veto_memory_export to create the export file',
73
- 'Check the export result — confirm row counts look right for sessions and knowledge_base',
74
- 'Copy the export file to Machine B via any method (Dropbox, USB, scp, etc.)',
75
- 'On Machine B: call veto_memory_import with the file path',
76
- 'Check the import result — merged counts show what was added, skipped counts show duplicates',
77
- 'Call veto_sessions_list to confirm the sessions you need are present',
78
- 'Call veto_session_restore with the session ID to load your prior context',
79
- 'Call veto_memory_search to confirm knowledge base entries are available',
80
- 'If working across multiple machines regularly: use a shared folder (Dropbox) as output_path so no manual copy is needed',
81
- 'After significant work on Machine B: run veto_memory_export again before switching back',
82
- ],
83
- patterns: [
84
- 'Export-before-switch: always export before ending a session, not only when switching machines',
85
- 'Shared-folder shortcut: point output_path at a Dropbox/OneDrive folder — no manual copy step',
86
- 'Merge semantics: INSERT OR IGNORE means both machines can export/import in any order without data loss',
87
- 'Verify-after-import: always call veto_sessions_list after import to confirm data arrived before starting work',
88
- ],
89
- gotchas: [
90
- 'Forgetting to export before switching — Machine B starts with no memory of Machine A\'s work',
91
- 'Importing a stale export (from yesterday) — you lose today\'s work on Machine A; always export fresh',
92
- 'The export file is plain JSON — it contains your session context. Don\'t commit it to a public git repo',
93
- 'Pattern merge adds seen_counts from both machines — this is intentional (more observations = higher confidence)',
94
- 'INSERT OR IGNORE means if Machine B already has a session with the same ID, it is not updated. Export fresh from Machine A if you need the latest version of a session',
95
- ],
96
- resources: [
97
- 'veto_memory_export — export all memory to JSON (default path: ~/.veto/veto-export.json)',
98
- 'veto_memory_import — import and merge JSON into local SQLite',
99
- 'veto_sessions_list — verify sessions after import',
100
- 'veto_session_restore — load a specific session to resume work',
101
- 'veto_memory_search — verify knowledge base after import',
102
- ],
103
- };
104
- }
@@ -1,119 +0,0 @@
1
- // Skill: decision-log — guide to logging architectural and design decisions
2
-
3
- export interface SkillInput {
4
- task: string;
5
- context?: string;
6
- options?: Record<string, unknown>;
7
- }
8
-
9
- export interface SkillOutput {
10
- skill: string;
11
- template?: string;
12
- checklist: string[];
13
- patterns: string[];
14
- gotchas: string[];
15
- resources: string[];
16
- }
17
-
18
- const TEMPLATE = `
19
- // ── Decision Log Entry ────────────────────────────────────────────────────
20
- //
21
- // Use this template for any decision that is:
22
- // - Non-obvious (a reasonable engineer could choose differently)
23
- // - Hard to reverse (schema changes, API contracts, auth architecture)
24
- // - Frequently re-discussed (keeps relitigating the same debate)
25
- // - A deliberate trade-off (performance vs correctness, simplicity vs flexibility)
26
- //
27
- {
28
- "id": "ADR-001", // Sequential ID for referencing
29
- "title": "Use JWT with rotating refresh tokens for authentication",
30
- "status": "accepted", // proposed | accepted | deprecated | superseded-by:ADR-xxx
31
- "date": "2026-05-01",
32
- "deciders": ["agent:auth", "human:alice"],
33
-
34
- "context": "We need an authentication mechanism for a stateless REST API that will be consumed by a mobile app and a web SPA. Session cookies are not ideal for the mobile client.",
35
-
36
- "decision": "Implement stateless JWTs for access (15-minute TTL) with rotating refresh tokens stored server-side in a database table.",
37
-
38
- "rationale": "JWTs allow stateless verification on every request without a DB lookup. Refresh token rotation limits the window of token theft. httpOnly cookies for refresh tokens prevent XSS access.",
39
-
40
- "alternatives": [
41
- {
42
- "option": "Server-side sessions with Redis",
43
- "pros": ["Instant revocation", "No JWT complexity"],
44
- "cons": ["Requires Redis infrastructure", "Not stateless — every request hits Redis", "Mobile clients struggle with cookie-based sessions"],
45
- "rejected_because": "Adds Redis dependency; poor fit for mobile client"
46
- },
47
- {
48
- "option": "Long-lived JWTs with no refresh",
49
- "pros": ["Simple implementation"],
50
- "cons": ["Cannot revoke without infrastructure", "Long-lived tokens are a large attack window"],
51
- "rejected_because": "Unacceptable security risk if token is stolen"
52
- }
53
- ],
54
-
55
- "consequences": {
56
- "positive": [
57
- "Stateless verification — no DB lookup per request",
58
- "Refresh token rotation limits theft window to 15 minutes",
59
- "Mobile and web clients use the same auth mechanism"
60
- ],
61
- "negative": [
62
- "Access tokens cannot be revoked before expiry (15-minute window)",
63
- "Requires refresh token table with periodic cleanup job",
64
- "More complex than simple sessions"
65
- ],
66
- "neutral": [
67
- "JWT library (jsonwebtoken) must be kept up to date for security patches"
68
- ]
69
- },
70
-
71
- "references": [
72
- "OWASP Authentication Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html",
73
- "RFC 6749 OAuth 2.0 Bearer Tokens",
74
- "Related implementation: src/services/auth.service.ts"
75
- ]
76
- }
77
- `.trim();
78
-
79
- export function run(input: SkillInput): SkillOutput {
80
- return {
81
- skill: 'decision-log',
82
- template: TEMPLATE,
83
- checklist: [
84
- 'Log the decision as soon as it is made — memory fades quickly and context is lost',
85
- 'Assign a sequential ID (ADR-001, ADR-002) to enable referencing in code comments and PRs',
86
- 'Write the context section first: describe the forces and constraints that made a choice necessary',
87
- 'State the decision explicitly and unambiguously — one clear sentence of what was decided',
88
- 'Document the rationale: why this option over the alternatives?',
89
- 'List at least two alternatives that were genuinely considered, not just strawmen',
90
- 'For each alternative, record pros, cons, and the specific reason it was rejected',
91
- 'Document positive, negative, and neutral consequences of the chosen option',
92
- 'Set the status field: proposed → accepted → deprecated or superseded-by:ADR-xxx',
93
- 'Add file references so future engineers can find the implementation',
94
- 'Reference the decision ID in relevant code comments: // See ADR-001',
95
- 'Store the decision log in docs/decisions/ or as a session memory entry',
96
- 'Update the status to "deprecated" or "superseded" when the decision changes — never delete',
97
- 'Review the decision log when revisiting a design — check if the original constraints still apply',
98
- ],
99
- patterns: [
100
- 'Architecture Decision Record (ADR) format: context → decision → rationale → alternatives → consequences',
101
- 'Decision-in-context: link from code to the decision that explains the design choice',
102
- 'Living document: update status when decisions change rather than deleting entries',
103
- 'Lightweight ADR: one file per decision, stored in git alongside the code it describes',
104
- ],
105
- gotchas: [
106
- 'Writing the decision without the rationale — future engineers will not know why, only what',
107
- 'Only documenting the chosen option without listing alternatives — looks like no thought went into it',
108
- 'Not updating stale decisions — a deprecated decision still marked "accepted" causes confusion',
109
- 'Writing the ADR after the fact with the benefit of hindsight — capture the original thinking at decision time',
110
- 'Logging trivial decisions — reserve the log for non-obvious choices; not every variable name needs an ADR',
111
- ],
112
- resources: [
113
- 'https://adr.github.io/ (Architectural Decision Records overview)',
114
- 'https://github.com/joelparkerhenderson/architecture-decision-record (templates and examples)',
115
- 'https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions (original Michael Nygard post)',
116
- 'https://www.thoughtworks.com/radar/techniques/lightweight-architecture-decision-records',
117
- ],
118
- };
119
- }
@@ -1,59 +0,0 @@
1
- // Skill: session-restore — guide to restoring context from a saved session
2
-
3
- export interface SkillInput {
4
- task: string;
5
- context?: string;
6
- options?: Record<string, unknown>;
7
- }
8
-
9
- export interface SkillOutput {
10
- skill: string;
11
- template?: string;
12
- checklist: string[];
13
- patterns: string[];
14
- gotchas: string[];
15
- resources: string[];
16
- }
17
-
18
- export function run(input: SkillInput): SkillOutput {
19
- return {
20
- skill: 'session-restore',
21
- template: undefined,
22
- checklist: [
23
- 'Call veto_sessions_list to get all available saved sessions',
24
- 'Identify the most relevant session: sort by updatedAt descending, read the task summary',
25
- 'If multiple sessions match the current task, read the top 2-3 and pick the most recent',
26
- 'Call veto_session_restore with the selected sessionId to load the full session object',
27
- 'Read the phase field to understand where work was left off (planning/implementing/reviewing/blocked)',
28
- 'Read progress.completed to know what has already been done — do not redo this work',
29
- 'Read progress.inProgress to know the exact subtask that was interrupted',
30
- 'Read progress.remaining to understand the full remaining scope before starting',
31
- 'Read decisions to understand constraints and design choices already made — do not revisit them without cause',
32
- 'Read findings to get codebase context (key files, discovered patterns, constraints)',
33
- 'Read blockers: if any blockers are listed, address them before continuing other work',
34
- 'Read nextAction and treat it as the starting instruction for this session',
35
- 'Re-read any key files mentioned in findings.filePaths before making changes',
36
- 'Verify that the code state matches expectations: if the session is old, re-check completed items',
37
- 'Save a new session checkpoint immediately after restoring and verifying context',
38
- ],
39
- patterns: [
40
- 'Restore-verify-continue: always verify actual code state matches what the session recorded before acting',
41
- 'Trust but verify: session describes intent; re-read key files to confirm they match expectations',
42
- 'Single source of truth: the saved session is authoritative about decisions and progress',
43
- 'Restore at the start of every new conversation before doing any work on a multi-session task',
44
- ],
45
- gotchas: [
46
- 'Restoring an old session and acting on stale file paths — files may have been moved or deleted',
47
- 'Skipping the verify step and redoing work already marked as completed — wastes time and may undo changes',
48
- 'Picking the wrong session when multiple tasks are in progress — check the task field carefully',
49
- 'Not saving a new checkpoint after restore — the next session will still start from the old state',
50
- 'Trusting a session that was saved in a "blocked" state without first resolving the blocker',
51
- ],
52
- resources: [
53
- 'Use the veto_session_restore MCP tool: { sessionId } → returns full session object',
54
- 'Use the veto_sessions_list MCP tool: returns all sessions sorted by updatedAt',
55
- 'Use the veto_session_save MCP tool after restoration to record the new starting point',
56
- 'MCP Session spec: https://modelcontextprotocol.io/docs/concepts/resources',
57
- ],
58
- };
59
- }
@@ -1,94 +0,0 @@
1
- // Skill: session-save — when and how to save MCP sessions
2
-
3
- export interface SkillInput {
4
- task: string;
5
- context?: string;
6
- options?: Record<string, unknown>;
7
- }
8
-
9
- export interface SkillOutput {
10
- skill: string;
11
- template?: string;
12
- checklist: string[];
13
- patterns: string[];
14
- gotchas: string[];
15
- resources: string[];
16
- }
17
-
18
- const TEMPLATE = `
19
- // ── What to include in a session save ────────────────────────────────────
20
- //
21
- // A session save should capture enough context so that a future agent
22
- // can resume work without re-reading all the source files.
23
- //
24
- // Recommended session object shape:
25
- {
26
- "task": "The original task description in one sentence",
27
- "phase": "planning | implementing | reviewing | blocked | complete",
28
- "progress": {
29
- "completed": ["List of finished subtasks or files written"],
30
- "inProgress": ["Current subtask being worked on"],
31
- "remaining": ["Subtasks still to do"]
32
- },
33
- "decisions": [
34
- {
35
- "decision": "What was decided",
36
- "rationale": "Why this approach was chosen",
37
- "alternatives": ["Other options that were considered"],
38
- "timestamp": "ISO 8601 timestamp"
39
- }
40
- ],
41
- "findings": [
42
- "Any important discoveries that affect future work",
43
- "File paths of key files that were read or modified",
44
- "Patterns or constraints discovered in the codebase"
45
- ],
46
- "blockers": [
47
- "Anything preventing progress that needs human input"
48
- ],
49
- "nextAction": "The single most important next step to resume work"
50
- }
51
- `.trim();
52
-
53
- export function run(input: SkillInput): SkillOutput {
54
- return {
55
- skill: 'session-save',
56
- template: TEMPLATE,
57
- checklist: [
58
- 'Save at the start of every new significant phase: planning, implementing, reviewing',
59
- 'Save after completing each major file or subtask — checkpoint before moving to the next',
60
- 'Save before any risky operation (file overwrites, schema migrations, destructive commands)',
61
- 'Save immediately when a blocker is encountered that requires human input',
62
- 'Save when token context is getting large — a compact save enables a fresh continuation',
63
- 'Include the original task description verbatim so it is never lost across sessions',
64
- 'Include current phase: planning / implementing / reviewing / blocked / complete',
65
- 'Include progress: completed[], inProgress[], remaining[] as concrete task lists',
66
- 'Include decisions made: decision + rationale + alternatives considered',
67
- 'Include codebase findings: key file paths discovered, constraints, patterns found',
68
- 'Include blockers: anything requiring human action before work can continue',
69
- 'Include nextAction: the single most important next step as a concrete instruction',
70
- 'Keep each save concise — aim for < 500 tokens; link to files rather than copying content',
71
- 'Use the veto_session_save MCP tool to persist the session to SQLite',
72
- 'Verify the save succeeded by calling veto_sessions_list and confirming the session appears',
73
- ],
74
- patterns: [
75
- 'Checkpoint pattern: save after each completed unit of work, not only at the end',
76
- 'Progressive detail: early saves capture intent; later saves add findings and decisions',
77
- 'Minimal viable context: save enough to resume, not a full transcript of every action',
78
- 'Blocker-first save: when stuck, save immediately with the blocker clearly stated',
79
- ],
80
- gotchas: [
81
- 'Not saving before a context switch — the next session starts blind without a save',
82
- 'Saving too much detail — a 5,000-token session save is expensive to restore and read',
83
- 'Forgetting to include nextAction — the restoring agent does not know where to start',
84
- 'Saving only at the very end — if the task fails partway through, the intermediate work is lost',
85
- 'Using vague phase descriptions ("working") instead of concrete phases (implementing step 3 of 7)',
86
- ],
87
- resources: [
88
- 'Use the veto_session_save MCP tool: { sessionId, task, phase, progress, decisions, findings }',
89
- 'Use the veto_sessions_list MCP tool to verify saves and list available sessions',
90
- 'Use the veto_session_restore MCP tool to reload a previous session',
91
- 'MCP Session spec: https://modelcontextprotocol.io/docs/concepts/resources',
92
- ],
93
- };
94
- }
File without changes