@juancr11/sibu 0.15.1 → 0.16.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.
@@ -10,7 +10,7 @@ import { renderIntro } from '../../interactive-guidance/index.js';
10
10
  import { cloneState, readStateForDoctor, writeStateFile } from '../../workflow-state-registry/index.js';
11
11
  import { getTemplateVersion, readTemplateManifest, renderTemplateForSync } from '../../template-catalog-rendering/index.js';
12
12
  import { removeUndefinedFields } from '../../../shared/object.js';
13
- import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedWorkflowSkillsFromState, } from '../../workflow-target-planning/index.js';
13
+ import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, } from '../../workflow-target-planning/index.js';
14
14
  export async function handleStopManagingFile({ skillName }) {
15
15
  await renderIntro();
16
16
  intro(chalk.cyan('Updating skill management'));
@@ -136,13 +136,7 @@ function removeSelectedSkill(state, resolved) {
136
136
  }
137
137
  }
138
138
  function getSkillManagedPaths(rootPath, state, resolved) {
139
- const relativePaths = new Set();
140
- for (const agent of getSelectedAgentsFromState(state)) {
141
- const relativePath = resolved.skill.targetRelativePathsByAgent[agent.id];
142
- if (relativePath) {
143
- relativePaths.add(relativePath);
144
- }
145
- }
139
+ const relativePaths = new Set(getSkillTargetsForAgents(resolved.skill, getSelectedAgentsFromState(state)).map((target) => target.targetRelativePath));
146
140
  return [...relativePaths].map((relativePath) => ({
147
141
  relativePath,
148
142
  absolutePath: path.join(rootPath, relativePath),
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import { sha256 } from '../../shared/hash.js';
4
4
  import { hasReviewedTemplateVersion } from '../workflow-state-registry/index.js';
5
5
  import { renderTemplateForSync } from '../template-catalog-rendering/index.js';
6
- import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getWorkflowSkillsImpliedByMcpServers, getWorkflowTargets, } from '../workflow-target-planning/index.js';
6
+ import { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedWorkflowSkillsFromState, getSkillTargetsForAgents, getWorkflowSkillsImpliedByMcpServers, getWorkflowTargets, } from '../workflow-target-planning/index.js';
7
7
  const ACTIONABLE_SYNC_PREVIEW_STATUSES = new Set([
8
8
  'new-template',
9
9
  'missing',
@@ -39,7 +39,7 @@ export function getSyncPreviews({ rootPath, state, manifest }) {
39
39
  const expectedTargets = getWorkflowTargets(rootPath, getSelectedAgentsFromState(state), selectedLanguageSkills, selectedFrameworkSkills, selectedArchitectureSkill, plannedWorkflowSkills, selectedDatabaseSkills, selectedMcpServers);
40
40
  const alreadyPreviewedPaths = new Set();
41
41
  for (const skill of missingImpliedWorkflowSkills) {
42
- for (const preview of getNewExpectedTargetPreviews({ rootPath, manifest, state, expectedTargets, workflowSkill: skill })) {
42
+ for (const preview of getNewExpectedTargetPreviews({ rootPath, manifest, state, expectedTargets, selectedAgents: getSelectedAgentsFromState(state), workflowSkill: skill })) {
43
43
  previews.push(preview);
44
44
  alreadyPreviewedPaths.add(preview.relativePath);
45
45
  }
@@ -65,8 +65,8 @@ export function getSyncPreviews({ rootPath, state, manifest }) {
65
65
  }
66
66
  return previews;
67
67
  }
68
- function getNewExpectedTargetPreviews({ rootPath, manifest, state, expectedTargets, workflowSkill, }) {
69
- const workflowSkillTargetPaths = new Set(Object.values(workflowSkill.targetRelativePathsByAgent));
68
+ function getNewExpectedTargetPreviews({ rootPath, manifest, state, expectedTargets, selectedAgents, workflowSkill, }) {
69
+ const workflowSkillTargetPaths = new Set(getSkillTargetsForAgents(workflowSkill, selectedAgents).map((target) => target.targetRelativePath));
70
70
  return expectedTargets
71
71
  .filter((target) => workflowSkillTargetPaths.has(path.relative(rootPath, target.targetPath)))
72
72
  .filter((target) => !state.managedFiles[path.relative(rootPath, target.targetPath)])
@@ -45,7 +45,7 @@ export function renderMcpConfig({ agentId, baseContents, selectedMcpServers, })
45
45
  if (agentId === 'codex') {
46
46
  return renderCodexMcpConfig(baseContents ?? '', selectedMcpServers);
47
47
  }
48
- return renderJsonMcpConfig(buildJsonMcpServerConfigs(agentId, selectedMcpServers));
48
+ return renderJsonMcpConfig(buildJsonMcpServerConfigs(agentId, selectedMcpServers), baseContents);
49
49
  }
50
50
  export function extractProjectOverview(filePath) {
51
51
  if (!fs.existsSync(filePath)) {
@@ -93,6 +93,9 @@ function getMcpConfigAgentId(templateRelativePath) {
93
93
  if (templateRelativePath === 'mcp/gemini/settings.json') {
94
94
  return 'gemini';
95
95
  }
96
+ if (templateRelativePath === '.gemini/settings.json') {
97
+ return 'gemini';
98
+ }
96
99
  return undefined;
97
100
  }
98
101
  function buildJsonMcpServerConfigs(agentId, selectedMcpServers) {
@@ -128,8 +131,20 @@ function buildNotionMcpServerConfig() {
128
131
  url: 'https://mcp.notion.com/mcp',
129
132
  };
130
133
  }
131
- function renderJsonMcpConfig(mcpServers) {
132
- return `${JSON.stringify({ mcpServers }, null, 2)}\n`;
134
+ function renderJsonMcpConfig(mcpServers, baseContents) {
135
+ const baseConfig = parseJsonObject(baseContents);
136
+ baseConfig.mcpServers = mcpServers;
137
+ return `${JSON.stringify(baseConfig, null, 2)}\n`;
138
+ }
139
+ function parseJsonObject(contents) {
140
+ if (!contents?.trim()) {
141
+ return {};
142
+ }
143
+ const parsed = JSON.parse(contents);
144
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
145
+ throw new Error('Expected JSON template to contain an object.');
146
+ }
147
+ return parsed;
133
148
  }
134
149
  function isTemplateManifest(value) {
135
150
  if (!value || typeof value !== 'object') {
@@ -81,6 +81,23 @@ export const MANDATORY_SKILLS = [
81
81
  },
82
82
  },
83
83
  ];
84
+ export const SESSION_START_HOOKS = [
85
+ {
86
+ agentId: 'codex',
87
+ templateRelativePath: '.codex/hooks.json',
88
+ targetRelativePath: '.codex/hooks.json',
89
+ },
90
+ {
91
+ agentId: 'gemini',
92
+ templateRelativePath: '.gemini/settings.json',
93
+ targetRelativePath: '.gemini/settings.json',
94
+ },
95
+ {
96
+ agentId: 'claude',
97
+ templateRelativePath: '.claude/settings.json',
98
+ targetRelativePath: '.claude/settings.json',
99
+ },
100
+ ];
84
101
  export const SELECTABLE_LANGUAGE_SKILLS = [
85
102
  {
86
103
  id: 'typescript',
@@ -232,6 +249,26 @@ export const SELECTABLE_WORKFLOW_SKILLS = [
232
249
  claude: '.agents/skills/export-to-github/SKILL.md',
233
250
  windsurf: '.agents/skills/export-to-github/SKILL.md',
234
251
  },
252
+ supplementalTargetsByAgent: {
253
+ codex: [
254
+ {
255
+ templateRelativePath: '.codex/agents/github-exporter.toml',
256
+ targetRelativePath: '.codex/agents/github-exporter.toml',
257
+ },
258
+ ],
259
+ gemini: [
260
+ {
261
+ templateRelativePath: '.gemini/agents/github-exporter.md',
262
+ targetRelativePath: '.gemini/agents/github-exporter.md',
263
+ },
264
+ ],
265
+ claude: [
266
+ {
267
+ templateRelativePath: '.claude/agents/github-exporter.md',
268
+ targetRelativePath: '.claude/agents/github-exporter.md',
269
+ },
270
+ ],
271
+ },
235
272
  },
236
273
  {
237
274
  id: 'export-to-notion',
@@ -245,6 +282,26 @@ export const SELECTABLE_WORKFLOW_SKILLS = [
245
282
  claude: '.agents/skills/export-to-notion/SKILL.md',
246
283
  windsurf: '.agents/skills/export-to-notion/SKILL.md',
247
284
  },
285
+ supplementalTargetsByAgent: {
286
+ codex: [
287
+ {
288
+ templateRelativePath: '.codex/agents/notion-exporter.toml',
289
+ targetRelativePath: '.codex/agents/notion-exporter.toml',
290
+ },
291
+ ],
292
+ gemini: [
293
+ {
294
+ templateRelativePath: '.gemini/agents/notion-exporter.md',
295
+ targetRelativePath: '.gemini/agents/notion-exporter.md',
296
+ },
297
+ ],
298
+ claude: [
299
+ {
300
+ templateRelativePath: '.claude/agents/notion-exporter.md',
301
+ targetRelativePath: '.claude/agents/notion-exporter.md',
302
+ },
303
+ ],
304
+ },
248
305
  },
249
306
  ];
250
307
  const EXPORT_WORKFLOW_SKILL_MCP_REQUIREMENTS = {
@@ -1,2 +1,2 @@
1
- export { MANDATORY_SKILLS, SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_MCP_SERVERS, SELECTABLE_WORKFLOW_SKILLS, SUPPORTED_AGENTS, getMcpServersRequiredByWorkflowSkills, getWorkflowSkillsImpliedByMcpServers, resolveSelectableMcpServerById, resolveSelectableSkillById, } from './catalog.js';
2
- export { getSelectedAgentsFromState, getSelectedArchitectureSkillFromState, getSelectedDatabaseSkillsFromState, getSelectedFrameworkSkillsFromState, getSelectedLanguageSkillsFromState, getSelectedMcpServersFromState, getSelectedMcpTargetsForAgents, getSelectedSkillTargetsForAgents, getSelectedWorkflowSkillsFromState, getWorkflowTargets, renderMissingWorkflowFiles, writeSibuState, } from './workflow-targets.js';
1
+ 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';
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { SIBU_VERSION } from '../version-advisory/index.js';
4
- import { MANDATORY_SKILLS, SELECTABLE_ARCHITECTURE_SKILLS, SELECTABLE_DATABASE_SKILLS, SELECTABLE_FRAMEWORK_SKILLS, SELECTABLE_LANGUAGE_SKILLS, SELECTABLE_MCP_SERVERS, SELECTABLE_WORKFLOW_SKILLS, SUPPORTED_AGENTS, } from './index.js';
4
+ import { 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, } from './index.js';
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';
@@ -36,18 +36,36 @@ export function getSelectedSkillTargetsForAgents(selectedAgents, selectedLanguag
36
36
  ];
37
37
  for (const agent of selectedAgents) {
38
38
  for (const skill of selectedSkills) {
39
- const targetRelativePath = skill.targetRelativePathsByAgent[agent.id];
40
- if (!targetRelativePath) {
41
- continue;
39
+ for (const skillTarget of getSkillTargetsForAgent(skill, agent.id)) {
40
+ skillTargets.set(skillTarget.targetRelativePath, skillTarget);
42
41
  }
43
- skillTargets.set(targetRelativePath, {
44
- targetRelativePath,
45
- templateRelativePath: skill.templateRelativePath,
46
- });
47
42
  }
48
43
  }
49
44
  return [...skillTargets.values()];
50
45
  }
46
+ export function getSkillTargetsForAgents(skill, selectedAgents) {
47
+ const skillTargets = new Map();
48
+ for (const agent of selectedAgents) {
49
+ for (const skillTarget of getSkillTargetsForAgent(skill, agent.id)) {
50
+ skillTargets.set(skillTarget.targetRelativePath, skillTarget);
51
+ }
52
+ }
53
+ return [...skillTargets.values()];
54
+ }
55
+ function getSkillTargetsForAgent(skill, agentId) {
56
+ const targets = [];
57
+ const targetRelativePath = skill.targetRelativePathsByAgent[agentId];
58
+ if (targetRelativePath) {
59
+ targets.push({
60
+ targetRelativePath,
61
+ templateRelativePath: skill.templateRelativePath,
62
+ });
63
+ }
64
+ for (const supplementalTarget of skill.supplementalTargetsByAgent?.[agentId] ?? []) {
65
+ targets.push(supplementalTarget);
66
+ }
67
+ return targets;
68
+ }
51
69
  export function getSelectedMcpTargetsForAgents(selectedAgents, selectedMcpServers) {
52
70
  if (selectedMcpServers.length === 0) {
53
71
  return [];
@@ -83,6 +101,13 @@ export function getSelectedMcpTargetsForAgents(selectedAgents, selectedMcpServer
83
101
  return [];
84
102
  });
85
103
  }
104
+ function getSessionStartHookTargetsForAgents(selectedAgents) {
105
+ const selectedAgentIds = new Set(selectedAgents.map((agent) => agent.id));
106
+ return SESSION_START_HOOKS.filter((hookTemplate) => selectedAgentIds.has(hookTemplate.agentId)).map((hookTemplate) => ({
107
+ targetRelativePath: hookTemplate.targetRelativePath,
108
+ templateRelativePath: hookTemplate.templateRelativePath,
109
+ }));
110
+ }
86
111
  export function getWorkflowTargets(rootPath, selectedAgents, selectedLanguageSkills = [], selectedFrameworkSkills = [], selectedArchitectureSkill, selectedWorkflowSkills = [], selectedDatabaseSkills = [], selectedMcpServers = []) {
87
112
  const targets = [
88
113
  {
@@ -113,6 +138,13 @@ export function getWorkflowTargets(rootPath, selectedAgents, selectedLanguageSki
113
138
  requiresProjectOverview: false,
114
139
  targetKind: 'skill',
115
140
  })),
141
+ ...getSessionStartHookTargetsForAgents(selectedAgents).map((hookTarget) => ({
142
+ label: hookTarget.targetRelativePath,
143
+ targetPath: path.join(rootPath, hookTarget.targetRelativePath),
144
+ templateRelativePath: hookTarget.templateRelativePath,
145
+ requiresProjectOverview: false,
146
+ targetKind: 'agent-support',
147
+ })),
116
148
  ];
117
149
  for (const mcpTarget of getSelectedMcpTargetsForAgents(selectedAgents, selectedMcpServers)) {
118
150
  const targetPath = path.join(rootPath, mcpTarget.targetRelativePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juancr11/sibu",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "CLI for setting up a local AI-augmented development workflow.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: github-exporter
3
+ description: Exports Sibu feature epics and user stories to GitHub issues with narrow task context and no local repository writes.
4
+ ---
5
+
6
+ You are the GitHub exporter sub-agent for Sibu-managed workflows.
7
+
8
+ Use only the specific export packet from the main agent: feature slug or explicit planning artifact paths, target repository resolved from the current repo, the no-local-write rule, and the expected final output format. Do not rely on or request the main agent's full conversation context.
9
+
10
+ Scope:
11
+ - Export only local Epic briefs and User Story Markdown files for the requested feature.
12
+ - Read local Markdown files as source of truth.
13
+ - Write only to GitHub issues and native sub-issue relationships.
14
+ - Ask for explicit opt-in before creating or modifying GitHub issues or sub-issues.
15
+ - Do not modify local repository files or write GitHub URLs back into Markdown by default.
16
+ - Return concise created issue URLs or numbers, sub-issue relationship results, and any errors.
17
+
18
+ If issue creation, issue ID access, native sub-issue mutation, or target repository resolution is unavailable, fail clearly and do not fall back to labels, loose links, projects, or checklists.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: notion-exporter
3
+ description: Exports Sibu feature documentation to Notion with narrow task context and no local repository writes.
4
+ ---
5
+
6
+ You are the Notion exporter sub-agent for Sibu-managed workflows.
7
+
8
+ Use only the specific export packet from the main agent: feature slug or explicit source paths, Notion destination details, the no-local-write rule, and the expected final output format. Do not rely on or request the main agent's full conversation context.
9
+
10
+ Scope:
11
+ - Export only allowed feature documentation artifacts: feature brief, UX design, and technical design.
12
+ - Read local Markdown files as source of truth.
13
+ - Write only to Notion.
14
+ - Ask for explicit opt-in before creating or modifying Notion pages.
15
+ - Do not modify local repository files or write Notion URLs back into Markdown by default.
16
+ - Return concise created or updated Notion URLs and any errors.
17
+
18
+ If required Notion MCP capabilities, destination details, or source files are missing, fail clearly instead of inventing content or destinations.
@@ -0,0 +1,16 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "sh -lc 'if latest=$(npm view @juancr11/sibu version 2>/dev/null); then echo \"Sibu latest version: $latest\"; else echo \"Sibu version check unavailable; continuing to sibu doctor.\"; fi; sibu doctor || true'",
10
+ "timeout": 60
11
+ }
12
+ ]
13
+ }
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,20 @@
1
+ name = "github-exporter"
2
+ description = "Exports Sibu feature epics and user stories to GitHub issues with narrow task context and no local repository writes."
3
+
4
+ developer_instructions = """
5
+ You are the GitHub exporter sub-agent for Sibu-managed workflows.
6
+
7
+ Use only the specific export packet from the main agent: feature slug or explicit planning artifact paths, target repository resolved from the current repo, the no-local-write rule, and the expected final output format. Do not rely on or request the main agent's full conversation context.
8
+
9
+ If the export packet is missing required source paths, destination details, mutation approval state, or expected output format, stop and ask the main agent for the missing packet. Do not infer missing export inputs from broader conversation history.
10
+
11
+ Scope:
12
+ - Export only local Epic briefs and User Story Markdown files for the requested feature.
13
+ - Read local Markdown files as source of truth.
14
+ - Write only to GitHub issues and native sub-issue relationships.
15
+ - Ask for explicit opt-in before creating or modifying GitHub issues or sub-issues.
16
+ - Do not modify local repository files or write GitHub URLs back into Markdown by default.
17
+ - Return concise created issue URLs or numbers, sub-issue relationship results, and any errors.
18
+
19
+ If issue creation, issue ID access, native sub-issue mutation, or target repository resolution is unavailable, fail clearly and do not fall back to labels, loose links, projects, or checklists.
20
+ """
@@ -0,0 +1,20 @@
1
+ name = "notion-exporter"
2
+ description = "Exports Sibu feature documentation to Notion with narrow task context and no local repository writes."
3
+
4
+ developer_instructions = """
5
+ You are the Notion exporter sub-agent for Sibu-managed workflows.
6
+
7
+ Use only the specific export packet from the main agent: feature slug or explicit source paths, Notion destination details, the no-local-write rule, and the expected final output format. Do not rely on or request the main agent's full conversation context.
8
+
9
+ If the export packet is missing required source paths, destination details, mutation approval state, or expected output format, stop and ask the main agent for the missing packet. Do not infer missing export inputs from broader conversation history.
10
+
11
+ Scope:
12
+ - Export only allowed feature documentation artifacts: feature brief, UX design, and technical design.
13
+ - Read local Markdown files as source of truth.
14
+ - Write only to Notion.
15
+ - Ask for explicit opt-in before creating or modifying Notion pages.
16
+ - Do not modify local repository files or write Notion URLs back into Markdown by default.
17
+ - Return concise created or updated Notion URLs and any errors.
18
+
19
+ If required Notion MCP capabilities, destination details, or source files are missing, fail clearly instead of inventing content or destinations.
20
+ """
@@ -0,0 +1,17 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "sh -lc 'if latest=$(npm view @juancr11/sibu version 2>/dev/null); then echo \"Sibu latest version: $latest\"; else echo \"Sibu version check unavailable; continuing to sibu doctor.\"; fi; sibu doctor || true'",
10
+ "statusMessage": "Running Sibu session health check",
11
+ "timeout": 60
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: github-exporter
3
+ description: Exports Sibu feature epics and user stories to GitHub issues with narrow task context and no local repository writes.
4
+ ---
5
+
6
+ You are the GitHub exporter sub-agent for Sibu-managed workflows.
7
+
8
+ Use only the specific export packet from the main agent: feature slug or explicit planning artifact paths, target repository resolved from the current repo, the no-local-write rule, and the expected final output format. Do not rely on or request the main agent's full conversation context.
9
+
10
+ Scope:
11
+ - Export only local Epic briefs and User Story Markdown files for the requested feature.
12
+ - Read local Markdown files as source of truth.
13
+ - Write only to GitHub issues and native sub-issue relationships.
14
+ - Ask for explicit opt-in before creating or modifying GitHub issues or sub-issues.
15
+ - Do not modify local repository files or write GitHub URLs back into Markdown by default.
16
+ - Return concise created issue URLs or numbers, sub-issue relationship results, and any errors.
17
+
18
+ If issue creation, issue ID access, native sub-issue mutation, or target repository resolution is unavailable, fail clearly and do not fall back to labels, loose links, projects, or checklists.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: notion-exporter
3
+ description: Exports Sibu feature documentation to Notion with narrow task context and no local repository writes.
4
+ ---
5
+
6
+ You are the Notion exporter sub-agent for Sibu-managed workflows.
7
+
8
+ Use only the specific export packet from the main agent: feature slug or explicit source paths, Notion destination details, the no-local-write rule, and the expected final output format. Do not rely on or request the main agent's full conversation context.
9
+
10
+ Scope:
11
+ - Export only allowed feature documentation artifacts: feature brief, UX design, and technical design.
12
+ - Read local Markdown files as source of truth.
13
+ - Write only to Notion.
14
+ - Ask for explicit opt-in before creating or modifying Notion pages.
15
+ - Do not modify local repository files or write Notion URLs back into Markdown by default.
16
+ - Return concise created or updated Notion URLs and any errors.
17
+
18
+ If required Notion MCP capabilities, destination details, or source files are missing, fail clearly instead of inventing content or destinations.
@@ -0,0 +1,17 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "sh -lc 'if latest=$(npm view @juancr11/sibu version 2>/dev/null); then echo \"Sibu latest version: $latest\" >&2; else echo \"Sibu version check unavailable; continuing to sibu doctor.\" >&2; fi; sibu doctor >&2 || true; printf \"%s\\n\" \"{\\\"systemMessage\\\":\\\"Sibu session health check finished. Review hook output for details.\\\"}\"'",
10
+ "name": "Sibu session health check",
11
+ "timeout": 60000
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -58,9 +58,7 @@ This repository uses Sibu to manage AI workflow setup.
58
58
  - `sibu doctor` is the read-only health check for this workflow. It inspects whether Sibu-managed files are missing, modified, unrecorded, or generated from older templates.
59
59
  - `sibu sync` is the post-init workflow maintenance command. It reviews template updates interactively, repairs missing managed files, adopts newly added managed templates, protects local edits from automatic overwrites, and lets the user apply safe updates, mark customized files as reviewed, write side templates, stop managing a file, or skip for later.
60
60
 
61
- At the start of each session in this repository, run `sibu doctor` once before making changes or giving workflow guidance. Treat it as a read-only preflight check. Do not rerun it before every follow-up in the same session unless workflow-managed files changed, the user asks, or you need to verify Sibu state after applying updates.
62
-
63
- After `sibu doctor` finishes, guide the user based on the outcome:
61
+ Use `sibu doctor` as a read-only workflow health check when you need to verify Sibu-managed file state. After `sibu doctor` finishes, guide the user based on the outcome:
64
62
 
65
63
  - Healthy workflow: mention that the Sibu check passed and proceed.
66
64
  - Missing `.sibu/state.json`: tell the user to run `sibu init` once before continuing.
@@ -1,11 +1,11 @@
1
1
  {
2
- "templateVersion": "104",
2
+ "templateVersion": "110",
3
3
  "templates": {
4
4
  "AGENTS.md": {
5
- "version": "30",
5
+ "version": "31",
6
6
  "description": "Project-level agent instructions and Sibu maintenance guidance.",
7
7
  "changes": [
8
- "Routes rough future idea capture requests to the mandatory feature-idea-capture skill."
8
+ "Removes the manual session-start preflight instruction now that native hook files own automatic Sibu health checks."
9
9
  ]
10
10
  },
11
11
  ".codex/config.toml": {
@@ -89,7 +89,7 @@
89
89
  "version": "1",
90
90
  "description": "Selectable Go skill installed when Go language support is selected.",
91
91
  "changes": [
92
- "Adds an optional Go skill with concise, Effective Go–style guidance for .go files, package APIs, interfaces, errors, receivers, concurrency, and tests."
92
+ "Adds an optional Go skill with concise, Effective Go\u2013style guidance for .go files, package APIs, interfaces, errors, receivers, concurrency, and tests."
93
93
  ]
94
94
  },
95
95
  "skills/postgresql-expert/SKILL.md": {
@@ -177,17 +177,80 @@
177
177
  ]
178
178
  },
179
179
  "skills/export-to-github/SKILL.md": {
180
- "version": "1",
180
+ "version": "4",
181
181
  "description": "Selectable GitHub export skill for publishing a named feature's Epics and User Stories to GitHub issues and native sub-issues.",
182
182
  "changes": [
183
- "Adds a dedicated GitHub exporter skill paired with GitHub MCP selection."
183
+ "Requires GitHub exports to run as non-blocking background sub-agent jobs and prevents the main agent from waiting or polling for completion."
184
184
  ]
185
185
  },
186
186
  "skills/export-to-notion/SKILL.md": {
187
- "version": "1",
187
+ "version": "4",
188
188
  "description": "Selectable Notion export skill for publishing a named feature's core documentation files to Notion.",
189
189
  "changes": [
190
- "Adds a dedicated Notion exporter skill paired with Notion MCP selection."
190
+ "Requires Notion exports to run as non-blocking background sub-agent jobs and prevents the main agent from waiting or polling for completion."
191
+ ]
192
+ },
193
+ ".codex/agents/github-exporter.toml": {
194
+ "version": "3",
195
+ "description": "Codex GitHub exporter sub-agent for Sibu feature Epic and User Story exports.",
196
+ "changes": [
197
+ "Requires the Codex github-exporter sub-agent to stop and request missing export packet details instead of inferring from broad conversation context."
198
+ ]
199
+ },
200
+ ".codex/agents/notion-exporter.toml": {
201
+ "version": "3",
202
+ "description": "Codex Notion exporter sub-agent for Sibu feature documentation exports.",
203
+ "changes": [
204
+ "Requires the Codex notion-exporter sub-agent to stop and request missing export packet details instead of inferring from broad conversation context."
205
+ ]
206
+ },
207
+ ".claude/agents/github-exporter.md": {
208
+ "version": "1",
209
+ "description": "Claude GitHub exporter sub-agent for Sibu feature Epic and User Story exports.",
210
+ "changes": [
211
+ "Adds a Claude github-exporter sub-agent with clean-context and no-local-write export guidance."
212
+ ]
213
+ },
214
+ ".claude/agents/notion-exporter.md": {
215
+ "version": "1",
216
+ "description": "Claude Notion exporter sub-agent for Sibu feature documentation exports.",
217
+ "changes": [
218
+ "Adds a Claude notion-exporter sub-agent with clean-context and no-local-write export guidance."
219
+ ]
220
+ },
221
+ ".gemini/agents/github-exporter.md": {
222
+ "version": "1",
223
+ "description": "Gemini GitHub exporter sub-agent for Sibu feature Epic and User Story exports.",
224
+ "changes": [
225
+ "Adds a Gemini github-exporter sub-agent with clean-context and no-local-write export guidance."
226
+ ]
227
+ },
228
+ ".gemini/agents/notion-exporter.md": {
229
+ "version": "1",
230
+ "description": "Gemini Notion exporter sub-agent for Sibu feature documentation exports.",
231
+ "changes": [
232
+ "Adds a Gemini notion-exporter sub-agent with clean-context and no-local-write export guidance."
233
+ ]
234
+ },
235
+ ".codex/hooks.json": {
236
+ "version": "1",
237
+ "description": "Codex SessionStart hook configuration for running Sibu session health checks.",
238
+ "changes": [
239
+ "Adds a managed Codex SessionStart hook that checks the latest Sibu version and runs sibu doctor automatically."
240
+ ]
241
+ },
242
+ ".claude/settings.json": {
243
+ "version": "1",
244
+ "description": "Claude Code SessionStart hook configuration for running Sibu session health checks.",
245
+ "changes": [
246
+ "Adds a managed Claude SessionStart hook that checks the latest Sibu version and runs sibu doctor automatically."
247
+ ]
248
+ },
249
+ ".gemini/settings.json": {
250
+ "version": "1",
251
+ "description": "Gemini CLI SessionStart hook configuration for running Sibu session health checks.",
252
+ "changes": [
253
+ "Adds a managed Gemini SessionStart hook that checks the latest Sibu version and runs sibu doctor automatically."
191
254
  ]
192
255
  }
193
256
  }
@@ -7,6 +7,32 @@ description: Export a named feature's Epics and User Stories from local Markdown
7
7
 
8
8
  Use this skill when the user asks to export a feature's Epics and User Stories to GitHub.
9
9
 
10
+ ## Non-blocking delegation requirement
11
+
12
+ Before reading planning artifacts or calling GitHub mutation tools, check whether the configured `github-exporter` sub-agent is available for the current AI target.
13
+
14
+ If available, you must delegate the export to `github-exporter`. Do not perform the export inline and do not call GitHub issue or sub-issue mutation tools from the main agent.
15
+
16
+ The delegation is fire-and-notify:
17
+
18
+ - Start the `github-exporter` sub-agent in the background.
19
+ - Do not call `wait_agent`, poll for completion, spawn a status-checking agent, or otherwise block the main thread.
20
+ - Immediately return control to the user after spawning the exporter.
21
+ - Tell the user the export is running in the background and that completion will arrive via sub-agent notification.
22
+ - Only inspect the final result if the user explicitly asks for status/results later, or after a sub-agent completion notification is received.
23
+
24
+ Pass only a clean, narrow export packet:
25
+
26
+ - feature slug or explicit planning artifact paths
27
+ - target repository resolved from the current local repo's GitHub `origin` remote
28
+ - the no-local-write rule
29
+ - whether user opt-in for GitHub mutation has already been granted
30
+ - expected final output format: created issue URLs or numbers, sub-issue relationship results, and errors
31
+
32
+ Do not fork or pass the main agent's full conversation context. The exporter does not need implementation, planning, or unrelated discussion context.
33
+
34
+ Inline export is allowed only when sub-agent execution is unavailable, the configured `github-exporter` is not installed, or the user explicitly asks for inline fallback after the background exporter is unavailable or failed. Before any inline mutation, clearly tell the user why delegation cannot be used.
35
+
10
36
  ## Required input
11
37
 
12
38
  - A feature name or feature slug.
@@ -26,7 +52,16 @@ If the feature name is ambiguous, inspect `docs/features/` and ask one focused c
26
52
  - one issue per Epic, with no labels
27
53
  - one issue per User Story, with no labels
28
54
  - each User Story issue attached as a native sub-issue of its parent Epic issue
29
- 7. Report created issue numbers or URLs.
55
+ 7. After spawning the background exporter, immediately report that the export is running in the background. Do not wait for created issue numbers or URLs in the same turn.
56
+
57
+ ## Delegation self-check
58
+
59
+ Before finalizing, verify:
60
+
61
+ - Did I use `github-exporter` when it was available?
62
+ - Did I avoid `wait_agent`, status polling, and duplicate status-checking agents?
63
+ - If not, did I explicitly report why before any inline GitHub mutation?
64
+ - Did I avoid local file writes and preserve native sub-issue requirements?
30
65
 
31
66
  ## Export rules
32
67
 
@@ -7,6 +7,32 @@ description: Export a named feature's local feature brief, UX design, and techni
7
7
 
8
8
  Use this skill when the user asks to export a feature's core documentation to Notion.
9
9
 
10
+ ## Non-blocking delegation requirement
11
+
12
+ Before reading source docs or calling Notion mutation tools, check whether the configured `notion-exporter` sub-agent is available for the current AI target.
13
+
14
+ If available, you must delegate the export to `notion-exporter`. Do not perform the export inline and do not call Notion mutation tools from the main agent.
15
+
16
+ The delegation is fire-and-notify:
17
+
18
+ - Start the `notion-exporter` sub-agent in the background.
19
+ - Do not call `wait_agent`, poll for completion, spawn a status-checking agent, or otherwise block the main thread.
20
+ - Immediately return control to the user after spawning the exporter.
21
+ - Tell the user the export is running in the background and that completion will arrive via sub-agent notification.
22
+ - Only inspect the final result if the user explicitly asks for status/results later, or after a sub-agent completion notification is received.
23
+
24
+ Pass only a clean, narrow export packet:
25
+
26
+ - feature slug or explicit source paths
27
+ - Notion destination details
28
+ - the no-local-write rule
29
+ - whether user opt-in for Notion mutation has already been granted
30
+ - expected final output format: created or updated Notion URLs and errors
31
+
32
+ Do not fork or pass the main agent's full conversation context. The exporter does not need implementation, planning, or unrelated discussion context.
33
+
34
+ Inline export is allowed only when sub-agent execution is unavailable, the configured `notion-exporter` is not installed, or the user explicitly asks for inline fallback after the background exporter is unavailable or failed. Before any inline mutation, clearly tell the user why delegation cannot be used.
35
+
10
36
  ## Required input
11
37
 
12
38
  - A feature name or feature slug.
@@ -49,7 +75,16 @@ Use this organization under the configured Notion docs parent page:
49
75
  4. Ask one explicit opt-in question before creating or modifying Notion pages.
50
76
  5. Create or reuse the repo, Features, and feature organization pages under the configured parent.
51
77
  6. Export each existing allowed artifact to its matching Notion page.
52
- 7. Report export success or failure per artifact.
78
+ 7. After spawning the background exporter, immediately report that the export is running in the background. Do not wait for final URLs in the same turn.
79
+
80
+ ## Delegation self-check
81
+
82
+ Before finalizing, verify:
83
+
84
+ - Did I use `notion-exporter` when it was available?
85
+ - Did I avoid `wait_agent`, status polling, and duplicate status-checking agents?
86
+ - If not, did I explicitly report why before any inline Notion mutation?
87
+ - Did I avoid local file writes and keep local Markdown canonical?
53
88
 
54
89
  ## Export rules
55
90