synarcx 0.2.0 → 0.3.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 (51) hide show
  1. package/README.md +237 -43
  2. package/dist/commands/config.js +7 -6
  3. package/dist/core/command-generation/adapters/bob.js +7 -20
  4. package/dist/core/command-generation/adapters/claude.js +9 -29
  5. package/dist/core/command-generation/adapters/cursor.js +9 -22
  6. package/dist/core/command-generation/adapters/pi.js +6 -19
  7. package/dist/core/command-generation/adapters/windsurf.js +9 -29
  8. package/dist/core/command-generation/yaml-utils.d.ts +3 -0
  9. package/dist/core/command-generation/yaml-utils.js +12 -0
  10. package/dist/core/completions/installers/bash-installer.d.ts +1 -0
  11. package/dist/core/completions/installers/bash-installer.js +14 -3
  12. package/dist/core/completions/installers/powershell-installer.d.ts +1 -0
  13. package/dist/core/completions/installers/powershell-installer.js +18 -10
  14. package/dist/core/config.js +0 -3
  15. package/dist/core/index.js +1 -1
  16. package/dist/core/init.d.ts +0 -2
  17. package/dist/core/init.js +27 -77
  18. package/dist/core/migration.js +1 -2
  19. package/dist/core/profile-sync-drift.d.ts +0 -7
  20. package/dist/core/profile-sync-drift.js +2 -17
  21. package/dist/core/profiles.d.ts +0 -11
  22. package/dist/core/profiles.js +1 -20
  23. package/dist/core/shared/artifact-cleanup.d.ts +5 -0
  24. package/dist/core/shared/artifact-cleanup.js +89 -0
  25. package/dist/core/shared/skill-generation.js +3 -3
  26. package/dist/core/shared/tool-detection.d.ts +4 -10
  27. package/dist/core/shared/tool-detection.js +3 -31
  28. package/dist/core/shared/workflow-registry.d.ts +40 -0
  29. package/dist/core/shared/workflow-registry.js +19 -0
  30. package/dist/core/templates/skill-templates.d.ts +1 -0
  31. package/dist/core/templates/skill-templates.js +1 -0
  32. package/dist/core/templates/types.d.ts +7 -0
  33. package/dist/core/templates/types.js +9 -1
  34. package/dist/core/templates/workflows/analyze.js +84 -84
  35. package/dist/core/templates/workflows/apply-change.js +291 -291
  36. package/dist/core/templates/workflows/archive-change.js +254 -254
  37. package/dist/core/templates/workflows/clarify.js +115 -93
  38. package/dist/core/templates/workflows/debug.js +100 -100
  39. package/dist/core/templates/workflows/explore.js +462 -462
  40. package/dist/core/templates/workflows/propose.js +199 -199
  41. package/dist/core/templates/workflows/quick.js +112 -112
  42. package/dist/core/templates/workflows/refactor.js +109 -109
  43. package/dist/core/templates/workflows/review.d.ts +4 -0
  44. package/dist/core/templates/workflows/review.js +293 -0
  45. package/dist/core/templates/workflows/sync.js +225 -148
  46. package/dist/core/update.d.ts +1 -21
  47. package/dist/core/update.js +18 -117
  48. package/dist/core/view.js +8 -8
  49. package/dist/core/workspace/open-surface.d.ts +2 -2
  50. package/dist/core/workspace/open-surface.js +13 -13
  51. package/package.json +84 -76
