@miraigent/ai-ops-templates 0.1.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.
@@ -0,0 +1,31 @@
1
+ # License Scope
2
+
3
+ This repository is not licensed under one repository-wide license.
4
+
5
+ The open source scope is intentionally limited to the public free resources and
6
+ starter MCP code listed below.
7
+
8
+ ## MIT-Licensed Paths
9
+
10
+ The MIT License applies only to files under these paths:
11
+
12
+ - free/
13
+ - mcp/
14
+
15
+ The full MIT License text is available in:
16
+
17
+ - free/LICENSE
18
+ - mcp/LICENSE
19
+
20
+ ## Not MIT-Licensed
21
+
22
+ The paid/ directory is not MIT-licensed.
23
+
24
+ It is included only as a public index for paid product names, sample previews,
25
+ sales-page links, and update notes. Full paid product files, private client
26
+ materials, internal operating manuals, credentials, unpublished product
27
+ specifications, the MIRAI Memory engine, and working memory MCPs must not be
28
+ committed to this public repository.
29
+
30
+ If paid product files are published later, they should be stored in a separate
31
+ private repository or shipped through the intended paid distribution channel.
package/NAMING.md ADDED
@@ -0,0 +1,90 @@
1
+ # Naming Rules
2
+
3
+ These rules are the source of truth for naming files, folders, products, and public URLs in this repository.
4
+
5
+ ## Core Rule
6
+
7
+ Use English, lowercase, and hyphen-separated names for GitHub paths.
8
+
9
+ Good:
10
+
11
+ - `mcp-starter-kit`
12
+ - `ai-readiness-checklist`
13
+ - `agent-memories-starter-kit`
14
+
15
+ Avoid:
16
+
17
+ - `MCPStarterKit`
18
+ - `mcp_starter_kit`
19
+ - `MCPテンプレ集`
20
+ - `new-template-final-v2`
21
+
22
+ ## Folder Names
23
+
24
+ Folder names must use:
25
+
26
+ - lowercase English
27
+ - hyphens between words
28
+ - no spaces
29
+ - no Japanese characters
30
+ - no version words such as `final`, `latest`, or `new`
31
+
32
+ Examples:
33
+
34
+ - `free/mcp-starter-kit/`
35
+ - `free/ai-readiness-checklist/`
36
+ - `agent-memories/basic-memory-log-template/`
37
+ - `paid/ai-ops-template-bundle/`
38
+ - `ja/booth-products/`
39
+
40
+ ## Product Names
41
+
42
+ Use the English product name as the canonical name.
43
+
44
+ Japanese names can be used as localized descriptions.
45
+
46
+ Example:
47
+
48
+ - Canonical: `Agent Memories Starter Kit`
49
+ - Japanese description: `Agent Memories 導入スターターキット`
50
+
51
+ ## File Names
52
+
53
+ Use lowercase English and hyphens.
54
+
55
+ Examples:
56
+
57
+ - `README.md`
58
+ - `template.md`
59
+ - `checklist.md`
60
+ - `workflow.md`
61
+ - `example-output.md`
62
+
63
+ When a date is required, use `YYYY-MM-DD`.
64
+
65
+ Example:
66
+
67
+ - `release-plan-2026-05-31.md`
68
+
69
+ ## Language Policy
70
+
71
+ GitHub paths use English.
72
+
73
+ Documents can include both English and Japanese. For global-facing pages, write English first and add a Japanese section below it.
74
+
75
+ For domestic-only materials, Japanese can be the main language, but file and folder names still stay in English.
76
+
77
+ ## URL Stability
78
+
79
+ Do not rename public folders after they are linked from:
80
+
81
+ - X
82
+ - note
83
+ - BOOTH
84
+ - Zenn
85
+ - Qiita
86
+ - GitHub README
87
+ - paid sales pages
88
+
89
+ If a folder name must change, keep a redirect note in the old folder instead of deleting it immediately.
90
+
package/README.md ADDED
@@ -0,0 +1,213 @@
1
+ # Miraigent AI Ops Templates
2
+
3
+ [![check](https://github.com/Miraigent/miraigent-ai-ops-templates/actions/workflows/check.yml/badge.svg)](https://github.com/Miraigent/miraigent-ai-ops-templates/actions/workflows/check.yml)
4
+
5
+ Open AI operations templates and starter MCP tooling for teams that want to use AI with practical human review.
6
+
7
+ Keywords: MCP, AI operations templates, agent tools, prompt safety review, human review gate, AI support process, AI-safe CRM notes, customer data anonymization, FAQ candidate review.
8
+
9
+ This repository is the public home for Miraigent's free AI operations resources and open MCP starter tools.
10
+
11
+ It is designed for teams that want to use AI for customer support, CRM notes, FAQ creation, workflow documentation, or internal operations while keeping human review, privacy, and decision logs visible.
12
+
13
+ ## Open Source Scope
14
+
15
+ This repository is not under one repository-wide MIT license. The open source
16
+ scope is limited by LICENSE-SCOPE.md.
17
+
18
+ MIT-licensed paths:
19
+
20
+ - public AI operations templates
21
+ - a dependency-free MCP server for template discovery
22
+ - starter MCP tools for human-reviewed AI operations
23
+
24
+ The paid/ directory is not MIT-licensed. It is a public index for paid product
25
+ names, sample previews, sales-page links, and update notes only.
26
+
27
+ The MIT license does not grant rights to full paid product files, private client
28
+ materials, the MIRAI Memory engine, or working memory MCPs.
29
+
30
+ This repository does not include private customer records, credentials,
31
+ company-specific internal manuals, or unpublished product specifications.
32
+
33
+ ## Public Boundary
34
+
35
+ MIRAI Memory is the private memory engine. This repository does not open-source
36
+ the MIRAI Memory engine itself.
37
+
38
+ Memory MCP servers that would make MIRAI Memory usable as a working memory
39
+ engine are also private and must not be published here.
40
+
41
+ The public layer is limited to tools and resources that can sit around that
42
+ engine:
43
+
44
+ - free AI operations templates
45
+ - the starter MCP server in mcp/
46
+ - non-memory skill resources
47
+ - non-memory AI operations helper MCP tools
48
+ - public Agent Memories guidance
49
+
50
+ In short: this repository opens free support tools, not the MIRAI Memory engine
51
+ and not a working memory MCP.
52
+
53
+ ## Naming Layers
54
+
55
+ Miraigent uses these public names consistently:
56
+
57
+ - Service: Agent Memories
58
+ - Private engine / memory concept: MIRAI Memory
59
+ - Public repository: Miraigent AI Ops Templates
60
+
61
+ In Japanese materials:
62
+
63
+ - サービス名: エージェントメモリーズ
64
+ - 非公開エンジン名 / 記憶コンセプト: MIRAI Memory
65
+ - 公開repo名: Miraigent AI Ops Templates
66
+
67
+ ## MCP Starter Server
68
+
69
+ Run the starter Model Context Protocol server:
70
+
71
+ ```bash
72
+ npm run mcp
73
+ ```
74
+
75
+ Run the smoke test:
76
+
77
+ ```bash
78
+ npm test
79
+ ```
80
+
81
+ Run all repository checks:
82
+
83
+ ```bash
84
+ npm run check
85
+ ```
86
+
87
+ Server path:
88
+
89
+ ```text
90
+ mcp/ai-ops-template-server/
91
+ ```
92
+
93
+ The server exposes tools for listing the public template catalog, fetching one template, building a short AI operations review checklist, and recommending a practical template sequence.
94
+
95
+ This repository currently publishes a starter MCP server. It does not claim to provide a full orchestration or automation engine.
96
+
97
+ After npm publication, the intended command will be npx @miraigent/ai-ops-templates.
98
+ Because this is a scoped public npm package, publication uses npm publish --access public.
99
+
100
+ ## Maintenance
101
+
102
+ This repository includes:
103
+
104
+ - CHANGELOG.md for public release notes
105
+ - CONTRIBUTING.md for contribution rules and public-boundary checks
106
+ - issue and pull request templates
107
+ - GitHub Actions for syntax checks, repository boundary checks, and MCP smoke tests
108
+ - a Codex-ready workflow that is prepared for future Miraigent-owned Codex credentials but does not claim active Codex usage before those credentials are configured
109
+
110
+ ## Free Template Library
111
+
112
+ Download the current free template set:
113
+
114
+ https://miraigent.com/en/free-ai-operations-templates.html
115
+
116
+ The set includes 10 free resources:
117
+
118
+ 1. Before You Send It to AI Checklist
119
+ 2. FAQ Candidate Review Checklist
120
+ 3. AI Prompt Risk Review Sheet
121
+ 4. Human Review Gate for AI Drafts
122
+ 5. AI-Safe CRM Notes Template
123
+ 6. Pre-AI Intake Form Questions
124
+ 7. Do Not Send to AI List Template
125
+ 8. AI Output Review Checklist
126
+ 9. Customer Data Anonymization Mini Guide
127
+ 10. AI Support Workflow Starter Map
128
+
129
+ ## What This Repository Covers
130
+
131
+ - AI operations checklists
132
+ - prompt safety review
133
+ - human review gate design
134
+ - CRM and FAQ workflow templates
135
+ - customer data anonymization patterns
136
+ - public starter templates
137
+ - workflow documentation patterns
138
+
139
+ ## Why This Exists
140
+
141
+ Most AI adoption problems are not solved by adding another prompt.
142
+
143
+ Teams also need to decide:
144
+
145
+ - what AI may receive
146
+ - what must be masked or rewritten
147
+ - what humans must review
148
+ - what should never be sent to AI as raw text
149
+ - what should be logged after AI output is used
150
+
151
+ Miraigent templates are built around that operating layer.
152
+
153
+ ## Repository Structure
154
+
155
+ - free/ - free templates, starter kits, and public links
156
+ - mcp/ - runnable MCP servers and examples
157
+ - agent-memories/ - lightweight public introduction to reusable AI operating notes
158
+ - paid/ - paid product indexes and sample previews
159
+ - ja/ - Japanese guidance for domestic buyers
160
+ - LICENSE-SCOPE.md - license scope and paid-directory boundary
161
+ - NAMING.md - naming rules for files, folders, products, and URLs
162
+
163
+ ## Start Here
164
+
165
+ 1. Browse the free template library:
166
+ https://miraigent.com/en/free-ai-operations-templates.html
167
+ 2. Run the starter MCP server with `npm run mcp`.
168
+ 3. Read free/ for the public resource map.
169
+ 4. Use agent-memories/ for a lightweight overview of reusable AI operating notes.
170
+ 5. Check paid/ for paid kit previews.
171
+
172
+ ## Agent Memories
173
+
174
+ Agent Memories is a public-facing concept for turning repeated AI operating lessons into reusable notes and templates.
175
+
176
+ Examples:
177
+
178
+ - repeated review points
179
+ - safe handling notes
180
+ - writing preferences
181
+ - FAQ candidate rules
182
+ - prompt safety checklists
183
+ - customer data anonymization examples
184
+
185
+ This repository only contains public-facing resources and tool-layer examples. The MIRAI Memory engine itself and working memory MCPs are private and are not included here. Private company context, internal operating manuals, credentials, customer records, and deep product specifications should not be stored here.
186
+
187
+ Public introduction page:
188
+
189
+ https://miraigent.com/en/mirai-memory-mcp.html
190
+
191
+ ## Roadmap
192
+
193
+ - Add MCP tools for safe prompt review, FAQ candidate review, and AI-safe CRM notes.
194
+ - Publish more template metadata as machine-readable JSON.
195
+ - Add practical examples that show how human-review gates connect to AI agents.
196
+ - Keep free resources open while reserving private customer-specific implementation details for private workspaces.
197
+
198
+ ## Japanese
199
+
200
+ このリポジトリは、MiraigentのAI運用テンプレートと公開向けスターターリソースを置く場所です。
201
+
202
+ 国内向けには、まず「AI導入前に何を整えるべきか」をわかりやすく整理します。noteでは考え方や導入前チェックを発信し、BOOTHでは日本語テンプレート、チェックリスト、ワークシートを販売する想定です。
203
+
204
+ 公開repoには、無料テンプレートと軽い紹介だけを置きます。深い商品仕様、内部運用、顧客情報、非公開の判断基準は置きません。
205
+
206
+ ## Links
207
+
208
+ - Free templates: https://miraigent.com/en/free-ai-operations-templates.html
209
+ - MIRAI Memory public introduction: https://miraigent.com/en/mirai-memory-mcp.html
210
+ - Free diagnosis: https://miraigent.com/en/diagnosis.html
211
+ - Website: https://miraigent.com/
212
+ - note: https://note.com/miraigent
213
+ - X: https://x.com/miraigent
@@ -0,0 +1,97 @@
1
+ # Agent Memories
2
+
3
+ Agent Memories is a public-facing concept for turning repeated AI operating lessons into reusable notes and templates.
4
+
5
+ This public repository only explains the lightweight idea and publishes tool-layer resources. It does not contain the MIRAI Memory engine, working memory MCPs, private company memory, internal product specifications, customer records, credentials, or implementation details.
6
+
7
+ ## Naming
8
+
9
+ - Service: Agent Memories
10
+ - Private engine / memory concept: MIRAI Memory
11
+ - Public tool layer: non-memory skills, templates, and AI operations helper MCP tools
12
+
13
+ Japanese:
14
+
15
+ - サービス名: エージェントメモリーズ
16
+ - 非公開エンジン名 / 記憶コンセプト: MIRAI Memory
17
+ - 公開道具レイヤー: 非記憶系skill、テンプレート、AI運用補助MCPツール
18
+
19
+ ## Public Boundary
20
+
21
+ MIRAI Memory is the private engine behind the service concept. It is not
22
+ open-sourced in this repository.
23
+
24
+ Working memory MCP servers are also private and must not be published here.
25
+
26
+ Public resources in this repository are limited to the surrounding support-tool
27
+ layer:
28
+
29
+ - free AI operations templates
30
+ - public Agent Memories guidance
31
+ - starter MCP tools
32
+ - non-memory skills and helper tools
33
+
34
+ ## Core Idea
35
+
36
+ AI tools become more useful when repeated operating context is saved in a reusable form.
37
+
38
+ Examples:
39
+
40
+ - what should be checked before AI output is used
41
+ - what should not be sent to AI as raw text
42
+ - which expressions or responses were rejected before
43
+ - which review points should be reused next time
44
+ - which customer data should be anonymized
45
+ - which FAQ candidates need human review
46
+
47
+ Agent Memories turns these lessons into practical templates for safer AI operations. MIRAI Memory is the private engine and memory concept behind that service name; this repository only publishes surrounding templates and non-memory support tools.
48
+
49
+ ## Public Examples
50
+
51
+ Public Agent Memories can include:
52
+
53
+ - prompt safety checklists
54
+ - AI output review checklists
55
+ - FAQ candidate review notes
56
+ - anonymized customer data examples
57
+ - AI-safe CRM note templates
58
+ - pre-AI intake questions
59
+ - human review gate templates
60
+
61
+ ## What Should Not Be Public
62
+
63
+ Do not put the following in this public repository:
64
+
65
+ - private customer records
66
+ - company-specific operating manuals
67
+ - credentials, keys, tokens, or cookies
68
+ - internal product specifications
69
+ - unpublished strategy documents
70
+ - sensitive approval rules
71
+ - personal or confidential context
72
+
73
+ ## Current Entry Points
74
+
75
+ Free AI operations templates:
76
+
77
+ https://miraigent.com/en/free-ai-operations-templates.html
78
+
79
+ MIRAI Memory public introduction page:
80
+
81
+ https://miraigent.com/en/mirai-memory-mcp.html
82
+
83
+ Free diagnosis:
84
+
85
+ https://miraigent.com/en/diagnosis.html
86
+
87
+ Related article:
88
+
89
+ https://note.com/miraigent/n/n346475238d34
90
+
91
+ ## Japanese
92
+
93
+ Agent Memoriesは、AI運用で繰り返し使う「確認ポイント」「避けるべきこと」「安全な扱い方」を、再利用できるメモやテンプレートとして整理する考え方です。
94
+
95
+ 公開repoには、無料テンプレートと軽い紹介だけを置きます。
96
+
97
+ MIRAI Memoryのエンジン本体、記憶MCP、深い商品仕様、内部運用、顧客情報、非公開の判断基準はprivate側で管理します。
package/free/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Miraigent
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of the files under the free/ path (the "Software"), to deal in the Software
7
+ without restriction, including without limitation the rights to use, copy,
8
+ modify, merge, publish, distribute, sublicense, and/or sell copies of the
9
+ Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/free/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # Free AI Operations Templates
2
+
3
+ Miraigent publishes free templates for teams that want to use AI in customer operations without losing reviewability.
4
+
5
+ Files under free/ are MIT-licensed. See free/LICENSE and the repository root
6
+ LICENSE-SCOPE.md.
7
+
8
+ Download the current free template library:
9
+
10
+ https://miraigent.com/en/free-ai-operations-templates.html
11
+
12
+ ## Free Template Set
13
+
14
+ ### 1. Before You Send It to AI Checklist
15
+
16
+ Decide whether a prompt is safe enough to send to AI.
17
+
18
+ https://miraigent.gumroad.com/l/before-you-send-it-to-ai-checklist
19
+
20
+ ### 2. FAQ Candidate Review Checklist
21
+
22
+ Turn repeated inquiries into safer FAQ knowledge.
23
+
24
+ https://miraigent.gumroad.com/l/faq-candidate-review-checklist
25
+
26
+ ### 3. AI Prompt Risk Review Sheet
27
+
28
+ Decide what to send, mask, rewrite, or stop.
29
+
30
+ https://miraigent.gumroad.com/l/ai-prompt-risk-review-sheet
31
+
32
+ ### 4. Human Review Gate for AI Drafts
33
+
34
+ Approve, revise, escalate, or stop before sending customer replies.
35
+
36
+ https://miraigent.gumroad.com/l/human-review-gate-ai-drafts
37
+
38
+ ### 5. AI-Safe CRM Notes Template
39
+
40
+ Keep context useful while removing unnecessary private details.
41
+
42
+ https://miraigent.gumroad.com/l/ai-safe-crm-notes-template
43
+
44
+ ### 6. Pre-AI Intake Form Questions
45
+
46
+ Collect the context needed before AI starts drafting.
47
+
48
+ https://miraigent.gumroad.com/l/pre-ai-intake-form-questions
49
+
50
+ ### 7. Do Not Send to AI List Template
51
+
52
+ Define what to block, mask, rewrite, or review.
53
+
54
+ https://miraigent.gumroad.com/l/do-not-send-to-ai-list-template
55
+
56
+ ### 8. AI Output Review Checklist
57
+
58
+ Check source accuracy, privacy, tone, and risk.
59
+
60
+ https://miraigent.gumroad.com/l/ai-output-review-checklist
61
+
62
+ ### 9. Customer Data Anonymization Mini Guide
63
+
64
+ Keep the lesson, remove the identifying details.
65
+
66
+ https://miraigent.gumroad.com/l/customer-data-anonymization-mini-guide
67
+
68
+ ### 10. AI Support Workflow Starter Map
69
+
70
+ Map intake, AI drafts, human review, exceptions, and logs.
71
+
72
+ https://miraigent.gumroad.com/l/ai-support-workflow-starter-map
73
+
74
+ ## Use Order
75
+
76
+ 1. Start with prompt boundaries.
77
+ 2. Add intake questions.
78
+ 3. Add human review gates.
79
+ 4. Convert repeated reasons into FAQ and CRM notes.
80
+ 5. Map the support workflow and learning log.
81
+
82
+ ## Related
83
+
84
+ - MCP starter server: ../mcp/ai-ops-template-server/
85
+ - Free diagnosis: https://miraigent.com/en/diagnosis.html
86
+ - Miraigent website: https://miraigent.com/
@@ -0,0 +1,48 @@
1
+ # MCP Starter Kit
2
+
3
+ This starter kit points to Miraigent's first public AI operations MCP server.
4
+
5
+ The goal is to make public AI operations templates accessible to agents through
6
+ simple MCP tools, not only static Markdown documents.
7
+
8
+ ## Server
9
+
10
+ ```text
11
+ ../../mcp/ai-ops-template-server/
12
+ ```
13
+
14
+ Run from the repository root:
15
+
16
+ ```bash
17
+ npm run mcp
18
+ ```
19
+
20
+ Smoke test:
21
+
22
+ ```bash
23
+ npm test
24
+ ```
25
+
26
+ ## Available Tools
27
+
28
+ - `list_ai_ops_templates`
29
+ - `get_ai_ops_template`
30
+ - `build_ai_ops_review_checklist`
31
+
32
+ ## What This Free Kit Includes
33
+
34
+ - Basic MCP server structure
35
+ - Example template discovery tools
36
+ - Human review checklist generation
37
+ - Safe input and output boundary examples
38
+ - Notes for moving from prototype to operations
39
+
40
+ ## What It Does Not Include
41
+
42
+ - Complete paid tooling bundles
43
+ - Industry-specific private templates
44
+ - Private client operating manuals
45
+ - Credentials, keys, or internal system details
46
+
47
+ Use this as the first open implementation path for turning public AI operations
48
+ templates into agent-accessible MCP tooling.
package/ja/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # 日本語案内
2
+
3
+ このディレクトリは、国内向けの説明、note、BOOTH、販売導線を整理する場所です。
4
+
5
+ ## 国内向けの基本方針
6
+
7
+ 国内では、まず「AI導入で何を整えればいいか」を中心に展開します。
8
+
9
+ 想定テーマ:
10
+
11
+ - AI導入前チェック
12
+ - 問い合わせログ設計
13
+ - FAQ候補管理
14
+ - CRM項目整理
15
+ - AIに渡してよい情報、渡さない情報
16
+ - 人間確認フロー
17
+ - Agent Memories導入ワークシート
18
+
19
+ ## 命名3層
20
+
21
+ - サービス名: エージェントメモリーズ
22
+ - 非公開エンジン名 / 記憶コンセプト: MIRAI Memory
23
+ - 公開repo名: Miraigent AI Ops Templates
24
+
25
+ ## 公開境界
26
+
27
+ MIRAI Memory のエンジン本体は非公開です。
28
+
29
+ 記憶MCPも公開厳禁です。
30
+
31
+ この公開repoで扱うのは、無料テンプレート、非記憶系skill、スターターMCPサーバ、AI運用補助MCPツールなどの道具レイヤーです。
32
+
33
+ エンジン本体、記憶MCP、顧客固有の記憶、内部運用、非公開の判断基準、有料商品の完全版は公開repoに置きません。
34
+
35
+ ## 販売導線
36
+
37
+ - note: 考え方、導入前チェック、実務解説
38
+ - BOOTH: 日本語テンプレート、チェックリスト、ワークシート
39
+ - GitHub: 無料サンプルと海外向け入口
40
+
41
+ ## 命名ルール
42
+
43
+ 日本語本文は使用してよいですが、GitHub上のファイル名・フォルダ名は英語・小文字・ハイフン区切りで統一します。
package/mcp/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Miraigent
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of the files under the mcp/ path (the "Software"), to deal in the Software
7
+ without restriction, including without limitation the rights to use, copy,
8
+ modify, merge, publish, distribute, sublicense, and/or sell copies of the
9
+ Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,84 @@
1
+ # AI Ops Template MCP Server
2
+
3
+ This is a small, dependency-free Model Context Protocol server for Miraigent's
4
+ public AI operations templates.
5
+
6
+ Files under mcp/ are MIT-licensed. See mcp/LICENSE and the repository root
7
+ LICENSE-SCOPE.md.
8
+
9
+ It helps an MCP client discover practical resources for human-reviewed AI
10
+ operations, including prompt risk review, data anonymization, CRM notes, FAQ
11
+ review, and support process mapping.
12
+
13
+ ## Run
14
+
15
+ ```bash
16
+ npm run mcp
17
+ ```
18
+
19
+ The server communicates over stdio with JSON-RPC Content-Length framing and implements:
20
+
21
+ - `initialize`
22
+ - `tools/list`
23
+ - `tools/call`
24
+
25
+ ## Quickstart
26
+
27
+ From the repository root, run npm run mcp.
28
+
29
+ After npm publication, the intended command will be npx @miraigent/ai-ops-templates.
30
+
31
+ ## Tools
32
+
33
+ ### `list_ai_ops_templates`
34
+
35
+ Returns the public template catalog.
36
+
37
+ ### `get_ai_ops_template`
38
+
39
+ Returns details for one template.
40
+
41
+ Input:
42
+
43
+ ```json
44
+ {
45
+ "id": "human-review-gate-ai-drafts"
46
+ }
47
+ ```
48
+
49
+ ### `build_ai_ops_review_checklist`
50
+
51
+ Builds a short review checklist for an AI operations area.
52
+
53
+ Input:
54
+
55
+ ```json
56
+ {
57
+ "operation": "customer-support",
58
+ "riskLevel": "medium"
59
+ }
60
+ ```
61
+
62
+ ### `recommend_ai_ops_template_sequence`
63
+
64
+ Recommends a practical order for applying the public templates.
65
+
66
+ Input fields:
67
+
68
+ - operation: support, CRM, FAQ, content, or another operations area
69
+ - priorities: optional list such as privacy, faq, crm, intake, or review
70
+
71
+ ## Why This Exists
72
+
73
+ Many teams adopt AI before they define the operating layer around it:
74
+
75
+ - what data can be sent to AI
76
+ - what must be masked
77
+ - when a human must review output
78
+ - how repeated review lessons become reusable memory
79
+ - how customer support and CRM notes stay useful without exposing private data
80
+
81
+ This starter server turns those public patterns into MCP-accessible tools.
82
+
83
+ It is a non-memory AI operations helper. It is not the MIRAI Memory engine and
84
+ it is not a working memory MCP.
@@ -0,0 +1,349 @@
1
+ #!/usr/bin/env node
2
+
3
+ const templates = [
4
+ {
5
+ id: "before-you-send-it-to-ai-checklist",
6
+ title: "Before You Send It to AI Checklist",
7
+ useCase: "Decide whether a prompt is safe enough to send to AI.",
8
+ url: "https://miraigent.gumroad.com/l/before-you-send-it-to-ai-checklist",
9
+ reviewPoints: ["private data", "purpose fit", "human review", "logging"]
10
+ },
11
+ {
12
+ id: "faq-candidate-review-checklist",
13
+ title: "FAQ Candidate Review Checklist",
14
+ useCase: "Turn repeated inquiries into safer FAQ knowledge.",
15
+ url: "https://miraigent.gumroad.com/l/faq-candidate-review-checklist",
16
+ reviewPoints: ["repeatability", "accuracy", "exceptions", "approval owner"]
17
+ },
18
+ {
19
+ id: "ai-prompt-risk-review-sheet",
20
+ title: "AI Prompt Risk Review Sheet",
21
+ useCase: "Decide what to send, mask, rewrite, or stop.",
22
+ url: "https://miraigent.gumroad.com/l/ai-prompt-risk-review-sheet",
23
+ reviewPoints: ["risk level", "masking", "rewrite need", "stop condition"]
24
+ },
25
+ {
26
+ id: "human-review-gate-ai-drafts",
27
+ title: "Human Review Gate for AI Drafts",
28
+ useCase: "Approve, revise, escalate, or stop before sending customer replies.",
29
+ url: "https://miraigent.gumroad.com/l/human-review-gate-ai-drafts",
30
+ reviewPoints: ["approval", "revision", "escalation", "send/no-send"]
31
+ },
32
+ {
33
+ id: "ai-safe-crm-notes-template",
34
+ title: "AI-Safe CRM Notes Template",
35
+ useCase: "Keep context useful while removing unnecessary private details.",
36
+ url: "https://miraigent.gumroad.com/l/ai-safe-crm-notes-template",
37
+ reviewPoints: ["anonymization", "business context", "next action", "retention"]
38
+ },
39
+ {
40
+ id: "pre-ai-intake-form-questions",
41
+ title: "Pre-AI Intake Form Questions",
42
+ useCase: "Collect the context needed before AI starts drafting.",
43
+ url: "https://miraigent.gumroad.com/l/pre-ai-intake-form-questions",
44
+ reviewPoints: ["goal", "constraint", "audience", "review owner"]
45
+ },
46
+ {
47
+ id: "do-not-send-to-ai-list-template",
48
+ title: "Do Not Send to AI List Template",
49
+ useCase: "Define what to block, mask, rewrite, or review.",
50
+ url: "https://miraigent.gumroad.com/l/do-not-send-to-ai-list-template",
51
+ reviewPoints: ["blocked data", "masking rule", "rewrite rule", "review path"]
52
+ },
53
+ {
54
+ id: "ai-output-review-checklist",
55
+ title: "AI Output Review Checklist",
56
+ useCase: "Check source accuracy, privacy, tone, and risk.",
57
+ url: "https://miraigent.gumroad.com/l/ai-output-review-checklist",
58
+ reviewPoints: ["accuracy", "privacy", "tone", "policy risk"]
59
+ },
60
+ {
61
+ id: "customer-data-anonymization-mini-guide",
62
+ title: "Customer Data Anonymization Mini Guide",
63
+ useCase: "Keep the lesson, remove the identifying details.",
64
+ url: "https://miraigent.gumroad.com/l/customer-data-anonymization-mini-guide",
65
+ reviewPoints: ["identifiers", "sensitive facts", "useful lesson", "audit trail"]
66
+ },
67
+ {
68
+ id: "ai-support-workflow-starter-map",
69
+ title: "AI Support Workflow Starter Map",
70
+ useCase: "Map intake, AI drafts, human review, exceptions, and logs.",
71
+ url: "https://miraigent.gumroad.com/l/ai-support-workflow-starter-map",
72
+ reviewPoints: ["intake", "AI draft", "review gate", "exception log"]
73
+ }
74
+ ];
75
+
76
+ const tools = [
77
+ {
78
+ name: "list_ai_ops_templates",
79
+ description: "List Miraigent public AI operations templates.",
80
+ inputSchema: {
81
+ type: "object",
82
+ properties: {}
83
+ }
84
+ },
85
+ {
86
+ name: "get_ai_ops_template",
87
+ description: "Get one AI operations template by id.",
88
+ inputSchema: {
89
+ type: "object",
90
+ properties: {
91
+ id: {
92
+ type: "string",
93
+ description: "Template id, such as human-review-gate-ai-drafts."
94
+ }
95
+ },
96
+ required: ["id"]
97
+ }
98
+ },
99
+ {
100
+ name: "build_ai_ops_review_checklist",
101
+ description: "Build a short human-review checklist for an AI operation.",
102
+ inputSchema: {
103
+ type: "object",
104
+ properties: {
105
+ operation: {
106
+ type: "string",
107
+ description: "Operations area, such as customer-support, CRM, FAQ, or content."
108
+ },
109
+ workflow: {
110
+ type: "string",
111
+ description: "Deprecated alias for operation."
112
+ },
113
+ riskLevel: {
114
+ type: "string",
115
+ enum: ["low", "medium", "high"],
116
+ description: "Expected risk level for the operation."
117
+ }
118
+ },
119
+ required: []
120
+ }
121
+ },
122
+ {
123
+ name: "recommend_ai_ops_template_sequence",
124
+ description: "Recommend a practical order for applying the public AI operations templates.",
125
+ inputSchema: {
126
+ type: "object",
127
+ properties: {
128
+ operation: {
129
+ type: "string",
130
+ description: "Operations area, such as support, CRM, FAQ, or content."
131
+ },
132
+ priorities: {
133
+ type: "array",
134
+ items: {
135
+ type: "string"
136
+ },
137
+ description: "Priorities such as privacy, review, intake, CRM, FAQ, or workflow."
138
+ }
139
+ }
140
+ }
141
+ }
142
+ ];
143
+
144
+ let buffer = Buffer.alloc(0);
145
+ process.stdin.on("data", (chunk) => {
146
+ buffer = Buffer.concat([buffer, chunk]);
147
+ while (readNextMessage()) {
148
+ // Keep draining complete messages.
149
+ }
150
+ });
151
+
152
+ function readNextMessage() {
153
+ const separator = buffer.indexOf("\r\n\r\n");
154
+ if (separator === -1) {
155
+ return false;
156
+ }
157
+
158
+ const header = buffer.slice(0, separator).toString("utf8");
159
+ const match = header.match(/Content-Length: (\d+)/i);
160
+ if (!match) {
161
+ respond(null, null, { code: -32600, message: "Missing Content-Length header" });
162
+ buffer = Buffer.alloc(0);
163
+ return false;
164
+ }
165
+
166
+ const contentLength = Number(match[1]);
167
+ const bodyStart = separator + 4;
168
+ const bodyEnd = bodyStart + contentLength;
169
+ if (buffer.length < bodyEnd) {
170
+ return false;
171
+ }
172
+
173
+ const body = buffer.slice(bodyStart, bodyEnd).toString("utf8");
174
+ buffer = buffer.slice(bodyEnd);
175
+ handleMessage(body);
176
+ return true;
177
+ }
178
+
179
+ function handleMessage(body) {
180
+ let request;
181
+ try {
182
+ request = JSON.parse(body);
183
+ } catch (error) {
184
+ respond(null, null, { code: -32700, message: "Parse error", data: error.message });
185
+ return;
186
+ }
187
+
188
+ try {
189
+ const result = route(request.method, request.params ?? {});
190
+ if (request.id !== undefined) {
191
+ respond(request.id, result);
192
+ }
193
+ } catch (error) {
194
+ respond(request.id ?? null, null, {
195
+ code: -32603,
196
+ message: error.message
197
+ });
198
+ }
199
+ }
200
+
201
+ function route(method, params) {
202
+ if (method === "initialize") {
203
+ return {
204
+ protocolVersion: "2024-11-05",
205
+ capabilities: {
206
+ tools: {}
207
+ },
208
+ serverInfo: {
209
+ name: "miraigent-ai-ops-template-server",
210
+ version: "0.1.0"
211
+ }
212
+ };
213
+ }
214
+
215
+ if (method === "tools/list") {
216
+ return { tools };
217
+ }
218
+
219
+ if (method === "tools/call") {
220
+ return callTool(params.name, params.arguments ?? {});
221
+ }
222
+
223
+ throw new Error(`Unsupported method: ${method}`);
224
+ }
225
+
226
+ function callTool(name, args) {
227
+ if (name === "list_ai_ops_templates") {
228
+ return textResult(JSON.stringify(templates, null, 2));
229
+ }
230
+
231
+ if (name === "get_ai_ops_template") {
232
+ const template = templates.find((item) => item.id === args.id);
233
+ if (!template) {
234
+ throw new Error(`Unknown template id: ${args.id}`);
235
+ }
236
+ return textResult(JSON.stringify(template, null, 2));
237
+ }
238
+
239
+ if (name === "build_ai_ops_review_checklist") {
240
+ const riskLevel = args.riskLevel ?? "medium";
241
+ const operation = args.operation ?? args.workflow ?? "general-ai-operations";
242
+ const checklist = buildChecklist(operation, riskLevel);
243
+ return textResult(checklist.map((item) => `- ${item}`).join("\n"));
244
+ }
245
+
246
+ if (name === "recommend_ai_ops_template_sequence") {
247
+ return textResult(JSON.stringify(recommendTemplateSequence(args), null, 2));
248
+ }
249
+
250
+ throw new Error(`Unknown tool: ${name}`);
251
+ }
252
+
253
+ function recommendTemplateSequence(args) {
254
+ const priorities = new Set((args.priorities ?? []).map((item) => String(item).toLowerCase()));
255
+ const sequence = [
256
+ "before-you-send-it-to-ai-checklist",
257
+ "do-not-send-to-ai-list-template",
258
+ "pre-ai-intake-form-questions",
259
+ "human-review-gate-ai-drafts",
260
+ "ai-output-review-checklist",
261
+ "faq-candidate-review-checklist",
262
+ "ai-safe-crm-notes-template",
263
+ "customer-data-anonymization-mini-guide",
264
+ "ai-support-workflow-starter-map"
265
+ ];
266
+
267
+ if (priorities.has("privacy")) {
268
+ moveBefore(sequence, "customer-data-anonymization-mini-guide", "human-review-gate-ai-drafts");
269
+ moveBefore(sequence, "do-not-send-to-ai-list-template", "pre-ai-intake-form-questions");
270
+ }
271
+
272
+ if (priorities.has("faq")) {
273
+ moveBefore(sequence, "faq-candidate-review-checklist", "ai-safe-crm-notes-template");
274
+ }
275
+
276
+ if (priorities.has("crm")) {
277
+ moveBefore(sequence, "ai-safe-crm-notes-template", "faq-candidate-review-checklist");
278
+ }
279
+
280
+ return {
281
+ operation: args.operation ?? "general-ai-operations",
282
+ note: "This is a non-memory AI operations helper sequence. It is not a MIRAI Memory engine or working memory MCP.",
283
+ templates: sequence.map((id) => templates.find((template) => template.id === id))
284
+ };
285
+ }
286
+
287
+ function moveBefore(items, target, before) {
288
+ const targetIndex = items.indexOf(target);
289
+ const beforeIndex = items.indexOf(before);
290
+ if (targetIndex === -1 || beforeIndex === -1 || targetIndex < beforeIndex) {
291
+ return;
292
+ }
293
+ items.splice(targetIndex, 1);
294
+ items.splice(beforeIndex, 0, target);
295
+ }
296
+
297
+ function buildChecklist(workflow, riskLevel) {
298
+ const base = [
299
+ `Define the workflow goal before using AI: ${workflow}.`,
300
+ "Remove or mask customer identifiers that are not needed for the AI task.",
301
+ "Mark which outputs require human approval before use.",
302
+ "Record the final decision and the reason for future review."
303
+ ];
304
+
305
+ if (riskLevel === "high") {
306
+ return [
307
+ ...base,
308
+ "Add an escalation owner before AI output can be sent externally.",
309
+ "Keep a no-send list for data, claims, and decisions AI must not handle."
310
+ ];
311
+ }
312
+
313
+ if (riskLevel === "low") {
314
+ return [
315
+ ...base,
316
+ "Sample-check outputs regularly and convert repeated review points into FAQ notes."
317
+ ];
318
+ }
319
+
320
+ return [
321
+ ...base,
322
+ "Use a review gate for uncertain tone, policy, privacy, or factual claims."
323
+ ];
324
+ }
325
+
326
+ function textResult(text) {
327
+ return {
328
+ content: [
329
+ {
330
+ type: "text",
331
+ text
332
+ }
333
+ ]
334
+ };
335
+ }
336
+
337
+ function respond(id, result = null, error = null) {
338
+ const message = {
339
+ jsonrpc: "2.0",
340
+ id
341
+ };
342
+ if (error) {
343
+ message.error = error;
344
+ } else {
345
+ message.result = result;
346
+ }
347
+ const body = JSON.stringify(message);
348
+ process.stdout.write(`Content-Length: ${Buffer.byteLength(body, "utf8")}\r\n\r\n${body}`);
349
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@miraigent/ai-ops-templates",
3
+ "version": "0.1.1",
4
+ "description": "Public AI operations templates and a starter MCP server for human-reviewed AI operations.",
5
+ "homepage": "https://github.com/Miraigent/miraigent-ai-ops-templates#readme",
6
+ "type": "module",
7
+ "private": false,
8
+ "license": "SEE LICENSE IN LICENSE-SCOPE.md",
9
+ "files": [
10
+ "README.md",
11
+ "NAMING.md",
12
+ "LICENSE-SCOPE.md",
13
+ "free/",
14
+ "mcp/",
15
+ "agent-memories/",
16
+ "ja/",
17
+ "scripts/"
18
+ ],
19
+ "bin": {
20
+ "miraigent-ai-ops-mcp": "mcp/ai-ops-template-server/server.mjs"
21
+ },
22
+ "scripts": {
23
+ "check": "node --check mcp/ai-ops-template-server/server.mjs && node --check scripts/smoke-test.mjs && node scripts/check-repository.mjs",
24
+ "test": "node scripts/smoke-test.mjs",
25
+ "mcp": "node mcp/ai-ops-template-server/server.mjs"
26
+ },
27
+ "keywords": [
28
+ "mcp",
29
+ "ai-operations",
30
+ "agent-tools",
31
+ "human-review",
32
+ "ai-safety",
33
+ "templates"
34
+ ],
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/Miraigent/miraigent-ai-ops-templates.git"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/Miraigent/miraigent-ai-ops-templates/issues"
41
+ }
42
+ }
@@ -0,0 +1,33 @@
1
+ import { readFileSync, existsSync } from "node:fs";
2
+
3
+ const checks = [
4
+ ["README.md", "MIRAI Memory is the private memory engine"],
5
+ ["README.md", "not a working memory MCP"],
6
+ ["LICENSE-SCOPE.md", "The MIT License applies only to files under these paths:"],
7
+ ["LICENSE-SCOPE.md", "The paid/ directory is not MIT-licensed."],
8
+ ["free/LICENSE", "files under the free/ path"],
9
+ ["mcp/LICENSE", "files under the mcp/ path"],
10
+ ["package.json", "\"license\": \"SEE LICENSE IN LICENSE-SCOPE.md\""]
11
+ ];
12
+
13
+ for (const [file, expected] of checks) {
14
+ assertFileContains(file, expected);
15
+ }
16
+
17
+ assertMissing("LICENSE");
18
+
19
+ function assertFileContains(file, expected) {
20
+ if (!existsSync(file)) {
21
+ throw new Error(`Missing required file: ${file}`);
22
+ }
23
+ const content = readFileSync(file, "utf8");
24
+ if (!content.includes(expected)) {
25
+ throw new Error(`Expected ${file} to include: ${expected}`);
26
+ }
27
+ }
28
+
29
+ function assertMissing(file) {
30
+ if (existsSync(file)) {
31
+ throw new Error(`Unexpected file exists: ${file}`);
32
+ }
33
+ }
@@ -0,0 +1,99 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ const child = spawn(process.execPath, ["mcp/ai-ops-template-server/server.mjs"], {
4
+ stdio: ["pipe", "pipe", "inherit"]
5
+ });
6
+
7
+ const responses = [];
8
+ let buffer = Buffer.alloc(0);
9
+ child.stdout.setEncoding("utf8");
10
+ child.stdout.on("data", (chunk) => {
11
+ buffer = Buffer.concat([buffer, Buffer.from(chunk, "utf8")]);
12
+ while (readNextResponse()) {
13
+ // Keep draining complete messages.
14
+ }
15
+ });
16
+
17
+ send({ jsonrpc: "2.0", id: 1, method: "initialize", params: {} });
18
+ send({ jsonrpc: "2.0", id: 2, method: "tools/list", params: {} });
19
+ send({
20
+ jsonrpc: "2.0",
21
+ id: 3,
22
+ method: "tools/call",
23
+ params: {
24
+ name: "get_ai_ops_template",
25
+ arguments: { id: "human-review-gate-ai-drafts" }
26
+ }
27
+ });
28
+ send({
29
+ jsonrpc: "2.0",
30
+ id: 4,
31
+ method: "tools/call",
32
+ params: {
33
+ name: "build_ai_ops_review_checklist",
34
+ arguments: { operation: "customer-support", riskLevel: "high" }
35
+ }
36
+ });
37
+ send({
38
+ jsonrpc: "2.0",
39
+ id: 5,
40
+ method: "tools/call",
41
+ params: {
42
+ name: "recommend_ai_ops_template_sequence",
43
+ arguments: { operation: "support", priorities: ["privacy", "faq"] }
44
+ }
45
+ });
46
+
47
+ await waitForResponses(5);
48
+ child.kill();
49
+
50
+ assert(responses[0].result.serverInfo.name === "miraigent-ai-ops-template-server", "initialize failed");
51
+ assert(responses[1].result.tools.length === 4, "tools/list failed");
52
+ assert(responses[2].result.content[0].text.includes("Human Review Gate"), "template lookup failed");
53
+ assert(responses[3].result.content[0].text.includes("escalation owner"), "checklist build failed");
54
+ assert(responses[4].result.content[0].text.includes("not a MIRAI Memory engine"), "sequence recommendation failed");
55
+
56
+ function send(payload) {
57
+ const body = JSON.stringify(payload);
58
+ child.stdin.write(`Content-Length: ${Buffer.byteLength(body, "utf8")}\r\n\r\n${body}`);
59
+ }
60
+
61
+ function readNextResponse() {
62
+ const separator = buffer.indexOf("\r\n\r\n");
63
+ if (separator === -1) {
64
+ return false;
65
+ }
66
+
67
+ const header = buffer.slice(0, separator).toString("utf8");
68
+ const match = header.match(/Content-Length: (\d+)/i);
69
+ if (!match) {
70
+ throw new Error(`Missing Content-Length in response: ${header}`);
71
+ }
72
+
73
+ const bodyStart = separator + 4;
74
+ const bodyEnd = bodyStart + Number(match[1]);
75
+ if (buffer.length < bodyEnd) {
76
+ return false;
77
+ }
78
+
79
+ const body = buffer.slice(bodyStart, bodyEnd).toString("utf8");
80
+ buffer = buffer.slice(bodyEnd);
81
+ responses.push(JSON.parse(body));
82
+ return true;
83
+ }
84
+
85
+ async function waitForResponses(count) {
86
+ const started = Date.now();
87
+ while (responses.length < count) {
88
+ if (Date.now() - started > 3000) {
89
+ throw new Error(`Timed out waiting for ${count} responses; got ${responses.length}`);
90
+ }
91
+ await new Promise((resolve) => setTimeout(resolve, 25));
92
+ }
93
+ }
94
+
95
+ function assert(condition, message) {
96
+ if (!condition) {
97
+ throw new Error(message);
98
+ }
99
+ }