@kynetic-ai/spec 0.1.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.
- package/README.md +263 -0
- package/dist/acp/client.d.ts +159 -0
- package/dist/acp/client.d.ts.map +1 -0
- package/dist/acp/client.js +255 -0
- package/dist/acp/client.js.map +1 -0
- package/dist/acp/framing.d.ts +119 -0
- package/dist/acp/framing.d.ts.map +1 -0
- package/dist/acp/framing.js +302 -0
- package/dist/acp/framing.js.map +1 -0
- package/dist/acp/index.d.ts +14 -0
- package/dist/acp/index.d.ts.map +1 -0
- package/dist/acp/index.js +13 -0
- package/dist/acp/index.js.map +1 -0
- package/dist/acp/types.d.ts +89 -0
- package/dist/acp/types.d.ts.map +1 -0
- package/dist/acp/types.js +99 -0
- package/dist/acp/types.js.map +1 -0
- package/dist/agents/adapters.d.ts +55 -0
- package/dist/agents/adapters.d.ts.map +1 -0
- package/dist/agents/adapters.js +84 -0
- package/dist/agents/adapters.js.map +1 -0
- package/dist/agents/index.d.ts +8 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +10 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/spawner.d.ts +53 -0
- package/dist/agents/spawner.d.ts.map +1 -0
- package/dist/agents/spawner.js +83 -0
- package/dist/agents/spawner.js.map +1 -0
- package/dist/cli/batch.d.ts +82 -0
- package/dist/cli/batch.d.ts.map +1 -0
- package/dist/cli/batch.js +162 -0
- package/dist/cli/batch.js.map +1 -0
- package/dist/cli/commands/clone-for-testing.d.ts +6 -0
- package/dist/cli/commands/clone-for-testing.d.ts.map +1 -0
- package/dist/cli/commands/clone-for-testing.js +176 -0
- package/dist/cli/commands/clone-for-testing.js.map +1 -0
- package/dist/cli/commands/derive.d.ts +6 -0
- package/dist/cli/commands/derive.d.ts.map +1 -0
- package/dist/cli/commands/derive.js +450 -0
- package/dist/cli/commands/derive.js.map +1 -0
- package/dist/cli/commands/help.d.ts +6 -0
- package/dist/cli/commands/help.d.ts.map +1 -0
- package/dist/cli/commands/help.js +196 -0
- package/dist/cli/commands/help.js.map +1 -0
- package/dist/cli/commands/inbox.d.ts +6 -0
- package/dist/cli/commands/inbox.d.ts.map +1 -0
- package/dist/cli/commands/inbox.js +235 -0
- package/dist/cli/commands/inbox.js.map +1 -0
- package/dist/cli/commands/index.d.ts +20 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +21 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +245 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/item.d.ts +6 -0
- package/dist/cli/commands/item.d.ts.map +1 -0
- package/dist/cli/commands/item.js +1311 -0
- package/dist/cli/commands/item.js.map +1 -0
- package/dist/cli/commands/link.d.ts +6 -0
- package/dist/cli/commands/link.d.ts.map +1 -0
- package/dist/cli/commands/link.js +288 -0
- package/dist/cli/commands/link.js.map +1 -0
- package/dist/cli/commands/log.d.ts +16 -0
- package/dist/cli/commands/log.d.ts.map +1 -0
- package/dist/cli/commands/log.js +291 -0
- package/dist/cli/commands/log.js.map +1 -0
- package/dist/cli/commands/meta.d.ts +15 -0
- package/dist/cli/commands/meta.d.ts.map +1 -0
- package/dist/cli/commands/meta.js +1378 -0
- package/dist/cli/commands/meta.js.map +1 -0
- package/dist/cli/commands/module.d.ts +6 -0
- package/dist/cli/commands/module.d.ts.map +1 -0
- package/dist/cli/commands/module.js +102 -0
- package/dist/cli/commands/module.js.map +1 -0
- package/dist/cli/commands/ralph.d.ts +9 -0
- package/dist/cli/commands/ralph.d.ts.map +1 -0
- package/dist/cli/commands/ralph.js +465 -0
- package/dist/cli/commands/ralph.js.map +1 -0
- package/dist/cli/commands/search.d.ts +6 -0
- package/dist/cli/commands/search.d.ts.map +1 -0
- package/dist/cli/commands/search.js +134 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/session.d.ts +164 -0
- package/dist/cli/commands/session.d.ts.map +1 -0
- package/dist/cli/commands/session.js +745 -0
- package/dist/cli/commands/session.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +26 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +586 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/shadow.d.ts +6 -0
- package/dist/cli/commands/shadow.d.ts.map +1 -0
- package/dist/cli/commands/shadow.js +299 -0
- package/dist/cli/commands/shadow.js.map +1 -0
- package/dist/cli/commands/task.d.ts +6 -0
- package/dist/cli/commands/task.d.ts.map +1 -0
- package/dist/cli/commands/task.js +1514 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/commands/tasks.d.ts +6 -0
- package/dist/cli/commands/tasks.d.ts.map +1 -0
- package/dist/cli/commands/tasks.js +347 -0
- package/dist/cli/commands/tasks.js.map +1 -0
- package/dist/cli/commands/trait.d.ts +10 -0
- package/dist/cli/commands/trait.d.ts.map +1 -0
- package/dist/cli/commands/trait.js +295 -0
- package/dist/cli/commands/trait.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +6 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +626 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/exit-codes.d.ts +62 -0
- package/dist/cli/exit-codes.d.ts.map +1 -0
- package/dist/cli/exit-codes.js +65 -0
- package/dist/cli/exit-codes.js.map +1 -0
- package/dist/cli/help/content.d.ts +35 -0
- package/dist/cli/help/content.d.ts.map +1 -0
- package/dist/cli/help/content.js +312 -0
- package/dist/cli/help/content.js.map +1 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +85 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/introspection.d.ts +87 -0
- package/dist/cli/introspection.d.ts.map +1 -0
- package/dist/cli/introspection.js +127 -0
- package/dist/cli/introspection.js.map +1 -0
- package/dist/cli/output.d.ts +56 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +467 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/suggest.d.ts +16 -0
- package/dist/cli/suggest.d.ts.map +1 -0
- package/dist/cli/suggest.js +72 -0
- package/dist/cli/suggest.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/parser/alignment.d.ts +113 -0
- package/dist/parser/alignment.d.ts.map +1 -0
- package/dist/parser/alignment.js +261 -0
- package/dist/parser/alignment.js.map +1 -0
- package/dist/parser/assess.d.ts +81 -0
- package/dist/parser/assess.d.ts.map +1 -0
- package/dist/parser/assess.js +197 -0
- package/dist/parser/assess.js.map +1 -0
- package/dist/parser/convention-validation.d.ts +48 -0
- package/dist/parser/convention-validation.d.ts.map +1 -0
- package/dist/parser/convention-validation.js +167 -0
- package/dist/parser/convention-validation.js.map +1 -0
- package/dist/parser/fix.d.ts +38 -0
- package/dist/parser/fix.d.ts.map +1 -0
- package/dist/parser/fix.js +185 -0
- package/dist/parser/fix.js.map +1 -0
- package/dist/parser/index.d.ts +12 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +13 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/items.d.ts +138 -0
- package/dist/parser/items.d.ts.map +1 -0
- package/dist/parser/items.js +321 -0
- package/dist/parser/items.js.map +1 -0
- package/dist/parser/meta.d.ts +120 -0
- package/dist/parser/meta.d.ts.map +1 -0
- package/dist/parser/meta.js +441 -0
- package/dist/parser/meta.js.map +1 -0
- package/dist/parser/refs.d.ts +185 -0
- package/dist/parser/refs.d.ts.map +1 -0
- package/dist/parser/refs.js +404 -0
- package/dist/parser/refs.js.map +1 -0
- package/dist/parser/shadow.d.ts +253 -0
- package/dist/parser/shadow.d.ts.map +1 -0
- package/dist/parser/shadow.js +1053 -0
- package/dist/parser/shadow.js.map +1 -0
- package/dist/parser/traits.d.ts +72 -0
- package/dist/parser/traits.d.ts.map +1 -0
- package/dist/parser/traits.js +120 -0
- package/dist/parser/traits.js.map +1 -0
- package/dist/parser/validate.d.ts +89 -0
- package/dist/parser/validate.d.ts.map +1 -0
- package/dist/parser/validate.js +817 -0
- package/dist/parser/validate.js.map +1 -0
- package/dist/parser/yaml.d.ts +326 -0
- package/dist/parser/yaml.d.ts.map +1 -0
- package/dist/parser/yaml.js +1383 -0
- package/dist/parser/yaml.js.map +1 -0
- package/dist/ralph/cli-renderer.d.ts +20 -0
- package/dist/ralph/cli-renderer.d.ts.map +1 -0
- package/dist/ralph/cli-renderer.js +179 -0
- package/dist/ralph/cli-renderer.js.map +1 -0
- package/dist/ralph/events.d.ts +65 -0
- package/dist/ralph/events.d.ts.map +1 -0
- package/dist/ralph/events.js +397 -0
- package/dist/ralph/events.js.map +1 -0
- package/dist/ralph/index.d.ts +8 -0
- package/dist/ralph/index.d.ts.map +1 -0
- package/dist/ralph/index.js +10 -0
- package/dist/ralph/index.js.map +1 -0
- package/dist/schema/common.d.ts +46 -0
- package/dist/schema/common.d.ts.map +1 -0
- package/dist/schema/common.js +71 -0
- package/dist/schema/common.js.map +1 -0
- package/dist/schema/inbox.d.ts +90 -0
- package/dist/schema/inbox.d.ts.map +1 -0
- package/dist/schema/inbox.js +30 -0
- package/dist/schema/inbox.js.map +1 -0
- package/dist/schema/index.d.ts +6 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +7 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/meta.d.ts +762 -0
- package/dist/schema/meta.d.ts.map +1 -0
- package/dist/schema/meta.js +144 -0
- package/dist/schema/meta.js.map +1 -0
- package/dist/schema/spec.d.ts +912 -0
- package/dist/schema/spec.d.ts.map +1 -0
- package/dist/schema/spec.js +104 -0
- package/dist/schema/spec.js.map +1 -0
- package/dist/schema/task.d.ts +664 -0
- package/dist/schema/task.d.ts.map +1 -0
- package/dist/schema/task.js +130 -0
- package/dist/schema/task.js.map +1 -0
- package/dist/sessions/index.d.ts +11 -0
- package/dist/sessions/index.d.ts.map +1 -0
- package/dist/sessions/index.js +13 -0
- package/dist/sessions/index.js.map +1 -0
- package/dist/sessions/store.d.ts +144 -0
- package/dist/sessions/store.d.ts.map +1 -0
- package/dist/sessions/store.js +325 -0
- package/dist/sessions/store.js.map +1 -0
- package/dist/sessions/types.d.ts +157 -0
- package/dist/sessions/types.d.ts.map +1 -0
- package/dist/sessions/types.js +90 -0
- package/dist/sessions/types.js.map +1 -0
- package/dist/strings/errors.d.ts +420 -0
- package/dist/strings/errors.d.ts.map +1 -0
- package/dist/strings/errors.js +282 -0
- package/dist/strings/errors.js.map +1 -0
- package/dist/strings/guidance.d.ts +65 -0
- package/dist/strings/guidance.d.ts.map +1 -0
- package/dist/strings/guidance.js +66 -0
- package/dist/strings/guidance.js.map +1 -0
- package/dist/strings/index.d.ts +12 -0
- package/dist/strings/index.d.ts.map +1 -0
- package/dist/strings/index.js +12 -0
- package/dist/strings/index.js.map +1 -0
- package/dist/strings/labels.d.ts +74 -0
- package/dist/strings/labels.d.ts.map +1 -0
- package/dist/strings/labels.js +75 -0
- package/dist/strings/labels.js.map +1 -0
- package/dist/strings/validation.d.ts +126 -0
- package/dist/strings/validation.d.ts.map +1 -0
- package/dist/strings/validation.js +135 -0
- package/dist/strings/validation.js.map +1 -0
- package/dist/utils/commit.d.ts +23 -0
- package/dist/utils/commit.d.ts.map +1 -0
- package/dist/utils/commit.js +67 -0
- package/dist/utils/commit.js.map +1 -0
- package/dist/utils/git.d.ts +57 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +192 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/grep.d.ts +28 -0
- package/dist/utils/grep.d.ts.map +1 -0
- package/dist/utils/grep.js +86 -0
- package/dist/utils/grep.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/time.d.ts +18 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.js +61 -0
- package/dist/utils/time.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized error messages for CLI commands
|
|
3
|
+
*
|
|
4
|
+
* Organizes error messages by category to improve maintainability and consistency.
|
|
5
|
+
* Each category corresponds to a common error pattern across command files.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Reference resolution errors (not found, ambiguous, wrong type)
|
|
9
|
+
*/
|
|
10
|
+
export const referenceErrors = {
|
|
11
|
+
// Not found
|
|
12
|
+
itemNotFound: (ref) => `Item not found: ${ref}`,
|
|
13
|
+
taskNotFound: (ref) => `Task not found: ${ref}`,
|
|
14
|
+
specNotFound: (ref) => `Spec item not found: ${ref}`,
|
|
15
|
+
metaNotFound: (ref) => `Meta item not found: ${ref}`,
|
|
16
|
+
inboxNotFound: (ref) => `Inbox item not found: ${ref}`,
|
|
17
|
+
observationNotFound: (ref) => `Observation not found: ${ref}`,
|
|
18
|
+
depNotFound: (ref) => `Dependency reference not found: ${ref}`,
|
|
19
|
+
acNotFound: (acId, itemRef) => `Acceptance criterion "${acId}" not found on @${itemRef}`,
|
|
20
|
+
// Ambiguous references
|
|
21
|
+
ambiguous: (ref) => `Reference "${ref}" is ambiguous. Matches:`,
|
|
22
|
+
slugMapsToMultiple: (ref) => `Slug "${ref}" maps to multiple items. Use ULID instead:`,
|
|
23
|
+
// Wrong type
|
|
24
|
+
notTask: (ref) => `Reference "${ref}" is not a task (it's a spec item)`,
|
|
25
|
+
notItem: (ref) => `"${ref}" is a task, not a spec item. Use 'kspec task get' instead.`,
|
|
26
|
+
taskUseTaskCommands: (ref) => `"${ref}" is a task. Use 'kspec task' commands instead.`,
|
|
27
|
+
itemUseTaskCancel: (ref) => `"${ref}" is a task. Use 'kspec task cancel' instead.`,
|
|
28
|
+
parentIsTask: (ref) => `"${ref}" is a task. Items can only be added under spec items.`,
|
|
29
|
+
notSpecItem: (ref) => `Reference "${ref}" is a task, not a spec item. Derive only works on spec items.`,
|
|
30
|
+
// Meta reference errors
|
|
31
|
+
metaRefNotFound: (ref) => `meta_ref '${ref}' not found`,
|
|
32
|
+
metaRefPointsToSpec: (ref) => `meta_ref '${ref}' points to a spec item; use --spec-ref for product spec references`,
|
|
33
|
+
// Spec reference errors
|
|
34
|
+
specRefNotFound: (ref) => `Spec reference not found: ${ref}`,
|
|
35
|
+
specRefIsTask: (ref) => `Reference "${ref}" is a task, not a spec item`,
|
|
36
|
+
// Reference not found (generic)
|
|
37
|
+
refNotFound: (ref) => `Reference not found: ${ref}`,
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Slug validation errors
|
|
41
|
+
*/
|
|
42
|
+
export const slugErrors = {
|
|
43
|
+
alreadyExists: (slug, existingUlid) => `Slug '${slug}' already exists (used by ${existingUlid})`,
|
|
44
|
+
notFound: (slug) => `Slug '${slug}' not found on item`,
|
|
45
|
+
cannotRemoveLast: (slug) => `Cannot remove last slug '${slug}' - items must have at least one slug`,
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Validation errors (JSON, data format, constraints)
|
|
49
|
+
*/
|
|
50
|
+
export const validationErrors = {
|
|
51
|
+
// JSON parsing
|
|
52
|
+
invalidJson: 'Invalid JSON syntax',
|
|
53
|
+
invalidJsonInData: (err) => `Invalid JSON in --data${err ? `: ${err}` : ''}`,
|
|
54
|
+
invalidJsonFromStdin: (err) => `Invalid JSON from stdin${err ? `: ${err}` : ''}`,
|
|
55
|
+
invalidPatchData: (err) => `Invalid patch data${err ? `: ${err}` : ''}`,
|
|
56
|
+
// Data validation
|
|
57
|
+
noPatchesProvided: 'No patches provided',
|
|
58
|
+
noPatchData: 'No patch data. Use --data or pipe JSON to stdin.',
|
|
59
|
+
noInputProvided: 'No input provided. Use --data for single item or pipe JSONL/JSON for bulk.',
|
|
60
|
+
failedToParseBulk: (err) => `Failed to parse bulk input${err ? `: ${err}` : ''}`,
|
|
61
|
+
expectedJsonArray: 'Expected JSON array',
|
|
62
|
+
patchMustBeObject: (index) => `Item ${index + 1}: Patch must be an object`,
|
|
63
|
+
patchMustHaveRef: (index) => `Item ${index + 1}: Patch must have "ref" string`,
|
|
64
|
+
patchMustHaveData: (index) => `Item ${index + 1}: Patch must have "data" object`,
|
|
65
|
+
jsonLineError: (line, message) => `Line ${line}: ${message}`,
|
|
66
|
+
// Field validation
|
|
67
|
+
unknownFields: (fields) => `Unknown field(s): ${fields.join(', ')}`,
|
|
68
|
+
invalidPatchDataWithIssues: (issues) => `Invalid patch data: ${issues}`,
|
|
69
|
+
// Constraint validation
|
|
70
|
+
priorityOutOfRange: 'Priority must be between 1 and 5',
|
|
71
|
+
invalidObservationType: (type) => `Invalid observation type: ${type}`,
|
|
72
|
+
invalidType: (type, validTypes) => `Invalid type: ${type}. Must be one of: ${validTypes.join(', ')}`,
|
|
73
|
+
invalidTodoId: (id) => `Invalid todo ID: ${id}`,
|
|
74
|
+
// Required fields
|
|
75
|
+
titleRequired: 'Task title is required',
|
|
76
|
+
resolutionRequired: 'Resolution text is required',
|
|
77
|
+
agentRequiresId: 'Agent requires --id',
|
|
78
|
+
agentRequiresName: 'Agent requires --name',
|
|
79
|
+
workflowRequiresId: 'Workflow requires --id',
|
|
80
|
+
workflowRequiresTrigger: 'Workflow requires --trigger',
|
|
81
|
+
conventionRequiresDomain: 'Convention requires --domain',
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Status/state errors (wrong status for operation)
|
|
85
|
+
*/
|
|
86
|
+
export const statusErrors = {
|
|
87
|
+
cannotStart: (status) => `Cannot start task with status: ${status}`,
|
|
88
|
+
cannotComplete: (status) => `Cannot complete task with status: ${status}`,
|
|
89
|
+
cannotBlock: (status) => `Cannot block task with status: ${status}`,
|
|
90
|
+
// AC: @spec-completion-enforcement ac-2
|
|
91
|
+
completeRequiresReview: 'Task must be submitted for review first. Use: kspec task submit @ref',
|
|
92
|
+
// AC: @spec-completion-enforcement ac-3
|
|
93
|
+
completeRequiresStart: 'Task must be started and submitted first',
|
|
94
|
+
// AC: @spec-completion-enforcement ac-4
|
|
95
|
+
completeBlockedTask: 'Cannot complete blocked task',
|
|
96
|
+
// AC: @spec-completion-enforcement ac-5
|
|
97
|
+
completeCancelledTask: 'Cannot complete cancelled task. Use: kspec task reset @ref first',
|
|
98
|
+
// AC: @spec-completion-enforcement ac-6
|
|
99
|
+
completeAlreadyCompleted: 'Task is already completed',
|
|
100
|
+
// AC: @spec-completion-enforcement ac-8
|
|
101
|
+
skipReviewRequiresReason: '--skip-review requires --reason to document why',
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Duplicate/conflict errors
|
|
105
|
+
*/
|
|
106
|
+
export const conflictErrors = {
|
|
107
|
+
acAlreadyExists: (acId, itemRef) => `Acceptance criterion "${acId}" already exists on @${itemRef}`,
|
|
108
|
+
acIdAlreadyExists: (acId) => `Acceptance criterion "${acId}" already exists`,
|
|
109
|
+
observationAlreadyPromoted: (taskRef) => `Observation already promoted to task ${taskRef}; resolve or delete the task first`,
|
|
110
|
+
observationAlreadyResolved: (date, reason) => `Observation already resolved on ${date}: '${reason}'`,
|
|
111
|
+
specDirExists: (dir) => `spec/ directory already exists in ${dir}`,
|
|
112
|
+
moduleFileExists: (path) => `Module file already exists: ${path}`,
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Operation not allowed errors
|
|
116
|
+
*/
|
|
117
|
+
export const operationErrors = {
|
|
118
|
+
cannotDeleteNoSource: 'Cannot delete item: no source file tracked',
|
|
119
|
+
cannotPromoteResolved: 'Cannot promote resolved observation; use --force to override',
|
|
120
|
+
tasksNoAcceptanceCriteria: (ref) => `Tasks don't have acceptance criteria; "${ref}" is a task`,
|
|
121
|
+
confirmRequired: (itemLabel) => `Warning: This will delete ${itemLabel}. Use --confirm to skip this prompt`,
|
|
122
|
+
cannotDeleteReferencedByTasks: (itemLabel, count, taskRefs) => `Cannot delete ${itemLabel}: Referenced by ${count} task(s): ${taskRefs}. Use --confirm to override.`,
|
|
123
|
+
cannotDeleteReferencedByObservations: (itemLabel, count, obsRefs) => `Cannot delete ${itemLabel}: Referenced by ${count} observation(s): ${obsRefs}. Use --confirm to override.`,
|
|
124
|
+
deleteItemFailed: (itemLabel) => `Failed to delete ${itemLabel}`,
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Git-related errors
|
|
128
|
+
*/
|
|
129
|
+
export const gitErrors = {
|
|
130
|
+
notGitRepo: 'Not a git repository',
|
|
131
|
+
couldNotDetermineRoot: 'Could not determine git root directory',
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Project/initialization errors
|
|
135
|
+
*/
|
|
136
|
+
export const projectErrors = {
|
|
137
|
+
noKspecProject: 'No kspec project found',
|
|
138
|
+
shadowInitFailed: (error) => `Shadow initialization failed: ${error}`,
|
|
139
|
+
couldNotGetImplSummary: 'Could not get implementation summary',
|
|
140
|
+
runningFromShadow: 'Cannot run kspec from inside .kspec/ directory',
|
|
141
|
+
runningFromShadowHint: (projectRoot) => `The .kspec/ directory is a git worktree. Run from project root: ${projectRoot}`,
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Usage/argument errors
|
|
145
|
+
*/
|
|
146
|
+
export const usageErrors = {
|
|
147
|
+
// Derive command
|
|
148
|
+
deriveNeedRefOrAll: 'Either provide a spec reference or use --all',
|
|
149
|
+
deriveCannotUseBoth: 'Cannot use both a specific reference and --all',
|
|
150
|
+
deriveUsageHelp: {
|
|
151
|
+
header: 'Usage:',
|
|
152
|
+
examples: [
|
|
153
|
+
' kspec derive @spec-ref',
|
|
154
|
+
' kspec derive @spec-ref --flat',
|
|
155
|
+
' kspec derive --all',
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
// Patch command
|
|
159
|
+
patchNeedRef: 'Reference required for single item patch. Use: kspec item patch <ref> --data <json>',
|
|
160
|
+
// Log command
|
|
161
|
+
logNeedRef: 'Provide a reference or use --spec/--task',
|
|
162
|
+
// Ralph command
|
|
163
|
+
maxLoopsPositive: '--max-loops must be a positive integer',
|
|
164
|
+
maxRetriesNonNegative: '--max-retries must be a non-negative integer',
|
|
165
|
+
maxFailuresPositive: '--max-failures must be a positive integer',
|
|
166
|
+
agentPromptCancelled: 'Agent prompt was cancelled',
|
|
167
|
+
// Derive command
|
|
168
|
+
deriveNoRef: 'Either provide a spec reference or use --all',
|
|
169
|
+
deriveRefAndAll: 'Cannot use both a specific reference and --all',
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Generic operation failures (with err object)
|
|
173
|
+
*/
|
|
174
|
+
export const operationFailures = {
|
|
175
|
+
// Item operations
|
|
176
|
+
listItems: 'Failed to list items',
|
|
177
|
+
getItem: 'Failed to get item',
|
|
178
|
+
createItem: 'Failed to create item',
|
|
179
|
+
updateItem: 'Failed to update item',
|
|
180
|
+
deleteItem: 'Failed to delete item',
|
|
181
|
+
patchItems: 'Failed to patch item(s)',
|
|
182
|
+
getItemStatus: 'Failed to get item status',
|
|
183
|
+
getTypes: 'Failed to get types',
|
|
184
|
+
getTags: 'Failed to get tags',
|
|
185
|
+
listAc: 'Failed to list acceptance criteria',
|
|
186
|
+
addAc: 'Failed to add acceptance criterion',
|
|
187
|
+
updateAc: 'Failed to update acceptance criterion',
|
|
188
|
+
removeAc: 'Failed to remove acceptance criterion',
|
|
189
|
+
// Task operations
|
|
190
|
+
getTask: 'Failed to get task',
|
|
191
|
+
createTask: 'Failed to create task',
|
|
192
|
+
updateTask: 'Failed to update task',
|
|
193
|
+
patchTask: 'Failed to patch task',
|
|
194
|
+
startTask: 'Failed to start task',
|
|
195
|
+
completeTask: 'Failed to complete task',
|
|
196
|
+
blockTask: 'Failed to block task',
|
|
197
|
+
unblockTask: 'Failed to unblock task',
|
|
198
|
+
cancelTask: 'Failed to cancel task',
|
|
199
|
+
deleteTask: 'Failed to delete task',
|
|
200
|
+
addNote: 'Failed to add note',
|
|
201
|
+
getNotes: 'Failed to get notes',
|
|
202
|
+
getTodos: 'Failed to get todos',
|
|
203
|
+
addTodo: 'Failed to add todo',
|
|
204
|
+
markTodoDone: 'Failed to mark todo as done',
|
|
205
|
+
markTodoNotDone: 'Failed to mark todo as not done',
|
|
206
|
+
listTasks: 'Failed to list tasks',
|
|
207
|
+
getReadyTasks: 'Failed to get ready tasks',
|
|
208
|
+
getNextTask: 'Failed to get next task',
|
|
209
|
+
getBlockedTasks: 'Failed to get blocked tasks',
|
|
210
|
+
getActiveTasks: 'Failed to get active tasks',
|
|
211
|
+
// Meta operations
|
|
212
|
+
showMeta: 'Failed to show meta',
|
|
213
|
+
listAgents: 'Failed to list agents',
|
|
214
|
+
listWorkflows: 'Failed to list workflows',
|
|
215
|
+
listConventions: 'Failed to list conventions',
|
|
216
|
+
getMetaItem: 'Failed to get meta item',
|
|
217
|
+
listMetaItems: 'Failed to list meta items',
|
|
218
|
+
createObservation: 'Failed to create observation',
|
|
219
|
+
listObservations: 'Failed to list observations',
|
|
220
|
+
promoteObservation: 'Failed to promote observation',
|
|
221
|
+
resolveObservation: 'Failed to resolve observation',
|
|
222
|
+
createMeta: (type) => `Failed to create ${type}`,
|
|
223
|
+
updateMetaItem: 'Failed to update meta item',
|
|
224
|
+
deleteMetaItem: 'Failed to delete meta item',
|
|
225
|
+
// Inbox operations
|
|
226
|
+
addInboxItem: 'Failed to add inbox item',
|
|
227
|
+
listInboxItems: 'Failed to list inbox items',
|
|
228
|
+
promoteInboxItem: 'Failed to promote inbox item',
|
|
229
|
+
deleteInboxItem: 'Failed to delete inbox item',
|
|
230
|
+
getInboxItem: 'Failed to get inbox item',
|
|
231
|
+
// Session operations
|
|
232
|
+
gatherSessionContext: 'Failed to gather session context',
|
|
233
|
+
runCheckpoint: 'Failed to run checkpoint',
|
|
234
|
+
updateSessionContext: 'Failed to update session context',
|
|
235
|
+
// Search operations
|
|
236
|
+
search: 'Failed to search',
|
|
237
|
+
searchCommits: 'Failed to search commits',
|
|
238
|
+
// Init operations
|
|
239
|
+
initProject: 'Failed to initialize project',
|
|
240
|
+
// Setup operations
|
|
241
|
+
installConfig: (agentType) => `Failed to install config for ${agentType}`,
|
|
242
|
+
setupFailed: 'Setup failed',
|
|
243
|
+
// Derive operations
|
|
244
|
+
deriveTasks: 'Failed to derive tasks',
|
|
245
|
+
// Ralph operations
|
|
246
|
+
ralphLoop: 'Ralph loop failed',
|
|
247
|
+
iterationFailed: (err) => `Iteration failed: ${err}`,
|
|
248
|
+
iterationFailedAfterRetries: (iteration, maxRetries, consecutiveFailures, maxFailures) => `Iteration ${iteration} failed after ${maxRetries + 1} attempts (${consecutiveFailures}/${maxFailures} consecutive failures)`,
|
|
249
|
+
lastError: (err) => `Last error: ${err}`,
|
|
250
|
+
reachedMaxFailures: (maxFailures) => `Reached ${maxFailures} consecutive failures. Exiting loop.`,
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Todo-specific errors
|
|
254
|
+
*/
|
|
255
|
+
export const todoErrors = {
|
|
256
|
+
notFound: (id) => `Todo #${id} not found`,
|
|
257
|
+
invalidId: (id) => `Invalid todo ID: ${id}`,
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Relationship/link errors
|
|
261
|
+
*/
|
|
262
|
+
export const relationshipErrors = {
|
|
263
|
+
invalidType: (type, validTypes) => `Invalid relationship type: ${type}. Must be one of: ${validTypes}`,
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* Re-export all error categories as a single object for convenience
|
|
267
|
+
*/
|
|
268
|
+
export const errors = {
|
|
269
|
+
reference: referenceErrors,
|
|
270
|
+
slug: slugErrors,
|
|
271
|
+
validation: validationErrors,
|
|
272
|
+
status: statusErrors,
|
|
273
|
+
conflict: conflictErrors,
|
|
274
|
+
operation: operationErrors,
|
|
275
|
+
git: gitErrors,
|
|
276
|
+
project: projectErrors,
|
|
277
|
+
usage: usageErrors,
|
|
278
|
+
failures: operationFailures,
|
|
279
|
+
todo: todoErrors,
|
|
280
|
+
relationship: relationshipErrors,
|
|
281
|
+
};
|
|
282
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/strings/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,YAAY;IACZ,YAAY,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,mBAAmB,GAAG,EAAE;IACvD,YAAY,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,mBAAmB,GAAG,EAAE;IACvD,YAAY,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,wBAAwB,GAAG,EAAE;IAC5D,YAAY,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,wBAAwB,GAAG,EAAE;IAC5D,aAAa,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,yBAAyB,GAAG,EAAE;IAC9D,mBAAmB,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,0BAA0B,GAAG,EAAE;IACrE,WAAW,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,mCAAmC,GAAG,EAAE;IACtE,UAAU,EAAE,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CAC5C,yBAAyB,IAAI,mBAAmB,OAAO,EAAE;IAE3D,uBAAuB;IACvB,SAAS,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,cAAc,GAAG,0BAA0B;IACvE,kBAAkB,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,SAAS,GAAG,6CAA6C;IAE9F,aAAa;IACb,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,cAAc,GAAG,oCAAoC;IAC/E,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,GAAG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ignment check guidance (shown when adding task notes)
|
|
6
|
+
*/
|
|
7
|
+
export declare const alignmentCheck: {
|
|
8
|
+
readonly header: string;
|
|
9
|
+
readonly beyondSpec: string;
|
|
10
|
+
readonly updateSpec: (specRef: string) => string;
|
|
11
|
+
readonly addAC: string;
|
|
12
|
+
readonly testCoverage: (count: number) => string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Commit guidance (shown after task completion)
|
|
16
|
+
*/
|
|
17
|
+
export declare const commitGuidance: {
|
|
18
|
+
readonly header: string;
|
|
19
|
+
readonly message: (msg: string) => string;
|
|
20
|
+
readonly trailers: (trailers: string) => string;
|
|
21
|
+
readonly noSpecRef: {
|
|
22
|
+
readonly warning: string;
|
|
23
|
+
readonly consider: string;
|
|
24
|
+
readonly intentional: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Session checkpoint instructions
|
|
29
|
+
*/
|
|
30
|
+
export declare const checkpoint: {
|
|
31
|
+
readonly intro: string;
|
|
32
|
+
readonly inProgressTasks: {
|
|
33
|
+
readonly header: string;
|
|
34
|
+
readonly action: string;
|
|
35
|
+
readonly noteCommand: (ref: string) => string;
|
|
36
|
+
};
|
|
37
|
+
readonly incompleteTodos: {
|
|
38
|
+
readonly header: string;
|
|
39
|
+
readonly action: string;
|
|
40
|
+
readonly command: string;
|
|
41
|
+
};
|
|
42
|
+
readonly uncommittedChanges: {
|
|
43
|
+
readonly header: string;
|
|
44
|
+
readonly action: string;
|
|
45
|
+
readonly wipCommit: string;
|
|
46
|
+
readonly wipGuidance: string;
|
|
47
|
+
};
|
|
48
|
+
readonly hints: {
|
|
49
|
+
readonly header: string;
|
|
50
|
+
readonly taskNote: string;
|
|
51
|
+
readonly taskComplete: string;
|
|
52
|
+
};
|
|
53
|
+
readonly messages: {
|
|
54
|
+
readonly retry: (count: number) => string;
|
|
55
|
+
readonly success: string;
|
|
56
|
+
readonly issues: (count: number) => string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Session prompt check (hook message)
|
|
61
|
+
*/
|
|
62
|
+
export declare const sessionPrompt: {
|
|
63
|
+
readonly specCheck: "[kspec] Before implementing behavior changes, check spec coverage. Update spec first if needed.";
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=guidance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../src/strings/guidance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,eAAO,MAAM,cAAc;;;mCAGH,MAAM;;mCAGN,MAAM;CAEpB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;4BAEV,MAAM;kCACA,MAAM;;;;;;CAMnB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;oCAMA,MAAM;;;;;;;;;;;;;;;;;;;gCAwBV,MAAM;;iCAGL,MAAM;;CAGhB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa;;CAEhB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Guidance and instructional text shown to users and agents
|
|
3
|
+
*/
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
/**
|
|
6
|
+
* Alignment check guidance (shown when adding task notes)
|
|
7
|
+
*/
|
|
8
|
+
export const alignmentCheck = {
|
|
9
|
+
header: chalk.gray('--- Alignment Check ---'),
|
|
10
|
+
beyondSpec: chalk.gray('Did your implementation add anything beyond the original spec?'),
|
|
11
|
+
updateSpec: (specRef) => chalk.gray(`If so, consider updating the spec:\n kspec item set ${specRef} --description "Updated description"`),
|
|
12
|
+
addAC: chalk.gray('Or add acceptance criteria for new features.'),
|
|
13
|
+
testCoverage: (count) => chalk.gray(`Linked spec has ${count} acceptance criteria - consider test coverage.`),
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Commit guidance (shown after task completion)
|
|
17
|
+
*/
|
|
18
|
+
export const commitGuidance = {
|
|
19
|
+
header: chalk.gray('--- Suggested Commit ---'),
|
|
20
|
+
message: (msg) => chalk.cyan(msg),
|
|
21
|
+
trailers: (trailers) => chalk.gray(trailers),
|
|
22
|
+
noSpecRef: {
|
|
23
|
+
warning: chalk.yellow("This task has no spec_ref."),
|
|
24
|
+
consider: chalk.gray("Is this a spec gap? Consider: kspec item add --under @parent ..."),
|
|
25
|
+
intentional: chalk.gray("Or is this intentional (infra/cleanup)?"),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Session checkpoint instructions
|
|
30
|
+
*/
|
|
31
|
+
export const checkpoint = {
|
|
32
|
+
intro: chalk.yellow('Before ending this session, please:'),
|
|
33
|
+
inProgressTasks: {
|
|
34
|
+
header: chalk.yellow('\n1. In-Progress Tasks:'),
|
|
35
|
+
action: chalk.gray(' Complete them or add a note explaining current state:'),
|
|
36
|
+
noteCommand: (ref) => chalk.gray(` kspec task note ${ref} "WIP: what's done, what remains"`),
|
|
37
|
+
},
|
|
38
|
+
incompleteTodos: {
|
|
39
|
+
header: chalk.yellow('\n2. Incomplete Todos:'),
|
|
40
|
+
action: chalk.gray(' Complete them or convert to tasks:'),
|
|
41
|
+
command: chalk.gray(' kspec task add --title "..." --spec-ref "@..."'),
|
|
42
|
+
},
|
|
43
|
+
uncommittedChanges: {
|
|
44
|
+
header: chalk.yellow('\n3. Uncommitted Changes:'),
|
|
45
|
+
action: chalk.gray(' Commit your work or create a WIP commit:'),
|
|
46
|
+
wipCommit: chalk.gray(` git add -A && git commit -m "WIP: describe state\n\n Task: @task-ref"`),
|
|
47
|
+
wipGuidance: chalk.gray(' WIP commits are fine - they show progress and can be squashed later.'),
|
|
48
|
+
},
|
|
49
|
+
hints: {
|
|
50
|
+
header: chalk.gray('\nHelpful commands:'),
|
|
51
|
+
taskNote: chalk.gray('Use: kspec task note @task "Progress notes..." to document state'),
|
|
52
|
+
taskComplete: chalk.gray('Use: kspec task complete @task --reason "Summary" if task is done'),
|
|
53
|
+
},
|
|
54
|
+
messages: {
|
|
55
|
+
retry: (count) => chalk.yellow(`[kspec] Session checkpoint: ${count} issue(s) acknowledged - allowing stop`),
|
|
56
|
+
success: chalk.green('[kspec] Session checkpoint passed - ready to end session'),
|
|
57
|
+
issues: (count) => chalk.yellow(`[kspec] Session checkpoint: ${count} issue(s) need attention`),
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Session prompt check (hook message)
|
|
62
|
+
*/
|
|
63
|
+
export const sessionPrompt = {
|
|
64
|
+
specCheck: '[kspec] Before implementing behavior changes, check spec coverage. Update spec first if needed.',
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=guidance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidance.js","sourceRoot":"","sources":["../../src/strings/guidance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAC7C,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,gEAAgE,CAAC;IACxF,UAAU,EAAE,CAAC,OAAe,EAAE,EAAE,CAC9B,KAAK,CAAC,IAAI,CAAC,wDAAwD,OAAO,sCAAsC,CAAC;IACnH,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC;IACjE,YAAY,EAAE,CAAC,KAAa,EAAE,EAAE,CAC9B,KAAK,CAAC,IAAI,CAAC,mBAAmB,KAAK,gDAAgD,CAAC;CAC9E,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC;IAC9C,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,KAAK,CAAC,I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CAAC;QACxF,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,mEAAmE,CAAC;KAC9F;IAED,QAAQ,EAAE;QACR,KAAK,EAAE,CAAC,KAAa,EAAE,EAAE,CACvB,KAAK,CAAC,MAAM,CAAC,+BAA+B,KAAK,wCAAwC,CAAC;QAC5F,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,0DAA0D,CAAC;QAChF,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE,CACxB,KAAK,CAAC,MAAM,CAAC,+BAA+B,KAAK,0BAA0B,CAAC;KAC/E;CACO,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS,EAAE,iGAAiG;CACpG,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized strings and messages for user-facing text
|
|
3
|
+
*
|
|
4
|
+
* This module provides a single source of truth for all user-facing text,
|
|
5
|
+
* making it easier to maintain consistent tone, support i18n in the future,
|
|
6
|
+
* and review/update messaging across the entire CLI.
|
|
7
|
+
*/
|
|
8
|
+
export * from './labels.js';
|
|
9
|
+
export * from './guidance.js';
|
|
10
|
+
export * from './validation.js';
|
|
11
|
+
export * from './errors.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/strings/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized strings and messages for user-facing text
|
|
3
|
+
*
|
|
4
|
+
* This module provides a single source of truth for all user-facing text,
|
|
5
|
+
* making it easier to maintain consistent tone, support i18n in the future,
|
|
6
|
+
* and review/update messaging across the entire CLI.
|
|
7
|
+
*/
|
|
8
|
+
export * from './labels.js';
|
|
9
|
+
export * from './guidance.js';
|
|
10
|
+
export * from './validation.js';
|
|
11
|
+
export * from './errors.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/strings/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field labels and section headers used throughout the CLI output
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Session context section headers
|
|
6
|
+
*/
|
|
7
|
+
export declare const sessionHeaders: {
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly activeWork: string;
|
|
10
|
+
readonly noActiveWork: string;
|
|
11
|
+
readonly awaitingReview: string;
|
|
12
|
+
readonly recentlyCompleted: string;
|
|
13
|
+
readonly recentNotes: string;
|
|
14
|
+
readonly incompleteTodos: string;
|
|
15
|
+
readonly readyTasks: string;
|
|
16
|
+
readonly blocked: string;
|
|
17
|
+
readonly recentCommits: string;
|
|
18
|
+
readonly inbox: string;
|
|
19
|
+
readonly workingTree: string;
|
|
20
|
+
readonly workingTreeClean: string;
|
|
21
|
+
readonly quickCommands: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Task/Item detail field labels
|
|
25
|
+
*/
|
|
26
|
+
export declare const fieldLabels: {
|
|
27
|
+
readonly ulid: "ULID:";
|
|
28
|
+
readonly slugs: "Slugs:";
|
|
29
|
+
readonly type: "Type:";
|
|
30
|
+
readonly status: "Status:";
|
|
31
|
+
readonly priority: "Priority:";
|
|
32
|
+
readonly automation: "Automation:";
|
|
33
|
+
readonly maturity: "Maturity:";
|
|
34
|
+
readonly specRef: "Spec ref:";
|
|
35
|
+
readonly metaRef: "Meta ref:";
|
|
36
|
+
readonly depends: "Depends:";
|
|
37
|
+
readonly blocked: "Blocked:";
|
|
38
|
+
readonly tags: "Tags:";
|
|
39
|
+
readonly created: "Created:";
|
|
40
|
+
readonly started: "Started:";
|
|
41
|
+
readonly completed: "Completed:";
|
|
42
|
+
readonly implementation: "Implementation: ";
|
|
43
|
+
readonly description: "Description:";
|
|
44
|
+
readonly acceptanceCriteria: "Acceptance Criteria:";
|
|
45
|
+
readonly traceability: "Traceability:";
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Output section separators
|
|
49
|
+
*/
|
|
50
|
+
export declare const sectionHeaders: {
|
|
51
|
+
readonly specContext: string;
|
|
52
|
+
readonly description: string;
|
|
53
|
+
readonly acceptanceCriteria: string;
|
|
54
|
+
readonly notes: string;
|
|
55
|
+
readonly todos: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Common CLI hints/suggestions
|
|
59
|
+
*/
|
|
60
|
+
export declare const hints: {
|
|
61
|
+
readonly inboxPromote: string;
|
|
62
|
+
readonly taskNote: (ref: string) => string;
|
|
63
|
+
readonly taskComplete: (ref: string) => string;
|
|
64
|
+
readonly taskStart: (ref: string) => string;
|
|
65
|
+
readonly gitCommit: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Summary/count messages
|
|
69
|
+
*/
|
|
70
|
+
export declare const summaries: {
|
|
71
|
+
readonly noTasks: string;
|
|
72
|
+
readonly taskCount: (count: number) => string;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/strings/labels.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;CAejB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;CAoBd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,KAAK;;6BAEA,MAAM;iCAEF,MAAM;8BAET,MAAM;;CAGf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,SAAS;;gCAED,MAAM;CACjB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field labels and section headers used throughout the CLI output
|
|
3
|
+
*/
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
/**
|
|
6
|
+
* Session context section headers
|
|
7
|
+
*/
|
|
8
|
+
export const sessionHeaders = {
|
|
9
|
+
title: chalk.blue.bold('=== Session Context ==='),
|
|
10
|
+
activeWork: chalk.cyan.bold('--- Active Work ---'),
|
|
11
|
+
noActiveWork: chalk.gray('--- No Active Work ---'),
|
|
12
|
+
awaitingReview: chalk.yellow.bold('--- Awaiting Review ---'),
|
|
13
|
+
recentlyCompleted: chalk.green.bold('--- Recently Completed ---'),
|
|
14
|
+
recentNotes: chalk.cyan.bold('--- Recent Notes ---'),
|
|
15
|
+
incompleteTodos: chalk.yellow.bold('--- Incomplete Todos ---'),
|
|
16
|
+
readyTasks: chalk.cyan.bold('--- Ready to Pick Up ---'),
|
|
17
|
+
blocked: chalk.red.bold('--- Blocked ---'),
|
|
18
|
+
recentCommits: chalk.cyan.bold('--- Recent Commits ---'),
|
|
19
|
+
inbox: chalk.magenta.bold('--- Inbox (oldest first) ---'),
|
|
20
|
+
workingTree: chalk.yellow.bold('--- Working Tree ---'),
|
|
21
|
+
workingTreeClean: chalk.gray('--- Working Tree: Clean ---'),
|
|
22
|
+
quickCommands: chalk.gray.bold('--- Quick Commands ---'),
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Task/Item detail field labels
|
|
26
|
+
*/
|
|
27
|
+
export const fieldLabels = {
|
|
28
|
+
ulid: 'ULID:',
|
|
29
|
+
slugs: 'Slugs:',
|
|
30
|
+
type: 'Type:',
|
|
31
|
+
status: 'Status:',
|
|
32
|
+
priority: 'Priority:',
|
|
33
|
+
automation: 'Automation:',
|
|
34
|
+
maturity: 'Maturity:',
|
|
35
|
+
specRef: 'Spec ref:',
|
|
36
|
+
metaRef: 'Meta ref:',
|
|
37
|
+
depends: 'Depends:',
|
|
38
|
+
blocked: 'Blocked:',
|
|
39
|
+
tags: 'Tags:',
|
|
40
|
+
created: 'Created:',
|
|
41
|
+
started: 'Started:',
|
|
42
|
+
completed: 'Completed:',
|
|
43
|
+
implementation: 'Implementation: ',
|
|
44
|
+
description: 'Description:',
|
|
45
|
+
acceptanceCriteria: 'Acceptance Criteria:',
|
|
46
|
+
traceability: 'Traceability:',
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Output section separators
|
|
50
|
+
*/
|
|
51
|
+
export const sectionHeaders = {
|
|
52
|
+
specContext: chalk.gray('─── Spec Context ───'),
|
|
53
|
+
description: chalk.gray('─── Description ───'),
|
|
54
|
+
acceptanceCriteria: chalk.gray('─── Acceptance Criteria ───'),
|
|
55
|
+
notes: chalk.gray('─── Notes ───'),
|
|
56
|
+
todos: chalk.gray('─── Todos ───'),
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Common CLI hints/suggestions
|
|
60
|
+
*/
|
|
61
|
+
export const hints = {
|
|
62
|
+
inboxPromote: chalk.gray('Use: kspec inbox promote <ref> to convert to task'),
|
|
63
|
+
taskNote: (ref) => chalk.gray(`Use: kspec task note ${ref} "<note>" to add context`),
|
|
64
|
+
taskComplete: (ref) => chalk.gray(`Use: kspec task complete ${ref} --reason "<summary>" when done`),
|
|
65
|
+
taskStart: (ref) => chalk.gray(`Use: kspec task start ${ref} to begin work`),
|
|
66
|
+
gitCommit: chalk.gray('Use: git add -A && git commit -m "..." to commit changes'),
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Summary/count messages
|
|
70
|
+
*/
|
|
71
|
+
export const summaries = {
|
|
72
|
+
noTasks: chalk.gray('No tasks found'),
|
|
73
|
+
taskCount: (count) => chalk.gray(`${count} task(s)`),
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/strings/labels.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC;IACjD,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAClD,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAClD,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAC5D,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC;IACjE,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC;IACpD,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC;IAC9D,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC;IACvD,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC;IAC1C,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC;IACxD,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC;IACzD,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC;IACtD,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC;IAC3D,aAAa,EAAE,KAAK,C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