@juancr11/sibu 0.17.0 → 0.18.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 (60) hide show
  1. package/README.md +66 -29
  2. package/bin/entrypoints/cli/create-program.js +1 -1
  3. package/bin/entrypoints/cli/execute-command.js +4 -7
  4. package/bin/modules/agent-tool-configuration/index.js +1 -0
  5. package/bin/modules/agent-tool-configuration/mcp-config.js +134 -0
  6. package/bin/modules/interactive-guidance/prompts.js +1 -1
  7. package/bin/modules/mcp-server-selection-management/list-mcp-servers/handler.js +2 -2
  8. package/bin/modules/mcp-server-selection-management/stop-mcp-server/handler.js +5 -5
  9. package/bin/modules/mcp-server-selection-management/use-mcp-server/handler.js +4 -3
  10. package/bin/modules/skill-selection-management/list-skills/handler.js +2 -2
  11. package/bin/modules/skill-selection-management/stop-managing-file/handler.js +5 -4
  12. package/bin/modules/skill-selection-management/use-skill/handler.js +5 -4
  13. package/bin/modules/{sync-review → sync-review-orchestrator}/apply-action.js +4 -3
  14. package/bin/modules/{sync-review → sync-review-orchestrator}/handler.js +4 -4
  15. package/bin/modules/{sync-review → sync-review-orchestrator}/index.js +1 -0
  16. package/bin/modules/{sync-review → sync-review-orchestrator}/log-preview.js +1 -1
  17. package/bin/modules/{sync-review → sync-review-orchestrator}/sync-preview.js +3 -3
  18. package/bin/modules/{sync-review → sync-review-orchestrator}/unsupported-agent-cleanup.js +2 -2
  19. package/bin/modules/{workflow-mutation-readiness → sync-review-orchestrator}/workflow-mutation-readiness.js +4 -4
  20. package/bin/modules/{workflow-target-planning → template-catalog}/index.js +2 -1
  21. package/bin/modules/{template-catalog-rendering → template-catalog}/templates.js +42 -115
  22. package/bin/modules/workflow-configuration-manager/index.js +6 -0
  23. package/bin/modules/workflow-configuration-manager/list-mcp-servers/handler.js +46 -0
  24. package/bin/modules/workflow-configuration-manager/list-skills/command.js +1 -0
  25. package/bin/modules/workflow-configuration-manager/list-skills/handler.js +75 -0
  26. package/bin/modules/workflow-configuration-manager/stop-managing-file/command.js +1 -0
  27. package/bin/modules/workflow-configuration-manager/stop-managing-file/handler.js +221 -0
  28. package/bin/modules/workflow-configuration-manager/stop-mcp-server/command.js +1 -0
  29. package/bin/modules/workflow-configuration-manager/stop-mcp-server/handler.js +198 -0
  30. package/bin/modules/workflow-configuration-manager/use-mcp-server/command.js +1 -0
  31. package/bin/modules/workflow-configuration-manager/use-mcp-server/handler.js +193 -0
  32. package/bin/modules/workflow-configuration-manager/use-skill/command.js +1 -0
  33. package/bin/modules/workflow-configuration-manager/use-skill/handler.js +314 -0
  34. package/bin/modules/workflow-health-inspector/command.js +1 -0
  35. package/bin/modules/{workflow-health-diagnosis → workflow-health-inspector}/handler.js +7 -7
  36. package/bin/modules/workflow-installer/command.js +1 -0
  37. package/bin/modules/{project-adoption → workflow-installer}/handler.js +5 -4
  38. package/bin/modules/workflow-state-ledger/index.js +2 -0
  39. package/bin/modules/workflow-state-ledger/state-path.js +1 -0
  40. package/bin/modules/{workflow-state-registry → workflow-state-ledger}/state.js +40 -1
  41. package/bin/{modules/workflow-target-planning/workflow-targets.js → shared/expected-workflow-targets.js} +3 -104
  42. package/bin/shared/paths.js +1 -1
  43. package/bin/support/expected-workflow-targets.js +131 -0
  44. package/bin/support/interactive-guidance/index.js +1 -0
  45. package/bin/support/interactive-guidance/prompts.js +275 -0
  46. package/bin/support/version-advisory/index.js +1 -0
  47. package/bin/support/version-advisory/npm-version.js +205 -0
  48. package/package.json +2 -1
  49. package/templates/AGENTS.md +8 -0
  50. package/templates/manifest.json +5 -4
  51. package/bin/modules/template-catalog-rendering/index.js +0 -1
  52. package/bin/modules/workflow-mutation-readiness/index.js +0 -1
  53. package/bin/modules/workflow-state-registry/index.js +0 -1
  54. /package/bin/{modules/project-adoption/command.js → entrypoints/cli-command-surface/index.js} +0 -0
  55. /package/bin/modules/{sync-review → sync-review-orchestrator}/action-prompt.js +0 -0
  56. /package/bin/modules/{sync-review → sync-review-orchestrator}/command.js +0 -0
  57. /package/bin/modules/{workflow-target-planning → template-catalog}/catalog.js +0 -0
  58. /package/bin/modules/{workflow-health-diagnosis → workflow-configuration-manager/list-mcp-servers}/command.js +0 -0
  59. /package/bin/modules/{workflow-health-diagnosis → workflow-health-inspector}/index.js +0 -0
  60. /package/bin/modules/{project-adoption → workflow-installer}/index.js +0 -0