@@ -0,0 +1,40 @@
1
+ export declare const DEFAULT_SCHEMA = "synarcx";
2
+ export declare const WORKFLOWS: readonly [{
3
+ readonly id: "explore";
4
+ readonly skillDir: "syn-explore";
5
+ }, {
6
+ readonly id: "apply";
7
+ readonly skillDir: "syn-apply";
8
+ }, {
9
+ readonly id: "propose";
10
+ readonly skillDir: "syn-propose";
11
+ }, {
12
+ readonly id: "sync";
13
+ readonly skillDir: "syn-sync";
14
+ }, {
15
+ readonly id: "clarify";
16
+ readonly skillDir: "syn-clarify";
17
+ }, {
18
+ readonly id: "analyze";
19
+ readonly skillDir: "syn-analyze";
20
+ }, {
21
+ readonly id: "debug";
22
+ readonly skillDir: "syn-debug";
23
+ }, {
24
+ readonly id: "refactor";
25
+ readonly skillDir: "syn-refactor";
26
+ }, {
27
+ readonly id: "quick";
28
+ readonly skillDir: "syn-quick";
29
+ }, {
30
+ readonly id: "review";
31
+ readonly skillDir: "syn-review";
32
+ }];
33
+ export declare const ALL_WORKFLOWS: readonly string[];
34
+ export declare const CORE_WORKFLOWS: readonly string[];
35
+ export declare const SKILL_NAMES: readonly string[];
36
+ export declare const COMMAND_IDS: readonly string[];
37
+ export declare const WORKFLOW_TO_SKILL_DIR: Record<string, string>;
38
+ export type WorkflowId = string;
39
+ export type CoreWorkflowId = string;
40
+ //# sourceMappingURL=workflow-registry.d.ts.map
@@ -0,0 +1,19 @@
1
+ export const DEFAULT_SCHEMA = 'synarcx';
2
+ export const WORKFLOWS = [
3
+ { id: 'explore', skillDir: 'syn-explore' },
4
+ { id: 'apply', skillDir: 'syn-apply' },
5
+ { id: 'propose', skillDir: 'syn-propose' },
6
+ { id: 'sync', skillDir: 'syn-sync' },
7
+ { id: 'clarify', skillDir: 'syn-clarify' },
8
+ { id: 'analyze', skillDir: 'syn-analyze' },
9
+ { id: 'debug', skillDir: 'syn-debug' },
10
+ { id: 'refactor', skillDir: 'syn-refactor' },
11
+ { id: 'quick', skillDir: 'syn-quick' },
12
+ { id: 'review', skillDir: 'syn-review' },
13
+ ];
14
+ export const ALL_WORKFLOWS = WORKFLOWS.map(w => w.id);
15
+ export const CORE_WORKFLOWS = [...ALL_WORKFLOWS];
16
+ export const SKILL_NAMES = WORKFLOWS.map(w => w.skillDir);
17
+ export const COMMAND_IDS = [...ALL_WORKFLOWS];
18
+ export const WORKFLOW_TO_SKILL_DIR = Object.fromEntries(WORKFLOWS.map(w => [w.id, w.skillDir]));
19
+ //# sourceMappingURL=workflow-registry.js.map
@@ -14,4 +14,5 @@ export { getSynAnalyzeSkillTemplate, getSynAnalyzeCommandTemplate } from './work
14
14
  export { getSynDebugSkillTemplate, getSynDebugCommandTemplate } from './workflows/debug.js';
15
15
  export { getSynRefactorSkillTemplate, getSynRefactorCommandTemplate } from './workflows/refactor.js';
16
16
  export { getSynQuickSkillTemplate, getSynQuickCommandTemplate } from './workflows/quick.js';
17
+ export { getSynReviewSkillTemplate, getSynReviewCommandTemplate } from './workflows/review.js';
17
18
  //# sourceMappingURL=skill-templates.d.ts.map
@@ -13,4 +13,5 @@ export { getSynAnalyzeSkillTemplate, getSynAnalyzeCommandTemplate } from './work
13
13
  export { getSynDebugSkillTemplate, getSynDebugCommandTemplate } from './workflows/debug.js';
14
14
  export { getSynRefactorSkillTemplate, getSynRefactorCommandTemplate } from './workflows/refactor.js';
15
15
  export { getSynQuickSkillTemplate, getSynQuickCommandTemplate } from './workflows/quick.js';
16
+ export { getSynReviewSkillTemplate, getSynReviewCommandTemplate } from './workflows/review.js';
16
17
  //# sourceMappingURL=skill-templates.js.map
@@ -16,4 +16,11 @@ export interface CommandTemplate {
16
16
  tags: string[];
17
17
  content: string;
18
18
  }
