clawvault 2.5.2 → 2.5.3

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 (55) hide show
  1. package/README.md +159 -200
  2. package/bin/clawvault.js +111 -111
  3. package/bin/command-registration.test.js +166 -166
  4. package/bin/command-runtime.js +93 -93
  5. package/bin/command-runtime.test.js +154 -154
  6. package/bin/help-contract.test.js +39 -39
  7. package/bin/register-config-commands.js +153 -153
  8. package/bin/register-config-route-commands.test.js +121 -121
  9. package/bin/register-core-commands.js +237 -237
  10. package/bin/register-kanban-commands.js +56 -56
  11. package/bin/register-kanban-commands.test.js +83 -83
  12. package/bin/register-maintenance-commands.js +282 -282
  13. package/bin/register-project-commands.js +209 -209
  14. package/bin/register-project-commands.test.js +206 -206
  15. package/bin/register-query-commands.js +317 -317
  16. package/bin/register-query-commands.test.js +65 -65
  17. package/bin/register-resilience-commands.js +182 -182
  18. package/bin/register-resilience-commands.test.js +81 -81
  19. package/bin/register-route-commands.js +114 -114
  20. package/bin/register-session-lifecycle-commands.js +206 -206
  21. package/bin/register-tailscale-commands.js +106 -106
  22. package/bin/register-task-commands.js +348 -348
  23. package/bin/register-task-commands.test.js +69 -69
  24. package/bin/register-template-commands.js +72 -72
  25. package/bin/register-vault-operations-commands.js +300 -300
  26. package/bin/test-helpers/cli-command-fixtures.js +119 -119
  27. package/dashboard/lib/graph-diff.js +104 -104
  28. package/dashboard/lib/graph-diff.test.js +75 -75
  29. package/dashboard/lib/vault-parser.js +556 -556
  30. package/dashboard/lib/vault-parser.test.js +254 -254
  31. package/dashboard/public/app.js +796 -796
  32. package/dashboard/public/index.html +52 -52
  33. package/dashboard/public/styles.css +221 -221
  34. package/dashboard/server.js +374 -374
  35. package/dist/{chunk-HWUNREDJ.js → chunk-FG6RJMCN.js} +1 -1
  36. package/dist/{chunk-HRTPQQF2.js → chunk-IZEY5S74.js} +1 -1
  37. package/dist/{chunk-BHO7WSAY.js → chunk-LMEMZGUV.js} +1 -1
  38. package/dist/{chunk-PLZKZW4I.js → chunk-OSMS7QIG.js} +1 -1
  39. package/dist/cli/index.js +3 -3
  40. package/dist/commands/doctor.js +2 -2
  41. package/dist/commands/observe.js +2 -2
  42. package/dist/commands/status.js +1 -1
  43. package/dist/index.js +4 -4
  44. package/hooks/clawvault/HOOK.md +83 -74
  45. package/hooks/clawvault/handler.js +816 -816
  46. package/hooks/clawvault/handler.test.js +263 -263
  47. package/package.json +94 -125
  48. package/templates/checkpoint.md +19 -19
  49. package/templates/daily-note.md +19 -19
  50. package/templates/daily.md +19 -19
  51. package/templates/decision.md +17 -17
  52. package/templates/handoff.md +19 -19
  53. package/templates/lesson.md +16 -16
  54. package/templates/person.md +19 -19
  55. package/templates/project.md +23 -23
