musubix 3.5.1 → 3.6.1

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 (99) hide show
  1. package/.github/AGENTS.md +949 -0
  2. package/.github/prompts/sdd-change-apply.prompt.md +283 -0
  3. package/.github/prompts/sdd-change-archive.prompt.md +241 -0
  4. package/.github/prompts/sdd-change-init.prompt.md +269 -0
  5. package/.github/prompts/sdd-design.prompt.md +250 -0
  6. package/.github/prompts/sdd-implement.prompt.md +387 -0
  7. package/.github/prompts/sdd-requirements.prompt.md +193 -0
  8. package/.github/prompts/sdd-review.prompt.md +155 -0
  9. package/.github/prompts/sdd-security.prompt.md +228 -0
  10. package/.github/prompts/sdd-steering.prompt.md +269 -0
  11. package/.github/prompts/sdd-tasks.prompt.md +255 -0
  12. package/.github/prompts/sdd-test.prompt.md +230 -0
  13. package/.github/prompts/sdd-validate.prompt.md +304 -0
  14. package/.github/skills/musubix-adr-generation/SKILL.md +209 -0
  15. package/.github/skills/musubix-best-practices/SKILL.md +315 -0
  16. package/.github/skills/musubix-c4-design/SKILL.md +162 -0
  17. package/.github/skills/musubix-code-generation/SKILL.md +237 -0
  18. package/.github/skills/musubix-domain-inference/SKILL.md +196 -0
  19. package/.github/skills/musubix-ears-validation/SKILL.md +161 -0
  20. package/.github/skills/musubix-sdd-workflow/SKILL.md +217 -0
  21. package/.github/skills/musubix-technical-writing/SKILL.md +444 -0
  22. package/.github/skills/musubix-test-generation/SKILL.md +212 -0
  23. package/.github/skills/musubix-traceability/SKILL.md +141 -0
  24. package/AGENTS.md +1136 -0
  25. package/LICENSE +21 -0
  26. package/README.ja.md +313 -0
  27. package/README.md +315 -50
  28. package/bin/musubix-mcp.js +15 -0
  29. package/bin/musubix.js +9 -1
  30. package/docs/API-REFERENCE.md +1425 -0
  31. package/docs/GITHUB-ACTIONS-NPM-SETUP.md +132 -0
  32. package/docs/INSTALL-GUIDE.ja.md +459 -0
  33. package/docs/INSTALL-GUIDE.md +459 -0
  34. package/docs/MIGRATION-v3.0.md +324 -0
  35. package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
  36. package/docs/MUSUBIX-v3.0-User-Guide.md +1357 -0
  37. package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
  38. package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
  39. package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
  40. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
  41. package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
  42. package/docs/ROADMAP-v1.5.md +116 -0
  43. package/docs/SwarmCoding.md +1284 -0
  44. package/docs/Test-prompt.md +105 -0
  45. package/docs/USER-GUIDE-v1.8.0.md +2371 -0
  46. package/docs/USER-GUIDE.ja.md +2147 -0
  47. package/docs/USER-GUIDE.md +3022 -0
  48. package/docs/YATA-GLOBAL-GUIDE.ja.md +750 -0
  49. package/docs/YATA-GLOBAL-GUIDE.md +595 -0
  50. package/docs/YATA-LOCAL-GUIDE.ja.md +989 -0
  51. package/docs/YATA-LOCAL-GUIDE.md +730 -0
  52. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
  53. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
  54. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
  55. package/docs/adr/ADR-v3.4.0-001-deep-research-architecture.md +217 -0
  56. package/docs/adr/ADR-v3.4.0-002-search-provider-selection.md +308 -0
  57. package/docs/adr/ADR-v3.4.0-003-lm-api-integration.md +475 -0
  58. package/docs/enterprise-knowledge-management.md +1737 -0
  59. package/docs/evolution-from-musubi-to-musubix.md +2170 -0
  60. package/docs/experiments/EXPERIMENT-ASSISTANT-AXIS-DRIFT-DETECTION.md +155 -0
  61. package/docs/getting-started-with-sdd.md +1602 -0
  62. package/docs/moodle-refactering-codegraph-musubix.md +391 -0
  63. package/docs/moodle-refactering-codegraph.md +278 -0
  64. package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
  65. package/docs/overview/MUSUBIX-Core.md +671 -0
  66. package/docs/overview/MUSUBIX-Decisions.md +494 -0
  67. package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
  68. package/docs/overview/MUSUBIX-Knowledge.md +1231 -0
  69. package/docs/overview/MUSUBIX-Learning.md +837 -0
  70. package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
  71. package/docs/overview/MUSUBIX-Overview.md +264 -0
  72. package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
  73. package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
  74. package/docs/overview/MUSUBIX-Policy.md +477 -0
  75. package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
  76. package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
  77. package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
  78. package/docs/overview/MUSUBIX-Security.md +891 -0
  79. package/docs/overview/MUSUBIX-YATA.md +666 -0
  80. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
  81. package/docs/overview/Neuro-SymbolicAI.md +159 -0
  82. package/docs/packages/knowledge.md +594 -0
  83. package/docs/qiita/musubix-v3.6.0-fastrender-insights.md +625 -0
  84. package/docs/qiita-linux-kernel-knowledge-graph.md +596 -0
  85. package/docs/qiita-musubix-assistant-axis.md +380 -0
  86. package/package.json +58 -52
  87. package/scripts/generate-quality-gate-report.ts +106 -0
  88. package/scripts/postinstall.js +94 -0
  89. package/scripts/register-release-knowledge.ts +127 -0
  90. package/steering/.musubi-version +1 -0
  91. package/steering/product.ja.md +572 -0
  92. package/steering/project.yml +66 -0
  93. package/steering/rules/constitution.md +491 -0
  94. package/steering/structure.ja.md +503 -0
  95. package/steering/tech.ja.md +208 -0
  96. package/dist/index.d.ts +0 -25
  97. package/dist/index.d.ts.map +0 -1
  98. package/dist/index.js +0 -74
  99. package/dist/index.js.map +0 -1
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MUSUBIX Postinstall Script
4
+ *
5
+ * Copies .github/ and AGENTS.md to the project root after npm install.
6
+ * This enables GitHub Copilot and other AI agents to use MUSUBIX prompts and skills.
7
+ */
8
+
9
+ import { existsSync, cpSync, copyFileSync, mkdirSync } from 'fs';
10
+ import { dirname, join, resolve } from 'path';
11
+ import { fileURLToPath } from 'url';
12
+
13
+ const __filename = fileURLToPath(import.meta.url);
14
+ const __dirname = dirname(__filename);
15
+
16
+ // Source: where musubix is installed (node_modules/musubix)
17
+ const packageRoot = resolve(__dirname, '..');
18
+
19
+ // Target: project root (where npm install was run)
20
+ // When installed as dependency: process.env.INIT_CWD points to project root
21
+ // When running in musubix repo itself: skip
22
+ const projectRoot = process.env.INIT_CWD || process.cwd();
23
+
24
+ // Skip if we're in the musubix package itself
25
+ if (projectRoot === packageRoot || projectRoot.includes('node_modules/musubix')) {
26
+ console.log('musubix: Skipping postinstall (running in package directory)');
27
+ process.exit(0);
28
+ }
29
+
30
+ const sourceGithub = join(packageRoot, '.github');
31
+ const sourceAgents = join(packageRoot, 'AGENTS.md');
32
+ const targetGithub = join(projectRoot, '.github');
33
+ const targetAgents = join(projectRoot, 'AGENTS.md');
34
+
35
+ let copied = false;
36
+
37
+ // Copy .github directory
38
+ if (existsSync(sourceGithub)) {
39
+ // Only copy musubix-specific files, don't overwrite existing .github
40
+ const musubixPrompts = join(sourceGithub, 'prompts');
41
+ const musubixSkills = join(sourceGithub, 'skills');
42
+ const musubixAgents = join(sourceGithub, 'AGENTS.md');
43
+
44
+ // Create .github if not exists
45
+ if (!existsSync(targetGithub)) {
46
+ mkdirSync(targetGithub, { recursive: true });
47
+ }
48
+
49
+ // Copy prompts
50
+ if (existsSync(musubixPrompts)) {
51
+ const targetPrompts = join(targetGithub, 'prompts');
52
+ if (!existsSync(targetPrompts)) {
53
+ mkdirSync(targetPrompts, { recursive: true });
54
+ }
55
+ cpSync(musubixPrompts, targetPrompts, { recursive: true, force: false });
56
+ console.log('musubix: Copied .github/prompts/');
57
+ copied = true;
58
+ }
59
+
60
+ // Copy skills
61
+ if (existsSync(musubixSkills)) {
62
+ const targetSkills = join(targetGithub, 'skills');
63
+ if (!existsSync(targetSkills)) {
64
+ mkdirSync(targetSkills, { recursive: true });
65
+ }
66
+ cpSync(musubixSkills, targetSkills, { recursive: true, force: false });
67
+ console.log('musubix: Copied .github/skills/');
68
+ copied = true;
69
+ }
70
+
71
+ // Copy .github/AGENTS.md
72
+ if (existsSync(musubixAgents)) {
73
+ const targetGithubAgents = join(targetGithub, 'AGENTS.md');
74
+ if (!existsSync(targetGithubAgents)) {
75
+ copyFileSync(musubixAgents, targetGithubAgents);
76
+ console.log('musubix: Copied .github/AGENTS.md');
77
+ copied = true;
78
+ }
79
+ }
80
+ }
81
+
82
+ // Copy AGENTS.md to project root
83
+ if (existsSync(sourceAgents) && !existsSync(targetAgents)) {
84
+ copyFileSync(sourceAgents, targetAgents);
85
+ console.log('musubix: Copied AGENTS.md');
86
+ copied = true;
87
+ }
88
+
89
+ if (copied) {
90
+ console.log('musubix: AI agent configuration files installed successfully!');
91
+ console.log('musubix: GitHub Copilot can now use MUSUBIX SDD prompts and skills.');
92
+ } else {
93
+ console.log('musubix: Configuration files already exist, skipping.');
94
+ }
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Register release procedure knowledge to @musubix/knowledge
3
+ */
4
+ import { createKnowledgeStore, type Entity, type Relation } from '@musubix/knowledge';
5
+
6
+ async function main() {
7
+ const store = createKnowledgeStore('.knowledge');
8
+ await store.load();
9
+
10
+ const now = new Date().toISOString();
11
+
12
+ // Knowledge: Release Procedure
13
+ const releaseEntity: Entity = {
14
+ id: 'PROC-RELEASE-001',
15
+ type: 'pattern',
16
+ name: 'バージョンリリース手順',
17
+ description: '新しいバージョンの開発終了後のリリース手順。npm install musubixでインストール可能にするための標準プロセス。',
18
+ properties: {
19
+ category: 'release-procedure',
20
+ steps: [
21
+ {
22
+ order: 1,
23
+ name: 'リリース準備',
24
+ description: 'CHANGELOG.mdの更新、READMEの確認、バージョン番号の更新',
25
+ commands: [
26
+ 'npm version patch/minor/major',
27
+ ],
28
+ },
29
+ {
30
+ order: 2,
31
+ name: 'pnpm互換性チェック',
32
+ description: 'workspace:* などpnpm独自のプロトコルが残っていないか確認',
33
+ commands: [
34
+ 'grep -r "workspace:" packages/*/package.json',
35
+ ],
36
+ note: 'workspace:*はnpmでサポートされないため、実バージョン(^x.y.z)に置換必須',
37
+ },
38
+ {
39
+ order: 3,
40
+ name: 'Gitコミット',
41
+ description: '変更をコミット',
42
+ commands: [
43
+ 'git add .',
44
+ 'git commit -m "chore: release vX.Y.Z"',
45
+ 'git tag vX.Y.Z',
46
+ ],
47
+ },
48
+ {
49
+ order: 4,
50
+ name: 'GitHubプッシュ',
51
+ description: 'コミットとタグをoriginにプッシュ',
52
+ commands: [
53
+ 'git push origin main --tags',
54
+ ],
55
+ },
56
+ {
57
+ order: 5,
58
+ name: 'npm publish',
59
+ description: 'npmレジストリに公開',
60
+ commands: [
61
+ 'npm publish --access public',
62
+ ],
63
+ },
64
+ ],
65
+ warnings: [
66
+ 'workspace:*を使用しているとnpm installで"EUNSUPPORTEDPROTOCOL"エラーが発生する',
67
+ 'タグをプッシュし忘れるとバージョン追跡ができなくなる',
68
+ ],
69
+ learnedFrom: 'v3.4.7リリース時の問題対応(2026-01-18)',
70
+ },
71
+ tags: ['release', 'npm', 'pnpm', 'workspace', 'procedure', 'best-practice'],
72
+ createdAt: now,
73
+ updatedAt: now,
74
+ };
75
+
76
+ // Knowledge: pnpm workspace:* issue
77
+ const workspaceIssueEntity: Entity = {
78
+ id: 'ISSUE-PNPM-001',
79
+ type: 'constraint',
80
+ name: 'pnpm workspace:* プロトコル非互換性',
81
+ description: 'pnpmのworkspace:*プロトコルはnpmでサポートされていない。npm publishする前に実バージョンに置換が必要。',
82
+ properties: {
83
+ symptom: 'npm install時に"EUNSUPPORTEDPROTOCOL: Unsupported URL Type workspace:"エラー',
84
+ cause: 'package.jsonにworkspace:*が残っている',
85
+ solution: 'workspace:*を^X.Y.Z形式の実バージョンに置換',
86
+ example: {
87
+ before: '"@nahisaho/musubix-core": "workspace:*"',
88
+ after: '"@nahisaho/musubix-core": "^3.4.6"',
89
+ },
90
+ affectedVersion: 'v3.4.5, v3.4.6',
91
+ fixedVersion: 'v3.4.7',
92
+ },
93
+ tags: ['pnpm', 'npm', 'workspace', 'error', 'compatibility'],
94
+ createdAt: now,
95
+ updatedAt: now,
96
+ };
97
+
98
+ // Register entities
99
+ await store.putEntity(releaseEntity);
100
+ console.log(`✅ Registered: ${releaseEntity.id} - ${releaseEntity.name}`);
101
+
102
+ await store.putEntity(workspaceIssueEntity);
103
+ console.log(`✅ Registered: ${workspaceIssueEntity.id} - ${workspaceIssueEntity.name}`);
104
+
105
+ // Add relation
106
+ const relation: Relation = {
107
+ id: 'REL-PROC-ISSUE-001',
108
+ source: 'PROC-RELEASE-001',
109
+ target: 'ISSUE-PNPM-001',
110
+ type: 'related_to',
111
+ properties: {
112
+ reason: 'リリース手順のstep2でチェックすべき問題',
113
+ },
114
+ };
115
+ await store.addRelation(relation);
116
+ console.log(`✅ Registered relation: ${relation.source} --[${relation.type}]--> ${relation.target}`);
117
+
118
+ // Save
119
+ await store.save();
120
+ console.log('\n📦 Knowledge saved to .knowledge/graph.json');
121
+
122
+ // Show stats
123
+ const stats = store.getStats();
124
+ console.log(`\n📊 Stats: ${stats.entityCount} entities, ${stats.relationCount} relations`);
125
+ }
126
+
127
+ main().catch(console.error);
@@ -0,0 +1 @@
1
+ 6.2.1