package/README.md CHANGED
@@ -123,7 +123,7 @@ Sibu works best when AI collaboration stays small, explicit, and reviewable. The
123
123
 
124
124
  ```mermaid
125
125
  flowchart LR
126
- orient["1. Orient<br/>Product vision + module map"] --> design["2. Design<br/>Feature brief + technical design"]
126
+ orient["1. Orient<br/>Product vision + domain model + capabilities + module map"] --> design["2. Design<br/>Feature brief + technical design"]
127
127
  design --> plan["3. Plan<br/>Epics, stories + implementation steps"]
128
128
  plan --> build["4. Build<br/>Small AI-assisted changes"]
129
129
  build --> validate["5. Validate<br/>Tests, checks + human review"]
@@ -133,7 +133,7 @@ flowchart LR
133
133
 
134
134
  | Stage | What it means |
135
135
  | --- | --- |
136
- | Orient | Clarify the product promise, boundaries, and deep modules so AI work starts with context instead of vibes. |
136
+ | Orient | Clarify the product promise, business domain, capabilities, and deep modules so AI work starts with context instead of vibes. |
137
137
  | Design | Turn a feature idea into a brief and technical direction before implementation details sprawl. |
138
138
  | Plan | Split work into epics, stories, and implementation steps small enough for reviewable AI collaboration. |
139
139
  | Build | Let agents help with focused changes while the engineer keeps scope and judgment. |
@@ -146,45 +146,82 @@ This is not ceremony for ceremony's sake. It is how Sibu keeps velocity from tur
146
146
 
147
147
  Skills are reusable instructions that teach an AI agent how to handle a focused kind of work. Sibu uses them to keep prompts smaller, workflows clearer, and responsibilities explicit.
148
148
 
149
+ The diagrams below show Sibu's bundled skill inventory, including optional selectable skills. Some skills may not be installed in this repository's `.agents/skills/` directory unless this project selected them.
150
+
149
151
  ```mermaid
150
152
  flowchart TB
151
- skills["Sibu skills"]
152
-
153
- skills --> product["Product + planning"]
153
+ product["Product + planning"]
154
154
  product --> productVision["product-vision-writer"]
155
+ product --> businessDomainModel["business-domain-model-writer"]
156
+ product --> capabilitiesMap["capabilities-map-writer"]
155
157
  product --> deepModuleMap["deep-module-map-writer"]
156
158
  product --> featureBrief["feature-brief-writer"]
159
+ product --> featureIdea["feature-idea-capture"]
157
160
  product --> scrumPlanner["scrum-master-planner"]
161
+ ```
158
162
 
159
- skills --> designDelivery["Design + delivery"]
160
- designDelivery --> technicalDesign["technical-design-writer"]
161
- designDelivery --> implementationPlanner["ai-implementation-planner"]
162
- designDelivery --> implementationExecutor["ai-implementation-plan-executor"]
163
+ ```mermaid
164
+ flowchart TB
165
+ delivery["Design + delivery"]
166
+ delivery --> uxExpert["ux-expert"]
167
+ delivery --> technicalDesign["technical-design-writer"]
168
+ delivery --> implementationPlanner["ai-implementation-planner"]
169
+ delivery --> implementationPlannerToolbox["ai-implementation-planner-toolbox"]
170
+ delivery --> implementationExecutor["ai-implementation-plan-executor"]
171
+ delivery --> implementationExecutorToolbox["ai-implementation-executor-toolbox"]
172
+ ```
163
173
 
164
- skills --> engineering["Engineering guidance"]
174
+ ```mermaid
175
+ flowchart TB
176
+ engineering["Engineering guidance"]
165
177
  engineering --> cleanCode["clean-code"]
166
178
  engineering --> typescript["typescript"]
179
+ engineering --> react["react"]
180
+ engineering --> nextjs["nextjs"]
181
+ engineering --> golang["golang"]
182
+ engineering --> postgres["postgresql-expert"]
167
183
  engineering --> commandPattern["command-pattern"]
