@nahisaho/shikigami 1.53.0 โ 2.0.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/AGENTS.md +33 -31
- package/CHANGELOG.md +20 -0
- package/README.md +80 -42
- package/mcp-server/package.json +1 -1
- package/mcp-server/src/index.ts +8 -195
- package/package.json +1 -1
- package/scripts/cli.js +11 -1
- package/scripts/init.js +17 -0
- package/scripts/setup-cowork.js +367 -0
package/AGENTS.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SHIKIGAMI - Deep Research Agent Skills
|
|
1
|
+
# SHIKIGAMI - Deep Research Agent Skills v2.0.0
|
|
2
2
|
|
|
3
3
|
> Knowledge for AI Coding Agents โ Triggers and Actions defined with WHEN/DO syntax
|
|
4
4
|
|
|
@@ -34,7 +34,7 @@ VIOLATION = WORKFLOW FAILURE
|
|
|
34
34
|
|------|-------|
|
|
35
35
|
| Version | 1.42.0 |
|
|
36
36
|
| Agent Skills | 4 |
|
|
37
|
-
| MCP Tools |
|
|
37
|
+
| MCP Tools | 7 |
|
|
38
38
|
| Frameworks | 53 |
|
|
39
39
|
| Report Templates | 33 |
|
|
40
40
|
|
|
@@ -144,20 +144,20 @@ THEN: Call set_project(autoDetect: true) to activate the project
|
|
|
144
144
|
FORBIDDEN: Web search, using search tools, or gathering information before project activation
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
### Prohibition 3: save_research Required After
|
|
147
|
+
### Prohibition 3: save_research Required After web_search/web_fetch
|
|
148
148
|
|
|
149
|
-
**๐จ๐จ๐จ EVERY
|
|
149
|
+
**๐จ๐จ๐จ EVERY web_search/web_fetch MUST be followed by save_research ๐จ๐จ๐จ**
|
|
150
150
|
|
|
151
151
|
```
|
|
152
|
-
WHEN: Executed
|
|
152
|
+
WHEN: Executed web_search or web_fetch Copilot CLI tool
|
|
153
153
|
DO: IMMEDIATELY call save_research MCP tool (within the SAME response, not later)
|
|
154
154
|
|
|
155
155
|
MANDATORY PATTERN - NO EXCEPTIONS:
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
web_search(...) โ save_research(...) โ next action
|
|
157
|
+
web_fetch(...) โ save_research(...) โ next action
|
|
158
158
|
|
|
159
159
|
EXAMPLE 1 (Search):
|
|
160
|
-
1.
|
|
160
|
+
1. web_search(query: "AIๅธๅ ดๅๅ")
|
|
161
161
|
2. save_research(
|
|
162
162
|
content: "<ๆค็ดข็ตๆใฎๅ
จๆใใใใซ>",
|
|
163
163
|
source: "search",
|
|
@@ -165,7 +165,7 @@ EXAMPLE 1 (Search):
|
|
|
165
165
|
)
|
|
166
166
|
|
|
167
167
|
EXAMPLE 2 (Visit):
|
|
168
|
-
1.
|
|
168
|
+
1. web_fetch(url: "https://example.com/article")
|
|
169
169
|
2. save_research(
|
|
170
170
|
content: "<ใใผใธๅ
ๅฎนใฎๅ
จๆใใใใซ>",
|
|
171
171
|
source: "visit",
|
|
@@ -173,8 +173,8 @@ EXAMPLE 2 (Visit):
|
|
|
173
173
|
)
|
|
174
174
|
|
|
175
175
|
FORBIDDEN (IMMEDIATE VIOLATION):
|
|
176
|
-
- Calling
|
|
177
|
-
- Calling
|
|
176
|
+
- Calling web_search then another web_search without save_research in between
|
|
177
|
+
- Calling web_fetch then summarizing without save_research first
|
|
178
178
|
- Proceeding to analysis without saving raw data
|
|
179
179
|
- "I'll save it later" - NO! Save IMMEDIATELY
|
|
180
180
|
|
|
@@ -183,7 +183,7 @@ CONSEQUENCE: Research data will be lost, workflow corrupted, unable to cite sour
|
|
|
183
183
|
|
|
184
184
|
**CORRECT FLOW**:
|
|
185
185
|
```
|
|
186
|
-
Agent:
|
|
186
|
+
Agent: web_search(query: "...")
|
|
187
187
|
โ [็ตๆใๅไฟก]
|
|
188
188
|
โ save_research(content: <ๅ
จ็ตๆ>, source: "search", query: <query>)
|
|
189
189
|
โ "ๆค็ดข็ตๆใไฟๅญใใพใใใๆฌกใซ..."
|
|
@@ -191,7 +191,7 @@ Agent: search(query: [...])
|
|
|
191
191
|
|
|
192
192
|
**INCORRECT FLOW (VIOLATION)**:
|
|
193
193
|
```
|
|
194
|
-
Agent:
|
|
194
|
+
Agent: web_search(query: "...")
|
|
195
195
|
โ "ๆค็ดข็ตๆใซใใใจ..." โ โ save_research ใๅผใใงใใชใ๏ผ
|
|
196
196
|
```
|
|
197
197
|
|
|
@@ -241,7 +241,7 @@ CONSEQUENCE: PDF content will be unreadable or lost
|
|
|
241
241
|
|
|
242
242
|
Every search/visit operation MUST follow this pattern:
|
|
243
243
|
```
|
|
244
|
-
1.
|
|
244
|
+
1. web_search(query: "...") or web_fetch(url: "...")
|
|
245
245
|
2. save_research(content: <results>, source: "search"|"visit", query: <query>)
|
|
246
246
|
```
|
|
247
247
|
|
|
@@ -567,10 +567,10 @@ WHEN: Phase 2 completed, true purpose confirmed
|
|
|
567
567
|
DO:
|
|
568
568
|
LOOP:
|
|
569
569
|
1. Think: Analyze knowledge gaps
|
|
570
|
-
2. Search:
|
|
570
|
+
2. Search: web_search(query: "Japanese query") + web_search(query: "English query")
|
|
571
571
|
3. ๐จ IMMEDIATELY: save_research(content: <FULL search_results>, source: "search", query: <query>)
|
|
572
572
|
โ Do NOT proceed without this step!
|
|
573
|
-
4. Visit:
|
|
573
|
+
4. Visit: web_fetch(url: <target_url>)
|
|
574
574
|
5. ๐จ IMMEDIATELY: save_research(content: <FULL page_content>, source: "visit", query: <url>)
|
|
575
575
|
โ Do NOT proceed without this step!
|
|
576
576
|
6. Report: Organize collected information
|
|
@@ -578,19 +578,19 @@ DO:
|
|
|
578
578
|
OUTPUT: Collected information summary, source list (URL + credibility)
|
|
579
579
|
```
|
|
580
580
|
|
|
581
|
-
**๐จ CRITICAL - save_research is MANDATORY after EVERY
|
|
581
|
+
**๐จ CRITICAL - save_research is MANDATORY after EVERY web_search/web_fetch**:
|
|
582
582
|
- Steps 3 and 5 are NOT optional
|
|
583
|
-
- You MUST call save_research IMMEDIATELY after each
|
|
583
|
+
- You MUST call save_research IMMEDIATELY after each web_search/web_fetch
|
|
584
584
|
- Do NOT analyze or summarize before saving raw data
|
|
585
585
|
- Do NOT call multiple searches without saving each one
|
|
586
586
|
|
|
587
587
|
**CORRECT Phase 3 Flow**:
|
|
588
588
|
```
|
|
589
|
-
|
|
589
|
+
web_search(query: "...")
|
|
590
590
|
โ
|
|
591
591
|
save_research(content: <ๅ
จ็ตๆ>, source: "search", ...) โ ๅฟ
้ ๏ผ
|
|
592
592
|
โ
|
|
593
|
-
|
|
593
|
+
web_fetch(url: ...)
|
|
594
594
|
โ
|
|
595
595
|
save_research(content: <ๅ
จๅ
ๅฎน>, source: "visit", ...) โ ๅฟ
้ ๏ผ
|
|
596
596
|
โ
|
|
@@ -598,7 +598,7 @@ save_research(content: <ๅ
จๅ
ๅฎน>, source: "visit", ...) โ ๅฟ
้ ๏ผ
|
|
|
598
598
|
```
|
|
599
599
|
|
|
600
600
|
**Search Rules**:
|
|
601
|
-
- Parallel JP/EN search required:
|
|
601
|
+
- Parallel JP/EN search required: web_search("Japanese query") + web_search("English query")
|
|
602
602
|
- For academic searches: `.ac.jp`, `.edu`, `.gov` domains auto-prioritized
|
|
603
603
|
- On 404/5xx: Wayback Machine โ Archive.today fallback
|
|
604
604
|
|
|
@@ -744,16 +744,18 @@ DO:
|
|
|
744
744
|
|------|---------|-----------------|
|
|
745
745
|
| `set_project` | Set project context | Once after Phase 0 completion |
|
|
746
746
|
| `save_prompt` | Save prompts to prompts/ | Every time user input received |
|
|
747
|
-
| `save_research` | Save research results to research/ | Every time after
|
|
748
|
-
| `search` | Web search | Phase 3 |
|
|
749
|
-
| `visit` | Extract page content | Phase 3 |
|
|
750
|
-
| `parse_file` | Parse local files | As needed |
|
|
751
|
-
| `parse_directory` | Recursively parse directories | As needed |
|
|
747
|
+
| `save_research` | Save research results to research/ | Every time after web_search/web_fetch |
|
|
752
748
|
| `embed` | Generate text embedding vectors | For semantic search |
|
|
753
749
|
| `similarity` | Calculate text similarity | For relevance determination |
|
|
754
750
|
| `semantic_search` | Semantic search | For context retrieval |
|
|
755
751
|
| `get_project` | Check current project | For debugging |
|
|
756
752
|
|
|
753
|
+
**v2.0.0 ใงๅ้คใใใใใผใซ๏ผCopilot CLI ใซๅง่ญฒ๏ผ:**
|
|
754
|
+
| ~~`search`~~ | โ Copilot CLI `web_search` |
|
|
755
|
+
| ~~`visit`~~ | โ Copilot CLI `web_fetch` |
|
|
756
|
+
| ~~`parse_file`~~ | โ Copilot CLI `view` |
|
|
757
|
+
| ~~`parse_directory`~~ | โ Copilot CLI `glob` + `view` |
|
|
758
|
+
|
|
757
759
|
### save_prompt type Parameter
|
|
758
760
|
|
|
759
761
|
| type | Purpose |
|
|
@@ -769,8 +771,8 @@ DO:
|
|
|
769
771
|
|
|
770
772
|
| source | Purpose | Filename Example |
|
|
771
773
|
|--------|---------|------------------|
|
|
772
|
-
| `search` |
|
|
773
|
-
| `visit` | Page visit results | `visit_domain_YYYYMMDD_HHMMSS.md` |
|
|
774
|
+
| `search` | Web search results (via Copilot CLI web_search) | `search_query_YYYYMMDD_HHMMSS.md` |
|
|
775
|
+
| `visit` | Page visit results (via Copilot CLI web_fetch) | `visit_domain_YYYYMMDD_HHMMSS.md` |
|
|
774
776
|
| `manual` | Analysis notes | `manual_topic_YYYYMMDD_HHMMSS.md` |
|
|
775
777
|
|
|
776
778
|
---
|
|
@@ -1099,7 +1101,7 @@ DO: Auto-prioritize .ac.jp, .edu, .gov domains
|
|
|
1099
1101
|
### On 404/5xx Errors
|
|
1100
1102
|
|
|
1101
1103
|
```
|
|
1102
|
-
WHEN: HTTP error occurs on
|
|
1104
|
+
WHEN: HTTP error occurs on web_fetch
|
|
1103
1105
|
DO:
|
|
1104
1106
|
1. Attempt retrieval from Wayback Machine (archive.org)
|
|
1105
1107
|
2. On failure, attempt retrieval from Archive.today
|
|
@@ -1128,5 +1130,5 @@ DO: Auto-detect Shift_JIS/EUC-JP/ISO-2022-JP and convert to UTF-8
|
|
|
1128
1130
|
|
|
1129
1131
|
---
|
|
1130
1132
|
|
|
1131
|
-
**Last Updated**: 2026-
|
|
1132
|
-
**Version**:
|
|
1133
|
+
**Last Updated**: 2026-05-18
|
|
1134
|
+
**Version**: 2.0.0
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ 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
|
+
## [2.0.0] - 2026-05-18
|
|
9
|
+
|
|
10
|
+
### Breaking Changes
|
|
11
|
+
|
|
12
|
+
- **Copilot CLI ้่คๆฉ่ฝใฎๅ้ค**: GitHub Copilot CLI ใฎ็ตใฟ่พผใฟๆฉ่ฝใจ้่คใใ SHIKIGAMI ๆฉ่ฝใๅ้ค
|
|
13
|
+
- MCP Tools: `search`๏ผโ `web_search`๏ผใ`visit`๏ผโ `web_fetch`๏ผใ`parse_file`๏ผโ `view`๏ผใ`parse_directory`๏ผโ `glob` + `view`๏ผใๅ้ค
|
|
14
|
+
- Agent Skills: `session-manager`๏ผโ `/session`๏ผใ`context-optimizer`๏ผโ `/context`๏ผใ`learning-hooks`๏ผโ `store_memory`๏ผใ`codemap`๏ผโ explore agent๏ผใ`refactor-cleaner`๏ผโ CLI + bash๏ผใๅ้ค
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **AGENTS.md ใฏใผใฏใใญใผๆดๆฐ**: ใชใตใผใใฏใผใฏใใญใผๅ
ใฎ `search` โ `web_search`ใ`visit` โ `web_fetch` ใซๅ
จ้ข็งป่ก
|
|
19
|
+
- **MCP Server**: 14ใใผใซ โ 10ใใผใซใซๆด็๏ผ`set_project`, `get_project`, `save_prompt`, `save_research`, `embed`, `similarity`, `semantic_search`, `branch_detect`, `branch_evaluate`, `branch_select`๏ผ
|
|
20
|
+
- **Agent Skills**: 20ในใญใซ โ 15ในใญใซใซๆด็๏ผใชใตใผใ4 + ๅ่ณชๆค่จผ5 + MUSUBIX SDD 6๏ผ
|
|
21
|
+
- **README.md**: v2.0.0 ใขใผใญใใฏใใฃๅณใปในใญใซไธ่ฆงใปMCPไธ่ฆงใๆดๆฐใCopilot CLI ้ฃๆบ่จญ่จใๆ่จ
|
|
22
|
+
|
|
23
|
+
### Removed
|
|
24
|
+
|
|
25
|
+
- **MCP Tools๏ผ4ใใผใซ๏ผ**: `search`, `visit`, `parse_file`, `parse_directory`
|
|
26
|
+
- **Agent Skills๏ผ5ในใญใซ๏ผ**: `session-manager`, `context-optimizer`, `learning-hooks`, `codemap`, `refactor-cleaner`
|
|
27
|
+
|
|
8
28
|
## [1.53.0] - 2026-04-07
|
|
9
29
|
|
|
10
30
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# SHIKIGAMI
|
|
1
|
+
# SHIKIGAMI
|
|
2
2
|
|
|
3
3
|
**GitHub Copilot Agent Skills for Deep Research & McKinsey Consulting**
|
|
4
4
|
|
|
5
|
-
ใใใญใณใผใผใฎใณใณใตใซใใฃใณใฐๆๆณ๏ผไปฎ่ชฌ้งๅใMECEใใใฉใใใๅๅใ7Sใใฌใผใ ใฏใผใฏ็ญ๏ผใๆดป็จใใๆทฑๅฑคใชใตใผใ่ชๅๅAgent Skillsใใใฑใผใธใงใใ
|
|
5
|
+
ใใใญใณใผใผใฎใณใณใตใซใใฃใณใฐๆๆณ๏ผไปฎ่ชฌ้งๅใMECEใใใฉใใใๅๅใ7Sใใฌใผใ ใฏใผใฏ็ญ๏ผใๆดป็จใใๆทฑๅฑคใชใตใผใ่ชๅๅAgent SkillsใใใฑใผใธใงใใGitHub Copilot CLI ใจ้ฃๆบใใCopilot CLI ใฎ็ตใฟ่พผใฟๆฉ่ฝใๆดป็จใใคใคใSHIKIGAMI็ฌ่ชใฎใชใตใผใใปใณใณใตใซใใฃใณใฐๆฉ่ฝใๆไพใใพใใ
|
|
6
6
|
|
|
7
7
|
## ๐ฏ ใงใใใใจ
|
|
8
8
|
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
- **Deep Research**: WebResearcherใใฉใใคใ ใซๅบใฅใๅๅพฉ็ๆทฑๅฑคใชใตใผใ
|
|
11
11
|
- **ใใใญใณใผใผใปใใฌใผใ ใฏใผใฏๅๆ**: ไปฎ่ชฌ้งๅใใคใทใฅใผใใชใผใ7Sใใใฉใใใๅๅ็ญใ้ฉ็จ
|
|
12
12
|
- **้ซๅ่ณชใฌใใผใ็ๆ**: ใใซใทใใผใทใงใณ้ฒๆญขใใฝใผใน่ฟฝ่ทกใๅผ็จ็ฎก็
|
|
13
|
-
-
|
|
14
|
-
-
|
|
13
|
+
- **ใใซใใใใๆข็ดข**: ใชใตใผใไธญใฎๅๅฒ็นใ่ชๅๆคๅบใใ่คๆฐใในใๅๆๆข็ดข
|
|
14
|
+
- **ใใฏใใซๆค็ดข**: ้ๅปใฎใชใตใผใ่ณ็ฃใใปใใณใใฃใใฏๆค็ดขใงๅๅฉ็จ
|
|
15
|
+
- **ๅ่ณชๆค่จผใซใผใ**: BuildโTypeโLintโTestโSecurityโDiff ใฎ6ใใงใผใบๆค่จผ
|
|
15
16
|
|
|
16
17
|
## ๐ฆ ใคใณในใใผใซ
|
|
17
18
|
|
|
@@ -22,45 +23,82 @@ npm install @nahisaho/shikigami-mck
|
|
|
22
23
|
ใพใใฏใใชใใธใใชใใฏใญใผใณ:
|
|
23
24
|
|
|
24
25
|
```bash
|
|
25
|
-
git clone https://github.com/nahisaho/SHIKIGAMI
|
|
26
|
+
git clone https://github.com/nahisaho/SHIKIGAMI.git
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
##
|
|
29
|
+
## ๐๏ธ ใขใผใญใใฏใใฃ
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
ๅฏพ่ฉฑ็็ฎ็ๆข็ดขใป่จ็ป็ซๆกในใญใซใ
|
|
31
|
+
SHIKIGAMI v2.0.0 ใฏ GitHub Copilot CLI ใฎ็ตใฟ่พผใฟๆฉ่ฝใๆๅคง้ๆดป็จใใ่จญ่จใซ็งป่กใใพใใใ
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- **ใใฉใใใๅๅ** - ็ต่ซๅ
่กใฎ่ซ็ๆง้
|
|
53
|
-
- **ใใใญใณใผใผใฎ7S** - ็ต็นใฎๆดๅๆงๅๆ
|
|
54
|
-
- **3ใคใฎๅฐๅนณ็ท** - ็ญๆใปไธญๆใป้ทๆใฎๆ้ท็ฎก็
|
|
55
|
-
- MECEใปใญใธใใฏๅ่ณชๆค่จผ
|
|
56
|
-
|
|
57
|
-
### shikigami-writing
|
|
58
|
-
ใฌใใผใ็ๆใปๅ่ณชไฟ่จผในใญใซใ
|
|
33
|
+
```
|
|
34
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
35
|
+
โ GitHub Copilot CLI โ
|
|
36
|
+
โ web_search / web_fetch / store_memory / grep โ
|
|
37
|
+
โ explore / research / rubber-duck agents โ
|
|
38
|
+
โ /session / /context / /compact โ
|
|
39
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
40
|
+
โ SHIKIGAMI v2.0.0 โ
|
|
41
|
+
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
42
|
+
โ โ Agent Skills โ โ MCP Server (10 tools) โ โ
|
|
43
|
+
โ โ (15 skills) โ โ embed / similarity โ โ
|
|
44
|
+
โ โ โ โ semantic_search โ โ
|
|
45
|
+
โ โ Research โ โ branch_detect/eval/ โ โ
|
|
46
|
+
โ โ Consulting โ โ select โ โ
|
|
47
|
+
โ โ Quality โ โ set/get_project โ โ
|
|
48
|
+
โ โ MUSUBIX SDD โ โ save_prompt/research โ โ
|
|
49
|
+
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
50
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
51
|
+
```
|
|
59
52
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
## ๐ง Agent Skills๏ผ15ในใญใซ๏ผ
|
|
54
|
+
|
|
55
|
+
### ใชใตใผใใปใณใณใตใซใใฃใณใฐ
|
|
56
|
+
|
|
57
|
+
| ในใญใซ | ่ชฌๆ |
|
|
58
|
+
|--------|------|
|
|
59
|
+
| `shikigami-planner` | ๅฏพ่ฉฑ็็ฎ็ๆข็ดขใป5 WhysใปJTBDใปใชใตใผใ่จ็ป็ซๆก |
|
|
60
|
+
| `shikigami-deep-research` | ThinkโReportโActionใตใคใฏใซใฎๅๅพฉ็ๆทฑๅฑคใชใตใผใ |
|
|
61
|
+
| `shikigami-consulting-framework` | ใใใญใณใผใผใปใใฌใผใ ใฏใผใฏๅๆ๏ผไปฎ่ชฌ้งๅใป7Sใปใใฉใใใๅๅ็ญ๏ผ |
|
|
62
|
+
| `shikigami-writing` | ใฌใใผใ็ๆใปใใซใทใใผใทใงใณๆคๅบใปๅผ็จ็ฎก็ |
|
|
63
|
+
|
|
64
|
+
### ๅ่ณชใปๆค่จผ
|
|
65
|
+
|
|
66
|
+
| ในใญใซ | ่ชฌๆ |
|
|
67
|
+
|--------|------|
|
|
68
|
+
| `build-fix` | ใใซใใจใฉใผใๅ้กใปๅๅพฉไฟฎๆญฃ๏ผTypeScript/ESLint/ไพๅญ้ขไฟ๏ผ |
|
|
69
|
+
| `checkpoint` | ใปใผใใใคใณใใฎไฝๆใปๅพฉๅ
ใปๆฏ่ผ๏ผGit็ตฑๅ๏ผ |
|
|
70
|
+
| `e2e-runner` | Playwrightใไฝฟ็จใใE2Eใในใ็ๆใปๅฎ่ก |
|
|
71
|
+
| `eval-harness` | pass@kใกใใชใฏในใงAIใณใผใ็ๆๅ่ณชใ่ฉไพก |
|
|
72
|
+
| `verification-loop` | BuildโTypeโLintโTestโSecurityโDiff ใฎ6ใใงใผใบๆค่จผ |
|
|
73
|
+
|
|
74
|
+
### MUSUBIX SDD
|
|
75
|
+
|
|
76
|
+
| ในใญใซ | ่ชฌๆ |
|
|
77
|
+
|--------|------|
|
|
78
|
+
| `musubix-sdd-workflow` | 10ๆฒๆณๆก้
ใซๅพใฃใไปๆง้งๅ้็บใฌใคใ |
|
|
79
|
+
| `musubix-domain-inference` | ่ชๅใใกใคใณๆคๅบใปใณใณใใผใใณใๆจ่ซ |
|
|
80
|
+
| `musubix-code-generation` | ่จญ่จไปๆงใใใฎใณใผใ็ๆ |
|
|
81
|
+
| `musubix-test-generation` | TDD/BDDใซใใใในใ็ๆ |
|
|
82
|
+
| `musubix-adr-generation` | Architecture Decision Recordsไฝๆ |
|
|
83
|
+
| `musubix-best-practices` | ๅญฆ็ฟๆธใฟ17ใในใใใฉใฏใใฃในใฌใคใ |
|
|
84
|
+
| `musubix-c4-design` | C4ใขใใซ่จญ่จใใญใฅใกใณใไฝๆ |
|
|
85
|
+
| `musubix-technical-writing` | ๆ่กใใญใฅใกใณใไฝๆ |
|
|
86
|
+
| `musubix-ears-validation` | EARSๅฝขๅผ่ฆไปถใฎๆค่จผใปไฝๆ |
|
|
87
|
+
| `musubix-traceability` | ่ฆไปถใป่จญ่จใปใณใผใใปใในใ้ใฎใใฌใผใตใใชใใฃ็ฎก็ |
|
|
88
|
+
|
|
89
|
+
## ๐ MCP Server๏ผ10ใใผใซ๏ผ
|
|
90
|
+
|
|
91
|
+
| ใใผใซ | ่ชฌๆ |
|
|
92
|
+
|--------|------|
|
|
93
|
+
| `set_project` / `get_project` | ใชใตใผใใใญใธใงใฏใใฎ่จญๅฎใปๅๅพ |
|
|
94
|
+
| `save_prompt` | ใชใตใผใใใญใณใใใฎไฟๅญ |
|
|
95
|
+
| `save_research` | ใชใตใผใ็ตๆใฎไฟๅญ |
|
|
96
|
+
| `embed` | ใใญในใใฎใใฏใใซๅใ่พผใฟ็ๆ |
|
|
97
|
+
| `similarity` | ใใญในใ้ใฎ้กไผผๅบฆ่จ็ฎ |
|
|
98
|
+
| `semantic_search` | ้ๅปใฎใชใตใผใ่ณ็ฃใใปใใณใใฃใใฏๆค็ดข |
|
|
99
|
+
| `branch_detect` | ใชใตใผใไธญใฎๅๅฒใทใฐใใซๆคๅบ |
|
|
100
|
+
| `branch_evaluate` | ๅๅฒใในใฎในใณใขใชใณใฐใป่ฉไพก |
|
|
101
|
+
| `branch_select` | ๆ้ฉใชๆข็ดขใในใฎ้ธๆ |
|
|
64
102
|
|
|
65
103
|
## ๐ Prompts
|
|
66
104
|
|
|
@@ -138,9 +176,9 @@ flowchart TB
|
|
|
138
176
|
```
|
|
139
177
|
ใฆใผใถใผ: ใๆฐ่ฆไบๆฅญใฎๆนๅๆงใๆค่จใใใใ
|
|
140
178
|
|
|
141
|
-
SHIKIGAMI
|
|
179
|
+
SHIKIGAMI:
|
|
142
180
|
1. [Planner] ใๆ้ทใฎ็ฎๆจใฏไฝใงใใ๏ผใโ ็ใฎ็ฎ็ใๆข็ดข
|
|
143
|
-
2. [Deep Research]
|
|
181
|
+
2. [Deep Research] ๅธๅ ดๆ
ๅ ฑใไปฎ่ชฌ้งๅใงๅ้๏ผweb_search / web_fetch ๆดป็จ๏ผ
|
|
144
182
|
3. [Framework] 3ใคใฎๅฐๅนณ็ทใๆ้ทใฎใฐใฉใใฅใฉใชใใฃใ้ฉ็จ
|
|
145
183
|
4. [Writing] ใใฉใใใๅๅใงๆง้ ๅใใๆ่จใฌใใผใใ็ๆ
|
|
146
184
|
```
|
|
@@ -150,7 +188,7 @@ SHIKIGAMI-McK:
|
|
|
150
188
|
```
|
|
151
189
|
ใฆใผใถใผ: ใ็ต็นใฎๅ้ก็นใๅๆใใฆใ
|
|
152
190
|
|
|
153
|
-
SHIKIGAMI
|
|
191
|
+
SHIKIGAMI:
|
|
154
192
|
1. [Planner] ๅค้ฉใฎ็ฎ็ใปๆๅๅบๆบใ็ขบ่ช
|
|
155
193
|
2. [Deep Research] ็ต็นๆ
ๅ ฑใๅ้
|
|
156
194
|
3. [Framework] ใใใญใณใผใผใฎ7Sใงๆดๅๆงใๅๆ
|
|
@@ -162,7 +200,7 @@ SHIKIGAMI-McK:
|
|
|
162
200
|
```
|
|
163
201
|
ใฆใผใถใผ: ใ้ๆฅ่ฒปใๅๆธใใใใ
|
|
164
202
|
|
|
165
|
-
SHIKIGAMI
|
|
203
|
+
SHIKIGAMI:
|
|
166
204
|
1. [Planner] ๅๆธ็ฎๆจใปๅถ็ดใ็ขบ่ช
|
|
167
205
|
2. [Deep Research] ้ๆฅ้จ้ใฎๆฉ่ฝใปใณในใใ่ชฟๆป
|
|
168
206
|
3. [Framework] OVA๏ผ้ๆฅ่ฒปไพกๅคๅๆ๏ผใ้ฉ็จ
|
package/mcp-server/package.json
CHANGED
package/mcp-server/src/index.ts
CHANGED
|
@@ -15,9 +15,7 @@ import {
|
|
|
15
15
|
type Tool,
|
|
16
16
|
} from '@modelcontextprotocol/sdk/types.js';
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
import { visitPage, type PageContent } from './tools/visit.js';
|
|
20
|
-
import { parseFile, parseFiles, parseDirectory, type ParsedFile } from './tools/file-parser.js';
|
|
18
|
+
// search, visit, file-parser โ REMOVED in v2.0.0 (Copilot CLI ใซๅง่ญฒ)
|
|
21
19
|
import {
|
|
22
20
|
embed,
|
|
23
21
|
embedBatch,
|
|
@@ -187,117 +185,11 @@ set_projectใงใใญใธใงใฏใใ่จญๅฎใใฆใใไฝฟ็จใ`,
|
|
|
187
185
|
required: ['content'],
|
|
188
186
|
},
|
|
189
187
|
},
|
|
190
|
-
// Search & Visit Tools
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
Deep Researchใฎๆ
ๅ ฑๅ้ใใงใผใบใงไฝฟ็จใ`,
|
|
196
|
-
inputSchema: {
|
|
197
|
-
type: 'object',
|
|
198
|
-
properties: {
|
|
199
|
-
query: {
|
|
200
|
-
oneOf: [
|
|
201
|
-
{ type: 'string', description: 'ๅไธใฎๆค็ดขใฏใจใช' },
|
|
202
|
-
{
|
|
203
|
-
type: 'array',
|
|
204
|
-
items: { type: 'string' },
|
|
205
|
-
minItems: 1,
|
|
206
|
-
description: 'ๆค็ดขใฏใจใชใฎใชในใ๏ผใใใๆค็ดข๏ผ',
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
description: 'ๆค็ดขใฏใจใช๏ผๆๅญๅใพใใฏๆๅญๅ้
ๅ๏ผ',
|
|
210
|
-
},
|
|
211
|
-
maxResults: {
|
|
212
|
-
type: 'number',
|
|
213
|
-
default: 10,
|
|
214
|
-
description: 'ๅใฏใจใชใใใใฎๆๅคง็ตๆๆฐ๏ผใใใฉใซใ: 10๏ผ',
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
required: ['query'],
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: 'visit',
|
|
222
|
-
description: `Webใใผใธใ่จชๅใใๅ
ๅฎนใฎใใญในใใๆฝๅบ๏ผJina AI Readerไฝฟ็จ๏ผใ
|
|
223
|
-
LLM็จใซๆ้ฉๅใใใใฏใชใผใณใชใใญในใใ่ฟๅดใ
|
|
224
|
-
Deep Researchใฎ่ฉณ็ดฐ่ชฟๆปใใงใผใบใงไฝฟ็จใ`,
|
|
225
|
-
inputSchema: {
|
|
226
|
-
type: 'object',
|
|
227
|
-
properties: {
|
|
228
|
-
url: {
|
|
229
|
-
oneOf: [
|
|
230
|
-
{ type: 'string', description: 'ๅไธใฎURL' },
|
|
231
|
-
{
|
|
232
|
-
type: 'array',
|
|
233
|
-
items: { type: 'string' },
|
|
234
|
-
description: 'URLใฎใชในใ๏ผใใใ่จชๅ๏ผ',
|
|
235
|
-
},
|
|
236
|
-
],
|
|
237
|
-
description: '่จชๅใใURL๏ผๆๅญๅใพใใฏๆๅญๅ้
ๅ๏ผ',
|
|
238
|
-
},
|
|
239
|
-
goal: {
|
|
240
|
-
type: 'string',
|
|
241
|
-
description: 'ใใฎใใผใธ่จชๅใฎ็ฎ็๏ผๆฝๅบใใๆ
ๅ ฑใฎๆ้๏ผ',
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
required: ['url'],
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
name: 'parse_file',
|
|
249
|
-
description: `ใญใผใซใซใใกใคใซใ่งฃๆใใฆใใญในใใๆฝๅบใ
|
|
250
|
-
ๅฏพๅฟๅฝขๅผ: ใใญในใ(txt,md,json,yaml,csv)ใใณใผใ(ts,js,py็ญ)ใ
|
|
251
|
-
ใใญใฅใกใณใ่ชฟๆปใใณใผใ่งฃๆใซไฝฟ็จใ`,
|
|
252
|
-
inputSchema: {
|
|
253
|
-
type: 'object',
|
|
254
|
-
properties: {
|
|
255
|
-
path: {
|
|
256
|
-
oneOf: [
|
|
257
|
-
{ type: 'string', description: 'ๅไธใฎใใกใคใซใใน' },
|
|
258
|
-
{
|
|
259
|
-
type: 'array',
|
|
260
|
-
items: { type: 'string' },
|
|
261
|
-
description: 'ใใกใคใซใในใฎใชในใ๏ผใใใ่งฃๆ๏ผ',
|
|
262
|
-
},
|
|
263
|
-
],
|
|
264
|
-
description: '่งฃๆใใใใกใคใซใใน๏ผๆๅญๅใพใใฏๆๅญๅ้
ๅ๏ผ',
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
required: ['path'],
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
name: 'parse_directory',
|
|
272
|
-
description: `ใใฃใฌใฏใใชๅ
ใฎใใกใคใซใๅๅธฐ็ใซ่งฃๆใ
|
|
273
|
-
ใณใผใใใผในๅ
จไฝใฎ็่งฃใใใใญใธใงใฏใๆง้ ใฎๆๆกใซไฝฟ็จใ
|
|
274
|
-
node_modules, .git็ญใฏ่ชๅ้คๅคใ`,
|
|
275
|
-
inputSchema: {
|
|
276
|
-
type: 'object',
|
|
277
|
-
properties: {
|
|
278
|
-
path: {
|
|
279
|
-
type: 'string',
|
|
280
|
-
description: '่งฃๆใใใใฃใฌใฏใใชใใน',
|
|
281
|
-
},
|
|
282
|
-
extensions: {
|
|
283
|
-
type: 'array',
|
|
284
|
-
items: { type: 'string' },
|
|
285
|
-
description: '่งฃๆใใๆกๅผตๅญใชในใ๏ผไพ: [".ts", ".js"]๏ผ',
|
|
286
|
-
},
|
|
287
|
-
exclude: {
|
|
288
|
-
type: 'array',
|
|
289
|
-
items: { type: 'string' },
|
|
290
|
-
description: '้คๅคใใฟใผใณ๏ผใใใฉใซใ: node_modules, .git, dist, build๏ผ',
|
|
291
|
-
},
|
|
292
|
-
maxFiles: {
|
|
293
|
-
type: 'number',
|
|
294
|
-
default: 100,
|
|
295
|
-
description: 'ๆๅคงใใกใคใซๆฐ๏ผใใใฉใซใ: 100๏ผ',
|
|
296
|
-
},
|
|
297
|
-
},
|
|
298
|
-
required: ['path'],
|
|
299
|
-
},
|
|
300
|
-
},
|
|
188
|
+
// Search & Visit Tools โ REMOVED in v2.0.0
|
|
189
|
+
// search: Copilot CLI web_search ใซๅง่ญฒ
|
|
190
|
+
// visit: Copilot CLI web_fetch ใซๅง่ญฒ
|
|
191
|
+
// parse_file: Copilot CLI view ใซๅง่ญฒ
|
|
192
|
+
// parse_directory: Copilot CLI glob + view ใซๅง่ญฒ
|
|
301
193
|
{
|
|
302
194
|
name: 'embed',
|
|
303
195
|
description: `ใใญในใใฎๅใ่พผใฟใใฏใใซใ็ๆ๏ผOllama/OpenAIไฝฟ็จ๏ผใ
|
|
@@ -624,87 +516,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request: CallToolRequest)
|
|
|
624
516
|
};
|
|
625
517
|
}
|
|
626
518
|
|
|
627
|
-
//
|
|
628
|
-
|
|
629
|
-
const queryInput = args?.query as string | string[];
|
|
630
|
-
const maxResults = (args?.maxResults as number) ?? 10;
|
|
631
|
-
|
|
632
|
-
const queries = Array.isArray(queryInput) ? queryInput : [queryInput];
|
|
633
|
-
const results: Record<string, SearchResult[]> = {};
|
|
634
|
-
|
|
635
|
-
for (const query of queries) {
|
|
636
|
-
results[query] = await searchDuckDuckGo(query, maxResults);
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
return {
|
|
640
|
-
content: [
|
|
641
|
-
{
|
|
642
|
-
type: 'text',
|
|
643
|
-
text: JSON.stringify(results, null, 2),
|
|
644
|
-
},
|
|
645
|
-
],
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
case 'visit': {
|
|
650
|
-
const urlInput = args?.url as string | string[];
|
|
651
|
-
const goal = (args?.goal as string) ?? '';
|
|
652
|
-
|
|
653
|
-
const urls = Array.isArray(urlInput) ? urlInput : [urlInput];
|
|
654
|
-
const results: PageContent[] = [];
|
|
655
|
-
|
|
656
|
-
for (const url of urls) {
|
|
657
|
-
const content = await visitPage(url, goal);
|
|
658
|
-
results.push(content);
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
return {
|
|
662
|
-
content: [
|
|
663
|
-
{
|
|
664
|
-
type: 'text',
|
|
665
|
-
text: JSON.stringify(results, null, 2),
|
|
666
|
-
},
|
|
667
|
-
],
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
case 'parse_file': {
|
|
672
|
-
const pathInput = args?.path as string | string[];
|
|
673
|
-
|
|
674
|
-
const paths = Array.isArray(pathInput) ? pathInput : [pathInput];
|
|
675
|
-
const results: ParsedFile[] = await parseFiles(paths);
|
|
676
|
-
|
|
677
|
-
return {
|
|
678
|
-
content: [
|
|
679
|
-
{
|
|
680
|
-
type: 'text',
|
|
681
|
-
text: JSON.stringify(results, null, 2),
|
|
682
|
-
},
|
|
683
|
-
],
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
case 'parse_directory': {
|
|
688
|
-
const dirPath = args?.path as string;
|
|
689
|
-
const extensions = args?.extensions as string[] | undefined;
|
|
690
|
-
const exclude = args?.exclude as string[] | undefined;
|
|
691
|
-
const maxFiles = (args?.maxFiles as number) ?? 100;
|
|
692
|
-
|
|
693
|
-
const results: ParsedFile[] = await parseDirectory(dirPath, {
|
|
694
|
-
extensions,
|
|
695
|
-
exclude,
|
|
696
|
-
maxFiles,
|
|
697
|
-
});
|
|
698
|
-
|
|
699
|
-
return {
|
|
700
|
-
content: [
|
|
701
|
-
{
|
|
702
|
-
type: 'text',
|
|
703
|
-
text: JSON.stringify(results, null, 2),
|
|
704
|
-
},
|
|
705
|
-
],
|
|
706
|
-
};
|
|
707
|
-
}
|
|
519
|
+
// search, visit, parse_file, parse_directory โ REMOVED in v2.0.0
|
|
520
|
+
// Copilot CLI ใฎ web_search, web_fetch, view, glob ใซๅง่ญฒ
|
|
708
521
|
|
|
709
522
|
case 'embed': {
|
|
710
523
|
const textInput = args?.text as string | string[];
|
package/package.json
CHANGED
package/scripts/cli.js
CHANGED
|
@@ -32,6 +32,7 @@ Usage: npx shikigami [command] [options]
|
|
|
32
32
|
Commands:
|
|
33
33
|
init Initialize SHIKIGAMI files in current directory
|
|
34
34
|
upgrade, update Upgrade SHIKIGAMI files (same as init --force) (v1.23.0)
|
|
35
|
+
cowork [options] Set up Microsoft Copilot Cowork MCP (v2.0.0)
|
|
35
36
|
new [name] Create a new research project
|
|
36
37
|
find-related [keyword] Find related projects by keywords (v1.7.0)
|
|
37
38
|
inherit [options] Prepare knowledge inheritance from past reports (v1.8.0)
|
|
@@ -41,6 +42,8 @@ Commands:
|
|
|
41
42
|
Examples:
|
|
42
43
|
npx shikigami init # Initialize SHIKIGAMI
|
|
43
44
|
npx shikigami upgrade # Upgrade to latest version
|
|
45
|
+
npx shikigami cowork # Set up Copilot Cowork MCP (v2.0.0)
|
|
46
|
+
npx shikigami cowork --status # Check Cowork installation status
|
|
44
47
|
npx shikigami new my-research # Create new project "my-research"
|
|
45
48
|
npx shikigami new # Create new project with auto-numbered name
|
|
46
49
|
npx shikigami find-related ใฌใขใขใผใน # Find projects related to "ใฌใขใขใผใน"
|
|
@@ -68,6 +71,13 @@ if (command === 'upgrade' || command === 'update') {
|
|
|
68
71
|
process.exit(0);
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
// Cowork command (v2.0.0)
|
|
75
|
+
if (command === 'cowork') {
|
|
76
|
+
const { setup } = require('./setup-cowork.js');
|
|
77
|
+
setup();
|
|
78
|
+
process.exit(0);
|
|
79
|
+
}
|
|
80
|
+
|
|
71
81
|
// New project command
|
|
72
82
|
if (command === 'new') {
|
|
73
83
|
const projectName = args[1];
|
|
@@ -89,7 +99,7 @@ if (command === 'inherit') {
|
|
|
89
99
|
}
|
|
90
100
|
|
|
91
101
|
// Unknown command
|
|
92
|
-
if (command !== 'find-related' && command !== 'inherit' && command !== 'upgrade' && command !== 'update') {
|
|
102
|
+
if (command !== 'find-related' && command !== 'inherit' && command !== 'upgrade' && command !== 'update' && command !== 'cowork') {
|
|
93
103
|
console.error(`Unknown command: ${command}`);
|
|
94
104
|
console.log('Run "npx shikigami --help" for usage information.');
|
|
95
105
|
process.exit(1);
|
package/scripts/init.js
CHANGED
|
@@ -166,6 +166,23 @@ function init() {
|
|
|
166
166
|
console.log('');
|
|
167
167
|
console.log(`๐ Summary: ${copiedCount} copied, ${overwrittenCount} overwritten, ${skippedCount} skipped`);
|
|
168
168
|
console.log('');
|
|
169
|
+
|
|
170
|
+
// Check Cowork MCP status
|
|
171
|
+
try {
|
|
172
|
+
const { isInstalled, isMcpConfigured } = require('./setup-cowork.js');
|
|
173
|
+
if (!isInstalled() || !isMcpConfigured()) {
|
|
174
|
+
console.log('๐ค Copilot Cowork MCP (M365้ฃๆบ):');
|
|
175
|
+
console.log(' ใกใผใซใปใซใฌใณใใผใปTeamsใปOneDrive ใซCopilot CLIใใใขใฏใปในๅฏ่ฝใซ');
|
|
176
|
+
console.log(' ใปใใใขใใ: npx shikigami cowork');
|
|
177
|
+
console.log('');
|
|
178
|
+
} else {
|
|
179
|
+
console.log('๐ค Copilot Cowork MCP: โ
Configured');
|
|
180
|
+
console.log('');
|
|
181
|
+
}
|
|
182
|
+
} catch {
|
|
183
|
+
// Ignore errors from cowork check
|
|
184
|
+
}
|
|
185
|
+
|
|
169
186
|
console.log('๐ Next steps:');
|
|
170
187
|
console.log(' 1. cd mcp-server && npm install && npm run build');
|
|
171
188
|
console.log(' 2. Restart VS Code to activate Agent Skills');
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SHIKIGAMI - Copilot Cowork MCP Setup
|
|
4
|
+
* Usage: npx shikigami cowork [options]
|
|
5
|
+
*
|
|
6
|
+
* Sets up Microsoft Copilot Cowork as an MCP server for GitHub Copilot CLI.
|
|
7
|
+
* Enables access to M365 data (Mail, Calendar, Teams, Files) from Copilot CLI.
|
|
8
|
+
*
|
|
9
|
+
* v2.0.0: Initial release
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
const { execSync } = require('child_process');
|
|
15
|
+
|
|
16
|
+
const COWORK_REPO = 'https://github.com/msartem/copilot_cowork_mcp.git';
|
|
17
|
+
const COPILOT_DIR = path.join(require('os').homedir(), '.copilot');
|
|
18
|
+
const PLUGINS_DIR = path.join(COPILOT_DIR, 'installed-plugins');
|
|
19
|
+
const COWORK_DIR = path.join(PLUGINS_DIR, 'copilot_cowork_mcp');
|
|
20
|
+
const MCP_CONFIG = path.join(COPILOT_DIR, '.mcp.json');
|
|
21
|
+
|
|
22
|
+
function parseArgs() {
|
|
23
|
+
const args = process.argv.slice(2).filter(a => a !== 'cowork');
|
|
24
|
+
return {
|
|
25
|
+
uninstall: args.includes('--uninstall'),
|
|
26
|
+
status: args.includes('--status'),
|
|
27
|
+
help: args.includes('--help') || args.includes('-h'),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function showHelp() {
|
|
32
|
+
console.log(`
|
|
33
|
+
๐ค SHIKIGAMI - Copilot Cowork Setup
|
|
34
|
+
|
|
35
|
+
Usage: npx shikigami cowork [options]
|
|
36
|
+
|
|
37
|
+
Options:
|
|
38
|
+
--status Check installation status
|
|
39
|
+
--uninstall Remove Cowork MCP configuration
|
|
40
|
+
-h, --help Show this help message
|
|
41
|
+
|
|
42
|
+
What is Copilot Cowork?
|
|
43
|
+
Microsoft Copilot Cowork MCP enables GitHub Copilot CLI to access
|
|
44
|
+
your M365 data: Mail, Calendar, Teams messages, and OneDrive files.
|
|
45
|
+
|
|
46
|
+
Requirements:
|
|
47
|
+
- Python 3.10+
|
|
48
|
+
- Microsoft 365 account
|
|
49
|
+
- First run requires browser sign-in (Edge/Chromium)
|
|
50
|
+
|
|
51
|
+
After setup:
|
|
52
|
+
1. Restart Copilot CLI (or start a new session)
|
|
53
|
+
2. First use will open a browser for M365 authentication
|
|
54
|
+
3. After sign-in, tokens are cached for ~90 days
|
|
55
|
+
`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function checkPython() {
|
|
59
|
+
try {
|
|
60
|
+
const version = execSync('python3 --version 2>&1', { encoding: 'utf-8' }).trim();
|
|
61
|
+
const match = version.match(/Python (\d+)\.(\d+)/);
|
|
62
|
+
if (match && (parseInt(match[1]) > 3 || (parseInt(match[1]) === 3 && parseInt(match[2]) >= 10))) {
|
|
63
|
+
return { ok: true, version };
|
|
64
|
+
}
|
|
65
|
+
return { ok: false, version, error: 'Python 3.10+ required' };
|
|
66
|
+
} catch {
|
|
67
|
+
return { ok: false, version: null, error: 'Python 3 not found' };
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function checkGit() {
|
|
72
|
+
try {
|
|
73
|
+
execSync('git --version', { encoding: 'utf-8' });
|
|
74
|
+
return true;
|
|
75
|
+
} catch {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function isInstalled() {
|
|
81
|
+
return fs.existsSync(path.join(COWORK_DIR, 'server.py'));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function isMcpConfigured() {
|
|
85
|
+
if (!fs.existsSync(MCP_CONFIG)) return false;
|
|
86
|
+
try {
|
|
87
|
+
const config = JSON.parse(fs.readFileSync(MCP_CONFIG, 'utf-8'));
|
|
88
|
+
return !!(config.mcpServers && config.mcpServers.cowork);
|
|
89
|
+
} catch {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function checkDependencies() {
|
|
95
|
+
const deps = ['fastmcp', 'requests', 'playwright'];
|
|
96
|
+
const results = {};
|
|
97
|
+
for (const dep of deps) {
|
|
98
|
+
try {
|
|
99
|
+
execSync(`python3 -c "import ${dep}" 2>&1`, { encoding: 'utf-8' });
|
|
100
|
+
results[dep] = true;
|
|
101
|
+
} catch {
|
|
102
|
+
results[dep] = false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return results;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function showStatus() {
|
|
109
|
+
console.log('');
|
|
110
|
+
console.log('๐ค Copilot Cowork MCP Status');
|
|
111
|
+
console.log('โโโโโโโโโโโโโโโโโโโโโโโโโโโโ');
|
|
112
|
+
console.log('');
|
|
113
|
+
|
|
114
|
+
const python = checkPython();
|
|
115
|
+
console.log(` Python: ${python.ok ? `โ
${python.version}` : `โ ${python.error}`}`);
|
|
116
|
+
|
|
117
|
+
const installed = isInstalled();
|
|
118
|
+
console.log(` Plugin: ${installed ? 'โ
Installed' : 'โ Not installed'}`);
|
|
119
|
+
|
|
120
|
+
if (installed) {
|
|
121
|
+
const deps = checkDependencies();
|
|
122
|
+
for (const [dep, ok] of Object.entries(deps)) {
|
|
123
|
+
console.log(` ${dep.padEnd(14)} ${ok ? 'โ
' : 'โ Missing'}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const configured = isMcpConfigured();
|
|
128
|
+
console.log(` MCP Config: ${configured ? 'โ
Configured' : 'โ Not configured'}`);
|
|
129
|
+
console.log(` Config Path: ${MCP_CONFIG}`);
|
|
130
|
+
console.log('');
|
|
131
|
+
|
|
132
|
+
if (installed && configured) {
|
|
133
|
+
console.log(' โจ Ready to use! Restart Copilot CLI to activate.');
|
|
134
|
+
} else {
|
|
135
|
+
console.log(' Run "npx shikigami cowork" to set up.');
|
|
136
|
+
}
|
|
137
|
+
console.log('');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function installDependencies() {
|
|
141
|
+
const deps = checkDependencies();
|
|
142
|
+
const missing = Object.entries(deps).filter(([, ok]) => !ok).map(([dep]) => dep);
|
|
143
|
+
|
|
144
|
+
if (missing.length === 0) {
|
|
145
|
+
console.log(' โ
All Python dependencies already installed');
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
console.log(` ๐ฆ Installing: ${missing.join(', ')}...`);
|
|
150
|
+
try {
|
|
151
|
+
// Try with --break-system-packages first (Ubuntu/Debian), fallback to without
|
|
152
|
+
try {
|
|
153
|
+
execSync(`pip install --break-system-packages ${missing.join(' ')} 2>&1`, {
|
|
154
|
+
encoding: 'utf-8',
|
|
155
|
+
stdio: 'pipe',
|
|
156
|
+
});
|
|
157
|
+
} catch {
|
|
158
|
+
execSync(`pip install ${missing.join(' ')} 2>&1`, {
|
|
159
|
+
encoding: 'utf-8',
|
|
160
|
+
stdio: 'pipe',
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Install Playwright browser if playwright was just installed
|
|
165
|
+
if (missing.includes('playwright')) {
|
|
166
|
+
console.log(' ๐ Installing Playwright browser (chromium)...');
|
|
167
|
+
execSync('python3 -m playwright install chromium 2>&1', {
|
|
168
|
+
encoding: 'utf-8',
|
|
169
|
+
stdio: 'pipe',
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
console.log(' โ
Dependencies installed');
|
|
174
|
+
return true;
|
|
175
|
+
} catch (err) {
|
|
176
|
+
console.error(` โ Failed to install dependencies: ${err.message}`);
|
|
177
|
+
console.log(' ๐ก Try manually: pip install fastmcp requests playwright');
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function clonePlugin() {
|
|
183
|
+
if (isInstalled()) {
|
|
184
|
+
console.log(' โ
Plugin already installed');
|
|
185
|
+
// Pull latest
|
|
186
|
+
try {
|
|
187
|
+
execSync(`git -C "${COWORK_DIR}" pull --quiet 2>&1`, {
|
|
188
|
+
encoding: 'utf-8',
|
|
189
|
+
stdio: 'pipe',
|
|
190
|
+
});
|
|
191
|
+
console.log(' ๐ Updated to latest version');
|
|
192
|
+
} catch {
|
|
193
|
+
// Ignore pull errors
|
|
194
|
+
}
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
console.log(' ๐ฅ Cloning Copilot Cowork MCP...');
|
|
199
|
+
try {
|
|
200
|
+
fs.mkdirSync(PLUGINS_DIR, { recursive: true });
|
|
201
|
+
execSync(`git clone "${COWORK_REPO}" "${COWORK_DIR}" 2>&1`, {
|
|
202
|
+
encoding: 'utf-8',
|
|
203
|
+
stdio: 'pipe',
|
|
204
|
+
});
|
|
205
|
+
console.log(' โ
Plugin cloned');
|
|
206
|
+
return true;
|
|
207
|
+
} catch (err) {
|
|
208
|
+
console.error(` โ Failed to clone: ${err.message}`);
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function configureMcp() {
|
|
214
|
+
if (isMcpConfigured()) {
|
|
215
|
+
console.log(' โ
MCP already configured');
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
console.log(' โ๏ธ Configuring MCP server...');
|
|
220
|
+
try {
|
|
221
|
+
fs.mkdirSync(COPILOT_DIR, { recursive: true });
|
|
222
|
+
|
|
223
|
+
let config = { mcpServers: {} };
|
|
224
|
+
if (fs.existsSync(MCP_CONFIG)) {
|
|
225
|
+
try {
|
|
226
|
+
config = JSON.parse(fs.readFileSync(MCP_CONFIG, 'utf-8'));
|
|
227
|
+
if (!config.mcpServers) config.mcpServers = {};
|
|
228
|
+
} catch {
|
|
229
|
+
// Corrupted config, start fresh but keep backup
|
|
230
|
+
const backup = `${MCP_CONFIG}.bak`;
|
|
231
|
+
fs.copyFileSync(MCP_CONFIG, backup);
|
|
232
|
+
console.log(` โ ๏ธ Backed up corrupted config to ${backup}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
config.mcpServers.cowork = {
|
|
237
|
+
type: 'stdio',
|
|
238
|
+
command: 'python3',
|
|
239
|
+
args: [path.join(COWORK_DIR, 'server.py')],
|
|
240
|
+
env: {
|
|
241
|
+
COWORK_SHOW_THINKING: 'false',
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
fs.writeFileSync(MCP_CONFIG, JSON.stringify(config, null, 2) + '\n');
|
|
246
|
+
console.log(' โ
MCP configured');
|
|
247
|
+
return true;
|
|
248
|
+
} catch (err) {
|
|
249
|
+
console.error(` โ Failed to configure MCP: ${err.message}`);
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function uninstall() {
|
|
255
|
+
console.log('');
|
|
256
|
+
console.log('๐ค Uninstalling Copilot Cowork MCP...');
|
|
257
|
+
console.log('');
|
|
258
|
+
|
|
259
|
+
// Remove from MCP config
|
|
260
|
+
if (fs.existsSync(MCP_CONFIG)) {
|
|
261
|
+
try {
|
|
262
|
+
const config = JSON.parse(fs.readFileSync(MCP_CONFIG, 'utf-8'));
|
|
263
|
+
if (config.mcpServers && config.mcpServers.cowork) {
|
|
264
|
+
delete config.mcpServers.cowork;
|
|
265
|
+
fs.writeFileSync(MCP_CONFIG, JSON.stringify(config, null, 2) + '\n');
|
|
266
|
+
console.log(' โ
Removed from MCP config');
|
|
267
|
+
} else {
|
|
268
|
+
console.log(' โญ๏ธ Not in MCP config');
|
|
269
|
+
}
|
|
270
|
+
} catch {
|
|
271
|
+
console.log(' โ ๏ธ Could not parse MCP config');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Remove plugin directory
|
|
276
|
+
if (fs.existsSync(COWORK_DIR)) {
|
|
277
|
+
fs.rmSync(COWORK_DIR, { recursive: true, force: true });
|
|
278
|
+
console.log(' โ
Removed plugin files');
|
|
279
|
+
} else {
|
|
280
|
+
console.log(' โญ๏ธ Plugin not installed');
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
console.log('');
|
|
284
|
+
console.log(' โจ Uninstall complete. Restart Copilot CLI to apply.');
|
|
285
|
+
console.log('');
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function setup() {
|
|
289
|
+
const { uninstall: doUninstall, status, help } = parseArgs();
|
|
290
|
+
|
|
291
|
+
if (help) {
|
|
292
|
+
showHelp();
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (status) {
|
|
297
|
+
showStatus();
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (doUninstall) {
|
|
302
|
+
uninstall();
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
console.log('');
|
|
307
|
+
console.log('๐ค Setting up Copilot Cowork MCP');
|
|
308
|
+
console.log('โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ');
|
|
309
|
+
console.log('');
|
|
310
|
+
|
|
311
|
+
// Step 1: Check prerequisites
|
|
312
|
+
console.log('Step 1/4: Checking prerequisites...');
|
|
313
|
+
const python = checkPython();
|
|
314
|
+
if (!python.ok) {
|
|
315
|
+
console.error(` โ ${python.error}`);
|
|
316
|
+
console.log(' ๐ก Install Python 3.10+: https://www.python.org/downloads/');
|
|
317
|
+
process.exit(1);
|
|
318
|
+
}
|
|
319
|
+
console.log(` โ
${python.version}`);
|
|
320
|
+
|
|
321
|
+
if (!checkGit()) {
|
|
322
|
+
console.error(' โ Git not found');
|
|
323
|
+
process.exit(1);
|
|
324
|
+
}
|
|
325
|
+
console.log(' โ
Git available');
|
|
326
|
+
console.log('');
|
|
327
|
+
|
|
328
|
+
// Step 2: Clone plugin
|
|
329
|
+
console.log('Step 2/4: Installing plugin...');
|
|
330
|
+
if (!clonePlugin()) process.exit(1);
|
|
331
|
+
console.log('');
|
|
332
|
+
|
|
333
|
+
// Step 3: Install dependencies
|
|
334
|
+
console.log('Step 3/4: Installing dependencies...');
|
|
335
|
+
if (!installDependencies()) process.exit(1);
|
|
336
|
+
console.log('');
|
|
337
|
+
|
|
338
|
+
// Step 4: Configure MCP
|
|
339
|
+
console.log('Step 4/4: Configuring MCP...');
|
|
340
|
+
if (!configureMcp()) process.exit(1);
|
|
341
|
+
console.log('');
|
|
342
|
+
|
|
343
|
+
// Done
|
|
344
|
+
console.log('โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ');
|
|
345
|
+
console.log('โจ Copilot Cowork MCP setup complete!');
|
|
346
|
+
console.log('');
|
|
347
|
+
console.log('๐ Next steps:');
|
|
348
|
+
console.log(' 1. Restart Copilot CLI (or start a new session)');
|
|
349
|
+
console.log(' 2. First use will open a browser for M365 sign-in');
|
|
350
|
+
console.log(' 3. After sign-in, tokens are cached for ~90 days');
|
|
351
|
+
console.log('');
|
|
352
|
+
console.log('๐ก Usage examples:');
|
|
353
|
+
console.log(' "ใกใผใซใฎๆช่ชญใ่ฆ็ดใใฆ"');
|
|
354
|
+
console.log(' "ๆๆฅใฎไผ่ญฐใฏ๏ผ"');
|
|
355
|
+
console.log(' "Teamsใง่ชๅใซhelloใจใกใใปใผใธ้ใฃใฆ"');
|
|
356
|
+
console.log('');
|
|
357
|
+
console.log('๐ง Commands:');
|
|
358
|
+
console.log(' npx shikigami cowork --status # Check status');
|
|
359
|
+
console.log(' npx shikigami cowork --uninstall # Remove');
|
|
360
|
+
console.log('');
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
module.exports = { setup, showStatus, isInstalled, isMcpConfigured };
|
|
364
|
+
|
|
365
|
+
if (require.main === module) {
|
|
366
|
+
setup();
|
|
367
|
+
}
|