@assistkick/create 1.31.0 → 1.33.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 (65) hide show
  1. package/package.json +1 -1
  2. package/templates/assistkick-product-system/package.json +3 -1
  3. package/templates/assistkick-product-system/packages/frontend/src/components/GraphLegend.tsx +10 -3
  4. package/templates/assistkick-product-system/packages/frontend/src/constants/graph.ts +8 -1
  5. package/templates/assistkick-product-system/packages/shared/db/migrate.ts +174 -3
  6. package/templates/assistkick-product-system/packages/shared/db/migrations/0003_solid_manta.sql +1 -0
  7. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0003_snapshot.json +992 -18
  8. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/_journal.json +7 -0
  9. package/templates/assistkick-product-system/packages/shared/db/schema.ts +1 -0
  10. package/templates/assistkick-product-system/packages/shared/lib/constants.ts +12 -0
  11. package/templates/assistkick-product-system/packages/shared/lib/embedding_service.test.ts +75 -0
  12. package/templates/assistkick-product-system/packages/shared/lib/embedding_service.ts +100 -0
  13. package/templates/assistkick-product-system/packages/shared/lib/relevance_search.ts +50 -38
  14. package/templates/assistkick-product-system/packages/shared/package.json +1 -0
  15. package/templates/assistkick-product-system/packages/shared/tools/add_node.ts +11 -3
  16. package/templates/assistkick-product-system/packages/shared/tools/delete_note.ts +50 -0
  17. package/templates/assistkick-product-system/packages/shared/tools/save_note.ts +79 -0
  18. package/templates/assistkick-product-system/packages/shared/tools/search_nodes.ts +6 -1
  19. package/templates/assistkick-product-system/packages/shared/tools/search_notes.ts +99 -0
  20. package/templates/assistkick-product-system/packages/shared/tools/update_node.ts +15 -0
  21. package/templates/assistkick-product-system/packages/shared/db/migrations/0000_dashing_gorgon.sql +0 -128
  22. package/templates/assistkick-product-system/packages/shared/db/migrations/0001_vengeful_wallop.sql +0 -1
  23. package/templates/assistkick-product-system/packages/shared/db/migrations/0002_greedy_excalibur.sql +0 -4
  24. package/templates/assistkick-product-system/packages/shared/db/migrations/0003_lonely_cyclops.sql +0 -17
  25. package/templates/assistkick-product-system/packages/shared/db/migrations/0004_tidy_matthew_murdock.sql +0 -9
  26. package/templates/assistkick-product-system/packages/shared/db/migrations/0005_mysterious_falcon.sql +0 -692
  27. package/templates/assistkick-product-system/packages/shared/db/migrations/0006_next_venom.sql +0 -9
  28. package/templates/assistkick-product-system/packages/shared/db/migrations/0007_deep_barracuda.sql +0 -39
  29. package/templates/assistkick-product-system/packages/shared/db/migrations/0008_puzzling_hannibal_king.sql +0 -1
  30. package/templates/assistkick-product-system/packages/shared/db/migrations/0009_amused_beast.sql +0 -8
  31. package/templates/assistkick-product-system/packages/shared/db/migrations/0010_spotty_moira_mactaggert.sql +0 -9
  32. package/templates/assistkick-product-system/packages/shared/db/migrations/0011_goofy_snowbird.sql +0 -3
  33. package/templates/assistkick-product-system/packages/shared/db/migrations/0011_supreme_doctor_octopus.sql +0 -3
  34. package/templates/assistkick-product-system/packages/shared/db/migrations/0013_reflective_prowler.sql +0 -15
  35. package/templates/assistkick-product-system/packages/shared/db/migrations/0014_nifty_punisher.sql +0 -15
  36. package/templates/assistkick-product-system/packages/shared/db/migrations/0015_magenta_jazinda.sql +0 -1
  37. package/templates/assistkick-product-system/packages/shared/db/migrations/0016_giant_xorn.sql +0 -1
  38. package/templates/assistkick-product-system/packages/shared/db/migrations/0017_sloppy_mentor.sql +0 -6
  39. package/templates/assistkick-product-system/packages/shared/db/migrations/0018_vengeful_kabuki.sql +0 -9
  40. package/templates/assistkick-product-system/packages/shared/db/migrations/0019_careful_sentinels.sql +0 -8
  41. package/templates/assistkick-product-system/packages/shared/db/migrations/0020_clever_spot.sql +0 -27
  42. package/templates/assistkick-product-system/packages/shared/db/migrations/0021_graceful_hex.sql +0 -1
  43. package/templates/assistkick-product-system/packages/shared/db/migrations/0022_short_kingpin.sql +0 -1
  44. package/templates/assistkick-product-system/packages/shared/db/migrations/0023_ambiguous_sharon_carter.sql +0 -1
  45. package/templates/assistkick-product-system/packages/shared/db/migrations/0024_fat_unus.sql +0 -1
  46. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0004_snapshot.json +0 -921
  47. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0005_snapshot.json +0 -1042
  48. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0006_snapshot.json +0 -1101
  49. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0007_snapshot.json +0 -1336
  50. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0008_snapshot.json +0 -1275
  51. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0009_snapshot.json +0 -1327
  52. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0010_snapshot.json +0 -1393
  53. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0011_snapshot.json +0 -1436
  54. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0013_snapshot.json +0 -1538
  55. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0014_snapshot.json +0 -1545
  56. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0015_snapshot.json +0 -1552
  57. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0016_snapshot.json +0 -1560
  58. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0017_snapshot.json +0 -1598
  59. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0018_snapshot.json +0 -1657
  60. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0019_snapshot.json +0 -1709
  61. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0020_snapshot.json +0 -1733
  62. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0021_snapshot.json +0 -1740
  63. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0022_snapshot.json +0 -1755
  64. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0023_snapshot.json +0 -1762
  65. package/templates/assistkick-product-system/packages/shared/db/migrations/meta/0024_snapshot.json +0 -1769