@@ -1,209 +1,209 @@
1
- /**
2
- * Project command registrations for ClawVault
3
- * Registers project add/update/archive/list/show/tasks/board commands
4
- */
5
-
6
- function parseCsvList(value) {
7
- if (!value) return undefined;
8
- const items = String(value)
9
- .split(',')
10
- .map((item) => item.trim())
11
- .filter(Boolean);
12
- return items.length > 0 ? items : undefined;
13
- }
14
-
15
- export function registerProjectCommands(
16
- program,
17
- { chalk, resolveVaultPath }
18
- ) {
19
- const projectCmd = program
20
- .command('project')
21
- .description('Manage projects and project boards');
22
-
23
- projectCmd
24
- .command('add <title>')
25
- .description('Add a new project')
26
- .option('-v, --vault <path>', 'Vault path (default: find nearest)')
27
- .option('--owner <owner>', 'Project owner')
28
- .option('--status <status>', 'Project status (active, paused, completed, archived) (default: active)')
29
- .option('--team <team>', 'Comma-separated team members')
30
- .option('--client <client>', 'Client name')
31
- .option('--tags <tags>', 'Comma-separated tags')
32
- .option('--description <description>', 'One-line project summary')
33
- .option('--deadline <date>', 'Deadline (YYYY-MM-DD)')
34
- .option('--repo <url>', 'Repository URL')
35
- .option('--url <url>', 'Production URL')
36
- .action(async (title, options) => {
37
- try {
38
- const vaultPath = resolveVaultPath(options.vault);
39
- const { projectCommand } = await import('../dist/commands/project.js');
40
- await projectCommand(vaultPath, 'add', {
41
- title,
42
- options: {
43
- owner: options.owner,
44
- status: options.status,
45
- team: parseCsvList(options.team),
46
- client: options.client,
47
- tags: parseCsvList(options.tags),
48
- description: options.description,
49
- deadline: options.deadline,
50
- repo: options.repo,
51
- url: options.url
52
- }
53
- });
54
- } catch (err) {
55
- console.error(chalk.red(`Error: ${err.message}`));
56
- process.exit(1);
57
- }
58
- });
59
-
60
- projectCmd
61
- .command('update <slug>')
62
- .description('Update a project')
63
- .option('-v, --vault <path>', 'Vault path (default: find nearest)')
64
- .option('--status <status>', 'Project status (active, paused, completed, archived)')
65
- .option('--owner <owner>', 'Project owner')
66
- .option('--team <team>', 'Comma-separated team members')
67
- .option('--client <client>', 'Client name')
68
- .option('--tags <tags>', 'Comma-separated tags')
69
- .option('--description <description>', 'One-line project summary')
70
- .option('--deadline <date>', 'Deadline (YYYY-MM-DD)')
71
- .option('--repo <url>', 'Repository URL')
72
- .option('--url <url>', 'Production URL')
73
- .action(async (slug, options) => {
74
- try {
75
- const vaultPath = resolveVaultPath(options.vault);
76
- const { projectCommand } = await import('../dist/commands/project.js');
77
- await projectCommand(vaultPath, 'update', {
78
- slug,
79
- options: {
80
- status: options.status,
81
- owner: options.owner,
82
- team: parseCsvList(options.team),
83
- client: options.client,
84
- tags: parseCsvList(options.tags),
85
- description: options.description,
86
- deadline: options.deadline,
87
- repo: options.repo,
88
- url: options.url
89
- }
90
- });
91
- } catch (err) {
92
- console.error(chalk.red(`Error: ${err.message}`));
93
- process.exit(1);
94
- }
95
- });
96
-
97
- projectCmd
98
- .command('archive <slug>')
99
- .description('Archive a project')
100
- .option('-v, --vault <path>', 'Vault path (default: find nearest)')
101
- .option('--reason <reason>', 'Reason for archiving')
102
- .action(async (slug, options) => {
103
- try {
104
- const vaultPath = resolveVaultPath(options.vault);
105
- const { projectCommand } = await import('../dist/commands/project.js');
106
- await projectCommand(vaultPath, 'archive', {
107
- slug,
108
- options: {
109
- reason: options.reason
110
- }
111
- });
112
- } catch (err) {
113
- console.error(chalk.red(`Error: ${err.message}`));
114
- process.exit(1);
115
- }
116
- });
117
-
118
- projectCmd
119
- .command('list')
120
- .description('List projects (archived projects are hidden unless --status archived)')
121
- .option('-v, --vault <path>', 'Vault path (default: find nearest)')
122
- .option('--status <status>', 'Filter by status (active, paused, completed, archived)')
123
- .option('--owner <owner>', 'Filter by owner')
124
- .option('--client <client>', 'Filter by client')
125
- .option('--tag <tag>', 'Filter by tag')
126
- .option('--json', 'Output as JSON')
127
- .action(async (options) => {
128
- try {
129
- const vaultPath = resolveVaultPath(options.vault);
130
- const { projectCommand } = await import('../dist/commands/project.js');
131
- await projectCommand(vaultPath, 'list', {
132
- options: {
133
- status: options.status,
134
- owner: options.owner,
135
- client: options.client,
136
- tag: options.tag,
137
- json: options.json
138
- }
139
- });
140
- } catch (err) {
141
- console.error(chalk.red(`Error: ${err.message}`));
142
- process.exit(1);
143
- }
144
- });
145
-
146
- projectCmd
147
- .command('show <slug>')
148
- .description('Show project details')
149
- .option('-v, --vault <path>', 'Vault path (default: find nearest)')
150
- .option('--json', 'Output as JSON')
151
- .action(async (slug, options) => {
152
- try {
153
- const vaultPath = resolveVaultPath(options.vault);
154
- const { projectCommand } = await import('../dist/commands/project.js');
155
- await projectCommand(vaultPath, 'show', {
156
- slug,
157
- options: {
158
- json: options.json
159
- }
160
- });
161
- } catch (err) {
162
- console.error(chalk.red(`Error: ${err.message}`));
163
- process.exit(1);
164
- }
165
- });
166
-
167
- projectCmd
168
- .command('tasks <slug>')
169
- .description('List tasks linked to a project')
170
- .option('-v, --vault <path>', 'Vault path (default: find nearest)')
171
- .option('--json', 'Output as JSON')
172
- .action(async (slug, options) => {
173
- try {
174
- const vaultPath = resolveVaultPath(options.vault);
175
- const { projectCommand } = await import('../dist/commands/project.js');
176
- await projectCommand(vaultPath, 'tasks', {
177
- slug,
178
- options: {
179
- json: options.json
180
- }
181
- });
182
- } catch (err) {
183
- console.error(chalk.red(`Error: ${err.message}`));
184
- process.exit(1);
185
- }
186
- });
187
-
188
- projectCmd
189
- .command('board')
190
- .description('Generate and sync the project kanban board')
191
- .option('-v, --vault <path>', 'Vault path (default: find nearest)')
192
- .option('--output <path>', 'Board markdown path (default: Projects-Board.md)')
193
- .option('--group-by <field>', 'Grouping field (status, owner, client) (default: status)')
194
- .action(async (options) => {
195
- try {
196
- const vaultPath = resolveVaultPath(options.vault);
197
- const { projectCommand } = await import('../dist/commands/project.js');
198
- await projectCommand(vaultPath, 'board', {
199
- options: {
200
- output: options.output,
201
- groupBy: options.groupBy
202
- }
203
- });
204
- } catch (err) {
205
- console.error(chalk.red(`Error: ${err.message}`));
206
- process.exit(1);
207
- }
208
- });
209
- }
1
+ /**
2
+ * Project command registrations for ClawVault
3
+ * Registers project add/update/archive/list/show/tasks/board commands
4
+ */
5
+
6
+ function parseCsvList(value) {
7
+ if (!value) return undefined;
8
+ const items = String(value)
9
+ .split(',')
10
+ .map((item) => item.trim())
11
+ .filter(Boolean);
12
+ return items.length > 0 ? items : undefined;
13
+ }
14
+
15
+ export function registerProjectCommands(
16
+ program,
17
+ { chalk, resolveVaultPath }
18
+ ) {
19
+ const projectCmd = program
20
+ .command('project')
21
+ .description('Manage projects and project boards');
22
+
23
+ projectCmd
24
+ .command('add <title>')
25
+ .description('Add a new project')
26
+ .option('-v, --vault <path>', 'Vault path (default: find nearest)')
27
+ .option('--owner <owner>', 'Project owner')
28
+ .option('--status <status>', 'Project status (active, paused, completed, archived) (default: active)')
29
+ .option('--team <team>', 'Comma-separated team members')
30
+ .option('--client <client>', 'Client name')
31
+ .option('--tags <tags>', 'Comma-separated tags')
32
+ .option('--description <description>', 'One-line project summary')
33
+ .option('--deadline <date>', 'Deadline (YYYY-MM-DD)')
34
+ .option('--repo <url>', 'Repository URL')
35
+ .option('--url <url>', 'Production URL')
36
+ .action(async (title, options) => {
37
+ try {
38
+ const vaultPath = resolveVaultPath(options.vault);
39
+ const { projectCommand } = await import('../dist/commands/project.js');
40
+ await projectCommand(vaultPath, 'add', {
41
+ title,
42
+ options: {
43
+ owner: options.owner,
44
+ status: options.status,
45
+ team: parseCsvList(options.team),
46
+ client: options.client,
47
+ tags: parseCsvList(options.tags),
48
+ description: options.description,
49
+ deadline: options.deadline,
50
+ repo: options.repo,
51
+ url: options.url
52
+ }
53
+ });
54
+ } catch (err) {
55
+ console.error(chalk.red(`Error: ${err.message}`));
56
+ process.exit(1);
57
+ }
58
+ });
59
+
60
+ projectCmd
61
+ .command('update <slug>')
62
+ .description('Update a project')
63
+ .option('-v, --vault <path>', 'Vault path (default: find nearest)')
64
+ .option('--status <status>', 'Project status (active, paused, completed, archived)')
65
+ .option('--owner <owner>', 'Project owner')
66
+ .option('--team <team>', 'Comma-separated team members')
67
+ .option('--client <client>', 'Client name')
68
+ .option('--tags <tags>', 'Comma-separated tags')
69
+ .option('--description <description>', 'One-line project summary')
70
+ .option('--deadline <date>', 'Deadline (YYYY-MM-DD)')
71
+ .option('--repo <url>', 'Repository URL')
72
+ .option('--url <url>', 'Production URL')
73
+ .action(async (slug, options) => {
74
+ try {
75
+ const vaultPath = resolveVaultPath(options.vault);
76
+ const { projectCommand } = await import('../dist/commands/project.js');
77
+ await projectCommand(vaultPath, 'update', {
78
+ slug,
79
+ options: {
80
+ status: options.status,
81
+ owner: options.owner,
82
+ team: parseCsvList(options.team),
83
+ client: options.client,
84
+ tags: parseCsvList(options.tags),
85
+ description: options.description,
86
+ deadline: options.deadline,
87
+ repo: options.repo,
88
+ url: options.url
89
+ }
90
+ });
91
+ } catch (err) {
92
+ console.error(chalk.red(`Error: ${err.message}`));
93
+ process.exit(1);
94
+ }
95
+ });
96
+
97
+ projectCmd
98
+ .command('archive <slug>')
99
+ .description('Archive a project')
100
+ .option('-v, --vault <path>', 'Vault path (default: find nearest)')
101
+ .option('--reason <reason>', 'Reason for archiving')
102
+ .action(async (slug, options) => {
103
+ try {
104
+ const vaultPath = resolveVaultPath(options.vault);
105
+ const { projectCommand } = await import('../dist/commands/project.js');
106
+ await projectCommand(vaultPath, 'archive', {
107
+ slug,
108
+ options: {
109
+ reason: options.reason
110
+ }
111
+ });
112
+ } catch (err) {
113
+ console.error(chalk.red(`Error: ${err.message}`));
114
+ process.exit(1);
115
+ }
116
+ });
117
+
118
+ projectCmd
119
+ .command('list')
120
+ .description('List projects (archived projects are hidden unless --status archived)')
121
+ .option('-v, --vault <path>', 'Vault path (default: find nearest)')
122
+ .option('--status <status>', 'Filter by status (active, paused, completed, archived)')
123
+ .option('--owner <owner>', 'Filter by owner')
124
+ .option('--client <client>', 'Filter by client')
125
+ .option('--tag <tag>', 'Filter by tag')
126
+ .option('--json', 'Output as JSON')
127
+ .action(async (options) => {
128
+ try {
129
+ const vaultPath = resolveVaultPath(options.vault);
130
+ const { projectCommand } = await import('../dist/commands/project.js');
131
+ await projectCommand(vaultPath, 'list', {
132
+ options: {
133
+ status: options.status,
134
+ owner: options.owner,
135
+ client: options.client,
136
+ tag: options.tag,
137
+ json: options.json
138
+ }
139
+ });
140
+ } catch (err) {
141
+ console.error(chalk.red(`Error: ${err.message}`));
142
+ process.exit(1);
143
+ }
144
+ });
145
+
146
+ projectCmd
147
+ .command('show <slug>')
148
+ .description('Show project details')
149
+ .option('-v, --vault <path>', 'Vault path (default: find nearest)')
150
+ .option('--json', 'Output as JSON')
151
+ .action(async (slug, options) => {
152
+ try {
153
+ const vaultPath = resolveVaultPath(options.vault);
154
+ const { projectCommand } = await import('../dist/commands/project.js');
155
+ await projectCommand(vaultPath, 'show', {
156
+ slug,
157
+ options: {
158
+ json: options.json
159
+ }
160
+ });
161
+ } catch (err) {
162
+ console.error(chalk.red(`Error: ${err.message}`));
163
+ process.exit(1);
164
+ }
165
+ });
166
+
167
+ projectCmd
168
+ .command('tasks <slug>')
169
+ .description('List tasks linked to a project')
170
+ .option('-v, --vault <path>', 'Vault path (default: find nearest)')
171
+ .option('--json', 'Output as JSON')
172
+ .action(async (slug, options) => {
173
+ try {
174
+ const vaultPath = resolveVaultPath(options.vault);
175
+ const { projectCommand } = await import('../dist/commands/project.js');
176
+ await projectCommand(vaultPath, 'tasks', {
177
+ slug,
178
+ options: {
179
+ json: options.json
180
+ }
181
+ });
182
+ } catch (err) {
183
+ console.error(chalk.red(`Error: ${err.message}`));
184
+ process.exit(1);
185
+ }
186
+ });
187
+
188
+ projectCmd
189
+ .command('board')
190
+ .description('Generate and sync the project kanban board')
191
+ .option('-v, --vault <path>', 'Vault path (default: find nearest)')
192
+ .option('--output <path>', 'Board markdown path (default: Projects-Board.md)')
193
+ .option('--group-by <field>', 'Grouping field (status, owner, client) (default: status)')
194
+ .action(async (options) => {
195
+ try {
196
+ const vaultPath = resolveVaultPath(options.vault);
197
+ const { projectCommand } = await import('../dist/commands/project.js');
198
+ await projectCommand(vaultPath, 'board', {
199
+ options: {
200
+ output: options.output,
201
+ groupBy: options.groupBy
202
+ }
203
+ });
204
+ } catch (err) {
205
+ console.error(chalk.red(`Error: ${err.message}`));
206
+ process.exit(1);
207
+ }
208
+ });
209
+ }