@markus-global/cli 0.2.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.
Files changed (177) hide show
  1. package/dist/api-client.d.ts +31 -0
  2. package/dist/api-client.d.ts.map +1 -0
  3. package/dist/api-client.js +96 -0
  4. package/dist/api-client.js.map +1 -0
  5. package/dist/commands/agent.d.ts +3 -0
  6. package/dist/commands/agent.d.ts.map +1 -0
  7. package/dist/commands/agent.js +224 -0
  8. package/dist/commands/agent.js.map +1 -0
  9. package/dist/commands/approval.d.ts +3 -0
  10. package/dist/commands/approval.d.ts.map +1 -0
  11. package/dist/commands/approval.js +59 -0
  12. package/dist/commands/approval.js.map +1 -0
  13. package/dist/commands/audit.d.ts +3 -0
  14. package/dist/commands/audit.d.ts.map +1 -0
  15. package/dist/commands/audit.js +92 -0
  16. package/dist/commands/audit.js.map +1 -0
  17. package/dist/commands/builder.d.ts +3 -0
  18. package/dist/commands/builder.d.ts.map +1 -0
  19. package/dist/commands/builder.js +85 -0
  20. package/dist/commands/builder.js.map +1 -0
  21. package/dist/commands/deliverable.d.ts +3 -0
  22. package/dist/commands/deliverable.d.ts.map +1 -0
  23. package/dist/commands/deliverable.js +127 -0
  24. package/dist/commands/deliverable.js.map +1 -0
  25. package/dist/commands/external-agent.d.ts +3 -0
  26. package/dist/commands/external-agent.d.ts.map +1 -0
  27. package/dist/commands/external-agent.js +74 -0
  28. package/dist/commands/external-agent.js.map +1 -0
  29. package/dist/commands/gateway.d.ts +3 -0
  30. package/dist/commands/gateway.d.ts.map +1 -0
  31. package/dist/commands/gateway.js +155 -0
  32. package/dist/commands/gateway.js.map +1 -0
  33. package/dist/commands/init.d.ts +6 -0
  34. package/dist/commands/init.d.ts.map +1 -0
  35. package/dist/commands/init.js +251 -0
  36. package/dist/commands/init.js.map +1 -0
  37. package/dist/commands/key.d.ts +3 -0
  38. package/dist/commands/key.d.ts.map +1 -0
  39. package/dist/commands/key.js +68 -0
  40. package/dist/commands/key.js.map +1 -0
  41. package/dist/commands/project.d.ts +3 -0
  42. package/dist/commands/project.d.ts.map +1 -0
  43. package/dist/commands/project.js +164 -0
  44. package/dist/commands/project.js.map +1 -0
  45. package/dist/commands/report.d.ts +3 -0
  46. package/dist/commands/report.d.ts.map +1 -0
  47. package/dist/commands/report.js +69 -0
  48. package/dist/commands/report.js.map +1 -0
  49. package/dist/commands/requirement.d.ts +3 -0
  50. package/dist/commands/requirement.d.ts.map +1 -0
  51. package/dist/commands/requirement.js +197 -0
  52. package/dist/commands/requirement.js.map +1 -0
  53. package/dist/commands/review.d.ts +3 -0
  54. package/dist/commands/review.d.ts.map +1 -0
  55. package/dist/commands/review.js +71 -0
  56. package/dist/commands/review.js.map +1 -0
  57. package/dist/commands/role.d.ts +3 -0
  58. package/dist/commands/role.d.ts.map +1 -0
  59. package/dist/commands/role.js +39 -0
  60. package/dist/commands/role.js.map +1 -0
  61. package/dist/commands/settings.d.ts +3 -0
  62. package/dist/commands/settings.d.ts.map +1 -0
  63. package/dist/commands/settings.js +53 -0
  64. package/dist/commands/settings.js.map +1 -0
  65. package/dist/commands/skill.d.ts +3 -0
  66. package/dist/commands/skill.d.ts.map +1 -0
  67. package/dist/commands/skill.js +136 -0
  68. package/dist/commands/skill.js.map +1 -0
  69. package/dist/commands/start.d.ts +3 -0
  70. package/dist/commands/start.d.ts.map +1 -0
  71. package/dist/commands/start.js +628 -0
  72. package/dist/commands/start.js.map +1 -0
  73. package/dist/commands/system.d.ts +3 -0
  74. package/dist/commands/system.d.ts.map +1 -0
  75. package/dist/commands/system.js +248 -0
  76. package/dist/commands/system.js.map +1 -0
  77. package/dist/commands/task.d.ts +3 -0
  78. package/dist/commands/task.d.ts.map +1 -0
  79. package/dist/commands/task.js +510 -0
  80. package/dist/commands/task.js.map +1 -0
  81. package/dist/commands/team.d.ts +3 -0
  82. package/dist/commands/team.d.ts.map +1 -0
  83. package/dist/commands/team.js +312 -0
  84. package/dist/commands/team.js.map +1 -0
  85. package/dist/commands/template.d.ts +3 -0
  86. package/dist/commands/template.d.ts.map +1 -0
  87. package/dist/commands/template.js +77 -0
  88. package/dist/commands/template.js.map +1 -0
  89. package/dist/commands/user.d.ts +3 -0
  90. package/dist/commands/user.d.ts.map +1 -0
  91. package/dist/commands/user.js +68 -0
  92. package/dist/commands/user.js.map +1 -0
  93. package/dist/index.d.ts +3 -0
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/index.js +96 -0
  96. package/dist/index.js.map +1 -0
  97. package/dist/markus.mjs +82359 -0
  98. package/dist/output.d.ts +31 -0
  99. package/dist/output.d.ts.map +1 -0
  100. package/dist/output.js +121 -0
  101. package/dist/output.js.map +1 -0
  102. package/dist/paths.d.ts +20 -0
  103. package/dist/paths.d.ts.map +1 -0
  104. package/dist/paths.js +61 -0
  105. package/dist/paths.js.map +1 -0
  106. package/dist/web-ui/assets/index-Bcc58A3R.css +1 -0
  107. package/dist/web-ui/assets/index-CP5PJ1Oz.js +61 -0
  108. package/dist/web-ui/index.html +20 -0
  109. package/dist/web-ui/logo.png +0 -0
  110. package/package.json +37 -0
  111. package/templates/openclaw-markus-skill/AGENTS.md +163 -0
  112. package/templates/openclaw-markus-skill/TOOLS.md +155 -0
  113. package/templates/openclaw-markus-skill/config.json5 +44 -0
  114. package/templates/openclaw-markus-skill/heartbeat.md +45 -0
  115. package/templates/roles/SHARED.md +383 -0
  116. package/templates/roles/agent-father/ROLE.md +42 -0
  117. package/templates/roles/content-writer/ROLE.md +28 -0
  118. package/templates/roles/developer/HEARTBEAT.md +8 -0
  119. package/templates/roles/developer/POLICIES.md +31 -0
  120. package/templates/roles/developer/ROLE.md +23 -0
  121. package/templates/roles/devops/ROLE.md +28 -0
  122. package/templates/roles/finance/ROLE.md +16 -0
  123. package/templates/roles/hr/ROLE.md +17 -0
  124. package/templates/roles/marketing/ROLE.md +16 -0
  125. package/templates/roles/openclaw-developer/openclaw.md +78 -0
  126. package/templates/roles/operations/HEARTBEAT.md +10 -0
  127. package/templates/roles/operations/ROLE.md +23 -0
  128. package/templates/roles/org-manager/HEARTBEAT.md +12 -0
  129. package/templates/roles/org-manager/POLICIES.md +14 -0
  130. package/templates/roles/org-manager/ROLE.md +102 -0
  131. package/templates/roles/product-manager/HEARTBEAT.md +9 -0
  132. package/templates/roles/product-manager/ROLE.md +37 -0
  133. package/templates/roles/project-manager/ROLE.md +44 -0
  134. package/templates/roles/qa-engineer/ROLE.md +28 -0
  135. package/templates/roles/research-assistant/ROLE.md +23 -0
  136. package/templates/roles/reviewer/HEARTBEAT.md +13 -0
  137. package/templates/roles/reviewer/ROLE.md +69 -0
  138. package/templates/roles/secretary/HEARTBEAT.md +50 -0
  139. package/templates/roles/secretary/ROLE.md +148 -0
  140. package/templates/roles/skill-architect/ROLE.md +42 -0
  141. package/templates/roles/support/ROLE.md +16 -0
  142. package/templates/roles/team-factory/ROLE.md +54 -0
  143. package/templates/roles/tech-writer/ROLE.md +23 -0
  144. package/templates/skills/agent-building/SKILL.md +140 -0
  145. package/templates/skills/agent-building/skill.json +13 -0
  146. package/templates/skills/chrome-devtools/SKILL.md +257 -0
  147. package/templates/skills/chrome-devtools/skill.json +21 -0
  148. package/templates/skills/markus-admin-cli/SKILL.md +121 -0
  149. package/templates/skills/markus-admin-cli/skill.json +14 -0
  150. package/templates/skills/markus-agent-cli/SKILL.md +67 -0
  151. package/templates/skills/markus-agent-cli/skill.json +14 -0
  152. package/templates/skills/markus-cli/SKILL.md +113 -0
  153. package/templates/skills/markus-cli/skill.json +14 -0
  154. package/templates/skills/markus-hub-connector/SKILL.md +64 -0
  155. package/templates/skills/markus-hub-connector/server.mjs +321 -0
  156. package/templates/skills/markus-hub-connector/skill.json +20 -0
  157. package/templates/skills/markus-project-cli/SKILL.md +161 -0
  158. package/templates/skills/markus-project-cli/skill.json +14 -0
  159. package/templates/skills/markus-skill-cli/SKILL.md +57 -0
  160. package/templates/skills/markus-skill-cli/skill.json +14 -0
  161. package/templates/skills/markus-team-cli/SKILL.md +52 -0
  162. package/templates/skills/markus-team-cli/skill.json +14 -0
  163. package/templates/skills/self-evolution/SKILL.md +207 -0
  164. package/templates/skills/self-evolution/skill.json +14 -0
  165. package/templates/skills/skill-building/SKILL.md +172 -0
  166. package/templates/skills/skill-building/skill.json +13 -0
  167. package/templates/skills/team-building/SKILL.md +159 -0
  168. package/templates/skills/team-building/skill.json +13 -0
  169. package/templates/teams/content-team/ANNOUNCEMENT.md +10 -0
  170. package/templates/teams/content-team/NORMS.md +20 -0
  171. package/templates/teams/content-team/team.json +18 -0
  172. package/templates/teams/dev-squad/ANNOUNCEMENT.md +11 -0
  173. package/templates/teams/dev-squad/NORMS.md +22 -0
  174. package/templates/teams/dev-squad/team.json +19 -0
  175. package/templates/teams/startup-team/ANNOUNCEMENT.md +11 -0
  176. package/templates/teams/startup-team/NORMS.md +21 -0
  177. package/templates/teams/startup-team/team.json +20 -0
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: self-evolution
3
+ description: Learn from mistakes, corrections, and successful strategies — evolve your role, tool preferences, and SOPs over time
4
+ ---
5
+
6
+ # Self-Evolution
7
+
8
+ You have the ability to learn from experience and evolve yourself over time. This goes beyond remembering facts — you can refine your own role definition, optimize your tool usage patterns, and develop standard operating procedures (SOPs) that make you more effective.
9
+
10
+ This is not optional — continuous self-improvement is a core part of being an effective agent.
11
+
12
+ ## When to Reflect
13
+
14
+ Trigger the reflection process when any of these happen:
15
+
16
+ 1. **User correction** — The user says "no, do X instead", "that's wrong", or redirects your approach. Strongest signal.
17
+ 2. **Task revision** — A task you submitted was rejected and sent back. The system will prompt you to reflect after a revised task is accepted.
18
+ 3. **Self-correction** — You tried one approach, it failed, and you found a different approach that worked.
19
+ 4. **Resolved error** — An unexpected error (tool failure, wrong API assumption, misunderstood requirement) that you diagnosed and fixed.
20
+ 5. **Efficiency insight** — You discover a faster, cleaner, or more reliable way to accomplish a recurring task.
21
+ 6. **Pattern recognition** — You notice you keep doing something the same way and realize it could be standardized.
22
+
23
+ Do NOT trigger reflection for trivial matters — typos, one-off path errors, or situations that won't recur.
24
+
25
+ ## Layer 1: Lessons (Immediate Memory)
26
+
27
+ ### How to Extract a Lesson
28
+
29
+ When a reflection trigger fires, think through:
30
+
31
+ 1. **Situation** — What were you trying to do?
32
+ 2. **What went wrong** — What assumption or action was incorrect?
33
+ 3. **What worked** — What was the correct approach?
34
+ 4. **Generalized rule** — A reusable principle beyond this specific instance.
35
+
36
+ ### How to Save a Lesson
37
+
38
+ Use `memory_save` with:
39
+
40
+ - **type**: `"note"`
41
+ - **content**: Concise lesson in this format:
42
+ ```
43
+ [LESSON] <one-line summary>
44
+ Situation: <brief context>
45
+ Mistake: <what went wrong>
46
+ Correction: <what works>
47
+ Rule: <generalized principle for future use>
48
+ ```
49
+ - **tags**: Always include `"lesson"` as the first tag, then add category tags:
50
+ - `coding` — code patterns, language features, library usage
51
+ - `tool-usage` — correct use of shell, file, git, or other tools
52
+ - `communication` — how to interact with users, managers, or other agents
53
+ - `architecture` — system design, file organization, dependency decisions
54
+ - `process` — workflow, task management, review process
55
+ - `domain:<topic>` — domain-specific knowledge (e.g., `domain:react`)
56
+
57
+ ### Consolidating Lessons
58
+
59
+ When you have 3+ unsaved lessons, consolidate into long-term memory:
60
+
61
+ ```
62
+ memory_update_longterm({
63
+ section: "lessons-learned",
64
+ content: "<numbered list of top 20 lessons>"
65
+ })
66
+ ```
67
+
68
+ Each lesson: one actionable sentence. Replace older/less impactful ones when you exceed 20.
69
+
70
+ ## Layer 2: Tool Preferences
71
+
72
+ Over time you will discover which tools work best for specific situations. Record these preferences so you can make better tool choices automatically.
73
+
74
+ ### When to Update Tool Preferences
75
+
76
+ - You discover a tool is significantly better than another for a specific task type
77
+ - You find optimal parameters or flags for a tool (e.g., `grep` with specific flags vs. `glob`)
78
+ - You learn that a tool has limitations you should work around
79
+ - A tool combination (pipeline) works well for a recurring need
80
+
81
+ ### How to Save Tool Preferences
82
+
83
+ Use `memory_save` with:
84
+
85
+ - **type**: `"note"`
86
+ - **content**:
87
+ ```
88
+ [TOOL-PREF] <one-line summary>
89
+ Task: <what kind of task>
90
+ Preferred: <tool and how to use it>
91
+ Avoid: <what doesn't work well and why>
92
+ Reason: <why this preference>
93
+ ```
94
+ - **tags**: `["lesson", "tool-preference", "<tool-name>"]`
95
+
96
+ Periodically consolidate into long-term memory:
97
+
98
+ ```
99
+ memory_update_longterm({
100
+ section: "tool-preferences",
101
+ content: "<list of tool preferences by task type>"
102
+ })
103
+ ```
104
+
105
+ Format as a compact reference table your future self can quickly scan.
106
+
107
+ ## Layer 3: SOPs (Standard Operating Procedures)
108
+
109
+ When you find yourself repeatedly doing a multi-step process, document it as an SOP. When you later find a better way, update it.
110
+
111
+ ### When to Create or Update an SOP
112
+
113
+ - You've done the same multi-step workflow 2+ times and want to standardize it
114
+ - You found a significantly better sequence of steps for an existing SOP
115
+ - A step in an existing SOP failed or was suboptimal, and you found a fix
116
+
117
+ ### How to Save SOPs
118
+
119
+ Use `memory_update_longterm` with section `"sops"`:
120
+
121
+ ```
122
+ memory_update_longterm({
123
+ section: "sops",
124
+ content: "<all your SOPs>"
125
+ })
126
+ ```
127
+
128
+ Format each SOP as:
129
+
130
+ ```
131
+ ### SOP: <Name>
132
+ Trigger: <when to use this SOP>
133
+ Steps:
134
+ 1. <step 1>
135
+ 2. <step 2>
136
+ ...
137
+ Notes: <gotchas, tips, common failures>
138
+ Last updated: <date>
139
+ ```
140
+
141
+ Keep SOPs concise and actionable. Maximum 10 SOPs — merge or retire outdated ones.
142
+
143
+ ## Layer 4: Role Evolution (ROLE.md)
144
+
145
+ This is the deepest level of self-evolution. Your ROLE.md defines your core identity, system prompt, and behavioral guidelines. When you accumulate enough lessons and experience in a domain, you can evolve your own role definition.
146
+
147
+ **Your ROLE.md path**: `{AGENT_DATA_DIR}/role/ROLE.md` (the system tells you your data directory in the workspace section of your context)
148
+
149
+ ### When to Modify ROLE.md
150
+
151
+ Only modify your ROLE.md when ALL of these conditions are met:
152
+
153
+ 1. **Pattern threshold** — You have 3+ related lessons pointing to a fundamental behavioral change (not a one-off fix)
154
+ 2. **High confidence** — The change reflects proven experience, not speculation
155
+ 3. **Systemic impact** — The improvement would affect how you handle many future tasks, not just one type
156
+ 4. **Not contradicting core role** — The change refines or extends your role, not contradicts it
157
+
158
+ ### How to Modify ROLE.md
159
+
160
+ 1. First, read your current ROLE.md via `file_read`
161
+ 2. Identify where the new guideline fits — append to existing sections or add a new section
162
+ 3. Use `file_edit` to make a surgical change — never rewrite the entire file
163
+ 4. Log the change in memory:
164
+
165
+ ```
166
+ memory_save({
167
+ type: "note",
168
+ content: "[ROLE-EVOLUTION] <summary of change>\nReason: <why this change>\nLessons: <which lessons led to this>\nChange: <what was added/modified in ROLE.md>",
169
+ tags: ["lesson", "role-evolution"]
170
+ })
171
+ ```
172
+
173
+ ### ROLE.md Evolution Rules
174
+
175
+ - **APPEND, don't replace** — Add new guidelines, don't remove existing ones unless they're clearly wrong
176
+ - **Keep it concise** — Each new guideline should be 1-3 lines. ROLE.md should not grow beyond 200 lines
177
+ - **Never touch the header** — The `# Role Name` and core identity section must stay intact
178
+ - **Log every change** — Always save a `role-evolution` tagged memory entry explaining why
179
+ - **One change at a time** — Don't batch multiple unrelated role changes
180
+ - **Consolidate evolution history** periodically:
181
+
182
+ ```
183
+ memory_update_longterm({
184
+ section: "role-evolution-log",
185
+ content: "<chronological list of role changes and reasons>"
186
+ })
187
+ ```
188
+
189
+ ## Using Past Experience
190
+
191
+ Your past evolution data is available in two ways:
192
+
193
+ 1. **Automatic** — Your `lessons-learned`, `tool-preferences`, `sops`, and `role-evolution-log` sections in MEMORY.md appear in your system context every session.
194
+ 2. **On-demand** — Use `memory_search` with relevant keywords to find specific past lessons.
195
+
196
+ Before starting a task, briefly review relevant sections. This takes seconds and prevents repeating mistakes.
197
+
198
+ ## Rules
199
+
200
+ - **DO NOT** skip reflection when the system prompts you after a task revision.
201
+ - **DO NOT** save trivial or non-generalizable lessons.
202
+ - **DO NOT** let any long-term memory section grow unbounded. Limits: lessons-learned (20), tool-preferences (15), SOPs (10), role-evolution-log (20).
203
+ - **DO NOT** modify ROLE.md for one-off situations — only for proven patterns.
204
+ - **DO** save lessons immediately when a correction happens, while context is fresh.
205
+ - **DO** include specific, actionable advice. "Be more careful" is useless. "Always validate input schema before processing" is useful.
206
+ - **DO** use tags consistently so lessons are discoverable via search.
207
+ - **DO** periodically prune and consolidate each memory section to keep it current.
@@ -0,0 +1,14 @@
1
+ {
2
+ "type": "skill",
3
+ "name": "self-evolution",
4
+ "displayName": "Self-Evolution",
5
+ "version": "1.0.0",
6
+ "description": "Learn from mistakes, corrections, and successful strategies — extract lessons and persist them as structured memories for future retrieval",
7
+ "author": "markus",
8
+ "category": "productivity",
9
+ "tags": ["learning", "reflection", "memory", "self-improvement", "evolution"],
10
+ "skill": {
11
+ "skillFile": "SKILL.md",
12
+ "alwaysOn": true
13
+ }
14
+ }
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: skill-building
3
+ description: Design and create agent skill packages — instruction-based and MCP-based skills, manifest format
4
+ ---
5
+
6
+ # Skill Building
7
+
8
+ This skill teaches you how to create Markus skill packages — directory-based artifacts that teach agents new capabilities. A skill can work in two ways (or both):
9
+
10
+ 1. **Instruction-based**: A `SKILL.md` file with instructions injected into the agent's context, guiding it to use existing tools in new ways.
11
+ 2. **MCP-based**: A bundled MCP server (script) that provides entirely new tools to the agent. The skill directory can contain any scripts, config files, or resources the MCP server needs.
12
+
13
+ Most skills are instruction-based. Use MCP-based skills when the capability requires new tools that don't exist yet (e.g., connecting to an external API, browser automation, hardware control).
14
+
15
+ ## Artifact Directory
16
+
17
+ **CRITICAL**: Skill artifacts MUST be saved under this exact path — the Builder page, install system, and deliverable detection all depend on it:
18
+
19
+ ```
20
+ ~/.markus/builder-artifacts/skills/{skill-name}/
21
+ ├── skill.json # Manifest (auto-created from your JSON output)
22
+ ├── SKILL.md # Instruction document (you write via file_write)
23
+ ├── README.md # Human-readable documentation (optional)
24
+ └── ... # Any other files: scripts, MCP servers, configs, templates, etc.
25
+ ```
26
+
27
+ **Do NOT write artifacts to `~/.markus/shared/`, your working directory, or any other location.** Only `~/.markus/builder-artifacts/skills/` is recognized by the system.
28
+
29
+ A skill directory can contain **any files** needed for the skill to work — not just SKILL.md and README.md. For example:
30
+ - **MCP server scripts** (e.g., `server.mjs`) that provide new tools to the agent
31
+ - **Configuration templates** or data files
32
+ - **Helper scripts** used by the instructions
33
+
34
+ When the user **installs** the artifact, the **entire directory** (all files) is deployed to `~/.markus/skills/{skill-name}/`. `SKILL.md` is loaded and injected into the agent's context when the skill is activated. If the manifest declares `mcpServers`, those servers are started and their tools registered to the agent. `skill.json` contains metadata used by the skill registry. `README.md` provides documentation for humans browsing or sharing the skill.
35
+
36
+ ## Two-Step Workflow
37
+
38
+ Output the skill in two steps — manifest first, then content files. **Never put file content inline in the JSON.**
39
+
40
+ ### Chat Mode vs Task Mode
41
+
42
+ - **Chat mode** (user conversation): Output the manifest JSON in a ```json code block → system auto-saves and creates the directory → then use `file_write` for each content file.
43
+ - **Task mode** (assigned task): Use `file_write` to write the manifest JSON file directly (e.g., `file_write("~/.markus/builder-artifacts/skills/{name}/skill.json", ...)`) → then use `file_write` for each content file. When submitting deliverables, set the reference to the artifact directory path.
44
+ - **A2A mode** (agent-to-agent): Same as task mode — write all files via `file_write`.
45
+
46
+ ### Step 1: Output Manifest JSON
47
+
48
+ **In chat mode**: Output the skill configuration as a JSON code block. The system auto-saves it.
49
+ **In task/A2A mode**: Write the manifest JSON file directly via `file_write`.
50
+
51
+ This JSON contains ONLY metadata — **no file content**.
52
+
53
+ **Instruction-based skill** (most common):
54
+ ```json
55
+ {
56
+ "type": "skill",
57
+ "name": "skill-name-kebab-case",
58
+ "displayName": "Skill Name",
59
+ "version": "1.0.0",
60
+ "description": "When and why an agent should use this skill",
61
+ "author": "",
62
+ "category": "custom",
63
+ "tags": ["tag1", "tag2"],
64
+ "skill": {
65
+ "skillFile": "SKILL.md"
66
+ }
67
+ }
68
+ ```
69
+
70
+ **MCP-based skill** (provides new tools via a bundled server script):
71
+ ```json
72
+ {
73
+ "type": "skill",
74
+ "name": "my-api-connector",
75
+ "displayName": "My API Connector",
76
+ "version": "1.0.0",
77
+ "description": "Connect to My API for data retrieval and actions",
78
+ "author": "",
79
+ "category": "custom",
80
+ "tags": ["api", "connector"],
81
+ "skill": {
82
+ "skillFile": "SKILL.md",
83
+ "requiredPermissions": ["network"],
84
+ "mcpServers": {
85
+ "my-api": {
86
+ "command": "node",
87
+ "args": ["${SKILL_DIR}/server.mjs"]
88
+ }
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ **Notes on MCP servers:**
95
+ - `${SKILL_DIR}` is resolved at load time to the skill's actual directory path — use it to reference bundled scripts.
96
+ - The `command` can be any executable (`node`, `python3`, `npx`, etc.).
97
+ - The MCP server communicates via JSON-RPC 2.0 over stdio (stdin/stdout).
98
+ - Tool names exposed by MCP servers are automatically prefixed with the server name (e.g., `my-api__tool_name`). Mention these prefixed names in SKILL.md.
99
+ - You can also use externally published MCP servers: `"command": "npx", "args": ["-y", "some-mcp-server@latest"]`.
100
+
101
+ The system automatically saves this JSON and creates the directory. After that, you proceed to write files.
102
+
103
+ ### Step 2: Write Files with file_write
104
+
105
+ After the JSON is saved, write each file individually using `file_write`. The base path is `~/.markus/builder-artifacts/skills/{skill-name}/` (use the `name` from your JSON).
106
+
107
+ **Write files in this order:**
108
+
109
+ 1. **SKILL.md** (REQUIRED) — The instruction document with YAML frontmatter and comprehensive Markdown body:
110
+ - YAML frontmatter with `name` and `description` (must match manifest)
111
+ - Overview of what the skill does
112
+ - Step-by-step instructions referencing actual tools (or MCP tool names if MCP-based)
113
+ - Error handling guidance
114
+ - Examples of typical input/output
115
+
116
+ 2. **MCP server script** (if MCP-based) — e.g., `server.mjs` implementing the MCP protocol over stdio. Must handle `initialize`, `tools/list`, and `tools/call` JSON-RPC methods.
117
+
118
+ 3. **README.md** (optional) — Human-readable documentation for browsing or sharing.
119
+
120
+ 4. **Any other files** — Helper scripts, templates, config files, data files, etc.
121
+
122
+ **Example file_write calls:**
123
+
124
+ ```
125
+ file_write("~/.markus/builder-artifacts/skills/git-changelog/SKILL.md", "---\nname: git-changelog\ndescription: Generate changelogs from git history\n---\n\n# Git Changelog\n\n## Overview\n...\n\n## Instructions\n...\n\n## Examples\n...")
126
+ file_write("~/.markus/builder-artifacts/skills/git-changelog/README.md", "# Git Changelog\n\nA skill that helps agents generate changelogs from git history...\n")
127
+ ```
128
+
129
+ ## Field Reference
130
+
131
+ ### Top-level fields
132
+ - **`type`**: Always `"skill"`
133
+ - **`name`**: **MUST be English kebab-case** (e.g., `git-changelog`, `web-scraper`). Must match `SKILL.md` frontmatter name. This is the directory name and identifier.
134
+ - **`displayName`**: Human-readable skill name, can be in any language
135
+ - **`version`**: Semver (default `"1.0.0"`)
136
+ - **`description`**: When and why an agent should use this skill (can be in any language)
137
+ - **`category`**: Typically `"custom"` for user-created skills
138
+ - **`tags`**: Array of descriptive tags
139
+
140
+ ### `skill` section (REQUIRED)
141
+ - **`skillFile`**: Always `"SKILL.md"` — the entry point instruction document
142
+ - **`requiredPermissions`**: (optional) Array of permissions: `"shell"`, `"file"`, `"network"`, `"browser"`
143
+ - **`mcpServers`**: (optional) Map of MCP server name → config. Each config has `command`, `args?`, `env?`. Use `${SKILL_DIR}` in args/env to reference the skill directory.
144
+ - **`alwaysOn`**: (optional, boolean) If `true`, the skill's instructions are automatically injected into **every** agent's context at startup. Only use this for foundational skills that all agents must always follow (e.g., `self-evolution`). Default is `false` — non-alwaysOn built-in skills are listed as "available" in the agent's identity section and can be activated on-demand via `discover_tools`.
145
+
146
+ ## After Creation
147
+
148
+ Once all files are written, tell the user:
149
+
150
+ 1. **The skill has been created and saved** — summarize what was created (name, purpose, what agents can do with it).
151
+ 2. **Go to the Builder page** to manage the skill: install it to make it available to agents, share it to Markus Hub, or delete it.
152
+ 3. **To modify or improve** this skill (e.g., add more instructions, update examples, fix edge cases), just continue the conversation here — describe what you want to change and I'll update the files directly.
153
+
154
+ ## Guidelines
155
+
156
+ - Instructions in SKILL.md should reference actual tools: `shell_execute`, `file_read`, `file_write`, `file_edit`, `grep`, `glob`, `web_fetch`, `web_search`, `gui` — or MCP tool names if the skill provides its own tools
157
+ - For MCP-based skills, document every tool with its prefixed name (e.g., `my-api__search`) in SKILL.md so the agent knows how to use them
158
+ - Be specific — include actual CLI commands, file paths, and URL patterns
159
+ - Include error handling: what to do when commands fail, pages don't load, etc.
160
+ - Provide examples of typical input/output for each workflow step
161
+ - Skills should be self-contained: an agent reading the instructions should know exactly what to do
162
+ - Consider composability: skills that work well alongside other skills
163
+ - After outputting the JSON, immediately proceed to write files via `file_write` — announce what you're writing
164
+ - When creating MCP server scripts, use only Node.js built-in modules (no npm dependencies) for maximum portability, or use `npx` to reference published packages
165
+
166
+ ## Rules
167
+
168
+ - **DO NOT** use names that conflict with built-in skills. Check the dynamic context for existing skill names.
169
+ - **DO NOT** put file content in the JSON. Always use `file_write` for files.
170
+ - **DO NOT** write artifacts to `~/.markus/shared/` or your working directory. Always use `~/.markus/builder-artifacts/skills/{name}/`.
171
+ - **The `name` field MUST be English kebab-case** (e.g., `git-changelog`, not `网页抓取器`). This is the directory name and package identifier.
172
+ - The `name` field and `SKILL.md` frontmatter `name` must match exactly.
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "skill",
3
+ "name": "skill-building",
4
+ "displayName": "Skill Building",
5
+ "version": "1.0.0",
6
+ "description": "Design and create agent skill packages — instruction-based and MCP-based skills, manifest format, directory structure for Markus skill artifacts",
7
+ "author": "markus",
8
+ "category": "development",
9
+ "tags": ["builder", "skill", "design", "manifest", "mcp"],
10
+ "skill": {
11
+ "skillFile": "SKILL.md"
12
+ }
13
+ }
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: team-building
3
+ description: Design and create AI team packages — manifest format, member structure, directory layout
4
+ ---
5
+
6
+ # Team Building
7
+
8
+ This skill teaches you how to create Markus team packages — self-contained directory-based artifacts that define a group of specialized AI agents with shared norms and coordination structure.
9
+
10
+ ## Core Philosophy
11
+
12
+ **Every agent in a team must be a specialist.** Do NOT simply pick generic templates and give them names. Design each agent with a unique identity, expertise, and detailed role documentation. Safety constraints are defined in each agent's `POLICIES.md`, not through tool restrictions.
13
+
14
+ ## Artifact Directory
15
+
16
+ **CRITICAL**: Team artifacts MUST be saved under this exact path — the Builder page, install system, and deliverable detection all depend on it:
17
+
18
+ ```
19
+ ~/.markus/builder-artifacts/teams/{team-name}/
20
+ ├── team.json # Manifest (auto-created from your JSON output)
21
+ ├── ANNOUNCEMENT.md # Team announcement (you write via file_write)
22
+ ├── NORMS.md # Working norms (you write via file_write)
23
+ └── members/
24
+ ├── {manager-slug}/
25
+ │ ├── ROLE.md # Manager identity (you write via file_write)
26
+ │ └── POLICIES.md # Manager constraints (you write via file_write, optional)
27
+ └── {worker-slug}/
28
+ ├── ROLE.md # Worker identity (you write via file_write)
29
+ └── POLICIES.md # Worker constraints (you write via file_write, optional)
30
+ ```
31
+
32
+ **Do NOT write artifacts to `~/.markus/shared/`, your working directory, or any other location.** Only `~/.markus/builder-artifacts/teams/` is recognized by the system.
33
+
34
+ ### Where files are deployed on install
35
+
36
+ | Package location | Deployed to | Purpose |
37
+ |---|---|---|
38
+ | `ANNOUNCEMENT.md` | `~/.markus/teams/{teamId}/ANNOUNCEMENT.md` | Injected into every member's context |
39
+ | `NORMS.md` | `~/.markus/teams/{teamId}/NORMS.md` | Injected into every member's context |
40
+ | `members/{name}/ROLE.md` | `~/.markus/agents/{agentId}/role/ROLE.md` | Overrides base role template prompt |
41
+ | `members/{name}/POLICIES.md` | `~/.markus/agents/{agentId}/role/POLICIES.md` | Additional agent constraints |
42
+
43
+ ## Two-Step Workflow
44
+
45
+ Output the team in two steps — manifest first, then content files. **Never put file content inline in the JSON.**
46
+
47
+ ### Chat Mode vs Task Mode
48
+
49
+ - **Chat mode** (user conversation): Output the manifest JSON in a ```json code block → system auto-saves and creates the directory → then use `file_write` for each content file.
50
+ - **Task mode** (assigned task): Use `file_write` to write the manifest JSON file directly (e.g., `file_write("~/.markus/builder-artifacts/teams/{name}/team.json", ...)`) → then use `file_write` for each content file. When submitting deliverables, set the reference to the artifact directory path.
51
+ - **A2A mode** (agent-to-agent): Same as task mode — write all files via `file_write`.
52
+
53
+ ### Step 1: Output Manifest JSON
54
+
55
+ **In chat mode**: Output the team structure as a JSON code block. The system auto-saves it.
56
+ **In task/A2A mode**: Write the manifest JSON file directly via `file_write`.
57
+
58
+ This JSON contains ONLY metadata and structure — **no file content**.
59
+
60
+ ```json
61
+ {
62
+ "type": "team",
63
+ "name": "team-name-kebab-case",
64
+ "displayName": "Team Display Name",
65
+ "version": "1.0.0",
66
+ "description": "Team purpose and goals",
67
+ "author": "",
68
+ "category": "development | devops | management | productivity | general",
69
+ "tags": ["tag1", "tag2"],
70
+ "team": {
71
+ "members": [
72
+ {
73
+ "name": "Manager Name",
74
+ "role": "manager",
75
+ "roleName": "project-manager",
76
+ "count": 1,
77
+ "skills": ["skill-id-1"]
78
+ },
79
+ {
80
+ "name": "Worker Name",
81
+ "role": "worker",
82
+ "roleName": "developer",
83
+ "count": 1,
84
+ "skills": ["skill-id-1", "skill-id-2"]
85
+ }
86
+ ]
87
+ }
88
+ }
89
+ ```
90
+
91
+ The system automatically saves this JSON and creates the directory. After that, you proceed to write files.
92
+
93
+ ### Step 2: Write Files with file_write
94
+
95
+ After the JSON is saved, write each file individually using `file_write`. The base path is `~/.markus/builder-artifacts/teams/{team-name}/` (use the `name` from your JSON).
96
+
97
+ **Write files in this order:**
98
+
99
+ 1. **ANNOUNCEMENT.md** — Team mission, member introduction, collaboration goals. At least 3 paragraphs.
100
+
101
+ 2. **NORMS.md** — Communication protocols, quality standards, escalation rules. Specific to this team's domain.
102
+
103
+ 3. **Each member's ROLE.md** — Write one at a time. Each ROLE.md should be at least 5 paragraphs, covering:
104
+ - Who this agent is (identity, personality)
105
+ - Core expertise and responsibilities
106
+ - Workflow and methodology
107
+ - Output standards and quality criteria
108
+ - Collaboration expectations within the team
109
+
110
+ 4. **POLICIES.md** (optional) — For members that need specific constraints.
111
+
112
+ **Example file_write calls:**
113
+
114
+ ```
115
+ file_write("~/.markus/builder-artifacts/teams/research-team/ANNOUNCEMENT.md", "# Research Team — Team Announcement\n\n...")
116
+ file_write("~/.markus/builder-artifacts/teams/research-team/NORMS.md", "# Research Team — Working Norms\n\n...")
117
+ file_write("~/.markus/builder-artifacts/teams/research-team/members/research-director/ROLE.md", "# Research Director\n\nYou are **Research Director** — ...\n\n...")
118
+ file_write("~/.markus/builder-artifacts/teams/research-team/members/senior-researcher/ROLE.md", "# Senior Researcher\n\nYou are **Senior Researcher** — ...\n\n...")
119
+ ```
120
+
121
+ **IMPORTANT**: The member directory slug is derived from the member's `name` field — lowercased, spaces to hyphens, non-alphanumeric removed.
122
+
123
+ ## Field Reference
124
+
125
+ ### Top-level fields
126
+ - **`type`**: Always `"team"`
127
+ - **`name`**: **MUST be English kebab-case** (e.g., `frontend-squad`, `research-team`). Even for Chinese teams, use English slug.
128
+ - **`displayName`**: Human-readable name, any language (e.g., `"前端开发小队"`)
129
+ - **`version`**: Semver (default `"1.0.0"`)
130
+ - **`description`**: Team purpose (any language)
131
+ - **`category`**: One of `development`, `devops`, `management`, `productivity`, `general`
132
+ - **`tags`**: Descriptive tags
133
+
134
+ ### `team.members[]` — Member Specifications (REQUIRED)
135
+ - **`name`**: Display name (the slug for file paths is derived from this)
136
+ - **`role`**: `"manager"` or `"worker"`
137
+ - **`roleName`**: Base role template from the dynamic context
138
+ - **`count`**: Number of instances (default 1)
139
+ - **`skills`**: Skill IDs from the dynamic context. **Actively assign skills — don't leave empty!**
140
+
141
+ ## After Creation
142
+
143
+ Once all files are written, tell the user:
144
+
145
+ 1. **The team has been created and saved** — summarize the team composition (name, members, their roles).
146
+ 2. **Go to the Builder page** to manage the team: install it to deploy all members, share it to Markus Hub, or delete it.
147
+ 3. **To modify or improve** this team (e.g., add new members, update roles, change team norms), just continue the conversation here — describe what you want to change and I'll update the files directly.
148
+
149
+ ## Rules
150
+
151
+ - **DO NOT** invent role names or skill IDs. Only use values from the dynamic context.
152
+ - **DO NOT** leave skills empty when relevant skills are available. Review the skills list!
153
+ - **DO NOT** put file content in the JSON. Always use `file_write` for files.
154
+ - **DO NOT** write artifacts to `~/.markus/shared/` or your working directory. Always use `~/.markus/builder-artifacts/teams/{name}/`.
155
+ - **The `name` field MUST be English kebab-case**.
156
+ - Every team MUST have exactly **one** member with `"role": "manager"` and at least **one** `"worker"`.
157
+ - Write each ROLE.md with **full attention** — at least 5 substantive paragraphs per member.
158
+ - Do NOT rush through members. Each one deserves careful, tailored content.
159
+ - After outputting the JSON, write files one by one — announce what you're writing each time.
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "skill",
3
+ "name": "team-building",
4
+ "displayName": "Team Building",
5
+ "version": "1.0.0",
6
+ "description": "Design and create AI team packages — manifest format, member structure, directory layout, and deployment for Markus team artifacts",
7
+ "author": "markus",
8
+ "category": "development",
9
+ "tags": ["builder", "team", "design", "manifest"],
10
+ "skill": {
11
+ "skillFile": "SKILL.md"
12
+ }
13
+ }
@@ -0,0 +1,10 @@
1
+ # Content Creation Team
2
+
3
+ Welcome to the Content Team. We create high-quality content that informs, engages, and converts.
4
+
5
+ ## Current Focus
6
+ - Awaiting content brief from stakeholders. The Content Director will set editorial priorities once a project is assigned.
7
+
8
+ ## Workflow
9
+ - The Director assigns topics. The Researcher provides source material. Writers produce drafts. The Director reviews and approves.
10
+ - All content goes through editorial review before publication.
@@ -0,0 +1,20 @@
1
+ # Content Team — Working Norms
2
+
3
+ ## Quality
4
+ - Every piece needs research backing. No publishing unsupported claims.
5
+ - Follow the brand style guide for tone, formatting, and terminology.
6
+ - All content is reviewed by the Director before acceptance.
7
+
8
+ ## Process
9
+ - Start with an outline or brief before writing the full piece.
10
+ - Writers should request research support early, not after the draft.
11
+ - Submit drafts with a summary of the piece's purpose and target audience.
12
+
13
+ ## Communication
14
+ - Share drafts early for feedback — don't wait until "perfect."
15
+ - Provide constructive feedback focused on improving the piece, not on style preferences.
16
+ - Flag missed deadlines immediately with a revised timeline.
17
+
18
+ ## Collaboration
19
+ - Research briefs are shared documents — everyone can read and build on them.
20
+ - Cross-review between writers improves quality. Volunteer to review teammates' work.
@@ -0,0 +1,18 @@
1
+ {
2
+ "type": "team",
3
+ "name": "content-team",
4
+ "displayName": "Content Creation Team",
5
+ "version": "1.0.0",
6
+ "description": "A content-focused team with a content strategist who plans, writers who create, and a researcher who provides insights. Ideal for marketing campaigns, documentation projects, and content operations.",
7
+ "author": "Markus Team",
8
+ "category": "productivity",
9
+ "tags": ["content", "writing", "marketing", "documentation", "creative"],
10
+ "icon": "edit",
11
+ "team": {
12
+ "members": [
13
+ { "name": "Content Director", "role": "manager", "roleName": "project-manager", "count": 1, "skills": [] },
14
+ { "name": "Writer", "role": "worker", "roleName": "content-writer", "count": 2, "skills": [] },
15
+ { "name": "Researcher", "role": "worker", "roleName": "research-assistant", "count": 1, "skills": [] }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,11 @@
1
+ # Development Squad
2
+
3
+ Welcome to the Development Squad. We build software features through structured sprints.
4
+
5
+ ## Current Focus
6
+ - Awaiting first project assignment. The PM will decompose requirements into tasks once a project is onboarded.
7
+
8
+ ## How We Work
9
+ - The PM assigns tasks based on requirements. Developers implement, Reviewer ensures quality, QA validates.
10
+ - All work goes through the task system — no side-channel requests.
11
+ - Submit via `task_submit_review` when done. The Reviewer or QA will validate before acceptance.