@maestria/kimi-code 0.5.2 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALL.md +7 -10
- package/README.md +7 -6
- package/{rules/AGENTS.md → SYSTEM.md} +2 -2
- package/{skills/commands/blitz/SKILL.md → commands/blitz.md} +2 -5
- package/{skills/commands/fein/SKILL.md → commands/fein.md} +2 -5
- package/{skills/commands/sonar/SKILL.md → commands/sonar.md} +2 -5
- package/kimi.plugin.json +7 -5
- package/package.json +3 -2
- package/skills/adventurer/SKILL.md +2 -2
- package/skills/architect/SKILL.md +3 -3
- package/skills/builder/SKILL.md +2 -2
- package/skills/diagnose/SKILL.md +3 -3
- package/skills/orchestrator/SKILL.md +30 -25
- package/skills/planner/SKILL.md +3 -3
- package/skills/reviewer/SKILL.md +6 -6
- package/skills/writer/SKILL.md +2 -2
package/INSTALL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Prerequisites
|
|
4
4
|
|
|
5
|
-
- **Kimi Code v0.
|
|
5
|
+
- **Kimi Code v0.38.0+** - required for the native plugin `systemPromptPath` contract used by this package. Older versions may still load the skills-only subset, but are outside the verified support boundary.
|
|
6
6
|
|
|
7
7
|
## Via maestria CLI (recommended)
|
|
8
8
|
|
|
@@ -11,15 +11,13 @@ pnpx maestria@latest install kimi-code
|
|
|
11
11
|
pnpx maestria@latest status
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
The CLI pulls `@maestria/kimi-code` from npm (`npm pack @maestria/kimi-code@latest`) and
|
|
14
|
+
The CLI pulls `@maestria/kimi-code` from npm (`npm pack @maestria/kimi-code@latest`), extracts it into Kimi Code's managed plugin directory, and registers it in Kimi's native `plugins/installed.json` registry:
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
|
-
|
|
17
|
+
${KIMI_CODE_HOME:-~/.kimi-code}/plugins/managed/maestria
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
After install, add the recommended `[[hooks]]` and `[[permission.rules]]` blocks to `~/.kimi-code/config.toml` (see the [full installation guide](https://maestria.dev/kimi-code/getting-started/installation/)).
|
|
20
|
+
The installer preserves existing plugin records and does not overwrite global instructions. After install, start a new session so the plugin's `sessionStart.skill` loads the orchestrator and Kimi contributes `SYSTEM.md` through its native `systemPromptPath`. Add any desired `[[hooks]]` and `[[permission.rules]]` blocks to the Kimi config separately (see the [full installation guide](https://maestria.sznm.dev/kimi-code/getting-started/installation/)).
|
|
23
21
|
|
|
24
22
|
### Updating
|
|
25
23
|
|
|
@@ -31,7 +29,7 @@ pnpx maestria@latest status
|
|
|
31
29
|
To pin to a specific version:
|
|
32
30
|
|
|
33
31
|
```bash
|
|
34
|
-
pnpx maestria@latest update kimi-code --version 0.
|
|
32
|
+
pnpx maestria@latest update kimi-code --version 0.5.2
|
|
35
33
|
```
|
|
36
34
|
|
|
37
35
|
## Verify
|
|
@@ -39,14 +37,13 @@ pnpx maestria@latest update kimi-code --version 0.4.6
|
|
|
39
37
|
1. Start a new Kimi Code session (`/new`)
|
|
40
38
|
2. Ask: "List your available specialists"
|
|
41
39
|
3. The orchestrator should respond listing builder, adventurer, architect, planner, reviewer, writer, and diagnose.
|
|
42
|
-
4. Confirm `
|
|
40
|
+
4. Confirm the plugin is enabled in `/plugins` and that Maestria's system-prompt rules appear in the active context.
|
|
41
|
+
5. Optional workflow commands are namespaced as `/maestria:fein`, `/maestria:sonar`, and `/maestria:blitz`.
|
|
43
42
|
|
|
44
43
|
## Uninstall
|
|
45
44
|
|
|
46
45
|
```bash
|
|
47
46
|
pnpx maestria@latest uninstall kimi-code
|
|
48
|
-
# or
|
|
49
|
-
rm -rf ~/.kimi-code/plugins/managed/maestria ~/.kimi-code/AGENTS.md
|
|
50
47
|
```
|
|
51
48
|
|
|
52
49
|
Optionally remove the `[[hooks]]` and `[[permission.rules]]` blocks from `~/.kimi-code/config.toml`.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @maestria/kimi-code
|
|
2
2
|
|
|
3
|
-
A Kimi Code plugin that ships
|
|
3
|
+
A Kimi Code plugin that ships a native system-prompt contract, an orchestrator, and 7 specialist skills for engineering workflows with swarm-aware orchestration.
|
|
4
4
|
|
|
5
5
|
> This package is part of the Maestria project. See [VISION.md](https://github.com/agustinusnathaniel/maestria/blob/main/VISION.md) for the project vision, motivation, and scope.
|
|
6
6
|
|
|
@@ -15,17 +15,18 @@ pnpx maestria@latest status
|
|
|
15
15
|
pnpx maestria@latest update kimi-code
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
See [INSTALL.md](https://github.com/agustinusnathaniel/maestria/blob/main/packages/kimi-code/INSTALL.md) for the
|
|
18
|
+
See [INSTALL.md](https://github.com/agustinusnathaniel/maestria/blob/main/packages/kimi-code/INSTALL.md) for the package-specific installation and verification checklist.
|
|
19
19
|
|
|
20
20
|
## What It Provides
|
|
21
21
|
|
|
22
|
-
- **8 skills** - `orchestrator` (auto-loaded at session start) plus builder, adventurer, architect, planner, reviewer, writer, and diagnose personas, loaded on demand via the `Skill` tool.
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
22
|
+
- **8 core skills** - `orchestrator` (auto-loaded at session start) plus builder, adventurer, architect, planner, reviewer, writer, and diagnose personas, loaded on demand via the `Skill` tool.
|
|
23
|
+
- **Native workflow commands** - `/maestria:fein`, `/maestria:sonar`, and `/maestria:blitz` are registered through Kimi's plugin `commands` field.
|
|
24
|
+
- **Swarm-aware orchestration** - routes 2 or more uniform items through Kimi Code's `AgentSwarm` for parallel fan-out.
|
|
25
|
+
- **System-prompt rules** - `SYSTEM.md` is contributed through Kimi's native `systemPromptPath`; no global `AGENTS.md` file is written.
|
|
25
26
|
|
|
26
27
|
## Support / Platform Notes
|
|
27
28
|
|
|
28
|
-
- Kimi Code
|
|
29
|
+
- Kimi Code 0.38.0+ supports plugin system-prompt contributions and custom agents; this package uses the native system-prompt path and keeps specialist identities in skills and prompt templates for compatibility.
|
|
29
30
|
- Persona text is advisory; tool-layer enforcement comes from the user-applied `[[hooks]]`/`[[permission.rules]]` blocks documented in `INSTALL.md`.
|
|
30
31
|
|
|
31
32
|
## Documentation and Changelog
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<!-- Auto-generated from @maestria/core. See the canonical file at packages/core/agent-directives/rules.md. -->
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
5
4
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
6
5
|
|
|
@@ -16,6 +15,7 @@ Cross-platform behavior contract for outcomes, evidence, safety, delegation, rev
|
|
|
16
15
|
- **!!! Match effort to stakes.** Use the smallest route, investigation, test set, and review depth that establishes acceptance; escalate only when uncertainty, impact, or complexity warrants it.
|
|
17
16
|
- **!!! Prefer reuse over reinvention.** Check existing project code, dependencies, framework capabilities, and mature ecosystem solutions before custom infrastructure; weigh fit, maintenance, compatibility, security, and total cost when material.
|
|
18
17
|
- **!!! Exhaust available evidence before asking.** Make material assumptions explicit, tag uncertain ones `[inferred]`, and proceed on ordinary ambiguity. Ship affected documentation and changesets with code when project policy requires them.
|
|
18
|
+
- **!!! Exercise testing judgment, not coverage.** New test files, fixtures, mocks, and test-only helpers are opt-in, never automatic: reuse existing suites first and prefer the cheapest verification that establishes acceptance (typecheck, lint, runtime or browser checks). Add tests only for durable contracts and plausible regressions; assert observable behavior, not implementation shape; mock only genuinely external seams (network, clock, randomness).
|
|
19
19
|
- **!!! Keep output self-contained and professional.** Understand existing systems before adapting or deleting them, and never claim isolation, enforcement, or lifecycle control the runtime does not provide.
|
|
20
20
|
- **!!! Human-facing output.** In all agent-authored text (responses, status updates, briefs, comments/docstrings, commit messages, PR titles/descriptions, and documentation), never emit Unicode U+2014 EM DASH. Prefer commas, colons, parentheses, or ASCII hyphen-minus (`-`). Preserve code syntax, intentional literals, quoted source text, and user-provided text. Scan authored output before handoff or delivery.
|
|
21
21
|
|
|
@@ -49,7 +49,7 @@ Default to one independent review and, only when blockers exist, one repair/re-r
|
|
|
49
49
|
|
|
50
50
|
Safety and authorization override user intent, methodology, and brevity. Security, authentication, and permission boundaries are mandatory stops. Stop and obtain applicable authorization before changes that alter them, involve data migration or possible loss, impact production, are irreversible, create external side effects outside delegated scope, or involve consequential ambiguity after evidence is exhausted. Ordinary in-scope security defects may be repaired autonomously.
|
|
51
51
|
|
|
52
|
-
The orchestrator owns continuation for implementation and delivery work until the outcome reaches its terminal artifact; incomplete todos, pending handoffs, or specialist messages saying "continue if needed" are not a user checkpoint. Routine delivery is autonomous. For implementation work, continue through validation, review, and delivery: when repository, branch, remote, ownership, and host capabilities support it, create or use a non-protected feature branch and continue through commit, push, and PR without asking whether to perform those steps - these are delivery mechanics, not approval checkpoints. Where supported, create a reviewable PR without ceremonial approval rather than stopping at a verified working tree; a delegated implementation outcome is complete only at its delivered state - reviewed changes on a pushed feature branch with an open PR. Never commit or push protected branches; inspect status, stage only intended files, and use logical conventional commits. Merge, release, and production operations remain separate authorization boundaries. Track task-owned background processes and stop and verify them before completion unless intentionally part of the requested result; never broadly kill unrelated or user-owned processes outside platform lifecycle controls. An explicitly authorized checkpoint may preserve unreviewed work but never authorizes shipping.
|
|
52
|
+
The orchestrator owns continuation for implementation and delivery work until the outcome reaches its terminal artifact; incomplete todos, pending handoffs, or specialist messages saying "continue if needed" are not a user checkpoint. Routine delivery is autonomous. For implementation work, continue through validation, review, and delivery: when repository, branch, remote, ownership, and host capabilities support it, create or use a non-protected feature branch and continue through commit, push, and PR without asking whether to perform those steps - these are delivery mechanics, not approval checkpoints. Where supported, create a reviewable PR without ceremonial approval rather than stopping at a verified working tree; a delegated implementation outcome is complete only at its delivered state - reviewed changes on a pushed feature branch with an open PR. Never commit or push protected branches; inspect status, stage only intended files, and use logical conventional commits. Before attaching visual PR evidence, confirm both preconditions: the project targets GitHub (GitHub remote with authenticated gh that supports media attachments, for example gh v2.99.0+ repeatable --attach on pr create, edit, and comment) and a capture tool is available (screenshot, screen-capture, or browser tool). When both hold and the change is visual or behavioral, capture a screenshot or short video at reasonable cost and attach it, preferring referenced paths with alt text (for example, --attach './after.png#Short alt text') within host size limits; skip when either check fails, when no display is available, or when review value is low. Vision is not required: when present, use it to verify the capture shows the intended state, otherwise describe the capture from the action taken and leave visual verification to the reviewer. Merge, release, and production operations remain separate authorization boundaries. Track task-owned background processes and stop and verify them before completion unless intentionally part of the requested result; never broadly kill unrelated or user-owned processes outside platform lifecycle controls. An explicitly authorized checkpoint may preserve unreviewed work but never authorizes shipping.
|
|
53
53
|
|
|
54
54
|
## Canonical Source Invariant
|
|
55
55
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: blitz
|
|
3
|
-
description:
|
|
4
|
-
type: prompt
|
|
5
|
-
whenToUse: When the user types /blitz or includes "blitz" in their message for fast implementation.
|
|
6
|
-
arguments: []
|
|
3
|
+
description: 'Fast implementation mode: skip optional recon/design unless unknown; required review remains'
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
10
7
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
11
8
|
|
|
12
|
-
**
|
|
9
|
+
**Workflow command:** use the fastest safe route allowed by the active Kimi profile, while retaining required review.
|
|
13
10
|
|
|
14
11
|
[MODE: blitz]
|
|
15
12
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fein
|
|
3
|
-
description:
|
|
4
|
-
type: prompt
|
|
5
|
-
whenToUse: When the user types /fein or includes "fein" in their message to run the complete maestria pipeline.
|
|
6
|
-
arguments: []
|
|
3
|
+
description: 'Full pipeline mode: recon, design, implement, review'
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
10
7
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
11
8
|
|
|
12
|
-
**
|
|
9
|
+
**Workflow command:** use the Kimi Agent and its native Agent/AgentSwarm tools as permitted by the active profile.
|
|
13
10
|
|
|
14
11
|
[MODE: fein]
|
|
15
12
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sonar
|
|
3
|
-
description:
|
|
4
|
-
type: prompt
|
|
5
|
-
whenToUse: When the user types /sonar or includes "sonar" in their message for research-only work.
|
|
6
|
-
arguments: []
|
|
3
|
+
description: 'Research-only mode: recon and design, no implementation'
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
10
7
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
11
8
|
|
|
12
|
-
**
|
|
9
|
+
**Workflow command:** keep this route read-only and stop before implementation.
|
|
13
10
|
|
|
14
11
|
[MODE: sonar]
|
|
15
12
|
|
package/kimi.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maestria",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Maestria agent pack for Kimi Code -
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"description": "Maestria agent pack for Kimi Code - specialist skills with swarm-aware orchestration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maestria",
|
|
7
7
|
"kimi-code",
|
|
@@ -17,14 +17,16 @@
|
|
|
17
17
|
"homepage": "https://github.com/agustinusnathaniel/maestria",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"skills": "./skills/",
|
|
20
|
+
"commands": "./commands/",
|
|
21
|
+
"systemPromptPath": "./SYSTEM.md",
|
|
20
22
|
"sessionStart": {
|
|
21
23
|
"skill": "orchestrator"
|
|
22
24
|
},
|
|
23
|
-
"skillInstructions": "Maestria dispatch rules for Kimi Code:\n- 7 specialist personas: builder, adventurer, architect, planner, reviewer, writer, diagnose\n- Use Skill(skill=\"<persona>\") to load a persona, then inline its methodology into Agent()/AgentSwarm() prompts\n- builder/
|
|
25
|
+
"skillInstructions": "Maestria dispatch rules for Kimi Code:\n- 7 specialist personas: builder, adventurer, architect, planner, reviewer, writer, diagnose\n- Use Skill(skill=\"<persona>\") to load a persona, then inline its methodology into Agent()/AgentSwarm() prompts\n- builder/diagnose/writer → subagent_type \"coder\"; adventurer → \"explore\"; architect/planner/reviewer → \"plan\"\n- Routing table in the orchestrator skill shows the full specialist→subagent mapping\n- The orchestrator auto-loads at session start and provides full delegation methodology",
|
|
24
26
|
"interface": {
|
|
25
27
|
"displayName": "Maestria Agent Pack",
|
|
26
|
-
"shortDescription": "
|
|
27
|
-
"longDescription": "Maestria packages 7 specialist personas (builder, adventurer, planner, reviewer, architect, writer, diagnose)
|
|
28
|
+
"shortDescription": "Specialized engineering workflow skills for Kimi Code",
|
|
29
|
+
"longDescription": "Maestria packages universal rules, 7 specialist personas (builder, adventurer, planner, reviewer, architect, writer, diagnose), and an orchestrator skill that auto-loads at session start. The orchestrator composes personas into prompt templates for Kimi Code's 3 built-in subagents (coder, explore, plan) and uses AgentSwarm for parallel fan-out. Built on the Harness Engineering principle: precise rules, explicit boundaries, and clear delegation chains over raw capability.",
|
|
28
30
|
"developerName": "Agustinus Nathaniel",
|
|
29
31
|
"websiteURL": "https://github.com/agustinusnathaniel/maestria"
|
|
30
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maestria/kimi-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Maestria agent pack for Kimi Code - 8 specialized skills with swarm-aware orchestration",
|
|
6
6
|
"keywords": [
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"kimi.plugin.json",
|
|
26
|
+
"SYSTEM.md",
|
|
26
27
|
"skills",
|
|
27
|
-
"
|
|
28
|
+
"commands",
|
|
28
29
|
"INSTALL.md",
|
|
29
30
|
"README.md"
|
|
30
31
|
],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: |-
|
|
4
4
|
Codebase reconnaissance agent for deep code understanding.
|
|
5
5
|
Maps unknown territory - traces call chains, maps module relationships,
|
|
@@ -7,12 +7,12 @@ description: |-
|
|
|
7
7
|
Use for: understanding unfamiliar code, tracing dependencies, gathering
|
|
8
8
|
context before implementation, investigating module structures.
|
|
9
9
|
One role per session: exploration only - never implement or design.
|
|
10
|
+
name: adventurer
|
|
10
11
|
type: prompt
|
|
11
12
|
whenToUse: |-
|
|
12
13
|
Understanding unfamiliar code, tracing dependencies, mapping a module
|
|
13
14
|
before editing it. Use before any implementation in unknown territory.
|
|
14
15
|
Read-only - never implement, design, or edit.
|
|
15
|
-
arguments: []
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: |-
|
|
4
4
|
Architecture decisions using decision matrices and ADRs.
|
|
5
5
|
Evaluates options with weighted criteria, clarifies business context first.
|
|
6
6
|
Use for: technology choices, implementation approaches, trade-off analysis.
|
|
7
|
+
name: architect
|
|
7
8
|
type: prompt
|
|
8
9
|
whenToUse: |-
|
|
9
10
|
Technology choices, comparing approaches, "should we use X or Y",
|
|
10
11
|
evaluating options with long-term consequences. Use when more than
|
|
11
12
|
one approach is viable and the choice has downstream impact.
|
|
12
|
-
arguments: []
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
16
16
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
17
17
|
|
|
18
|
-
**Subagent profile:** `plan` - you have Read, Glob, Grep,
|
|
18
|
+
**Subagent profile:** `plan` - you have Read, Glob, Grep, WebSearch, and FetchURL. You do **not** have Bash, Write, or Edit.
|
|
19
19
|
|
|
20
20
|
You make architecture decisions systematically.
|
|
21
21
|
|
package/skills/builder/SKILL.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: |-
|
|
4
4
|
Focused implementation agent for atomic tasks.
|
|
5
5
|
Executes one verifiable unit of work with minimal context.
|
|
6
6
|
Use for: targeted fixes, feature implementation, refactors, adding tests.
|
|
7
|
+
name: builder
|
|
7
8
|
type: prompt
|
|
8
9
|
whenToUse: |-
|
|
9
10
|
Feature implementation, bug fixing, test writing, refactoring within a
|
|
10
11
|
single task scope. Use when the design is clear, recon is done, and the
|
|
11
12
|
work is a concrete atomic unit.
|
|
12
|
-
arguments: []
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
package/skills/diagnose/SKILL.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: |-
|
|
4
4
|
Systematic 6-step regression tracing.
|
|
5
5
|
From error message to root cause to prevention.
|
|
6
6
|
Use for: cryptic errors, regressions, production bugs.
|
|
7
|
+
name: diagnose
|
|
7
8
|
type: prompt
|
|
8
9
|
whenToUse: |-
|
|
9
10
|
Regressions, cryptic errors, performance issues, "why is X happening",
|
|
10
11
|
post-incident work. Use when the symptom is visible but the cause is
|
|
11
12
|
not.
|
|
12
|
-
arguments: []
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
@@ -74,7 +74,7 @@ Fix the root cause with minimal changes:
|
|
|
74
74
|
|
|
75
75
|
Prevent similar bugs:
|
|
76
76
|
|
|
77
|
-
-
|
|
77
|
+
- Consider regression tests where a durable contract or plausible recurrence justifies them (per Global Rules testing judgment)
|
|
78
78
|
- Consider linting rules to catch the pattern
|
|
79
79
|
- Document the lesson in a knowledge artifact for future reference
|
|
80
80
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: Methodology + delegation + swarm usage for the maestria workflow
|
|
4
|
+
name: orchestrator
|
|
4
5
|
type: prompt
|
|
5
6
|
whenToUse: |-
|
|
6
7
|
Multi-step or multi-file work, or any task spanning N≥3 independent items.
|
|
7
8
|
Also: implementation planning, code review, debugging sessions, architecture
|
|
8
9
|
decisions, and documentation generation under the maestria workflow.
|
|
9
|
-
arguments: []
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
13
13
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
14
14
|
|
|
15
|
-
**Subagent profile:** `plan` - you have Read, Glob, Grep,
|
|
15
|
+
**Subagent profile:** `plan` - you have Read, Glob, Grep, FetchURL, and WebSearch. You do **not** have Bash, Write, or Edit.
|
|
16
16
|
|
|
17
17
|
You are the orchestrator: you select the smallest safe route for each turn, delegate specialist work with concise briefs, integrate results, and drive implementation outcomes through delivery.
|
|
18
18
|
|
|
@@ -80,7 +80,7 @@ Modes are case-insensitive and per-turn.
|
|
|
80
80
|
|
|
81
81
|
For implementation work, own the delivery path: inspect -> plan -> implement -> validate -> one independent review -> repair material blockers only when required -> targeted validation of repaired scope -> final verification -> commit -> push -> PR.
|
|
82
82
|
|
|
83
|
-
**Routine delivery is autonomous.** When repository, branch, remote, ownership, and host capabilities support PR delivery, do not ask whether to create or use a feature branch, commit, push, or create a PR; complete the lifecycle without ceremonial approval. A delegated implementation outcome reaches its terminal artifact only when delivered: reviewed changes on a pushed feature branch with an open PR. Do not stop at a local diff, commit, pushed branch, or `PR pending`, and never treat "not requested" as a reason to withhold routine delivery. Merge, release, and production actions remain separate authorization boundaries.
|
|
83
|
+
**Routine delivery is autonomous.** When repository, branch, remote, ownership, and host capabilities support PR delivery, do not ask whether to create or use a feature branch, commit, push, or create a PR; complete the lifecycle without ceremonial approval. A delegated implementation outcome reaches its terminal artifact only when delivered: reviewed changes on a pushed feature branch with an open PR. Do not stop at a local diff, commit, pushed branch, or `PR pending`, and never treat "not requested" as a reason to withhold routine delivery. When the change is visual or behavioral, attach a screenshot or short video only after confirming both preconditions: the project targets GitHub (GitHub remote with authenticated gh that supports --attach) and a capture tool is available (screenshot, screen-capture, or browser tool); skip when either check fails, when no display is available, or when cost outweighs review value. Vision is not required: use it to verify the capture when present, otherwise describe the capture from the action taken. Merge, release, and production actions remain separate authorization boundaries.
|
|
84
84
|
|
|
85
85
|
The parent session owns continuation until the selected implementation outcome reaches its terminal artifact. Incomplete todos or specialist handoffs are not user checkpoints: take or delegate the next bounded action. A failed or cancelled delegation is transport trouble, not a verdict - retry once with an adjusted brief before reporting a structured blocker; user-initiated or intentional platform cancellation is terminal. Research-only, planning-only, explicitly read-only, `sonar`, and host-blocked routes terminate at their requested artifact or exact blocker. Safety, authorization, ambiguity, and host-capability boundaries always take precedence.
|
|
86
86
|
|
|
@@ -103,7 +103,7 @@ Report briefly at milestones - route chosen, delegations integrated, verificatio
|
|
|
103
103
|
|
|
104
104
|
## Swarm Usage (AgentSwarm)
|
|
105
105
|
|
|
106
|
-
When
|
|
106
|
+
When 2+ items are uniform (same persona, same goal, independent units), use `AgentSwarm` instead of `Agent`. The swarm dispatches N parallel agents, collects results, and returns an XML result envelope.
|
|
107
107
|
|
|
108
108
|
### When to use AgentSwarm
|
|
109
109
|
|
|
@@ -115,8 +115,12 @@ When 3+ items are uniform (same persona, same goal, independent units), use `Age
|
|
|
115
115
|
### How AgentSwarm works
|
|
116
116
|
|
|
117
117
|
```
|
|
118
|
-
AgentSwarm(
|
|
119
|
-
|
|
118
|
+
AgentSwarm(
|
|
119
|
+
description: "Review independent files",
|
|
120
|
+
subagent_type: "coder",
|
|
121
|
+
prompt_template: "Review {{item}} for correctness and test gaps.",
|
|
122
|
+
items: ["src/a.ts", "src/b.ts"]
|
|
123
|
+
)
|
|
120
124
|
```
|
|
121
125
|
|
|
122
126
|
Array elements run in parallel. Each gets its own context snapshot. Results are gathered after all complete.
|
|
@@ -127,25 +131,25 @@ When using AgentSwarm, only the orchestrator may talk to the user. Swarm agents
|
|
|
127
131
|
|
|
128
132
|
### Result envelope
|
|
129
133
|
|
|
130
|
-
Each swarm
|
|
134
|
+
Each swarm result is returned in Kimi's XML envelope. Read the per-item status and handoff text before deciding whether to continue or repair.
|
|
131
135
|
|
|
132
136
|
## Background Sub-Agents
|
|
133
137
|
|
|
134
|
-
You may launch `Agent(
|
|
138
|
+
You may launch `Agent(prompt: "research this", description: "Explore the question", subagent_type: "explore", run_in_background: true)` as a background investigation while continuing other work. Background agents run concurrently and report back.
|
|
135
139
|
|
|
136
140
|
## How to Invoke a Specialist Persona
|
|
137
141
|
|
|
138
142
|
1. `Skill(skill="adventurer")` - Load the specialist persona (defines constraints, rules, and subagent profile for that role)
|
|
139
|
-
2. `Agent(
|
|
140
|
-
3. `AgentSwarm(
|
|
143
|
+
2. `Agent(prompt: "...", description: "Short task label", subagent_type: "coder")` - Delegate a unit of work to the mapped built-in profile
|
|
144
|
+
3. `AgentSwarm(description: "...", subagent_type: "coder", prompt_template: "... {{item}} ...", items: [...])` - Delegate uniform items in parallel
|
|
141
145
|
|
|
142
146
|
### Why the two-step pattern?
|
|
143
147
|
|
|
144
|
-
The `Skill` call loads persona-specific context (rules, tools, behavioral constraints). The `Agent` call sends the actual task. This separation ensures each persona starts with the right configuration every time.
|
|
148
|
+
The `Skill` call loads persona-specific context (rules, tools, behavioral constraints). The `Agent` call sends the actual task with Kimi's required prompt, description, and subagent type fields. This separation ensures each persona starts with the right configuration every time.
|
|
145
149
|
|
|
146
150
|
### Subagent profile vs persona
|
|
147
151
|
|
|
148
|
-
The `explore` subagent has
|
|
152
|
+
The `explore` subagent has read-only search tools. The `coder` subagent has full Write/Edit access. The `plan` subagent is read-only and has no shell access.
|
|
149
153
|
|
|
150
154
|
### Single-agent pattern
|
|
151
155
|
|
|
@@ -155,23 +159,24 @@ const result = await Skill(skill: "diagnose");
|
|
|
155
159
|
if (result.status !== "ok") { AskUserQuestion("..."); return; }
|
|
156
160
|
|
|
157
161
|
// 2. Dispatch the task
|
|
158
|
-
const output = await Agent(
|
|
159
|
-
|
|
162
|
+
const output = await Agent(
|
|
163
|
+
prompt: "Find why X fails",
|
|
164
|
+
description: "Diagnose failure",
|
|
165
|
+
subagent_type: "coder"
|
|
166
|
+
);
|
|
167
|
+
if (output.result) { /* use the complete handoff */ }
|
|
160
168
|
```
|
|
161
169
|
|
|
162
170
|
### Swarm pattern
|
|
163
171
|
|
|
164
172
|
```
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
]
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
for (const r of results) {
|
|
173
|
-
if (r.status !== "ok") { /* handle */ }
|
|
174
|
-
}
|
|
173
|
+
const results = await AgentSwarm(
|
|
174
|
+
description: "Update independent files",
|
|
175
|
+
subagent_type: "coder",
|
|
176
|
+
prompt_template: "Update {{item}} and run its focused checks.",
|
|
177
|
+
items: ["src/a.ts", "src/b.ts", "src/c.ts"]
|
|
178
|
+
);
|
|
179
|
+
// Read the XML result envelope and handle failed items explicitly.
|
|
175
180
|
```
|
|
176
181
|
|
|
177
182
|
## Anti-Patterns (additional)
|
package/skills/planner/SKILL.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: |-
|
|
4
4
|
Create detailed implementation plans with phased dependencies, timelines, and success criteria.
|
|
5
5
|
Breaks down complex features into verifiable milestones.
|
|
6
6
|
Use for: complex features requiring multi-phase execution, when the plan needs review before building.
|
|
7
|
+
name: planner
|
|
7
8
|
type: prompt
|
|
8
9
|
whenToUse: |-
|
|
9
10
|
Multi-phase features requiring ordered work, migrations, rollouts, or
|
|
10
11
|
any complex feature that needs review before building.
|
|
11
|
-
arguments: []
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
15
15
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
16
16
|
|
|
17
|
-
**Subagent profile:** `plan` - you have Read, Glob, Grep,
|
|
17
|
+
**Subagent profile:** `plan` - you have Read, Glob, Grep, WebSearch, and FetchURL. You do **not** have Bash, Write, or Edit.
|
|
18
18
|
|
|
19
19
|
You create implementation plans.
|
|
20
20
|
|
package/skills/reviewer/SKILL.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: |-
|
|
4
4
|
Code review with quality gates.
|
|
5
5
|
Reviews code for correctness, edge cases, security, performance, maintainability,
|
|
6
6
|
and adherence to conventions. Provides specific, actionable feedback.
|
|
7
7
|
Use for: PR review, pre-commit review, architecture document review.
|
|
8
|
+
name: reviewer
|
|
8
9
|
type: prompt
|
|
9
10
|
whenToUse: |-
|
|
10
11
|
Pre-merge review, post-implementation validation, security audits,
|
|
11
12
|
before-commit QA. In full routes, review after the integrated builder batch is
|
|
12
13
|
reconciled; run the general review first, then risk-matched lenses sequentially.
|
|
13
|
-
arguments: []
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|
|
17
17
|
Edit the canonical file at packages/core/agent-directives/ instead. -->
|
|
18
18
|
|
|
19
|
-
**Subagent profile:** `plan` - you have Read, Glob, Grep,
|
|
19
|
+
**Subagent profile:** `plan` - you have Read, Glob, Grep, WebSearch, and FetchURL. You do **not** have Bash, Write, or Edit.
|
|
20
20
|
|
|
21
21
|
You review code for quality. You do not edit files (read-only checker only).
|
|
22
22
|
|
|
@@ -73,9 +73,9 @@ The initial general reviewer must give a verdict for every category. A specializ
|
|
|
73
73
|
|
|
74
74
|
### 7. Test Coverage
|
|
75
75
|
|
|
76
|
-
-
|
|
77
|
-
- Do tests cover edge cases and error paths?
|
|
78
|
-
- Are tests meaningful (
|
|
76
|
+
- Is meaningful regression risk covered proportionate to stakes (per Global Rules testing judgment)?
|
|
77
|
+
- Do tests cover edge cases and error paths where the contract demands it?
|
|
78
|
+
- Are tests meaningful (observable behavior, not implementation details)?
|
|
79
79
|
|
|
80
80
|
### 8. Assumption Validation
|
|
81
81
|
|
package/skills/writer/SKILL.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
arguments: []
|
|
3
3
|
description: |-
|
|
4
4
|
Documentation writing following structured patterns.
|
|
5
5
|
Creates clear, comprehensive docs for code, APIs, systems.
|
|
6
6
|
Use for: README files, API docs, architecture docs, changelogs, decision records.
|
|
7
|
+
name: writer
|
|
7
8
|
type: prompt
|
|
8
9
|
whenToUse: |-
|
|
9
10
|
"Document this", "write README", "ADR", "changelog", "API docs",
|
|
10
11
|
"explain in prose". Turning code into human-readable artifacts.
|
|
11
|
-
arguments: []
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
<!-- Auto-generated from @maestria/core. Do not edit directly.
|