@sudocode-ai/integration-speckit 0.1.14

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 (53) hide show
  1. package/dist/id-generator.d.ts +149 -0
  2. package/dist/id-generator.d.ts.map +1 -0
  3. package/dist/id-generator.js +197 -0
  4. package/dist/id-generator.js.map +1 -0
  5. package/dist/index.d.ts +33 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +1017 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/parser/index.d.ts +11 -0
  10. package/dist/parser/index.d.ts.map +1 -0
  11. package/dist/parser/index.js +16 -0
  12. package/dist/parser/index.js.map +1 -0
  13. package/dist/parser/markdown-utils.d.ts +138 -0
  14. package/dist/parser/markdown-utils.d.ts.map +1 -0
  15. package/dist/parser/markdown-utils.js +283 -0
  16. package/dist/parser/markdown-utils.js.map +1 -0
  17. package/dist/parser/plan-parser.d.ts +97 -0
  18. package/dist/parser/plan-parser.d.ts.map +1 -0
  19. package/dist/parser/plan-parser.js +286 -0
  20. package/dist/parser/plan-parser.js.map +1 -0
  21. package/dist/parser/spec-parser.d.ts +95 -0
  22. package/dist/parser/spec-parser.d.ts.map +1 -0
  23. package/dist/parser/spec-parser.js +250 -0
  24. package/dist/parser/spec-parser.js.map +1 -0
  25. package/dist/parser/supporting-docs.d.ts +119 -0
  26. package/dist/parser/supporting-docs.d.ts.map +1 -0
  27. package/dist/parser/supporting-docs.js +324 -0
  28. package/dist/parser/supporting-docs.js.map +1 -0
  29. package/dist/parser/tasks-parser.d.ts +171 -0
  30. package/dist/parser/tasks-parser.d.ts.map +1 -0
  31. package/dist/parser/tasks-parser.js +281 -0
  32. package/dist/parser/tasks-parser.js.map +1 -0
  33. package/dist/relationship-mapper.d.ts +165 -0
  34. package/dist/relationship-mapper.d.ts.map +1 -0
  35. package/dist/relationship-mapper.js +238 -0
  36. package/dist/relationship-mapper.js.map +1 -0
  37. package/dist/watcher.d.ts +137 -0
  38. package/dist/watcher.d.ts.map +1 -0
  39. package/dist/watcher.js +599 -0
  40. package/dist/watcher.js.map +1 -0
  41. package/dist/writer/index.d.ts +8 -0
  42. package/dist/writer/index.d.ts.map +1 -0
  43. package/dist/writer/index.js +10 -0
  44. package/dist/writer/index.js.map +1 -0
  45. package/dist/writer/spec-writer.d.ts +70 -0
  46. package/dist/writer/spec-writer.d.ts.map +1 -0
  47. package/dist/writer/spec-writer.js +261 -0
  48. package/dist/writer/spec-writer.js.map +1 -0
  49. package/dist/writer/tasks-writer.d.ts +47 -0
  50. package/dist/writer/tasks-writer.d.ts.map +1 -0
  51. package/dist/writer/tasks-writer.js +161 -0
  52. package/dist/writer/tasks-writer.js.map +1 -0
  53. package/package.json +42 -0