@@ -11,6 +11,7 @@ import { readNode, writeNode, appendToSection, setSection, deriveMetadata } from
11
11
  import { assertNodeExists, assertNotDone } from '../lib/validator.js';
12
12
  import { VALID_STATUSES, VALID_PRIORITIES, VALID_FEATURE_KINDS } from '../lib/constants.js';
13
13
  import { getKanbanEntry, saveKanbanEntry } from '../lib/kanban.js';
14
+ import { embedAndStore } from '../lib/embedding_service.js';
14
15
 
15
16
  program
16
17
  .argument('<id>', 'Node ID to update')
@@ -120,6 +121,20 @@ const opts = program.opts();
120
121
  }
121
122
  }
122
123
 
124
+ // Recompute embedding when content changes (name, description, or sections)
125
+ const contentChanged = opts.setName || opts.setDescription || opts.setSection
126
+ || opts.addAcceptanceCriteria || opts.addOpenQuestion || opts.addNote;
127
+ if (contentChanged) {
128
+ try {
129
+ const bodyText = Object.entries(sections)
130
+ .map(([name, content]) => content.trim() ? `## ${name}\n${content.trim()}` : '')
131
+ .filter(Boolean).join('\n');
132
+ await embedAndStore(id, frontmatter.name, bodyText);
133
+ } catch (embErr: any) {
134
+ console.log(chalk.yellow(`⚠ Embedding update skipped: ${embErr.message}`));
135
+ }
136
+ }
137
+
123
138
  console.log(chalk.green(`✓ Updated ${id}`));