19
+ export declare function commandFromSkill(skill: SkillTemplate, overrides: {
20
+ content: string;
21
+ name?: string;
22
+ description?: string;
23
+ tags?: string[];
24
+ category?: string;
25
+ }): CommandTemplate;
19
26
  //# sourceMappingURL=types.d.ts.map
@@ -1,5 +1,13 @@
1
1
  /**
2
2
  * Core template types for skills and slash commands.
3
3
  */
4
- export {};
4
+ export function commandFromSkill(skill, overrides) {
5
+ return {
6
+ name: overrides.name ?? skill.name,
7
+ description: overrides.description ?? skill.description,
8
+ category: overrides.category ?? 'Workflow',
9
+ tags: overrides.tags ?? ['synarcx', skill.name.replace('syn-', '')],
10
+ content: overrides.content,
11
+ };
12
+ }
5
13
  //# sourceMappingURL=types.js.map
@@ -1,48 +1,49 @@
1
+ import { commandFromSkill } from '../types.js';
1
2
  export function getSynAnalyzeSkillTemplate() {
2
3
  return {
3
4
  name: 'syn-analyze',
4
5
  description: 'Cross-artifact consistency check across proposal, specs, design, and tasks. Edits in place to fix inconsistencies.',
5
- instructions: `Run a cross-artifact consistency check for a change. Edits artifacts in place to fix issues found.
6
-
7
- ---
8
-
9
- ## Steps
10
-
11
- 1. **Identify the change**
12
- - If the user specified a change name, use it
13
- - Otherwise, run \`synarcx list --json\` to find active changes
14
- - If multiple, ask which one to analyze
15
-
16
- 2. **Read all artifacts**
17
- - \`synspec/changes/<name>/proposal.md\`
18
- - \`synspec/changes/<name>/specs/**/*.md\`
19
- - \`synspec/changes/<name>/design.md\`
20
- - \`synspec/changes/<name>/tasks.md\`
21
-
22
- 3. **Run consistency checks**
23
-
24
- a. **Terminology consistency** — same terms used across all artifacts
25
- b. **Scope alignment** — proposal scope matches design and tasks
26
- c. **Completeness** — no missing sections or dangling references
27
- d. **Conflict detection** — contradictory statements between artifacts
28
- e. **Traceability** — every task maps to a spec requirement
29
-
30
- 4. **Fix inconsistencies in place**
31
- - Edit artifacts directly to resolve issues
32
- - Maximum 5 edits per session
33
- - Show what was changed and why
34
-
35
- 5. **Generate summary** of changes made
36
-
37
- ---
38
-
39
- ## Output
40
-
41
- After completing, summarize:
42
- - What was checked
43
- - What inconsistencies were found and fixed
44
- - What artifacts were modified
45
- - Any remaining concerns
6
+ instructions: `Run a cross-artifact consistency check for a change. Edits artifacts in place to fix issues found.
7
+
8
+ ---
9
+
10
+ ## Steps
11
+
12
+ 1. **Identify the change**
13
+ - If the user specified a change name, use it
14
+ - Otherwise, run \`synarcx list --json\` to find active changes
15
+ - If multiple, ask which one to analyze
16
+
17
+ 2. **Read all artifacts**
18
+ - \`synspec/changes/<name>/proposal.md\`
19
+ - \`synspec/changes/<name>/specs/**/*.md\`
20
+ - \`synspec/changes/<name>/design.md\`
21
+ - \`synspec/changes/<name>/tasks.md\`
22
+
23
+ 3. **Run consistency checks**
24
+
25
+ a. **Terminology consistency** — same terms used across all artifacts
26
+ b. **Scope alignment** — proposal scope matches design and tasks
27
+ c. **Completeness** — no missing sections or dangling references
28
+ d. **Conflict detection** — contradictory statements between artifacts
29
+ e. **Traceability** — every task maps to a spec requirement
30
+
31
+ 4. **Fix inconsistencies in place**
32
+ - Edit artifacts directly to resolve issues
33
+ - Maximum 5 edits per session
34
+ - Show what was changed and why
35
+
36
+ 5. **Generate summary** of changes made
37
+
38
+ ---
39
+
40
+ ## Output
41
+
42
+ After completing, summarize:
43
+ - What was checked
44
+ - What inconsistencies were found and fixed
45
+ - What artifacts were modified
46
+ - Any remaining concerns
46
47
  - Next step: Run \`/syn:apply\` to start implementation`,
47
48
  license: 'MIT',
48
49
  compatibility: 'Requires synarcx CLI.',
@@ -50,52 +51,51 @@ After completing, summarize:
50
51
  };
51
52
  }