184
+ engineering --> dddHexagonal["ddd-hexagonal"]
185
+ engineering --> layeredArchitecture["layered-architecture"]
186
+ ```
187
+
188
+ ```mermaid
189
+ flowchart TB
190
+ maintenance["Prompts, exports + workflow maintenance"]
191
+ maintenance --> promptEngineer["ai-prompt-engineer-master"]
192
+ maintenance --> exportGithub["export-to-github"]
193
+ maintenance --> exportNotion["export-to-notion"]
194
+ maintenance --> templateChange["sibu-template-change"]
195
+ ```
168
196
 
169
- skills --> promptsMaintenance["Prompts + workflow maintenance"]
170
- promptsMaintenance --> promptEngineer["ai-prompt-engineer-master"]
171
- promptsMaintenance --> templateChange["sibu-template-change"]
172
- ```
173
-
174
- | Skill | Helps with | Use when... |
175
- | --- | --- | --- |
176
- | `product-vision-writer` | Product vision and positioning | You need to define or revise the product north star, audience, boundaries, voice, or success signals. |
177
- | `deep-module-map-writer` | Deep implementation boundaries | You need to map durable modules before feature work, or decide where future work belongs. |
178
- | `feature-brief-writer` | Business-level feature definition | You need a scoped feature brief grounded in the product vision and Deep Module Map. |
179
- | `technical-design-writer` | Implementation-oriented design | You have an approved feature brief and need a concise technical direction before planning stories. |
180
- | `scrum-master-planner` | Epics and user stories | You need to split an approved feature brief and technical design into pragmatic delivery slices. |
181
- | `ai-implementation-planner` | Story implementation steps | You need an approved user story turned into small, executable implementation-plan files. |
182
- | `ai-implementation-plan-executor` | Plan execution | You want an agent to execute a story implementation plan, stop for review, then commit after approval. |
183
- | `clean-code` | General code quality | Any task writes or modifies code and should stay clear, simple, focused, and readable. |
184
- | `typescript` | TypeScript guidance | A task changes `.ts` or `.tsx` files and needs practical TypeScript discipline. |
185
- | `command-pattern` | Vertical-slice command design | Work involves command handlers, workflows, request processing, or executable tasks. |
186
- | `ai-prompt-engineer-master` | Prompt and template quality | You are creating, rewriting, compressing, or evaluating prompts or reusable AI instructions. |
187
- | `sibu-template-change` | Sibu template maintenance | You change files under `templates/` or template manifest metadata and need safe lifecycle validation. |
197
+ | Skill | Helps with | Availability | Use when... |
198
+ | --- | --- | --- | --- |
199
+ | `product-vision-writer` | Product vision and positioning | Installed here | You need to define or revise the product north star, audience, boundaries, voice, or success signals. |
200
+ | `business-domain-model-writer` | Domain language and rules | Installed here | You need to clarify business concepts, subdomains, workflows, lifecycle rules, domain events, or boundaries. |
201
+ | `capabilities-map-writer` | Business/product capability map | Installed here | You need to map the product abilities each subdomain must provide before module or feature planning. |
202
+ | `deep-module-map-writer` | Deep implementation boundaries | Installed here | You need to map durable modules from the product vision, domain model, and capabilities map before feature work. |
203
+ | `feature-brief-writer` | Business-level feature definition | Installed here | You need a scoped feature brief grounded in the product vision, Business Domain Model, and Capabilities Map. |
204
+ | `feature-idea-capture` | Rough future ideas | Installed here | You want to save a feature, product, workflow, or improvement idea without turning it into planned work yet. |
205
+ | `scrum-master-planner` | Epics and user stories | Installed here | You need to split an approved feature brief and technical design into pragmatic delivery slices. |
206
+ | `ux-expert` | UX design guidance | Bundled optional | You need UX design, interaction, flow, layout, or experience guidance. |
207
+ | `technical-design-writer` | Implementation-oriented design | Installed here | You have an approved feature brief and need a concise technical direction before planning stories. |
208
+ | `ai-implementation-planner` | Story implementation steps | Installed here | You need an approved user story turned into small, executable implementation-plan files. |
209
+ | `ai-implementation-planner-toolbox` | Planner sub-agent rules | Installed here | A Sibu implementation planner worker needs worker-only rules for creating a story-local implementation plan. |
210
+ | `ai-implementation-plan-executor` | Plan execution | Installed here | You want an agent to execute a story implementation plan, stop for review, then commit after approval. |
211
+ | `ai-implementation-executor-toolbox` | Executor sub-agent rules | Installed here | A Sibu implementation executor worker needs worker-only rules for executing one story plan with validation. |
212
+ | `clean-code` | General code quality | Installed here | Any task writes or modifies code and should stay clear, simple, focused, and readable. |
213
+ | `typescript` | TypeScript guidance | Installed here | A task changes `.ts` or `.tsx` files and needs practical TypeScript discipline. |
214
+ | `react` | React component design | Bundled optional | Work creates or edits React components, props, state ownership, or presentation boundaries. |
215
+ | `nextjs` | Next.js App Router guidance | Bundled optional | Work touches Next.js App Router files, rendering choices, data fetching placement, or framework-specific behavior. |
216
+ | `golang` | Go implementation guidance | Bundled optional | Work changes Go code and needs idiomatic Go structure, errors, tests, or interfaces. |
217
+ | `postgresql-expert` | PostgreSQL guidance | Bundled optional | Work changes PostgreSQL schema, queries, migrations, indexes, constraints, or transaction behavior. |
218
+ | `command-pattern` | Vertical-slice command design | Installed here | Work involves command handlers, workflows, request processing, or executable tasks. |
219
+ | `ddd-hexagonal` | DDD/hexagonal architecture | Bundled optional | Work needs domain/application/infrastructure boundaries, ports, adapters, or dependency-direction guidance. |
220
+ | `layered-architecture` | Layered architecture | Bundled optional | Work needs presentation, application, domain, and infrastructure layering guidance. |
221
+ | `ai-prompt-engineer-master` | Prompt and template quality | Installed here | You are creating, rewriting, compressing, or evaluating prompts or reusable AI instructions. |
222
+ | `export-to-github` | GitHub issue export | Installed here | You need to export a feature's Epics and User Stories to GitHub issues and sub-issues. |
223
+ | `export-to-notion` | Notion documentation export | Installed here | You need to export local feature briefs, UX designs, or technical designs to Notion. |
224
+ | `sibu-template-change` | Sibu template maintenance | Installed here | You change files under `templates/` or template manifest metadata and need safe lifecycle validation. |
188
225
 