124
139
  console.log(JSON.stringify({
125
140
  id,
@@ -1,128 +0,0 @@
1
- CREATE TABLE `coherence_reviews` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `type` text NOT NULL,
4
- `from_id` text,
5
- `to_id` text,
6
- `relation` text,
7
- `proposed_node_type` text,
8
- `proposed_node_name` text,
9
- `target_node_id` text,
10
- `proposed_description` text,
11
- `confidence` text,
12
- `batch_id` text,
13
- `reasoning` text NOT NULL,
14
- `status` text NOT NULL,
15
- `created_at` text NOT NULL,
16
- `resolved_at` text,
17
- `project_id` text
18
- );
19
- --> statement-breakpoint
20
- CREATE TABLE `edges` (
21
- `from_id` text NOT NULL,
22
- `relation` text NOT NULL,
23
- `to_id` text NOT NULL,
24
- `project_id` text,
25
- PRIMARY KEY(`from_id`, `relation`, `to_id`)
26
- );
27
- --> statement-breakpoint
28
- CREATE TABLE `invitations` (
29
- `id` text PRIMARY KEY NOT NULL,
30
- `email` text NOT NULL,
31
- `token_hash` text NOT NULL,
32
- `invited_by` text NOT NULL,
33
- `expires_at` text NOT NULL,
34
- `accepted_at` text,
35
- `created_at` text NOT NULL,
36
- FOREIGN KEY (`invited_by`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
37
- );
38
- --> statement-breakpoint
39
- CREATE TABLE `kanban` (
40
- `node_id` text PRIMARY KEY NOT NULL,
41
- `column_name` text NOT NULL,
42
- `position` integer NOT NULL,
43
- `project_id` text,
44
- FOREIGN KEY (`node_id`) REFERENCES `nodes`(`id`) ON UPDATE no action ON DELETE no action
45
- );
46
- --> statement-breakpoint
47
- CREATE TABLE `nodes` (
48
- `id` text PRIMARY KEY NOT NULL,
49
- `type` text NOT NULL,
50
- `name` text NOT NULL,
51
- `status` text NOT NULL,
52
- `priority` text NOT NULL,
53
- `completeness` real DEFAULT 0 NOT NULL,
54
- `open_questions_count` integer DEFAULT 0 NOT NULL,
55
- `kind` text,
56
- `created_at` text NOT NULL,
57
- `updated_at` text NOT NULL,
58
- `body` text,
59
- `project_id` text
60
- );
61
- --> statement-breakpoint
62
- CREATE TABLE `password_reset_tokens` (
63
- `id` text PRIMARY KEY NOT NULL,
64
- `user_id` text NOT NULL,
65
- `token_hash` text NOT NULL,
66
- `expires_at` text NOT NULL,
67
- `created_at` text NOT NULL,
68
- `used_at` text,
69
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
70
- );
71
- --> statement-breakpoint
72
- CREATE TABLE `pipeline_state` (
73
- `feature_id` text PRIMARY KEY NOT NULL,
74
- `status` text NOT NULL,
75
- `cycle` integer DEFAULT 1 NOT NULL,
76
- `tasks_json` text,
77
- `tool_calls_json` text,
78
- `work_summaries_json` text,
79
- `error` text,
80
- `updated_at` text NOT NULL,
81
- `project_id` text
82
- );
83
- --> statement-breakpoint
84
- CREATE TABLE `projects` (
85
- `id` text PRIMARY KEY NOT NULL,
86
- `name` text NOT NULL,
87
- `is_default` integer DEFAULT 0 NOT NULL,
88
- `archived_at` text,
89
- `created_at` text NOT NULL,
90
- `updated_at` text NOT NULL
91
- );
92
- --> statement-breakpoint
93
- CREATE TABLE `refresh_tokens` (
94
- `id` text PRIMARY KEY NOT NULL,
95
- `user_id` text NOT NULL,
96
- `token_hash` text NOT NULL,
97
- `expires_at` text NOT NULL,
98
- `created_at` text NOT NULL,
99
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
100
- );
101
- --> statement-breakpoint
102
- CREATE TABLE `review_meta` (
103
- `key` text PRIMARY KEY NOT NULL,
104
- `value` text NOT NULL,
105
- `project_id` text
106
- );
107
- --> statement-breakpoint
108
- CREATE TABLE `sessions` (
109
- `session_number` integer PRIMARY KEY NOT NULL,
110
- `started_at` text NOT NULL,
111
- `ended_at` text,
112
- `summary` text,
113
- `nodes_touched` text,
114
- `questions_resolved` integer DEFAULT 0 NOT NULL,
115
- `body` text,
116
- `project_id` text
117
- );
118
- --> statement-breakpoint
119
- CREATE TABLE `users` (
120
- `id` text PRIMARY KEY NOT NULL,
121
- `email` text NOT NULL,
122
- `password_hash` text NOT NULL,
123
- `role` text DEFAULT 'user' NOT NULL,
124
- `created_at` text NOT NULL,
125
- `updated_at` text NOT NULL
126
- );
127
- --> statement-breakpoint
128
- CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);
@@ -1 +0,0 @@
1
- ALTER TABLE `pipeline_state` ADD `stage_stats_json` text;
@@ -1,4 +0,0 @@
1
- ALTER TABLE `projects` ADD `repo_url` text;--> statement-breakpoint
2
- ALTER TABLE `projects` ADD `github_installation_id` text;--> statement-breakpoint
3
- ALTER TABLE `projects` ADD `github_repo_full_name` text;--> statement-breakpoint
4
- ALTER TABLE `projects` ADD `base_branch` text;
@@ -1,17 +0,0 @@
1
- PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
- CREATE TABLE `__new_sessions` (
3
- `session_number` integer NOT NULL,
4
- `started_at` text NOT NULL,
5
- `ended_at` text,
6
- `summary` text,
7
- `nodes_touched` text,
8
- `questions_resolved` integer DEFAULT 0 NOT NULL,
9
- `body` text,
10
- `project_id` text NOT NULL,
11
- PRIMARY KEY(`session_number`, `project_id`)
12
- );
13
- --> statement-breakpoint
14
- INSERT INTO `__new_sessions`("session_number", "started_at", "ended_at", "summary", "nodes_touched", "questions_resolved", "body", "project_id") SELECT "session_number", "started_at", "ended_at", "summary", "nodes_touched", "questions_resolved", "body", "project_id" FROM `sessions`;--> statement-breakpoint
15
- DROP TABLE `sessions`;--> statement-breakpoint
16
- ALTER TABLE `__new_sessions` RENAME TO `sessions`;--> statement-breakpoint
17
- PRAGMA foreign_keys=ON;
@@ -1,9 +0,0 @@
1
- CREATE TABLE `terminal_sessions` (
2
- `id` text PRIMARY KEY NOT NULL,
3
- `claude_session_id` text NOT NULL,
4
- `project_id` text NOT NULL,
5
- `project_name` text NOT NULL,
6
- `name` text NOT NULL,
7
- `created_at` text NOT NULL,
8
- `last_used_at` text NOT NULL
9
- );