52
53
  export function getSynAnalyzeCommandTemplate() {
53
- return {
54
+ return commandFromSkill(getSynAnalyzeSkillTemplate(), {
54
55
  name: 'syn:analyze',
55
56
  description: 'Cross-artifact consistency check for proposal, specs, design, and tasks',
56
- category: 'Workflow',
57
57
  tags: ['workflow', 'analyze'],
58
- content: `Run a cross-artifact consistency check for a change. Edits artifacts in place to fix issues found.
59
-
60
- ---
61
-
62
- ## Steps
63
-
64
- 1. **Identify the change**
65
- - If the user specified a change name, use it
66
- - Otherwise, run \`synarcx list --json\` to find active changes
67
- - If multiple, ask which one to analyze
68
-
69
- 2. **Read all artifacts**
70
- - \`synspec/changes/<name>/proposal.md\`
71
- - \`synspec/changes/<name>/specs/**/*.md\`
72
- - \`synspec/changes/<name>/design.md\`
73
- - \`synspec/changes/<name>/tasks.md\`
74
-
75
- 3. **Run consistency checks**
76
- - **Terminology consistency** — same terms across all artifacts
77
- - **Scope alignment** — proposal scope matches design and tasks
78
- - **Completeness** — no missing sections or dangling references
79
- - **Conflict detection** — contradictory statements between artifacts
80
- - **Traceability** — every task maps to a spec requirement
81
-
82
- 4. **Fix inconsistencies in place**
83
- - Edit artifacts directly to resolve issues
84
- - Maximum 5 edits per session
85
- - Show what was changed and why
86
-
87
- 5. **Generate summary** of changes made
88
-
89
- ---
90
-
91
- ## Output
92
-
93
- After completing, summarize:
94
- - What was checked
95
- - What inconsistencies were found and fixed
96
- - What artifacts were modified
97
- - Any remaining concerns
58
+ content: `Run a cross-artifact consistency check for a change. Edits artifacts in place to fix issues found.
59
+
60
+ ---
61
+
62
+ ## Steps
63
+
64
+ 1. **Identify the change**
65
+ - If the user specified a change name, use it
66
+ - Otherwise, run \`synarcx list --json\` to find active changes
67
+ - If multiple, ask which one to analyze
68
+
69
+ 2. **Read all artifacts**
70
+ - \`synspec/changes/<name>/proposal.md\`
71
+ - \`synspec/changes/<name>/specs/**/*.md\`
72
+ - \`synspec/changes/<name>/design.md\`
73
+ - \`synspec/changes/<name>/tasks.md\`
74
+
75
+ 3. **Run consistency checks**
76
+ - **Terminology consistency** — same terms across all artifacts
77
+ - **Scope alignment** — proposal scope matches design and tasks
78
+ - **Completeness** — no missing sections or dangling references
79
+ - **Conflict detection** — contradictory statements between artifacts
80
+ - **Traceability** — every task maps to a spec requirement
81
+
82
+ 4. **Fix inconsistencies in place**
83
+ - Edit artifacts directly to resolve issues
84
+ - Maximum 5 edits per session
85
+ - Show what was changed and why
86
+
87
+ 5. **Generate summary** of changes made
88
+
89
+ ---
90
+
91
+ ## Output
92
+
93
+ After completing, summarize:
94
+ - What was checked
95
+ - What inconsistencies were found and fixed
96
+ - What artifacts were modified
97
+ - Any remaining concerns
98
98
  - Next step: Run \`/syn:apply\` to start implementation`
99
- };
99
+ });
100
100
  }
101
101
  //# sourceMappingURL=analyze.js.map