@juancr11/sibu 0.16.0 → 0.17.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 (28) hide show
  1. package/bin/modules/sync-review/action-prompt.js +14 -1
  2. package/bin/modules/sync-review/handler.js +54 -7
  3. package/bin/modules/sync-review/index.js +1 -0
  4. package/bin/modules/sync-review/unsupported-agent-cleanup.js +57 -0
  5. package/bin/modules/template-catalog-rendering/index.js +1 -1
  6. package/bin/modules/template-catalog-rendering/templates.js +65 -1
  7. package/bin/modules/workflow-mutation-readiness/workflow-mutation-readiness.js +9 -0
  8. package/bin/modules/workflow-target-planning/catalog.js +83 -26
  9. package/bin/modules/workflow-target-planning/workflow-targets.js +2 -1
  10. package/package.json +1 -1
  11. package/templates/.claude/agents/sibu-implementation-executor.md +30 -0
  12. package/templates/.claude/agents/sibu-implementation-planner.md +30 -0
  13. package/templates/.codex/agents/sibu-implementation-executor.toml +30 -0
  14. package/templates/.codex/agents/sibu-implementation-planner.toml +30 -0
  15. package/templates/.gemini/agents/sibu-implementation-executor.md +30 -0
  16. package/templates/.gemini/agents/sibu-implementation-planner.md +30 -0
  17. package/templates/AGENTS.md +4 -2
  18. package/templates/manifest.json +94 -17
  19. package/templates/skills/ai-implementation-executor-toolbox/SKILL.md +78 -0
  20. package/templates/skills/ai-implementation-plan-executor/SKILL.md +64 -108
  21. package/templates/skills/ai-implementation-planner/SKILL.md +55 -138
  22. package/templates/skills/ai-implementation-planner-toolbox/SKILL.md +78 -0
  23. package/templates/skills/business-domain-model-writer/SKILL.md +313 -0
  24. package/templates/skills/capabilities-map-writer/SKILL.md +271 -0
  25. package/templates/skills/deep-module-map-writer/SKILL.md +50 -14
  26. package/templates/skills/feature-brief-writer/SKILL.md +72 -32
  27. package/templates/skills/technical-design-writer/SKILL.md +10 -10
  28. package/templates/skills/ux-expert/SKILL.md +62 -17