189
226
  The point is not to make agents magical. The point is to give them the right job, the right context, and a tight enough boundary that a human can trust the result.
190
227
 
@@ -1,5 +1,5 @@
1
1
  import { Command as CommanderCommand } from 'commander';
2
- import { SIBU_VERSION } from '../../modules/version-advisory/index.js';
2
+ import { SIBU_VERSION } from '../../support/version-advisory/index.js';
3
3
  import { executeCliCommand } from './execute-command.js';
4
4
  export function createProgram() {
5
5
  const cli = new CommanderCommand();
@@ -1,10 +1,7 @@
1
- import { handleDoctorProject } from '../../modules/workflow-health-diagnosis/index.js';
2
- import { handleInitProject } from '../../modules/project-adoption/index.js';
3
- import { handleListMcpServers, handleStopMcpServer, handleUseMcpServer } from '../../modules/mcp-server-selection-management/index.js';
4
- import { handleListSkills } from '../../modules/skill-selection-management/index.js';
5
- import { handleStopManagingFile } from '../../modules/skill-selection-management/index.js';
6
- import { handleSyncProject } from '../../modules/sync-review/index.js';
7
- import { handleUseSkill } from '../../modules/skill-selection-management/index.js';
1
+ import { handleDoctorProject } from '../../modules/workflow-health-inspector/index.js';
2
+ import { handleInitProject } from '../../modules/workflow-installer/index.js';
3
+ import { handleListMcpServers, handleListSkills, handleStopManagingFile, handleStopMcpServer, handleUseMcpServer, handleUseSkill, } from '../../modules/workflow-configuration-manager/index.js';
4
+ import { handleSyncProject } from '../../modules/sync-review-orchestrator/index.js';
8
5
  export async function executeCliCommand(command) {
9
6
  switch (command.type) {
10
7
  case 'init':
@@ -0,0 +1 @@
1
+ export { getMcpConfigTargetsForAgents, renderMcpConfig, resolveMcpConfigAgentId } from './mcp-config.js';
@@ -0,0 +1,134 @@
1
+ export function getMcpConfigTargetsForAgents(selectedAgents, selectedMcpServers) {
2
+ if (selectedMcpServers.length === 0) {
3
+ return [];
4
+ }
5
+ return selectedAgents.flatMap((agent) => {
6
+ if (agent.id === 'codex') {
7
+ return [
8
+ {
9
+ targetRelativePath: '.codex/config.toml',
10
+ templateRelativePath: '.codex/config.toml',
11
+ agentId: 'codex',
12
+ },
13
+ ];
14
+ }
15
+ if (agent.id === 'claude') {
16
+ return [
17
+ {
18
+ targetRelativePath: '.mcp.json',
19
+ templateRelativePath: 'mcp/claude/.mcp.json',
20
+ agentId: 'claude',
21
+ },
22
+ ];
23
+ }
24
+ if (agent.id === 'gemini') {
25
+ return [
26
+ {
27
+ targetRelativePath: '.gemini/settings.json',
28
+ templateRelativePath: 'mcp/gemini/settings.json',
29
+ agentId: 'gemini',
30
+ },
31
+ ];
32
+ }
33
+ return [];
34
+ });
35
+ }
36
+ export function renderMcpConfig({ agentId, baseContents, selectedMcpServers, }) {
37
+ if (selectedMcpServers.length === 0) {
38
+ return baseContents ?? renderJsonMcpConfig({});
39
+ }
40
+ if (agentId === 'codex') {
41
+ return renderCodexMcpConfig(baseContents ?? '', selectedMcpServers);
42
+ }
43
+ return renderJsonMcpConfig(buildJsonMcpServerConfigs(agentId, selectedMcpServers), baseContents);
44
+ }
45
+ export function resolveMcpConfigAgentId(templateRelativePath) {
46
+ if (templateRelativePath === '.codex/config.toml') {
47
+ return 'codex';
48
+ }
49
+ if (templateRelativePath === 'mcp/claude/.mcp.json') {
50
+ return 'claude';
51
+ }
52
+ if (templateRelativePath === 'mcp/gemini/settings.json') {
53
+ return 'gemini';
54
+ }
55
+ if (templateRelativePath === '.gemini/settings.json') {
56
+ return 'gemini';
57
+ }
58
+ return undefined;
59
+ }
60
+ function renderCodexMcpConfig(baseContents, selectedMcpServers) {
61
+ const trimmedBaseContents = baseContents.trimEnd();
62
+ const serverConfigs = selectedMcpServers.map((server) => buildCodexMcpServerConfig(server)).filter((config) => config.length > 0);
63
+ if (serverConfigs.length === 0) {
64
+ return baseContents;
65
+ }
66
+ const separator = trimmedBaseContents ? '\n\n' : '';
67
+ return `${trimmedBaseContents}${separator}${serverConfigs.join('\n\n')}\n`;
68
+ }
69
+ function buildCodexMcpServerConfig(server) {
70
+ if (server.id === 'github') {
71
+ return `[mcp_servers.github]
72
+ url = "https://api.githubcopilot.com/mcp/"
73
+ bearer_token_env_var = "GITHUB_PERSONAL_ACCESS_TOKEN"
74
+
75
+ [mcp_servers.github.tools.issue_write]
76
+ approval_mode = "approve"
77
+
78
+ [mcp_servers.github.tools.sub_issue_write]
79
+ approval_mode = "approve"`;
80
+ }
81
+ if (server.id === 'notion') {
82
+ return `[mcp_servers.notion]
83
+ url = "https://mcp.notion.com/mcp"`;
84
+ }
85
+ return '';
86
+ }
87
+ function buildJsonMcpServerConfigs(agentId, selectedMcpServers) {
88
+ const mcpServers = {};
89
+ for (const server of selectedMcpServers) {
90
+ if (server.id === 'github') {
91
+ mcpServers.github = buildGithubMcpServerConfig(agentId);
92
+ }
93
+ if (server.id === 'notion') {
94
+ mcpServers.notion = buildNotionMcpServerConfig();
95
+ }
96
+ }
97
+ return mcpServers;
98
+ }
99
+ function buildGithubMcpServerConfig(agentId) {
100
+ const headers = {
101
+ Authorization: 'Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}',
102
+ };
103
+ if (agentId === 'gemini') {
104
+ return {
105
+ httpUrl: 'https://api.githubcopilot.com/mcp/',
106
+ headers,
107
+ };
108
+ }
109
+ return {
110
+ type: 'http',
111
+ url: 'https://api.githubcopilot.com/mcp/',
112
+ headers,
113
+ };
114
+ }
115
+ function buildNotionMcpServerConfig() {
116
+ return {
117
+ url: 'https://mcp.notion.com/mcp',
118
+ };
119
+ }
120
+ function renderJsonMcpConfig(mcpServers, baseContents) {
121
+ const baseConfig = parseJsonObject(baseContents);
122
+ baseConfig.mcpServers = mcpServers;
123
+ return `${JSON.stringify(baseConfig, null, 2)}\n`;
124
+ }
125
+ function parseJsonObject(contents) {
126
+ if (!contents?.trim()) {
127
+ return {};
128
+ }
129
+ const parsed = JSON.parse(contents);
130
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
131
+ throw new Error('Expected JSON template to contain an object.');
132
+ }
133
+ return parsed;
134
+ }
@@ -3,7 +3,7 @@ import { cancel, isCancel, multiselect, select, text } from '@clack/prompts';
3
3
  import gradient from 'gradient-string';
4
4
  import { Box, Text, render, useApp } from 'ink';
5
5
  import { useEffect } from 'react';
6
- import { SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_MCP_SERVERS, SELECTABLE_WORKFLOW_SKILLS, SUPPORTED_AGENTS, } from '../workflow-target-planning/index.js';
6
+ import { SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_MCP_SERVERS, SELECTABLE_WORKFLOW_SKILLS, SUPPORTED_AGENTS, } from '../template-catalog/index.js';
7
7
  const NONE_OPTION_ID = 'none';
8
8
  export const MCP_SERVER_SELECTION_MESSAGE = 'Select optional MCP servers to configure. Sibu writes config files only; you own prerequisites and authentication.';
9
9
  export async function renderIntro() {
@@ -1,9 +1,9 @@
1
1
  import { intro, log, outro } from '@clack/prompts';
2
2
  import chalk from 'chalk';
3
- import { SELECTABLE_MCP_SERVERS } from '../../workflow-target-planning/index.js';
3
+ import { SELECTABLE_MCP_SERVERS } from '../../template-catalog/index.js';
4
4
  import { getProjectContext } from '../../../shared/paths.js';
5
5
  import { renderIntro } from '../../interactive-guidance/index.js';
6
- import { readStateForDoctor } from '../../workflow-state-registry/index.js';
6
+ import { readStateForDoctor } from '../../workflow-state-ledger/index.js';
7
7
  const defaultDependencies = {
8
8
  renderIntro,
9
9
  intro,
@@ -5,11 +5,11 @@ import { STATE_RELATIVE_PATH } from '../../../shared/catalog.js';
5
5
  import { readFileHashIfPresent, sha256 } from '../../../shared/hash.js';
6
6
  import { removeUndefinedFields } from '../../../shared/object.js';
7
7
  import { getProjectContext } from '../../../shared/paths.js';
8
- import { renderMissingWorkflowFiles, resolveSelectableMcpServerById } from '../../workflow-target-planning/index.js';
9
- import { getWorkflowMutationReadiness } from '../../workflow-mutation-readiness/index.js';
10
- import { getTemplateVersion, readTemplateManifest } from '../../template-catalog-rendering/index.js';
11
- import { cloneState, writeStateFile } from '../../workflow-state-registry/index.js';
12
- import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getWorkflowTargets, } from '../../workflow-target-planning/index.js';
8
+ import { renderMissingWorkflowFiles, resolveSelectableMcpServerById } from '../../template-catalog/index.js';
9
+ import { getWorkflowMutationReadiness } from '../../sync-review-orchestrator/index.js';
10
+ import { getTemplateVersion, readTemplateManifest } from '../../template-catalog/index.js';
11
+ import { cloneState, writeStateFile } from '../../workflow-state-ledger/index.js';
12
+ import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getWorkflowTargets, } from '../../template-catalog/index.js';
13
13
  export async function handleStopMcpServer(command) {
14
14
  const { rootPath, statePath } = getProjectContext();
15
15
  const readiness = getWorkflowMutationReadiness({ rootPath, statePath });
@@ -1,13 +1,14 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
+ import { writeSibuState } from '../../workflow-state-ledger/index.js';
3
4
  import { log } from '@clack/prompts';
4
5
  import { STATE_RELATIVE_PATH } from '../../../shared/catalog.js';
5
6
  import { sha256 } from '../../../shared/hash.js';
6
7
  import { getProjectContext } from '../../../shared/paths.js';
7
8
  import { askForNotionDocsParentPage } from '../../interactive-guidance/index.js';
8
- import { renderTemplateForSync } from '../../template-catalog-rendering/index.js';
9
- import { getWorkflowMutationReadiness } from '../../workflow-mutation-readiness/index.js';
10
- import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getWorkflowSkillsImpliedByMcpServers, getWorkflowTargets, renderMissingWorkflowFiles, resolveSelectableMcpServerById, writeSibuState, } from '../../workflow-target-planning/index.js';
9
+ import { renderTemplateForSync } from '../../template-catalog/index.js';
10
+ import { getWorkflowMutationReadiness } from '../../sync-review-orchestrator/index.js';
11
+ import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getWorkflowSkillsImpliedByMcpServers, getWorkflowTargets, renderMissingWorkflowFiles, resolveSelectableMcpServerById, } from '../../template-catalog/index.js';
11
12
  const defaultDependencies = {
12
13
  askForNotionDocsParentPage,
13
14
  };
@@ -1,9 +1,9 @@
1
1
  import { intro, log, outro } from '@clack/prompts';
2
2
  import chalk from 'chalk';
3
- import { SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_WORKFLOW_SKILLS } from '../../workflow-target-planning/index.js';
3
+ import { SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_WORKFLOW_SKILLS } from '../../template-catalog/index.js';
4
4
  import { getProjectContext } from '../../../shared/paths.js';
5
5
  import { renderIntro } from '../../interactive-guidance/index.js';
6
- import { readStateForDoctor } from '../../workflow-state-registry/index.js';
6
+ import { readStateForDoctor } from '../../workflow-state-ledger/index.js';
7
7
  export async function handleListSkills(_command) {
8
8
  await renderIntro();
9
9
  intro(chalk.cyan('Available workflow skills'));
@@ -3,14 +3,15 @@ import path from 'node:path';
3
3
  import { cancel, intro, isCancel, log, outro, select } from '@clack/prompts';
4
4
  import chalk from 'chalk';
5
5
  import { STATE_RELATIVE_PATH } from '../../../shared/catalog.js';
6
- import { resolveSelectableSkillById } from '../../workflow-target-planning/index.js';
6
+ import { resolveSelectableSkillById } from '../../template-catalog/index.js';
7
7
  import { readFileHashIfPresent, sha256 } from '../../../shared/hash.js';
8
8
  import { getProjectContext } from '../../../shared/paths.js';
9
9
  import { renderIntro } from '../../interactive-guidance/index.js';
10
- import { cloneState, readStateForDoctor, writeStateFile } from '../../workflow-state-registry/index.js';
11
- import { getTemplateVersion, readTemplateManifest, renderTemplateForSync } from '../../template-catalog-rendering/index.js';
10
+ import { cloneState, readStateForDoctor, writeStateFile } from '../../workflow-state-ledger/index.js';
11
+ import { getTemplateVersion, readTemplateManifest } from '../../template-catalog/index.js';
12
+ import { renderTemplateForSync } from '../../template-catalog/index.js';
12
13
  import { removeUndefinedFields } from '../../../shared/object.js';
13
- import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, } from '../../workflow-target-planning/index.js';
14
+ import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, } from '../../template-catalog/index.js';
14
15
  export async function handleStopManagingFile({ skillName }) {
15
16
  await renderIntro();
16
17
  intro(chalk.cyan('Updating skill management'));
@@ -1,14 +1,15 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
+ import { writeSibuState } from '../../workflow-state-ledger/index.js';
3
4
  import { log } from '@clack/prompts';
4
5
  import { STATE_RELATIVE_PATH } from '../../../shared/catalog.js';
5
6
  import { askForNotionDocsParentPage } from '../../interactive-guidance/index.js';
6
- import { getMcpServersRequiredByWorkflowSkills, resolveSelectableSkillById } from '../../workflow-target-planning/index.js';
7
+ import { getMcpServersRequiredByWorkflowSkills, resolveSelectableSkillById } from '../../template-catalog/index.js';
7
8
  import { sha256 } from '../../../shared/hash.js';
8
9
  import { getProjectContext } from '../../../shared/paths.js';
9
- import { renderTemplateForSync } from '../../template-catalog-rendering/index.js';
10
- import { getWorkflowMutationReadiness } from '../../workflow-mutation-readiness/index.js';
11
- import { getSelectedAgentsFromState, getSelectedMcpServersFromState, getWorkflowTargets, renderMissingWorkflowFiles, writeSibuState } from '../../workflow-target-planning/index.js';
10
+ import { renderTemplateForSync } from '../../template-catalog/index.js';
11
+ import { getWorkflowMutationReadiness } from '../../sync-review-orchestrator/index.js';
12
+ import { getSelectedAgentsFromState, getSelectedMcpServersFromState, getWorkflowTargets, renderMissingWorkflowFiles, } from '../../template-catalog/index.js';
12
13
  const defaultDependencies = {
13
14
  askForNotionDocsParentPage,
14
15
  };
@@ -3,9 +3,10 @@ import path from 'node:path';
3
3
  import { log } from '@clack/prompts';
4
4
  import { sha256 } from '../../shared/hash.js';
5
5
  import { getSideTemplatePath } from '../../shared/paths.js';
6
- import { cloneState } from '../workflow-state-registry/index.js';
7
- import { getTemplateVersion, renderTemplateForSync } from '../template-catalog-rendering/index.js';
8
- import { getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, } from '../workflow-target-planning/index.js';
6
+ import { cloneState } from '../workflow-state-ledger/index.js';
7
+ import { getTemplateVersion } from '../template-catalog/index.js';
8
+ import { renderTemplateForSync } from '../template-catalog/index.js';
9
+ import { getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, } from '../template-catalog/index.js';
9
10
  export function applySyncAction({ rootPath, state, manifest, preview, action, }) {
10
11
  const nextState = cloneState(state);
11
12
  const managedFile = nextState.managedFiles[preview.relativePath] ?? preview.managedFile;
@@ -1,10 +1,10 @@
1
1
  import { intro, log, outro } from '@clack/prompts';
2
2
  import chalk from 'chalk';
3
- import { STATE_RELATIVE_PATH } from '../../shared/catalog.js';
3
+ import { STATE_RELATIVE_PATH } from '../workflow-state-ledger/state-path.js';
4
4
  import { getProjectContext } from '../../shared/paths.js';
5
- import { askForMissingFrameworkSkills, askForNewArchitectureSkill, askForNewLanguageSkills, renderIntro } from '../interactive-guidance/index.js';
6
- import { readStateForDoctor, writeStateFile } from '../workflow-state-registry/index.js';
7
- import { readTemplateManifest } from '../template-catalog-rendering/index.js';
5
+ import { askForMissingFrameworkSkills, askForNewArchitectureSkill, askForNewLanguageSkills, renderIntro } from '../../support/interactive-guidance/index.js';
6
+ import { readStateForDoctor, writeStateFile } from '../workflow-state-ledger/index.js';
7
+ import { readTemplateManifest } from '../template-catalog/index.js';
8
8
  import { askForSyncAction, askForUnsupportedAgentCleanup } from './action-prompt.js';
9
9
  import { applySyncAction } from './apply-action.js';
10
10
  import { logSyncPreview } from './log-preview.js';
@@ -4,3 +4,4 @@ export { handleSyncProject } from './handler.js';
4
4
  export { logSyncPreview } from './log-preview.js';
5
5
  export { getSyncPreviews, isActionableSyncPreview, shouldAskForSyncAction } from './sync-preview.js';
6
6
  export { applyUnsupportedAgentCleanup, getUnsupportedAgentCleanupPlan } from './unsupported-agent-cleanup.js';
7
+ export { getWorkflowMutationReadiness } from './workflow-mutation-readiness.js';
@@ -1,5 +1,5 @@
1
1
  import { log } from '@clack/prompts';
2
- import { STATE_RELATIVE_PATH } from '../../shared/catalog.js';
2
+ import { STATE_RELATIVE_PATH } from '../workflow-state-ledger/state-path.js';
3
3
  export function logSyncPreview(preview) {
4
4
  switch (preview.status) {
5
5
  case 'up-to-date':
@@ -1,9 +1,9 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { sha256 } from '../../shared/hash.js';
4
- import { hasReviewedTemplateVersion } from '../workflow-state-registry/index.js';
5
- import { renderTemplateForSync } from '../template-catalog-rendering/index.js';
6
- import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, getWorkflowSkillsImpliedByMcpServers, getWorkflowTargets, } from '../workflow-target-planning/index.js';
4
+ import { hasReviewedTemplateVersion } from '../workflow-state-ledger/index.js';
5
+ import { renderTemplateForSync } from '../template-catalog/index.js';
6
+ import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, getWorkflowSkillsImpliedByMcpServers, getWorkflowTargets, } from '../template-catalog/index.js';
7
7
  const ACTIONABLE_SYNC_PREVIEW_STATUSES = new Set([
8
8
  'new-template',
9
9
  'missing',
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getWorkflowTargets, SUPPORTED_AGENTS, } from '../workflow-target-planning/index.js';
4
- import { cloneState } from '../workflow-state-registry/index.js';
3
+ import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getWorkflowTargets, SUPPORTED_AGENTS, } from '../template-catalog/index.js';
4
+ import { cloneState } from '../workflow-state-ledger/index.js';
5
5
  export function getUnsupportedAgentCleanupPlan({ rootPath, state }) {
6
6
  const supportedAgentIds = new Set(SUPPORTED_AGENTS.map((agent) => agent.id));
7
7
  const unsupportedAgentIds = state.selectedAgents.filter((agentId) => !supportedAgentIds.has(agentId));
@@ -1,7 +1,7 @@
1
- import { readStateForDoctor } from '../workflow-state-registry/index.js';
2
- import { getSyncPreviews, isActionableSyncPreview } from '../sync-review/index.js';
3
- import { getUnsupportedAgentCleanupPlan } from '../sync-review/unsupported-agent-cleanup.js';
4
- import { readTemplateManifest } from '../template-catalog-rendering/index.js';
1
+ import { readTemplateManifest } from '../template-catalog/index.js';
2
+ import { readStateForDoctor } from '../workflow-state-ledger/index.js';
3
+ import { getSyncPreviews, isActionableSyncPreview } from './sync-preview.js';
4
+ import { getUnsupportedAgentCleanupPlan } from './unsupported-agent-cleanup.js';
5
5
  export function getWorkflowMutationReadiness({ rootPath, statePath }) {
6
6
  const stateResult = readStateForDoctor(statePath);
7
7
  if (!stateResult.ok) {
@@ -1,2 +1,3 @@
1
+ export { extractProjectOverview, getTemplateVersion, readTemplate, readTemplateManifest, renderMissingWorkflowFiles, renderSkillRouting, renderTemplateForSync, renderWorkerToolboxRouting, renderWorkerToolboxRoutingPlaceholders, } from './templates.js';
1
2
  export { MANDATORY_SKILLS, SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_MCP_SERVERS, SELECTABLE_WORKFLOW_SKILLS, SESSION_START_HOOKS, SUPPORTED_AGENTS, getMcpServersRequiredByWorkflowSkills, getWorkflowSkillsImpliedByMcpServers, resolveSelectableMcpServerById, resolveSelectableSkillById, } from './catalog.js';
2
- export { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedMcpTargetsForAgents, getSelectedSkillTargetsForAgents, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, getWorkflowTargets, renderMissingWorkflowFiles, writeSibuState, } from './workflow-targets.js';
3
+ export { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedSkillTargetsForAgents, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, getWorkflowTargets, } from '../../support/expected-workflow-targets.js';