@@ -0,0 +1,149 @@
1
+ /**
2
+ * ID Generation for Spec-Kit Integration
3
+ *
4
+ * Generates deterministic, path-based IDs for spec-kit entities.
5
+ * IDs are stable across syncs (based on file path, not content hash).
6
+ *
7
+ * Examples:
8
+ * .specify/specs/001-auth/spec.md -> sk-001-spec
9
+ * .specify/specs/001-auth/plan.md -> sk-001-plan
10
+ * .specify/specs/001-auth/tasks.md T001 -> skt-001-T001
11
+ * .specify/specs/001-auth/research.md -> sk-001-research
12
+ * .specify/specs/001-auth/contracts/api-spec.json -> sk-001-contract-api-spec
13
+ * .specify/memory/constitution.md -> sk-constitution
14
+ */
15
+ /**
16
+ * Result of parsing a spec-kit ID
17
+ */
18
+ export interface ParsedSpecId {
19
+ /** The prefix used (e.g., "sk", "skt") */
20
+ prefix: string;
21
+ /** Feature number extracted from path (e.g., "001") or null for non-feature files */
22
+ featureNumber: string | null;
23
+ /** File type or identifier (e.g., "spec", "plan", "research", "T001") */
24
+ fileType: string;
25
+ /** Whether this is a task ID */
26
+ isTask: boolean;
27
+ }
28
+ /**
29
+ * File types recognized in spec-kit feature directories
30
+ */
31
+ export type SpecKitFileType = "spec" | "plan" | "tasks" | "research" | "data-model" | "contract";
32
+ /**
33
+ * Extract feature number from a spec-kit path
34
+ *
35
+ * @param relativePath - Path relative to .specify directory (e.g., "specs/001-auth/spec.md")
36
+ * @returns Feature number (e.g., "001") or null if not in a feature directory
37
+ *
38
+ * @example
39
+ * extractFeatureNumber("specs/001-auth/spec.md") // "001"
40
+ * extractFeatureNumber("specs/042-payments/plan.md") // "042"
41
+ * extractFeatureNumber("memory/constitution.md") // null
42
+ */
43
+ export declare function extractFeatureNumber(relativePath: string): string | null;
44
+ /**
45
+ * Extract file type from a spec-kit file path
46
+ *
47
+ * @param relativePath - Path relative to .specify directory
48
+ * @returns File type identifier for ID generation
49
+ *
50
+ * @example
51
+ * extractFileType("specs/001-auth/spec.md") // "spec"
52
+ * extractFileType("specs/001-auth/plan.md") // "plan"
53
+ * extractFileType("specs/001-auth/contracts/api-spec.json") // "contract-api-spec"
54
+ * extractFileType("memory/constitution.md") // "constitution"
55
+ */
56
+ export declare function extractFileType(relativePath: string): string;
57
+ /**
58
+ * Generate a spec ID from a file path
59
+ *
60
+ * @param relativePath - Path relative to .specify directory
61
+ * @param prefix - ID prefix (default: "sk")
62
+ * @returns Generated spec ID
63
+ *
64
+ * @example
65
+ * generateSpecId("specs/001-auth/spec.md") // "sk-001-spec"
66
+ * generateSpecId("specs/001-auth/plan.md") // "sk-001-plan"
67
+ * generateSpecId("specs/001-auth/contracts/api-spec.json") // "sk-001-contract-api-spec"
68
+ * generateSpecId("memory/constitution.md") // "sk-constitution"
69
+ * generateSpecId("specs/001-auth/spec.md", "myprefix") // "myprefix-001-spec"
70
+ */
71
+ export declare function generateSpecId(relativePath: string, prefix?: string): string;
72
+ /**
73
+ * Generate an issue ID for a task from tasks.md
74
+ *
75
+ * @param featureNumber - Feature number (e.g., "001")
76
+ * @param taskId - Task identifier from tasks.md (e.g., "T001", "T002")
77
+ * @param prefix - ID prefix (default: "skt" for spec-kit tasks)
78
+ * @returns Generated issue ID
79
+ *
80
+ * @example
81
+ * generateTaskIssueId("001", "T001") // "skt-001-T001"
82
+ * generateTaskIssueId("042", "T003", "task") // "task-042-T003"
83
+ */
84
+ export declare function generateTaskIssueId(featureNumber: string, taskId: string, prefix?: string): string;
85
+ /**
86
+ * Parse a spec-kit ID back into its components
87
+ *
88
+ * @param id - A spec-kit ID (e.g., "sk-001-spec", "skt-001-T001")
89
+ * @returns Parsed ID components or null if invalid format
90
+ *
91
+ * @example
92
+ * parseSpecId("sk-001-spec")
93
+ * // { prefix: "sk", featureNumber: "001", fileType: "spec", isTask: false }
94
+ *
95
+ * parseSpecId("skt-001-T001")
96
+ * // { prefix: "skt", featureNumber: "001", fileType: "T001", isTask: true }
97
+ *
98
+ * parseSpecId("sk-constitution")
99
+ * // { prefix: "sk", featureNumber: null, fileType: "constitution", isTask: false }
100
+ */
101
+ export declare function parseSpecId(id: string): ParsedSpecId | null;
102
+ /**
103
+ * Check if an ID is a valid spec-kit ID format
104
+ *
105
+ * @param id - ID to validate
106
+ * @param expectedPrefix - Optional prefix to check against
107
+ * @returns true if valid spec-kit ID format
108
+ *
109
+ * @example
110
+ * isValidSpecKitId("sk-001-spec") // true
111
+ * isValidSpecKitId("sk-001-spec", "sk") // true
112
+ * isValidSpecKitId("sk-001-spec", "other") // false
113
+ * isValidSpecKitId("invalid") // false
114
+ */
115
+ export declare function isValidSpecKitId(id: string, expectedPrefix?: string): boolean;
116
+ /**
117
+ * Generate the spec ID for a feature's root spec file
118
+ *
119
+ * @param featureNumber - Feature number (e.g., "001")
120
+ * @param prefix - ID prefix (default: "sk")
121
+ * @returns Spec ID for the feature's spec.md
122
+ *
123
+ * @example
124
+ * getFeatureSpecId("001") // "sk-001-spec"
125
+ */
126
+ export declare function getFeatureSpecId(featureNumber: string, prefix?: string): string;
127
+ /**
128
+ * Generate the spec ID for a feature's plan file
129
+ *
130
+ * @param featureNumber - Feature number (e.g., "001")
131
+ * @param prefix - ID prefix (default: "sk")
132
+ * @returns Spec ID for the feature's plan.md
133
+ *
134
+ * @example
135
+ * getFeaturePlanId("001") // "sk-001-plan"
136
+ */
137
+ export declare function getFeaturePlanId(featureNumber: string, prefix?: string): string;
138
+ /**
139
+ * Generate the spec ID for a feature's tasks file
140
+ *
141
+ * @param featureNumber - Feature number (e.g., "001")
142
+ * @param prefix - ID prefix (default: "sk")
143
+ * @returns Spec ID for the feature's tasks.md
144
+ *
145
+ * @example
146
+ * getFeatureTasksId("001") // "sk-001-tasks"
147
+ */
148
+ export declare function getFeatureTasksId(featureNumber: string, prefix?: string): string;
149
+ //# sourceMappingURL=id-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id-generator.d.ts","sourceRoot":"","sources":["../src/id-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,MAAM,GACN,OAAO,GACP,UAAU,GACV,YAAY,GACZ,UAAU,CAAC;AAEf;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAiB5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,YAAY,EAAE,MAAM,EACpB,MAAM,GAAE,MAAa,GACpB,MAAM,CAUR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAc,GACrB,MAAM,CAER;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CA0B3D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAK7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,MAAa,GACpB,MAAM,CAER;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,MAAa,GACpB,MAAM,CAER;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,MAAa,GACpB,MAAM,CAER"}
@@ -0,0 +1,197 @@
1
+ /**
2
+ * ID Generation for Spec-Kit Integration
3
+ *
4
+ * Generates deterministic, path-based IDs for spec-kit entities.
5
+ * IDs are stable across syncs (based on file path, not content hash).
6
+ *
7
+ * Examples:
8
+ * .specify/specs/001-auth/spec.md -> sk-001-spec
9
+ * .specify/specs/001-auth/plan.md -> sk-001-plan
10
+ * .specify/specs/001-auth/tasks.md T001 -> skt-001-T001
11
+ * .specify/specs/001-auth/research.md -> sk-001-research
12
+ * .specify/specs/001-auth/contracts/api-spec.json -> sk-001-contract-api-spec
13
+ * .specify/memory/constitution.md -> sk-constitution
14
+ */
15
+ /**
16
+ * Extract feature number from a spec-kit path
17
+ *
18
+ * @param relativePath - Path relative to .specify directory (e.g., "specs/001-auth/spec.md")
19
+ * @returns Feature number (e.g., "001") or null if not in a feature directory
20
+ *
21
+ * @example
22
+ * extractFeatureNumber("specs/001-auth/spec.md") // "001"
23
+ * extractFeatureNumber("specs/042-payments/plan.md") // "042"
24
+ * extractFeatureNumber("memory/constitution.md") // null
25
+ */
26
+ export function extractFeatureNumber(relativePath) {
27
+ // Match patterns like "specs/001-xxx/" or "specs/42-xxx/"
28
+ const featureMatch = relativePath.match(/specs\/(\d+)-[^/]+\//);
29
+ return featureMatch ? featureMatch[1] : null;
30
+ }
31
+ /**
32
+ * Extract file type from a spec-kit file path
33
+ *
34
+ * @param relativePath - Path relative to .specify directory
35
+ * @returns File type identifier for ID generation
36
+ *
37
+ * @example
38
+ * extractFileType("specs/001-auth/spec.md") // "spec"
39
+ * extractFileType("specs/001-auth/plan.md") // "plan"
40
+ * extractFileType("specs/001-auth/contracts/api-spec.json") // "contract-api-spec"
41
+ * extractFileType("memory/constitution.md") // "constitution"
42
+ */
43
+ export function extractFileType(relativePath) {
44
+ const parts = relativePath.split("/");
45
+ const fileName = parts[parts.length - 1];
46
+ const baseName = fileName.replace(/\.(md|json|yaml|yml)$/, "");
47
+ // Handle contracts subdirectory
48
+ if (relativePath.includes("/contracts/")) {
49
+ return `contract-${baseName}`;
50
+ }
51
+ // Handle memory directory files
52
+ if (relativePath.startsWith("memory/")) {
53
+ return baseName;
54
+ }
55
+ // Standard file types in feature directory
56
+ return baseName;
57
+ }
58
+ /**
59
+ * Generate a spec ID from a file path
60
+ *
61
+ * @param relativePath - Path relative to .specify directory
62
+ * @param prefix - ID prefix (default: "sk")
63
+ * @returns Generated spec ID
64
+ *
65
+ * @example
66
+ * generateSpecId("specs/001-auth/spec.md") // "sk-001-spec"
67
+ * generateSpecId("specs/001-auth/plan.md") // "sk-001-plan"
68
+ * generateSpecId("specs/001-auth/contracts/api-spec.json") // "sk-001-contract-api-spec"
69
+ * generateSpecId("memory/constitution.md") // "sk-constitution"
70
+ * generateSpecId("specs/001-auth/spec.md", "myprefix") // "myprefix-001-spec"
71
+ */
72
+ export function generateSpecId(relativePath, prefix = "sk") {
73
+ const featureNumber = extractFeatureNumber(relativePath);
74
+ const fileType = extractFileType(relativePath);
75
+ if (featureNumber) {
76
+ return `${prefix}-${featureNumber}-${fileType}`;
77
+ }
78
+ // Non-feature files (e.g., constitution.md)
79
+ return `${prefix}-${fileType}`;
80
+ }
81
+ /**
82
+ * Generate an issue ID for a task from tasks.md
83
+ *
84
+ * @param featureNumber - Feature number (e.g., "001")
85
+ * @param taskId - Task identifier from tasks.md (e.g., "T001", "T002")
86
+ * @param prefix - ID prefix (default: "skt" for spec-kit tasks)
87
+ * @returns Generated issue ID
88
+ *
89
+ * @example
90
+ * generateTaskIssueId("001", "T001") // "skt-001-T001"
91
+ * generateTaskIssueId("042", "T003", "task") // "task-042-T003"
92
+ */
93
+ export function generateTaskIssueId(featureNumber, taskId, prefix = "skt") {
94
+ return `${prefix}-${featureNumber}-${taskId}`;
95
+ }
96
+ /**
97
+ * Parse a spec-kit ID back into its components
98
+ *
99
+ * @param id - A spec-kit ID (e.g., "sk-001-spec", "skt-001-T001")
100
+ * @returns Parsed ID components or null if invalid format
101
+ *
102
+ * @example
103
+ * parseSpecId("sk-001-spec")
104
+ * // { prefix: "sk", featureNumber: "001", fileType: "spec", isTask: false }
105
+ *
106
+ * parseSpecId("skt-001-T001")
107
+ * // { prefix: "skt", featureNumber: "001", fileType: "T001", isTask: true }
108
+ *
109
+ * parseSpecId("sk-constitution")
110
+ * // { prefix: "sk", featureNumber: null, fileType: "constitution", isTask: false }
111
+ */
112
+ export function parseSpecId(id) {
113
+ // Pattern for feature-based IDs: prefix-number-type
114
+ const featureMatch = id.match(/^([a-z]+)-(\d+)-(.+)$/i);
115
+ if (featureMatch) {
116
+ const [, prefix, featureNumber, fileType] = featureMatch;
117
+ return {
118
+ prefix,
119
+ featureNumber,
120
+ fileType,
121
+ isTask: fileType.startsWith("T") && /^T\d+$/.test(fileType),
122
+ };
123
+ }
124
+ // Pattern for non-feature IDs: prefix-type
125
+ const simpleMatch = id.match(/^([a-z]+)-(.+)$/i);
126
+ if (simpleMatch) {
127
+ const [, prefix, fileType] = simpleMatch;
128
+ return {
129
+ prefix,
130
+ featureNumber: null,
131
+ fileType,
132
+ isTask: false,
133
+ };
134
+ }
135
+ return null;
136
+ }
137
+ /**
138
+ * Check if an ID is a valid spec-kit ID format
139
+ *
140
+ * @param id - ID to validate
141
+ * @param expectedPrefix - Optional prefix to check against
142
+ * @returns true if valid spec-kit ID format
143
+ *
144
+ * @example
145
+ * isValidSpecKitId("sk-001-spec") // true
146
+ * isValidSpecKitId("sk-001-spec", "sk") // true
147
+ * isValidSpecKitId("sk-001-spec", "other") // false
148
+ * isValidSpecKitId("invalid") // false
149
+ */
150
+ export function isValidSpecKitId(id, expectedPrefix) {
151
+ const parsed = parseSpecId(id);
152
+ if (!parsed)
153
+ return false;
154
+ if (expectedPrefix && parsed.prefix !== expectedPrefix)
155
+ return false;
156
+ return true;
157
+ }
158
+ /**
159
+ * Generate the spec ID for a feature's root spec file
160
+ *
161
+ * @param featureNumber - Feature number (e.g., "001")
162
+ * @param prefix - ID prefix (default: "sk")
163
+ * @returns Spec ID for the feature's spec.md
164
+ *
165
+ * @example
166
+ * getFeatureSpecId("001") // "sk-001-spec"
167
+ */
168
+ export function getFeatureSpecId(featureNumber, prefix = "sk") {
169
+ return `${prefix}-${featureNumber}-spec`;
170
+ }
171
+ /**
172
+ * Generate the spec ID for a feature's plan file
173
+ *
174
+ * @param featureNumber - Feature number (e.g., "001")
175
+ * @param prefix - ID prefix (default: "sk")
176
+ * @returns Spec ID for the feature's plan.md
177
+ *
178
+ * @example
179
+ * getFeaturePlanId("001") // "sk-001-plan"
180
+ */
181
+ export function getFeaturePlanId(featureNumber, prefix = "sk") {
182
+ return `${prefix}-${featureNumber}-plan`;
183
+ }
184
+ /**
185
+ * Generate the spec ID for a feature's tasks file
186
+ *
187
+ * @param featureNumber - Feature number (e.g., "001")
188
+ * @param prefix - ID prefix (default: "sk")
189
+ * @returns Spec ID for the feature's tasks.md
190
+ *
191
+ * @example
192
+ * getFeatureTasksId("001") // "sk-001-tasks"
193
+ */
194
+ export function getFeatureTasksId(featureNumber, prefix = "sk") {
195
+ return `${prefix}-${featureNumber}-tasks`;
196
+ }
197
+ //# sourceMappingURL=id-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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CAAC;AACd,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,aAAqB,EACrB,SAAiB,IAAI;IAErB,OAAO,GAAG,MAAM,IAAI,aAAa,OAAO,CAAC;AAC3C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,aAAqB,EACrB,SAAiB,IAAI;IAErB,OAAO,GAAG,MAAM,IAAI,aAAa,OAAO,CAAC;AAC3C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,aAAqB,EACrB,SAAiB,IAAI;IAErB,OAAO,GAAG,MAAM,IAAI,aAAa,QAAQ,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Spec-Kit Integration Plugin for sudocode
3
+ *
4
+ * Provides integration with spec-kit - a markdown-based specification system.
5
+ * Syncs specs, plans, and tasks to sudocode's specs and issues.
6
+ */
7
+ export { generateSpecId, generateTaskIssueId, parseSpecId, isValidSpecKitId, extractFeatureNumber, extractFileType, getFeatureSpecId, getFeaturePlanId, getFeatureTasksId, type ParsedSpecId, type SpecKitFileType, } from "./id-generator.js";
8
+ export { mapFeatureRelationships, mapTaskDependencies, mapSupportingDocRelationships, mapPlanToSpecRelationship, mapTaskToPlanRelationship, getStandardSupportingDocTypes, createContractDocInfo, type MappedRelationship, type TaskInfo, type SupportingDocInfo, } from "./relationship-mapper.js";
9
+ export { updateTaskStatus, getTaskStatus, getAllTaskStatuses, updateSpecContent, getSpecTitle, getSpecStatus, type TaskUpdateResult, type SpecUpdates, type SpecUpdateResult, } from "./writer/index.js";
10
+ export { SpecKitWatcher, type ChangeCallback, type SpecKitWatcherOptions, } from "./watcher.js";
11
+ export { PATTERNS, extractMetadata, extractTitle, extractTitleWithPrefixRemoval, extractMetadataValue, extractCrossReferences, findContentStartIndex, extractSection, parseDate, escapeRegex, cleanTaskDescription, normalizeStatus, parseSpec, parseSpecContent, isSpecFile, getSpecFileTitle, getSpecFileStatus, type ParsedSpecKitSpec, type ParseSpecOptions, parsePlan, parsePlanContent, isPlanFile, getPlanFileTitle, getPlanFileStatus, type ParsedSpecKitPlan, type ParsePlanOptions, parseTasks, parseTasksContent, getAllTasks, getTaskById, getIncompleteTasks, getParallelizableTasks, getTasksByPhase, getTasksByUserStory, isTasksFile, getTaskStats, type ParsedTask, type ParsedTasksFile, type ParseTasksOptions, parseResearch, parseDataModel, parseSupportingDoc, parseContract, parseContractsDirectory, discoverSupportingDocs, detectDocType, type SupportingDocType, type ParsedSupportingDoc, type ParsedContract, type ParseSupportingDocOptions, } from "./parser/index.js";
12
+ import type { IntegrationPlugin } from "@sudocode-ai/types";
13
+ /**
14
+ * Spec-kit specific configuration options
15
+ */
16
+ export interface SpecKitOptions {
17
+ /** Path to the .specify directory (relative to project root) */
18
+ path: string;
19
+ /** Prefix for spec IDs imported from spec-kit (default: "sk") */
20
+ spec_prefix?: string;
21
+ /** Prefix for task IDs imported from spec-kit (default: "skt") */
22
+ task_prefix?: string;
23
+ /** Whether to include supporting docs (research.md, data-model.md, contracts/) (default: true) */
24
+ include_supporting_docs?: boolean;
25
+ /** Whether to include constitution.md as root project spec (default: true) */
26
+ include_constitution?: boolean;
27
+ }
28
+ /**
29
+ * Spec-kit integration plugin
30
+ */
31
+ declare const specKitPlugin: IntegrationPlugin;
32
+ export default specKitPlugin;
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,6BAA6B,EAC7B,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