@@ -1,4 +1,4 @@
1
- import { cancel, isCancel, select } from '@clack/prompts';
1
+ import { cancel, confirm, isCancel, select } from '@clack/prompts';
2
2
  export async function askForSyncAction(preview) {
3
3
  if (preview.status === 'update-available') {
4
4
  const action = await select({
@@ -56,6 +56,19 @@ export async function askForSyncAction(preview) {
56
56
  });
57
57
  return handleSyncActionCancel(action);
58
58
  }
59
+ export async function askForUnsupportedAgentCleanup(plan) {
60
+ const shouldCleanUp = await confirm({
61
+ message: plan.removesSibuState
62
+ ? 'Remove unsupported agent state and all Sibu-managed workflow files?'
63
+ : 'Remove unsupported agent selections and obsolete Sibu-managed files?',
64
+ initialValue: true,
65
+ });
66
+ if (isCancel(shouldCleanUp)) {
67
+ cancel('Sync cancelled.');
68
+ process.exit(0);
69
+ }
70
+ return shouldCleanUp;
71
+ }
59
72
  function handleSyncActionCancel(action) {
60
73
  if (isCancel(action)) {
61
74
  cancel('Sync cancelled.');
@@ -5,12 +5,22 @@ import { getProjectContext } from '../../shared/paths.js';
5
5
  import { askForMissingFrameworkSkills, askForNewArchitectureSkill, askForNewLanguageSkills, renderIntro } from '../interactive-guidance/index.js';
6
6
  import { readStateForDoctor, writeStateFile } from '../workflow-state-registry/index.js';
7
7
  import { readTemplateManifest } from '../template-catalog-rendering/index.js';
8
- import { askForSyncAction } from './action-prompt.js';
8
+ import { askForSyncAction, askForUnsupportedAgentCleanup } from './action-prompt.js';
9
9
  import { applySyncAction } from './apply-action.js';
10
10
  import { logSyncPreview } from './log-preview.js';
11
11
  import { getSyncPreviews, isActionableSyncPreview, shouldAskForSyncAction } from './sync-preview.js';
12
- export async function handleSyncProject(_command) {
13
- await renderIntro();
12
+ import { applyUnsupportedAgentCleanup, getUnsupportedAgentCleanupPlan } from './unsupported-agent-cleanup.js';
13
+ const defaultSyncProjectDependencies = {
14
+ renderIntro,
15
+ askForUnsupportedAgentCleanup,
16
+ askForNewLanguageSkills,
17
+ askForMissingFrameworkSkills,
18
+ askForNewArchitectureSkill,
19
+ askForSyncAction,
20
+ };
21
+ export async function handleSyncProject(_command, dependencies = {}) {
22
+ const syncDependencies = { ...defaultSyncProjectDependencies, ...dependencies };
23
+ await syncDependencies.renderIntro();
14
24
  intro(chalk.cyan('Reviewing workflow updates'));
15
25
  const { rootPath, statePath } = getProjectContext();
16
26
  const stateResult = readStateForDoctor(statePath);
@@ -21,9 +31,46 @@ export async function handleSyncProject(_command) {
21
31
  process.exitCode = 1;
22
32
  return;
23
33
  }
24
- const languageSkillSelection = await askForNewLanguageSkills(stateResult.state);
25
- const frameworkSkillSelection = await askForMissingFrameworkSkills(languageSkillSelection.state);
26
- const architectureSkillSelection = await askForNewArchitectureSkill(frameworkSkillSelection.state);
34
+ const cleanupPlan = getUnsupportedAgentCleanupPlan({ rootPath, state: stateResult.state });
35
+ if (cleanupPlan) {
36
+ log.warn('This project has agent selections that are no longer supported by Sibu.');
37
+ log.info(`Unsupported selections: ${cleanupPlan.unsupportedAgentIds.join(', ')}`);
38
+ if (cleanupPlan.filePathsToDelete.length > 0) {
39
+ log.info('Sibu-managed files to remove:');
40
+ for (const relativePath of cleanupPlan.filePathsToDelete) {
41
+ log.info(`- ${relativePath}`);
42
+ }
43
+ }
44
+ else {
45
+ log.info('No Sibu-managed files need to be deleted for this cleanup.');
46
+ }
47
+ if (cleanupPlan.removesSibuState) {
48
+ log.warn(`No supported agents will remain, so ${STATE_RELATIVE_PATH} will be removed after cleanup.`);
49
+ }
50
+ const shouldCleanUp = await syncDependencies.askForUnsupportedAgentCleanup(cleanupPlan);
51
+ if (!shouldCleanUp) {
52
+ log.warn('Unsupported agent cleanup was skipped.');
53
+ log.info('Run `sibu sync` again and accept cleanup before reviewing other workflow updates.');
54
+ outro(chalk.yellow('Sync stopped.'));
55
+ process.exitCode = 1;
56
+ return;
57
+ }
58
+ const cleanupResult = applyUnsupportedAgentCleanup({ rootPath, statePath, state: stateResult.state, plan: cleanupPlan });
59
+ for (const relativePath of cleanupResult.removedFiles) {
60
+ log.success(`Removed ${relativePath}`);
61
+ }
62
+ if (cleanupResult.removedStateFile) {
63
+ log.success(`Removed ${STATE_RELATIVE_PATH}`);
64
+ outro(chalk.green('Unsupported agent cleanup complete.'));
65
+ return;
66
+ }
67
+ writeStateFile(statePath, cleanupResult.state);
68
+ log.success(`Updated ${STATE_RELATIVE_PATH}`);
69
+ stateResult.state = cleanupResult.state;
70
+ }
71
+ const languageSkillSelection = await syncDependencies.askForNewLanguageSkills(stateResult.state);
72
+ const frameworkSkillSelection = await syncDependencies.askForMissingFrameworkSkills(languageSkillSelection.state);
73
+ const architectureSkillSelection = await syncDependencies.askForNewArchitectureSkill(frameworkSkillSelection.state);
27
74
  let state = architectureSkillSelection.state;
28
75
  const manifest = readTemplateManifest();
29
76
  const previews = getSyncPreviews({ rootPath, state, manifest });
@@ -56,7 +103,7 @@ export async function handleSyncProject(_command) {
56
103
  if (!shouldAskForSyncAction(preview)) {
57
104
  continue;
58
105
  }
59
- const action = await askForSyncAction(preview);
106
+ const action = await syncDependencies.askForSyncAction(preview);
60
107
  if (action === 'skip') {
61
108
  log.info(`Skipped ${preview.relativePath}.`);
62
109
  continue;
@@ -3,3 +3,4 @@ export { applySyncAction } from './apply-action.js';
3
3
  export { handleSyncProject } from './handler.js';
4
4
  export { logSyncPreview } from './log-preview.js';
5
5
  export { getSyncPreviews, isActionableSyncPreview, shouldAskForSyncAction } from './sync-preview.js';
6
+ export { applyUnsupportedAgentCleanup, getUnsupportedAgentCleanupPlan } from './unsupported-agent-cleanup.js';
@@ -0,0 +1,57 @@
1
+ import fs from 'node:fs';
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';
5
+ export function getUnsupportedAgentCleanupPlan({ rootPath, state }) {
6
+ const supportedAgentIds = new Set(SUPPORTED_AGENTS.map((agent) => agent.id));
7
+ const unsupportedAgentIds = state.selectedAgents.filter((agentId) => !supportedAgentIds.has(agentId));
8
+ if (unsupportedAgentIds.length === 0) {
9
+ return undefined;
10
+ }
11
+ const remainingSupportedAgents = getSelectedAgentsFromState(state);
12
+ const obsoleteManagedFilePaths = getObsoleteManagedFilePaths({ rootPath, state, remainingSupportedAgents });
13
+ const filePathsToDelete = obsoleteManagedFilePaths.filter((relativePath) => state.managedFiles[relativePath]?.status !== 'unmanaged');
14
+ return {
15
+ unsupportedAgentIds,
16
+ remainingSupportedAgents,
17
+ obsoleteManagedFilePaths,
18
+ filePathsToDelete,
19
+ removesSibuState: remainingSupportedAgents.length === 0,
20
+ };
21
+ }
22
+ export function applyUnsupportedAgentCleanup({ rootPath, statePath, state, plan, }) {
23
+ const removedFiles = [];
24
+ for (const relativePath of plan.filePathsToDelete) {
25
+ const targetPath = path.join(rootPath, relativePath);
26
+ if (!fs.existsSync(targetPath)) {
27
+ continue;
28
+ }
29
+ fs.rmSync(targetPath, { recursive: true, force: true });
30
+ removedFiles.push(relativePath);
31
+ }
32
+ if (plan.removesSibuState) {
33
+ fs.rmSync(statePath, { force: true });
34
+ return { removedStateFile: true, removedFiles };
35
+ }
36
+ const unsupportedAgentIds = new Set(plan.unsupportedAgentIds);
37
+ const obsoleteManagedFilePaths = new Set(plan.obsoleteManagedFilePaths);
38
+ const nextState = cloneState(state);
39
+ nextState.selectedAgents = nextState.selectedAgents.filter((agentId) => !unsupportedAgentIds.has(agentId));
40
+ nextState.updatedAt = new Date().toISOString();
41
+ for (const relativePath of obsoleteManagedFilePaths) {
42
+ delete nextState.managedFiles[relativePath];
43
+ }
44
+ return {
45
+ removedStateFile: false,
46
+ removedFiles,
47
+ state: nextState,
48
+ };
49
+ }
50
+ function getObsoleteManagedFilePaths({ rootPath, state, remainingSupportedAgents, }) {
51
+ if (remainingSupportedAgents.length === 0) {
52
+ return Object.keys(state.managedFiles);
53
+ }
54
+ const expectedTargets = getWorkflowTargets(rootPath, remainingSupportedAgents, getSelectedLanguageSkillsFromState(state), getSelectedFrameworkSkillsFromState(state), getSelectedArchitectureSkillFromState(state), getSelectedWorkflowSkillsFromState(state), getSelectedDatabaseSkillsFromState(state), getSelectedMcpServersFromState(state));
55
+ const expectedManagedFilePaths = new Set(expectedTargets.map((target) => path.relative(rootPath, target.targetPath)));
56
+ return Object.keys(state.managedFiles).filter((relativePath) => !expectedManagedFilePaths.has(relativePath));
57
+ }
@@ -1 +1 @@
1
- export { extractProjectOverview, getTemplateVersion, readTemplate, readTemplateManifest, renderMcpConfig, renderSkillRouting, renderTemplateForSync, } from './templates.js';
1
+ export { extractProjectOverview, getTemplateVersion, readTemplate, readTemplateManifest, renderMcpConfig, renderSkillRouting, renderTemplateForSync, renderWorkerToolboxRoutingPlaceholders, renderWorkerToolboxRouting, } from './templates.js';
@@ -27,7 +27,9 @@ export function renderTemplateForSync({ templateRelativePath, currentPath, selec
27
27
  if (contents.includes('{{PROJECT_OVERVIEW}}')) {
28
28
  contents = contents.replace('{{PROJECT_OVERVIEW}}', extractProjectOverview(currentPath) ?? 'Describe this project.');
29
29
  }
30
- return renderSkillRouting(contents, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills, selectedDatabaseSkills);
30
+ contents = renderSkillRouting(contents, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills, selectedDatabaseSkills);
31
+ contents = renderWorkerToolboxRoutingPlaceholders(contents, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills, selectedDatabaseSkills);
32
+ return contents;
31
33
  }
32
34
  export function renderSkillRouting(contents, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills = [], selectedDatabaseSkills = []) {
33
35
  if (!contents.includes('{{OPTIONAL_SKILL_ROUTING}}')) {
@@ -38,6 +40,51 @@ export function renderSkillRouting(contents, selectedLanguageSkills, selectedFra
38
40
  .join('\n');
39
41
  return contents.replace('{{OPTIONAL_SKILL_ROUTING}}', optionalRouting);
40
42
  }
43
+ export function renderWorkerToolboxRouting({ profile, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills = [], selectedDatabaseSkills = [], }) {
44
+ const selectedSkills = collectWorkerRelevantSkills({
45
+ selectedLanguageSkills,
46
+ selectedFrameworkSkills,
47
+ selectedArchitectureSkill,
48
+ selectedWorkflowSkills,
49
+ selectedDatabaseSkills,
50
+ });
51
+ const selectedSkillLines = selectedSkills.map((skill) => `- ${skill.name}: read \`${getSharedSkillTargetPath(skill)}\` when relevant. ${skill.routingInstruction}`);
52
+ const selectedSkillsSection = selectedSkillLines.length > 0
53
+ ? selectedSkillLines.join('\n')
54
+ : '- No optional implementation-relevant Sibu skills are selected for this project. Use source artifacts and flag unmapped patterns as risks instead of guessing silently.';
55
+ return `## Focused ${profile} worker routing
56
+
57
+ - Always read and apply \`.agents/skills/clean-code/SKILL.md\` before ${profile === 'planner' ? 'writing implementation plan steps' : 'editing code or running story execution'}.
58
+ - Read the worker toolbox skill path provided in the main-agent packet before doing work.
59
+ - Read every required skill path listed in the packet. If a required skill path is missing, stop and report the blocker to the main agent.
60
+ - Read optional installed skill paths only when they are relevant to the story, touched files, source artifacts, or validation work.
61
+ - Treat distilled skill constraints from the packet as binding task constraints.
62
+ - If an optional relevant skill is not installed and you encounter an unmapped language, framework, database, or architecture pattern, do not guess silently; continue only when safe and flag the gap as a ${profile === 'planner' ? 'plan risk' : 'Review Gate risk'}.
63
+
64
+ ### Optional installed skills relevant to ${profile} work
65
+ ${selectedSkillsSection}`;
66
+ }
67
+ export function renderWorkerToolboxRoutingPlaceholders(contents, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills = [], selectedDatabaseSkills = []) {
68
+ const placeholderProfiles = [
69
+ { placeholder: '{{PLANNER_WORKER_ROUTING}}', profile: 'planner' },
70
+ { placeholder: '{{EXECUTOR_WORKER_ROUTING}}', profile: 'executor' },
71
+ ];
72
+ let renderedContents = contents;
73
+ for (const { placeholder, profile } of placeholderProfiles) {
74
+ if (!renderedContents.includes(placeholder)) {
75
+ continue;
76
+ }
77
+ renderedContents = renderedContents.replace(placeholder, renderWorkerToolboxRouting({
78
+ profile,
79
+ selectedLanguageSkills,
80
+ selectedFrameworkSkills,
81
+ selectedArchitectureSkill,
82
+ selectedWorkflowSkills,
83
+ selectedDatabaseSkills,
84
+ }));
85
+ }
86
+ return renderedContents;
87
+ }
41
88
  export function renderMcpConfig({ agentId, baseContents, selectedMcpServers, }) {
42
89
  if (selectedMcpServers.length === 0) {
43
90
  return baseContents ?? renderJsonMcpConfig({});
@@ -47,6 +94,23 @@ export function renderMcpConfig({ agentId, baseContents, selectedMcpServers, })
47
94
  }
48
95
  return renderJsonMcpConfig(buildJsonMcpServerConfigs(agentId, selectedMcpServers), baseContents);
49
96
  }
97
+ function collectWorkerRelevantSkills({ selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills, selectedDatabaseSkills, }) {
98
+ const implementationRelevantWorkflowSkills = selectedWorkflowSkills.filter((skill) => skill.id === 'ai-prompt-engineer-master' || skill.id === 'ux-expert');
99
+ return [
100
+ ...selectedLanguageSkills,
101
+ ...selectedFrameworkSkills,
102
+ ...selectedDatabaseSkills,
103
+ ...(selectedArchitectureSkill ? [selectedArchitectureSkill] : []),
104
+ ...implementationRelevantWorkflowSkills,
105
+ ];
106
+ }
107
+ function getSharedSkillTargetPath(skill) {
108
+ const sharedTargetPath = Object.values(skill.targetRelativePathsByAgent).find((targetPath) => targetPath !== undefined);
109
+ if (!sharedTargetPath) {
110
+ throw new Error(`Selectable skill ${skill.id} has no target path.`);
111
+ }
112
+ return sharedTargetPath;
113
+ }
50
114
  export function extractProjectOverview(filePath) {
51
115
  if (!fs.existsSync(filePath)) {
52
116
  return undefined;
@@ -1,5 +1,6 @@
1
1
  import { readStateForDoctor } from '../workflow-state-registry/index.js';
2
2
  import { getSyncPreviews, isActionableSyncPreview } from '../sync-review/index.js';
3
+ import { getUnsupportedAgentCleanupPlan } from '../sync-review/unsupported-agent-cleanup.js';
3
4
  import { readTemplateManifest } from '../template-catalog-rendering/index.js';
4
5
  export function getWorkflowMutationReadiness({ rootPath, statePath }) {
5
6
  const stateResult = readStateForDoctor(statePath);
@@ -11,6 +12,14 @@ export function getWorkflowMutationReadiness({ rootPath, statePath }) {
11
12
  };
12
13
  }
13
14
  const manifest = readTemplateManifest();
15
+ const unsupportedAgentCleanupPlan = getUnsupportedAgentCleanupPlan({ rootPath, state: stateResult.state });
16
+ if (unsupportedAgentCleanupPlan) {
17
+ return {
18
+ ok: false,
19
+ message: 'Workflow state is not clean enough to select a skill safely.',
20
+ hint: 'Run `sibu sync` to review workflow state before selecting a skill.',
21
+ };
22
+ }
14
23
  const previews = getSyncPreviews({ rootPath, state: stateResult.state, manifest });
15
24
  const actionablePreviews = previews.filter(isActionableSyncPreview);
16
25
  if (actionablePreviews.length > 0) {
@@ -5,7 +5,6 @@ export const MANDATORY_SKILLS = [
5
5
  codex: '.agents/skills/clean-code/SKILL.md',
6
6
  gemini: '.agents/skills/clean-code/SKILL.md',
7
7
  claude: '.agents/skills/clean-code/SKILL.md',
8
- windsurf: '.agents/skills/clean-code/SKILL.md',
9
8
  },
10
9
  },
11
10
  {
@@ -14,7 +13,22 @@ export const MANDATORY_SKILLS = [
14
13
  codex: '.agents/skills/product-vision-writer/SKILL.md',
15
14
  gemini: '.agents/skills/product-vision-writer/SKILL.md',
16
15
  claude: '.agents/skills/product-vision-writer/SKILL.md',
17
- windsurf: '.agents/skills/product-vision-writer/SKILL.md',
16
+ },
17
+ },
18
+ {
19
+ templateRelativePath: 'skills/business-domain-model-writer/SKILL.md',
20
+ targetRelativePathsByAgent: {
21
+ codex: '.agents/skills/business-domain-model-writer/SKILL.md',
22
+ gemini: '.agents/skills/business-domain-model-writer/SKILL.md',
23
+ claude: '.agents/skills/business-domain-model-writer/SKILL.md',
24
+ },
25
+ },
26
+ {
27
+ templateRelativePath: 'skills/capabilities-map-writer/SKILL.md',
28
+ targetRelativePathsByAgent: {
29
+ codex: '.agents/skills/capabilities-map-writer/SKILL.md',
30
+ gemini: '.agents/skills/capabilities-map-writer/SKILL.md',
31
+ claude: '.agents/skills/capabilities-map-writer/SKILL.md',
18
32
  },
19
33
  },
20
34
  {
@@ -23,7 +37,6 @@ export const MANDATORY_SKILLS = [
23
37
  codex: '.agents/skills/deep-module-map-writer/SKILL.md',
24
38
  gemini: '.agents/skills/deep-module-map-writer/SKILL.md',
25
39
  claude: '.agents/skills/deep-module-map-writer/SKILL.md',
26
- windsurf: '.agents/skills/deep-module-map-writer/SKILL.md',
27
40
  },
28
41
  },
29
42
  {
@@ -32,7 +45,6 @@ export const MANDATORY_SKILLS = [
32
45
  codex: '.agents/skills/feature-brief-writer/SKILL.md',
33
46
  gemini: '.agents/skills/feature-brief-writer/SKILL.md',
34
47
  claude: '.agents/skills/feature-brief-writer/SKILL.md',
35
- windsurf: '.agents/skills/feature-brief-writer/SKILL.md',
36
48
  },
37
49
  },
38
50
  {
@@ -41,7 +53,6 @@ export const MANDATORY_SKILLS = [
41
53
  codex: '.agents/skills/technical-design-writer/SKILL.md',
42
54
  gemini: '.agents/skills/technical-design-writer/SKILL.md',
43
55
  claude: '.agents/skills/technical-design-writer/SKILL.md',
44
- windsurf: '.agents/skills/technical-design-writer/SKILL.md',
45
56
  },
46
57
  },
47
58
  {
@@ -50,7 +61,6 @@ export const MANDATORY_SKILLS = [
50
61
  codex: '.agents/skills/scrum-master-planner/SKILL.md',
51
62
  gemini: '.agents/skills/scrum-master-planner/SKILL.md',
52
63
  claude: '.agents/skills/scrum-master-planner/SKILL.md',
53
- windsurf: '.agents/skills/scrum-master-planner/SKILL.md',
54
64
  },
55
65
  },
56
66
  {
@@ -59,7 +69,38 @@ export const MANDATORY_SKILLS = [
59
69
  codex: '.agents/skills/ai-implementation-planner/SKILL.md',
60
70
  gemini: '.agents/skills/ai-implementation-planner/SKILL.md',
61
71
  claude: '.agents/skills/ai-implementation-planner/SKILL.md',
62
- windsurf: '.agents/skills/ai-implementation-planner/SKILL.md',
72
+ },
73
+ supplementalTargetsByAgent: {
74
+ codex: [
75
+ {
76
+ templateRelativePath: 'skills/ai-implementation-planner-toolbox/SKILL.md',
77
+ targetRelativePath: '.agents/skills/ai-implementation-planner-toolbox/SKILL.md',
78
+ },
79
+ {
80
+ templateRelativePath: '.codex/agents/sibu-implementation-planner.toml',
81
+ targetRelativePath: '.codex/agents/sibu-implementation-planner.toml',
82
+ },
83
+ ],
84
+ gemini: [
85
+ {
86
+ templateRelativePath: 'skills/ai-implementation-planner-toolbox/SKILL.md',
87
+ targetRelativePath: '.agents/skills/ai-implementation-planner-toolbox/SKILL.md',
88
+ },
89
+ {
90
+ templateRelativePath: '.gemini/agents/sibu-implementation-planner.md',
91
+ targetRelativePath: '.gemini/agents/sibu-implementation-planner.md',
92
+ },
93
+ ],
94
+ claude: [
95
+ {
96
+ templateRelativePath: 'skills/ai-implementation-planner-toolbox/SKILL.md',
97
+ targetRelativePath: '.agents/skills/ai-implementation-planner-toolbox/SKILL.md',
98
+ },
99
+ {
100
+ templateRelativePath: '.claude/agents/sibu-implementation-planner.md',
101
+ targetRelativePath: '.claude/agents/sibu-implementation-planner.md',
102
+ },
103
+ ],
63
104
  },
64
105
  },
65
106
  {
@@ -68,7 +109,38 @@ export const MANDATORY_SKILLS = [
68
109
  codex: '.agents/skills/ai-implementation-plan-executor/SKILL.md',
69
110
  gemini: '.agents/skills/ai-implementation-plan-executor/SKILL.md',
70
111
  claude: '.agents/skills/ai-implementation-plan-executor/SKILL.md',
71
- windsurf: '.agents/skills/ai-implementation-plan-executor/SKILL.md',
112
+ },
113
+ supplementalTargetsByAgent: {
114
+ codex: [
115
+ {
116
+ templateRelativePath: 'skills/ai-implementation-executor-toolbox/SKILL.md',
117
+ targetRelativePath: '.agents/skills/ai-implementation-executor-toolbox/SKILL.md',
118
+ },
119
+ {
120
+ templateRelativePath: '.codex/agents/sibu-implementation-executor.toml',
121
+ targetRelativePath: '.codex/agents/sibu-implementation-executor.toml',
122
+ },
123
+ ],
124
+ gemini: [
125
+ {
126
+ templateRelativePath: 'skills/ai-implementation-executor-toolbox/SKILL.md',
127
+ targetRelativePath: '.agents/skills/ai-implementation-executor-toolbox/SKILL.md',
128
+ },
129
+ {
130
+ templateRelativePath: '.gemini/agents/sibu-implementation-executor.md',
131
+ targetRelativePath: '.gemini/agents/sibu-implementation-executor.md',
132
+ },
133
+ ],
134
+ claude: [
135
+ {
136
+ templateRelativePath: 'skills/ai-implementation-executor-toolbox/SKILL.md',
137
+ targetRelativePath: '.agents/skills/ai-implementation-executor-toolbox/SKILL.md',
138
+ },
139
+ {
140
+ templateRelativePath: '.claude/agents/sibu-implementation-executor.md',
141
+ targetRelativePath: '.claude/agents/sibu-implementation-executor.md',
142
+ },
143
+ ],
72
144
  },
73
145
  },
74
146
  {
@@ -77,7 +149,6 @@ export const MANDATORY_SKILLS = [
77
149
  codex: '.agents/skills/feature-idea-capture/SKILL.md',
78
150
  gemini: '.agents/skills/feature-idea-capture/SKILL.md',
79
151
  claude: '.agents/skills/feature-idea-capture/SKILL.md',
80
- windsurf: '.agents/skills/feature-idea-capture/SKILL.md',
81
152
  },
82
153
  },
83
154
  ];
@@ -109,7 +180,6 @@ export const SELECTABLE_LANGUAGE_SKILLS = [
109
180
  codex: '.agents/skills/typescript/SKILL.md',
110
181
  gemini: '.agents/skills/typescript/SKILL.md',
111
182
  claude: '.agents/skills/typescript/SKILL.md',
112
- windsurf: '.agents/skills/typescript/SKILL.md',
113
183
  },
114
184
  },
115
185
  {
@@ -122,7 +192,6 @@ export const SELECTABLE_LANGUAGE_SKILLS = [
122
192
  codex: '.agents/skills/golang/SKILL.md',
123
193
  gemini: '.agents/skills/golang/SKILL.md',
124
194
  claude: '.agents/skills/golang/SKILL.md',
125
- windsurf: '.agents/skills/golang/SKILL.md',
126
195
  },
127
196
  },
128
197
  ];
@@ -137,7 +206,6 @@ export const SELECTABLE_DATABASE_SKILLS = [
137
206
  codex: '.agents/skills/postgresql-expert/SKILL.md',
138
207
  gemini: '.agents/skills/postgresql-expert/SKILL.md',
139
208
  claude: '.agents/skills/postgresql-expert/SKILL.md',
140
- windsurf: '.agents/skills/postgresql-expert/SKILL.md',
141
209
  },
142
210
  },
143
211
  ];
@@ -152,7 +220,6 @@ export const SELECTABLE_FRAMEWORK_SKILLS = [
152
220
  codex: '.agents/skills/react/SKILL.md',
153
221
  gemini: '.agents/skills/react/SKILL.md',
154
222
  claude: '.agents/skills/react/SKILL.md',
155
- windsurf: '.agents/skills/react/SKILL.md',
156
223
  },
157
224
  },
158
225
  {
@@ -165,7 +232,6 @@ export const SELECTABLE_FRAMEWORK_SKILLS = [
165
232
  codex: '.agents/skills/nextjs/SKILL.md',
166
233
  gemini: '.agents/skills/nextjs/SKILL.md',
167
234
  claude: '.agents/skills/nextjs/SKILL.md',
168
- windsurf: '.agents/skills/nextjs/SKILL.md',
169
235
  },
170
236
  },
171
237
  ];
@@ -180,7 +246,6 @@ export const SELECTABLE_ARCHITECTURE_SKILLS = [
180
246
  codex: '.agents/skills/ddd-hexagonal/SKILL.md',
181
247
  gemini: '.agents/skills/ddd-hexagonal/SKILL.md',
182
248
  claude: '.agents/skills/ddd-hexagonal/SKILL.md',
183
- windsurf: '.agents/skills/ddd-hexagonal/SKILL.md',
184
249
  },
185
250
  },
186
251
  {
@@ -193,7 +258,6 @@ export const SELECTABLE_ARCHITECTURE_SKILLS = [
193
258
  codex: '.agents/skills/command-pattern/SKILL.md',
194
259
  gemini: '.agents/skills/command-pattern/SKILL.md',
195
260
  claude: '.agents/skills/command-pattern/SKILL.md',
196
- windsurf: '.agents/skills/command-pattern/SKILL.md',
197
261
  },
198
262
  },
199
263
  {
@@ -206,7 +270,6 @@ export const SELECTABLE_ARCHITECTURE_SKILLS = [
206
270
  codex: '.agents/skills/layered-architecture/SKILL.md',
207
271
  gemini: '.agents/skills/layered-architecture/SKILL.md',
208
272
  claude: '.agents/skills/layered-architecture/SKILL.md',
209
- windsurf: '.agents/skills/layered-architecture/SKILL.md',
210
273
  },
211
274
  },
212
275
  ];
@@ -221,7 +284,6 @@ export const SELECTABLE_WORKFLOW_SKILLS = [
221
284
  codex: '.agents/skills/ai-prompt-engineer-master/SKILL.md',
222
285
  gemini: '.agents/skills/ai-prompt-engineer-master/SKILL.md',
223
286
  claude: '.agents/skills/ai-prompt-engineer-master/SKILL.md',
224
- windsurf: '.agents/skills/ai-prompt-engineer-master/SKILL.md',
225
287
  },
226
288
  },
227
289
  {
@@ -234,7 +296,6 @@ export const SELECTABLE_WORKFLOW_SKILLS = [
234
296
  codex: '.agents/skills/ux-expert/SKILL.md',
235
297
  gemini: '.agents/skills/ux-expert/SKILL.md',
236
298
  claude: '.agents/skills/ux-expert/SKILL.md',
237
- windsurf: '.agents/skills/ux-expert/SKILL.md',
238
299
  },
239
300
  },
240
301
  {
@@ -247,7 +308,6 @@ export const SELECTABLE_WORKFLOW_SKILLS = [
247
308
  codex: '.agents/skills/export-to-github/SKILL.md',
248
309
  gemini: '.agents/skills/export-to-github/SKILL.md',
249
310
  claude: '.agents/skills/export-to-github/SKILL.md',
250
- windsurf: '.agents/skills/export-to-github/SKILL.md',
251
311
  },
252
312
  supplementalTargetsByAgent: {
253
313
  codex: [
@@ -280,7 +340,6 @@ export const SELECTABLE_WORKFLOW_SKILLS = [
280
340
  codex: '.agents/skills/export-to-notion/SKILL.md',
281
341
  gemini: '.agents/skills/export-to-notion/SKILL.md',
282
342
  claude: '.agents/skills/export-to-notion/SKILL.md',
283
- windsurf: '.agents/skills/export-to-notion/SKILL.md',
284
343
  },
285
344
  supplementalTargetsByAgent: {
286
345
  codex: [
@@ -352,6 +411,7 @@ export const SUPPORTED_AGENTS = [
352
411
  description: 'Create .codex/config.toml pointing Codex to AGENTS.md',
353
412
  targetRelativePath: '.codex/config.toml',
354
413
  templateRelativePath: '.codex/config.toml',
414
+ supportsForegroundWorkers: true,
355
415
  },
356
416
  {
357
417
  id: 'gemini',
@@ -359,6 +419,7 @@ export const SUPPORTED_AGENTS = [
359
419
  description: 'Create GEMINI.md that delegates to AGENTS.md',
360
420
  targetRelativePath: 'GEMINI.md',
361
421
  templateRelativePath: 'GEMINI.md',
422
+ supportsForegroundWorkers: true,
362
423
  },
363
424
  {
364
425
  id: 'claude',
@@ -366,11 +427,7 @@ export const SUPPORTED_AGENTS = [
366
427
  description: 'Create CLAUDE.md that delegates to AGENTS.md',
367
428
  targetRelativePath: 'CLAUDE.md',
368
429
  templateRelativePath: 'CLAUDE.md',
369
- },
370
- {
371
- id: 'windsurf',
372
- name: 'Windsurf',
373
- description: 'Use root AGENTS.md and shared .agents/skills/ discovery',
430
+ supportsForegroundWorkers: true,
374
431
  },
375
432
  ];
376
433
  export function resolveSelectableMcpServerById(serverId) {
@@ -5,7 +5,7 @@ import { MANDATORY_SKILLS, SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_S
5
5
  import { sha256 } from '../../shared/hash.js';
6
6
  import { removeUndefinedFields } from '../../shared/object.js';
7
7
  import { readExistingState } from '../workflow-state-registry/index.js';
8
- import { getTemplateVersion, readTemplate, readTemplateManifest, renderMcpConfig, renderSkillRouting } from '../template-catalog-rendering/index.js';
8
+ import { getTemplateVersion, readTemplate, readTemplateManifest, renderMcpConfig, renderSkillRouting, renderWorkerToolboxRoutingPlaceholders } from '../template-catalog-rendering/index.js';
9
9
  export function getSelectedLanguageSkillsFromState(state) {
10
10
  return SELECTABLE_LANGUAGE_SKILLS.filter((skill) => state.selectedLanguageSkills?.includes(skill.id));
11
11
  }
@@ -183,6 +183,7 @@ export function renderMissingWorkflowFiles({ missingTargets, overview, selectedL
183
183
  contents = contents.replace('{{PROJECT_OVERVIEW}}', overview.trim());
184
184
  }
185
185
  contents = renderSkillRouting(contents, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills, selectedDatabaseSkills);
186
+ contents = renderWorkerToolboxRoutingPlaceholders(contents, selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, selectedWorkflowSkills, selectedDatabaseSkills);
186
187
  return {
187
188
  label: target.label,
188
189
  targetPath: target.targetPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juancr11/sibu",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "CLI for setting up a local AI-augmented development workflow.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: sibu-implementation-executor
3
+ description: Executes one Sibu story plan in a fresh, bounded context using the executor toolbox skill.
4
+ ---
5
+
6
+ You are the Sibu implementation executor worker.
7
+
8
+ Communication mode: use light verbose mode for all progress updates and final reporting.
9
+
10
+ Light verbose mode rules:
11
+ - Show the plan once at the beginning, with at most 5 bullets.
12
+ - Announce only major phase changes.
13
+ - Mention skills or tools only when first used.
14
+ - Do not explain obvious file reads.
15
+ - Summarize batches of work instead of every action.
16
+ - Report decisions, not thought processes.
17
+ - Show only test failures and final test results.
18
+ - Give a concise final summary that satisfies the worker's required final output format.
19
+
20
+ Use only the narrow executor packet from the main agent. Do not rely on or request the main agent's full conversation context.
21
+
22
+ The packet must include exactly one User Story path or one story-local `.impl_plan/` folder, required source artifact paths, the executor toolbox skill path, required and optional skill paths, distilled constraints, approval and commit rules, and the expected final output format. If required packet fields are missing or ambiguous, stop and ask the main agent for the missing packet fields.
23
+
24
+ Before execution:
25
+ - Read and follow the executor toolbox skill from the packet.
26
+ - Read required skill files listed in the packet, including clean-code.
27
+ - Read optional installed skill files only when relevant to the story, step files, source artifacts, or touched files.
28
+ - Treat distilled constraints as binding for this task.
29
+
30
+ Execute exactly one story plan. You may edit the local working tree and run validation. Never approve your own work, write approval metadata, run git commit, run git stash, or run git reset.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: sibu-implementation-planner
3
+ description: Plans one Sibu User Story in a fresh, bounded context using the planner toolbox skill.
4
+ ---
5
+
6
+ You are the Sibu implementation planner worker.
7
+
8
+ Communication mode: use light verbose mode for all progress updates and final reporting.
9
+
10
+ Light verbose mode rules:
11
+ - Show the plan once at the beginning, with at most 5 bullets.
12
+ - Announce only major phase changes.
13
+ - Mention skills or tools only when first used.
14
+ - Do not explain obvious file reads.
15
+ - Summarize batches of work instead of every action.
16
+ - Report decisions, not thought processes.
17
+ - Show only test failures and final test results.
18
+ - Give a concise final summary that satisfies the worker's required final output format.
19
+
20
+ Use only the narrow planner packet from the main agent. Do not rely on or request the main agent's full conversation context.
21
+
22
+ The packet must include exactly one User Story path, required source artifact paths, the planner toolbox skill path, required and optional skill paths, distilled constraints, and the expected final output format. If required packet fields are missing or ambiguous, stop and ask the main agent for the missing packet fields.
23
+
24
+ Before planning:
25
+ - Read and follow the planner toolbox skill from the packet.
26
+ - Read required skill files listed in the packet, including clean-code.
27
+ - Read optional installed skill files only when relevant to the story or source artifacts.
28
+ - Treat distilled constraints as binding for this task.
29
+
30
+ Plan exactly one story. Write only story-local implementation plan files. Never write production code or unrelated artifacts.