@nahisaho/shikigami 1.16.6 → 1.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.
- package/.github/prompts/shikigami-manifest.prompt.md +3 -2
- package/.github/skills/shikigami-planner/SKILL.md +8 -7
- package/.github/skills/shikigami-writing/SKILL.md +1 -1
- package/.github/skills/shikigami-writing/templates/extraction-rules.yaml +4 -4
- package/AGENTS.md +30 -25
- package/CHANGELOG.md +41 -0
- package/mcp-server/shikigami.config.example.yaml +1 -1
- package/mcp-server/src/config/types.ts +2 -2
- package/package.json +1 -1
- package/scripts/cli.js +43 -35
- package/scripts/knowledge-discovery/index.ts +2 -2
- package/scripts/postinstall.js +1 -1
|
@@ -20,8 +20,9 @@ tools: ['shikigami-consulting-framework']
|
|
|
20
20
|
|
|
21
21
|
```yaml
|
|
22
22
|
project:
|
|
23
|
-
id: "
|
|
23
|
+
id: "pjXXXXX"
|
|
24
24
|
name: "プロジェクト名"
|
|
25
|
+
folder: "pjXXXXX_Name_YYYYMMDD"
|
|
25
26
|
status: "planning | in-progress | completed | archived"
|
|
26
27
|
|
|
27
28
|
deliverables:
|
|
@@ -45,7 +46,7 @@ quality: # 品質チェックリスト
|
|
|
45
46
|
|
|
46
47
|
**出力例**:
|
|
47
48
|
```
|
|
48
|
-
📋 Project Manifest:
|
|
49
|
+
📋 Project Manifest: pj00001_ai_market_research_20260119
|
|
49
50
|
|
|
50
51
|
📊 成果物ステータス
|
|
51
52
|
| ID | 成果物 | ステータス | ファイル |
|
|
@@ -1391,23 +1391,24 @@ personas:
|
|
|
1391
1391
|
|
|
1392
1392
|
---
|
|
1393
1393
|
|
|
1394
|
-
## Phase 6: manifest.yaml生成(v1.
|
|
1394
|
+
## Phase 6: manifest.yaml生成(v1.17.0 Enhanced)
|
|
1395
1395
|
|
|
1396
|
-
### 完全なmanifest.yaml v1.
|
|
1396
|
+
### 完全なmanifest.yaml v1.17.0フォーマット
|
|
1397
1397
|
|
|
1398
1398
|
```yaml
|
|
1399
|
-
# manifest.yaml v1.
|
|
1400
|
-
version: "1.
|
|
1399
|
+
# manifest.yaml v1.17.0
|
|
1400
|
+
version: "1.17.0"
|
|
1401
1401
|
|
|
1402
|
-
project_id: "
|
|
1402
|
+
project_id: "pj00001"
|
|
1403
1403
|
name: "[プロジェクト名]"
|
|
1404
|
-
|
|
1404
|
+
folder: "pj00001_Name_20260119"
|
|
1405
|
+
created_at: "2026-01-19T10:00:00+09:00"
|
|
1405
1406
|
purpose_type: "business_proposal"
|
|
1406
1407
|
|
|
1407
1408
|
# 真の目的
|
|
1408
1409
|
true_purpose: "[探索で発見した真の目的]"
|
|
1409
1410
|
|
|
1410
|
-
# v1.
|
|
1411
|
+
# v1.17.0: 成功条件詳細
|
|
1411
1412
|
purpose_discovery:
|
|
1412
1413
|
success_condition:
|
|
1413
1414
|
type: "IMMEDIATE_APPROVAL"
|
|
@@ -13,22 +13,22 @@ description: |
|
|
|
13
13
|
sources:
|
|
14
14
|
manifest:
|
|
15
15
|
description: "プロジェクトのmanifest.yaml"
|
|
16
|
-
path: "
|
|
16
|
+
path: "projects/{{project_id}}/manifest.yaml"
|
|
17
17
|
priority: 1 # 最優先
|
|
18
18
|
|
|
19
19
|
research_report:
|
|
20
20
|
description: "Deep Researchのevolving report"
|
|
21
|
-
path: "
|
|
21
|
+
path: "projects/{{project_id}}/reports/*-evolving-report-*.md"
|
|
22
22
|
priority: 2
|
|
23
23
|
|
|
24
24
|
competitor_analysis:
|
|
25
25
|
description: "競合分析結果"
|
|
26
|
-
path: "
|
|
26
|
+
path: "projects/{{project_id}}/analysis/competitor-*.md"
|
|
27
27
|
priority: 3
|
|
28
28
|
|
|
29
29
|
client_profile:
|
|
30
30
|
description: "顧客プロファイル"
|
|
31
|
-
path: "
|
|
31
|
+
path: "projects/{{project_id}}/client/profile.yaml"
|
|
32
32
|
priority: 4
|
|
33
33
|
|
|
34
34
|
# 抽出パス定義(JSONPath形式)
|
package/AGENTS.md
CHANGED
|
@@ -455,8 +455,8 @@ shikigami/
|
|
|
455
455
|
│ └── joint-research-proposal.md # v1.11.0
|
|
456
456
|
├── .vscode/
|
|
457
457
|
│ └── mcp.json # MCP設定
|
|
458
|
-
└──
|
|
459
|
-
└──
|
|
458
|
+
└── projects/ # リサーチ出力ディレクトリ
|
|
459
|
+
└── pjXXXXX_Name_YYYYMMDD/
|
|
460
460
|
├── manifest.yaml
|
|
461
461
|
├── research/
|
|
462
462
|
└── reports/
|
|
@@ -466,11 +466,12 @@ shikigami/
|
|
|
466
466
|
<summary><b>manifest.yaml スキーマ(クリックで展開)</b></summary>
|
|
467
467
|
|
|
468
468
|
```yaml
|
|
469
|
-
# manifest.yaml v1.
|
|
470
|
-
version: "1.
|
|
471
|
-
project_id: "
|
|
469
|
+
# manifest.yaml v1.17.0
|
|
470
|
+
version: "1.17.0"
|
|
471
|
+
project_id: "pj00001"
|
|
472
472
|
name: "[プロジェクト名]"
|
|
473
|
-
|
|
473
|
+
folder: "pj00001_ProjectName_20260119"
|
|
474
|
+
created_at: "2026-01-19T10:00:00+09:00"
|
|
474
475
|
purpose_type: "business_proposal"
|
|
475
476
|
true_purpose: "[探索で発見した真の目的]"
|
|
476
477
|
|
|
@@ -751,15 +752,16 @@ npx shikigami --help
|
|
|
751
752
|
npx shikigami init
|
|
752
753
|
|
|
753
754
|
# 新規リサーチプロジェクト作成
|
|
754
|
-
npx shikigami new # 自動採番 (
|
|
755
|
-
npx shikigami new
|
|
755
|
+
npx shikigami new # 自動採番 (pj00001, pj00002, ...)
|
|
756
|
+
npx shikigami new MyResearch # 名前付き (pj00001_MyResearch_20260119)
|
|
756
757
|
```
|
|
757
758
|
|
|
758
759
|
### プロジェクト出力構造
|
|
759
760
|
|
|
760
761
|
```
|
|
761
|
-
|
|
762
|
-
└──
|
|
762
|
+
projects/
|
|
763
|
+
└── pjXXXXX_Name_YYYYMMDD/ # XXXXXは5桁連番(20260119は作成日)
|
|
764
|
+
├── manifest.yaml # プロジェクト管理
|
|
763
765
|
├── research/ # Web検索で得られた情報
|
|
764
766
|
│ ├── sources.md # ソースURL一覧
|
|
765
767
|
│ └── notes/ # 検索結果メモ
|
|
@@ -794,43 +796,45 @@ cd mcp-server && npm start
|
|
|
794
796
|
|
|
795
797
|
1. **プロジェクト名を確認**(なければユーザーに質問)
|
|
796
798
|
2. **⚠️ 必ずCLIコマンドを実行**: `npx shikigami new <プロジェクト名>`
|
|
797
|
-
3. **生成されたディレクトリを確認**: `
|
|
799
|
+
3. **生成されたディレクトリを確認**: `projects/pjXXXXX_<名前>_YYYYMMDD/`
|
|
798
800
|
4. **manifest.yamlを確認・編集**(必要に応じて)
|
|
799
801
|
5. **Phase 0(ナレッジ継承)** → **Phase 1(目的探索)** へ進む
|
|
800
802
|
|
|
801
803
|
**プロジェクトフォルダ命名規則**:
|
|
802
804
|
```
|
|
803
|
-
|
|
805
|
+
projects/pjXXXXX_ProjectName_YYYYMMDD/
|
|
804
806
|
```
|
|
805
807
|
|
|
806
808
|
| パターン | コマンド | 結果 |
|
|
807
809
|
|---------|---------|------|
|
|
808
|
-
| 名前なし | `npx shikigami new` | `
|
|
809
|
-
| 名前あり | `npx shikigami new
|
|
810
|
+
| 名前なし | `npx shikigami new` | `projects/pj00001_Project_20260119/` |
|
|
811
|
+
| 名前あり | `npx shikigami new AIMarket` | `projects/pj00001_AIMarket_20260119/` |
|
|
810
812
|
|
|
811
|
-
- **保存場所**: 必ず `
|
|
812
|
-
- `
|
|
813
|
-
- `
|
|
813
|
+
- **保存場所**: 必ず `projects/` ディレクトリ配下(ルート直下は禁止)
|
|
814
|
+
- `XXXXX`: 5桁の自動連番(00001, 00002, 00003...)
|
|
815
|
+
- `ProjectName`: 英数字のみ(ハイフン・スペース・日本語不可)
|
|
816
|
+
- `YYYYMMDD`: プロジェクト作成日
|
|
814
817
|
- 既存プロジェクトをスキャンして次の番号を自動決定
|
|
815
818
|
|
|
816
819
|
**❌ 禁止される命名**:
|
|
817
820
|
| 禁止パターン | 理由 |
|
|
818
821
|
|-------------|------|
|
|
819
|
-
| `ai-for-science-proposal/` |
|
|
820
|
-
| `
|
|
821
|
-
| `my-research/` |
|
|
822
|
-
| ルート直下にフォルダ作成 | 必ず
|
|
822
|
+
| `ai-for-science-proposal/` | 命名規則に従っていない |
|
|
823
|
+
| `project-015/` | 旧形式、projects/配下でない |
|
|
824
|
+
| `my-research/` | 命名規則に従っていない |
|
|
825
|
+
| ルート直下にフォルダ作成 | 必ずprojects/配下に作成 |
|
|
826
|
+
| `pj00001_AI-Market_20260119/` | ハイフン禁止 |
|
|
823
827
|
|
|
824
828
|
**コマンド例**:
|
|
825
829
|
```bash
|
|
826
|
-
npx shikigami new
|
|
827
|
-
# →
|
|
830
|
+
npx shikigami new AIMarketResearch
|
|
831
|
+
# → projects/pj00003_AIMarketResearch_20260119/ が作成される
|
|
828
832
|
# ├── manifest.yaml # 成果物管理マニフェスト
|
|
829
833
|
# ├── research/ # Web検索で得られた情報
|
|
830
834
|
# └── reports/ # 最終的なレポート
|
|
831
835
|
```
|
|
832
836
|
|
|
833
|
-
**⚠️ 重要**: プロジェクトディレクトリを作成せずにリサーチを開始しないこと。成果物の散逸を防ぐため、必ず `
|
|
837
|
+
**⚠️ 重要**: プロジェクトディレクトリを作成せずにリサーチを開始しないこと。成果物の散逸を防ぐため、必ず `projects/` 配下にプロジェクトを作成する。
|
|
834
838
|
|
|
835
839
|
---
|
|
836
840
|
|
|
@@ -1129,8 +1133,9 @@ npx shikigami new my-research
|
|
|
1129
1133
|
|
|
1130
1134
|
```yaml
|
|
1131
1135
|
project:
|
|
1132
|
-
id: "
|
|
1136
|
+
id: "pjXXXXX"
|
|
1133
1137
|
name: "プロジェクト名"
|
|
1138
|
+
folder: "pjXXXXX_Name_YYYYMMDD"
|
|
1134
1139
|
status: "planning | in-progress | completed | archived"
|
|
1135
1140
|
|
|
1136
1141
|
deliverables:
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,47 @@ All notable changes to SHIKIGAMI will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.17.0] - 2026-01-19
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **BREAKING: プロジェクトフォルダ命名規則変更**
|
|
13
|
+
- 旧: `outputs/project-XXX[-name]/`
|
|
14
|
+
- 新: `projects/pjXXXXX_ProjectName_YYYYMMDD/`
|
|
15
|
+
- ディレクトリ名: `outputs/` → `projects/`
|
|
16
|
+
- 連番: 3桁 → 5桁 (00001, 00002, ...)
|
|
17
|
+
- 区切り文字: ハイフン `-` → アンダースコア `_`
|
|
18
|
+
- 日付: 作成日を `YYYYMMDD` 形式で付加
|
|
19
|
+
|
|
20
|
+
- **cli.js**: `createNewProject()` を新命名規則に対応
|
|
21
|
+
- `findRelatedProjects()` のパスを `projects/` に変更
|
|
22
|
+
- `scanReportsSync()` のパスを `projects/` に変更
|
|
23
|
+
|
|
24
|
+
- **mcp-server**: 設定ファイルのデフォルトパスを更新
|
|
25
|
+
- `types.ts`: `DEFAULT_KNOWLEDGE_DISCOVERY_CONFIG.searchPath` を `projects/` に変更
|
|
26
|
+
- `shikigami.config.example.yaml`: `knowledgeDiscovery.searchPath` を `projects/` に変更
|
|
27
|
+
|
|
28
|
+
- **ドキュメント更新**
|
|
29
|
+
- `AGENTS.md`: 新命名規則・コマンド例を反映
|
|
30
|
+
- `SHIKIGAMI-KNOWLEDGE.md`: ディレクトリ構造を更新
|
|
31
|
+
- `extraction-rules.yaml`: パステンプレートを更新
|
|
32
|
+
- `knowledge-discovery/index.ts`: デフォルトパスを更新
|
|
33
|
+
- `postinstall.js`: コメントを更新
|
|
34
|
+
|
|
35
|
+
### Migration Guide
|
|
36
|
+
|
|
37
|
+
既存プロジェクトは引き続き動作しますが、新規プロジェクトは新しい命名規則に従います。
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 旧コマンド(v1.16.x)
|
|
41
|
+
npx shikigami new my-research
|
|
42
|
+
# → outputs/project-001-my-research/
|
|
43
|
+
|
|
44
|
+
# 新コマンド(v1.17.0)
|
|
45
|
+
npx shikigami new MyResearch
|
|
46
|
+
# → projects/pj00001_MyResearch_20260119/
|
|
47
|
+
```
|
|
48
|
+
|
|
8
49
|
## [1.16.6] - 2026-01-18
|
|
9
50
|
|
|
10
51
|
### Added
|
|
@@ -130,7 +130,7 @@ searchRecovery:
|
|
|
130
130
|
# 関連プロジェクトの自動検出
|
|
131
131
|
knowledgeDiscovery:
|
|
132
132
|
enabled: true
|
|
133
|
-
searchPath:
|
|
133
|
+
searchPath: projects/ # プロジェクト検索パス
|
|
134
134
|
similarityThreshold: 0.3 # 類似度閾値(0-1)
|
|
135
135
|
maxResults: 5 # 表示する最大プロジェクト数
|
|
136
136
|
freshnessWarningDays: 30 # 鮮度警告の日数
|
|
@@ -243,7 +243,7 @@ export interface SearchRecoveryConfig {
|
|
|
243
243
|
export interface KnowledgeDiscoveryConfig {
|
|
244
244
|
/** ナレッジ連携を有効にするか */
|
|
245
245
|
enabled: boolean;
|
|
246
|
-
/** プロジェクト検索パス(デフォルト:
|
|
246
|
+
/** プロジェクト検索パス(デフォルト: projects/) */
|
|
247
247
|
searchPath?: string;
|
|
248
248
|
/** 類似度閾値(0-1、デフォルト: 0.3) */
|
|
249
249
|
similarityThreshold?: number;
|
|
@@ -412,7 +412,7 @@ export const DEFAULT_SEARCH_RECOVERY_CONFIG: Required<Omit<SearchRecoveryConfig,
|
|
|
412
412
|
*/
|
|
413
413
|
export const DEFAULT_KNOWLEDGE_DISCOVERY_CONFIG: Required<KnowledgeDiscoveryConfig> = {
|
|
414
414
|
enabled: true,
|
|
415
|
-
searchPath: '
|
|
415
|
+
searchPath: 'projects/',
|
|
416
416
|
similarityThreshold: 0.3,
|
|
417
417
|
maxResults: 5,
|
|
418
418
|
freshnessWarningDays: 30,
|
package/package.json
CHANGED
package/scripts/cli.js
CHANGED
|
@@ -89,20 +89,20 @@ if (command !== 'find-related' && command !== 'inherit') {
|
|
|
89
89
|
* Create a new research project
|
|
90
90
|
*/
|
|
91
91
|
function createNewProject(name) {
|
|
92
|
-
const
|
|
92
|
+
const projectsDir = path.join(process.cwd(), 'projects');
|
|
93
93
|
|
|
94
|
-
// Ensure
|
|
95
|
-
if (!fs.existsSync(
|
|
96
|
-
fs.mkdirSync(
|
|
94
|
+
// Ensure projects directory exists
|
|
95
|
+
if (!fs.existsSync(projectsDir)) {
|
|
96
|
+
fs.mkdirSync(projectsDir, { recursive: true });
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
// Find next project number
|
|
100
100
|
let projectNumber = 1;
|
|
101
|
-
if (fs.existsSync(
|
|
102
|
-
const existing = fs.readdirSync(
|
|
103
|
-
.filter(d => d.startsWith('
|
|
101
|
+
if (fs.existsSync(projectsDir)) {
|
|
102
|
+
const existing = fs.readdirSync(projectsDir)
|
|
103
|
+
.filter(d => d.startsWith('pj'))
|
|
104
104
|
.map(d => {
|
|
105
|
-
const match = d.match(/^
|
|
105
|
+
const match = d.match(/^pj(\d{5})/);
|
|
106
106
|
return match ? parseInt(match[1], 10) : 0;
|
|
107
107
|
})
|
|
108
108
|
.filter(n => !isNaN(n));
|
|
@@ -112,13 +112,17 @@ function createNewProject(name) {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
// Format project number with leading zeros (
|
|
116
|
-
const paddedNumber = String(projectNumber).padStart(
|
|
115
|
+
// Format project number with leading zeros (5 digits)
|
|
116
|
+
const paddedNumber = String(projectNumber).padStart(5, '0');
|
|
117
|
+
// Get current date in YYYYMMDD format
|
|
118
|
+
const today = new Date();
|
|
119
|
+
const dateStr = today.toISOString().split('T')[0].replace(/-/g, '');
|
|
120
|
+
// Format: pjXXXXX_ProjectName_YYYYMMDD
|
|
117
121
|
const projectDirName = name
|
|
118
|
-
? `
|
|
119
|
-
: `
|
|
122
|
+
? `pj${paddedNumber}_${name}_${dateStr}`
|
|
123
|
+
: `pj${paddedNumber}_Project_${dateStr}`;
|
|
120
124
|
|
|
121
|
-
const projectDir = path.join(
|
|
125
|
+
const projectDir = path.join(projectsDir, projectDirName);
|
|
122
126
|
const researchDir = path.join(projectDir, 'research');
|
|
123
127
|
const reportsDir = path.join(projectDir, 'reports');
|
|
124
128
|
|
|
@@ -127,18 +131,20 @@ function createNewProject(name) {
|
|
|
127
131
|
fs.mkdirSync(reportsDir, { recursive: true });
|
|
128
132
|
|
|
129
133
|
// Create README.md for the project
|
|
130
|
-
const readmeContent = `# Research Project: ${name ||
|
|
134
|
+
const readmeContent = `# Research Project: ${name || 'Project'}
|
|
131
135
|
|
|
132
|
-
|
|
136
|
+
**Project ID**: pj${paddedNumber}
|
|
137
|
+
**Created**: ${today.toISOString().split('T')[0]}
|
|
133
138
|
|
|
134
139
|
## Directory Structure
|
|
135
140
|
|
|
136
141
|
\`\`\`
|
|
137
142
|
${projectDirName}/
|
|
138
|
-
├──
|
|
139
|
-
|
|
140
|
-
└──
|
|
141
|
-
|
|
143
|
+
├── manifest.yaml # プロジェクト管理マニフェスト
|
|
144
|
+
├── research/ # Web検索で得られた情報
|
|
145
|
+
│ └── ... # 検索結果、ソースメモ等
|
|
146
|
+
└── reports/ # 最終的なレポート
|
|
147
|
+
└── ... # 分析レポート、提案書等
|
|
142
148
|
\`\`\`
|
|
143
149
|
|
|
144
150
|
## Research Notes
|
|
@@ -157,16 +163,16 @@ ${projectDirName}/
|
|
|
157
163
|
fs.writeFileSync(path.join(researchDir, '.gitkeep'), '');
|
|
158
164
|
fs.writeFileSync(path.join(reportsDir, '.gitkeep'), '');
|
|
159
165
|
|
|
160
|
-
// Generate manifest.yaml (v1.4.0)
|
|
161
|
-
const manifestContent = generateManifestTemplate(name ||
|
|
166
|
+
// Generate manifest.yaml (v1.4.0, v1.17.0 updated format)
|
|
167
|
+
const manifestContent = generateManifestTemplate(name || 'Project', paddedNumber, dateStr);
|
|
162
168
|
fs.writeFileSync(path.join(projectDir, 'manifest.yaml'), manifestContent);
|
|
163
169
|
|
|
164
170
|
console.log(`
|
|
165
171
|
🎭 SHIKIGAMI - New Research Project Created
|
|
166
172
|
============================================
|
|
167
173
|
|
|
168
|
-
📁 Project:
|
|
169
|
-
├── manifest.yaml # 成果物管理マニフェスト
|
|
174
|
+
📁 Project: projects/${projectDirName}
|
|
175
|
+
├── manifest.yaml # 成果物管理マニフェスト
|
|
170
176
|
├── research/ # Web検索で得られた情報
|
|
171
177
|
└── reports/ # 最終的なレポート
|
|
172
178
|
|
|
@@ -181,19 +187,21 @@ ${projectDirName}/
|
|
|
181
187
|
/**
|
|
182
188
|
* Generate manifest.yaml template for a research project
|
|
183
189
|
* @param {string} projectName - Project name
|
|
184
|
-
* @param {string} projectNumber - Project number (e.g., "
|
|
190
|
+
* @param {string} projectNumber - Project number (e.g., "00001")
|
|
191
|
+
* @param {string} dateStr - Date string in YYYYMMDD format
|
|
185
192
|
* @returns {string} YAML content
|
|
186
193
|
*/
|
|
187
|
-
function generateManifestTemplate(projectName, projectNumber) {
|
|
194
|
+
function generateManifestTemplate(projectName, projectNumber, dateStr) {
|
|
188
195
|
const today = new Date().toISOString().split('T')[0];
|
|
189
196
|
|
|
190
197
|
return `# SHIKIGAMI Project Manifest
|
|
191
198
|
# Generated: ${today}
|
|
192
|
-
# Version: 1.
|
|
199
|
+
# Version: 1.17.0
|
|
193
200
|
|
|
194
201
|
project:
|
|
195
|
-
id: "
|
|
202
|
+
id: "pj${projectNumber}"
|
|
196
203
|
name: "${projectName}"
|
|
204
|
+
folder: "pj${projectNumber}_${projectName}_${dateStr}"
|
|
197
205
|
created: "${today}"
|
|
198
206
|
status: "planning" # planning | in-progress | completed | archived
|
|
199
207
|
|
|
@@ -312,10 +320,10 @@ keywords: []
|
|
|
312
320
|
* REQ-KM-003: 関連プロジェクトの自動検出
|
|
313
321
|
*/
|
|
314
322
|
async function findRelatedProjects(keywords) {
|
|
315
|
-
const
|
|
323
|
+
const projectsDir = path.join(process.cwd(), 'projects');
|
|
316
324
|
|
|
317
|
-
if (!fs.existsSync(
|
|
318
|
-
console.log('📁
|
|
325
|
+
if (!fs.existsSync(projectsDir)) {
|
|
326
|
+
console.log('📁 projects/ ディレクトリが見つかりません。');
|
|
319
327
|
console.log(' npx shikigami new [name] でプロジェクトを作成してください。');
|
|
320
328
|
process.exit(0);
|
|
321
329
|
}
|
|
@@ -325,7 +333,7 @@ async function findRelatedProjects(keywords) {
|
|
|
325
333
|
console.log('');
|
|
326
334
|
|
|
327
335
|
// プロジェクトをスキャン
|
|
328
|
-
const projects = scanProjectsSync(
|
|
336
|
+
const projects = scanProjectsSync(projectsDir);
|
|
329
337
|
|
|
330
338
|
if (projects.length === 0) {
|
|
331
339
|
console.log('📭 プロジェクトが見つかりませんでした。');
|
|
@@ -530,7 +538,7 @@ function handleInheritCommand(args) {
|
|
|
530
538
|
|
|
531
539
|
if (reports.length === 0) {
|
|
532
540
|
console.log('📭 レポートが見つかりませんでした。');
|
|
533
|
-
console.log('
|
|
541
|
+
console.log(' projects/*/reports/ または reports/ ディレクトリにレポートを配置してください。');
|
|
534
542
|
process.exit(0);
|
|
535
543
|
}
|
|
536
544
|
|
|
@@ -562,18 +570,18 @@ function handleInheritCommand(args) {
|
|
|
562
570
|
console.log('');
|
|
563
571
|
console.log('Examples:');
|
|
564
572
|
console.log(' npx shikigami inherit --query "ネオジム磁石 調達"');
|
|
565
|
-
console.log(' npx shikigami inherit --from
|
|
573
|
+
console.log(' npx shikigami inherit --from projects/pj00001_sample/reports/report.md');
|
|
566
574
|
console.log(' npx shikigami inherit --list');
|
|
567
575
|
process.exit(0);
|
|
568
576
|
}
|
|
569
577
|
|
|
570
578
|
/**
|
|
571
|
-
* Scan for reports in
|
|
579
|
+
* Scan for reports in projects and reports directories
|
|
572
580
|
*/
|
|
573
581
|
function scanReportsSync(outputsDir, reportsDir) {
|
|
574
582
|
const reports = [];
|
|
575
583
|
|
|
576
|
-
// Scan
|
|
584
|
+
// Scan projects/*/reports/
|
|
577
585
|
if (fs.existsSync(outputsDir)) {
|
|
578
586
|
const projects = fs.readdirSync(outputsDir, { withFileTypes: true });
|
|
579
587
|
for (const project of projects) {
|
|
@@ -35,14 +35,14 @@ const DEFAULT_OPTIONS: Required<DiscoveryOptions> = {
|
|
|
35
35
|
/**
|
|
36
36
|
* ナレッジ連携サービス
|
|
37
37
|
*
|
|
38
|
-
*
|
|
38
|
+
* projects/配下のプロジェクトをスキャンし、関連プロジェクトを検出する
|
|
39
39
|
*/
|
|
40
40
|
export class KnowledgeDiscoveryService {
|
|
41
41
|
private readonly baseDir: string;
|
|
42
42
|
private readonly indexFileName: string;
|
|
43
43
|
private indexCache: ProjectIndex | null = null;
|
|
44
44
|
|
|
45
|
-
constructor(baseDir: string = '
|
|
45
|
+
constructor(baseDir: string = 'projects', indexFileName: string = '.shikigami-index.json') {
|
|
46
46
|
this.baseDir = baseDir;
|
|
47
47
|
this.indexFileName = indexFileName;
|
|
48
48
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -28,7 +28,7 @@ const itemsToCopy = [
|
|
|
28
28
|
{ src: 'AGENTS.md', dest: 'AGENTS.md', type: 'file' },
|
|
29
29
|
];
|
|
30
30
|
|
|
31
|
-
// Note:
|
|
31
|
+
// Note: projects/ directory is NOT created automatically.
|
|
32
32
|
// Use `npx shikigami new <name>` to create project directories.
|
|
33
33
|
const itemsToCreate = [];
|
|
34
34
|
|