@maestria/kimi-code 0.4.15 → 0.4.17
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 +1 -1
- package/README.md +21 -67
- package/package.json +1 -1
- package/rules/AGENTS.md +16 -5
- package/skills/builder/SKILL.md +2 -23
- package/skills/orchestrator/SKILL.md +12 -4
- package/skills/reviewer/SKILL.md +2 -0
package/INSTALL.md
CHANGED
package/README.md
CHANGED
|
@@ -2,90 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
A declarative, manifest-based Kimi Code plugin that ships 8 specialized skills (orchestrator + 7 specialists) for engineering workflows with swarm-aware orchestration.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> This package is part of Maestria. See [VISION.md](https://github.com/agustinusnathaniel/maestria/blob/main/VISION.md) for the project vision, motivation, and scope. The skills and rules are **generated** from the canonical directives in `packages/core/agent-directives/` by the [sync pipeline](https://github.com/agustinusnathaniel/maestria/blob/main/CONTRIBUTING.md#3-the-sync-pipeline-core-concept).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
+
# Recommended: via the maestria CLI (pulls the package from npm into ~/.kimi-code/plugins/managed/maestria)
|
|
10
11
|
pnpx maestria@latest install kimi-code
|
|
11
12
|
pnpx maestria@latest status
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
The CLI pulls `@maestria/kimi-code` from npm and extracts it into `~/.kimi-code/plugins/managed/maestria`.
|
|
15
|
-
|
|
16
|
-
## The 8 Skills at a Glance
|
|
17
|
-
|
|
18
|
-
| Skill | Subagent | Purpose |
|
|
19
|
-
| --- | --- | --- |
|
|
20
|
-
| `orchestrator` | main | Auto-loaded at session start. Methodology, delegation, swarm. |
|
|
21
|
-
| `builder` | `coder` | Focused implementation - atomic tasks, write code, run tests. |
|
|
22
|
-
| `adventurer` | `explore` | Codebase reconnaissance - read-only exploration, structured reports. |
|
|
23
|
-
| `architect` | `coder` | Architecture decisions, trade-offs, ADRs. |
|
|
24
|
-
| `planner` | `plan` | Multi-phase implementation plans, success criteria, rollback. |
|
|
25
|
-
| `reviewer` | `coder` | Code review with quality gates - no editing, structured feedback. |
|
|
26
|
-
| `writer` | `coder` | Documentation - READMEs, API docs, changelogs, ADR transcription. |
|
|
27
|
-
| `diagnose` | `coder` | Root cause analysis - 6-step methodology, blast-radius audit. |
|
|
28
|
-
|
|
29
|
-
The orchestrator's `whenToUse` field teaches the model when to dispatch each persona. The 7 specialists are loaded on demand via the `Skill` tool.
|
|
30
|
-
|
|
31
|
-
## Design Philosophy
|
|
32
|
-
|
|
33
|
-
This plugin is built on the **Harness Engineering** principle: `Agent = Model + Harness`. The harness is what turns a raw LLM into a reliable coding agent - the model is just one component.
|
|
34
|
-
|
|
35
|
-
The 6 harness components map directly to plugin features:
|
|
36
|
-
|
|
37
|
-
| Component | Plugin Mapping |
|
|
38
|
-
| ----------------- | ---------------------------------------------------------------------------- |
|
|
39
|
-
| **Instructions** | `rules/AGENTS.md` placed at `~/.kimi-code/AGENTS.md` (auto-loaded) |
|
|
40
|
-
| **Tools** | Skill prescription per specialist; `AgentSwarm` for parallel fan-out |
|
|
41
|
-
| **Sandboxes** | Subagent profile tool lists (`coder`/`explore`/`plan`); `permission.rules` |
|
|
42
|
-
| **Orchestration** | `sessionStart.skill` (orchestrator auto-loads); `Agent` / `AgentSwarm` tools |
|
|
43
|
-
| **Guardrails** | `!!!` rule markers in every SKILL.md; iteration limits; persona constraints |
|
|
44
|
-
| **Observability** | `PreCompact` / `PostCompact` hooks (observation-only); structured handoffs |
|
|
45
|
-
|
|
46
|
-
Most agent failures are configuration failures, not model failures. The plugin's skills are designed with this principle - precise rules, explicit boundaries, and clear delegation chains over raw capability.
|
|
47
|
-
|
|
48
|
-
### How It Works
|
|
49
13
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
4. **Rules loaded** - `~/.kimi-code/AGENTS.md` (which the user copies from `rules/AGENTS.md`) is auto-loaded by Kimi Code's session-start context preparer.
|
|
54
|
-
5. **Specialists dispatched** - the orchestrator loads specialist skills via the `Skill` tool and inlines them into `Agent` / `AgentSwarm` prompts.
|
|
55
|
-
6. **Swarm fan-out** - for ≥3 uniform items, `AgentSwarm` runs the same persona against a list of items, returning a single `<agent_swarm_result>` envelope.
|
|
14
|
+
# Update (latest by default; pin with --version)
|
|
15
|
+
pnpx maestria@latest update kimi-code
|
|
16
|
+
```
|
|
56
17
|
|
|
57
|
-
|
|
18
|
+
See [INSTALL.md](https://github.com/agustinusnathaniel/maestria/blob/main/packages/kimi-code/INSTALL.md) for the full checklist, including the recommended `[[hooks]]` and `[[permission.rules]]` tool-layer safety configuration.
|
|
58
19
|
|
|
59
|
-
|
|
20
|
+
## What It Provides
|
|
60
21
|
|
|
61
|
-
- **
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
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
|
+
- **Swarm-aware orchestration** - routes ≥3 uniform items through Kimi Code's `AgentSwarm` for parallel fan-out.
|
|
24
|
+
- **Global rules** - `rules/AGENTS.md` auto-loaded by Kimi Code at session start.
|
|
25
|
+
- **Declarative-only** - manifest plus `skills/` and `rules/`; no TypeScript, SDK hooks, or build step.
|
|
64
26
|
|
|
65
|
-
|
|
27
|
+
## Support / Platform Notes
|
|
66
28
|
|
|
67
|
-
|
|
29
|
+
- Kimi Code hardcodes its `coder`/`explore`/`plan` subagents; the 7 specialist identities are persona content in prompt templates, not custom subagent definitions.
|
|
30
|
+
- Persona text is advisory; tool-layer enforcement comes from the user-applied `[[hooks]]`/`[[permission.rules]]` blocks documented in `INSTALL.md`.
|
|
31
|
+
- The generated skills and rules are projections of the canonical core directives. To change behavior, edit `packages/core/agent-directives/` and re-run the sync pipeline - never edit the generated files under `skills/` or `rules/` directly.
|
|
68
32
|
|
|
69
|
-
|
|
70
|
-
pnpx maestria@latest update kimi-code
|
|
71
|
-
```
|
|
33
|
+
## Documentation and Changelog
|
|
72
34
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
pnpx maestria@latest update kimi-code@0.4.6
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
See [INSTALL.md](./INSTALL.md) for details.
|
|
35
|
+
- [User-facing documentation](https://maestria.sznm.dev/kimi-code/) on the docs site
|
|
36
|
+
- [Installation checklist](https://github.com/agustinusnathaniel/maestria/blob/main/packages/kimi-code/INSTALL.md)
|
|
37
|
+
- [Changelog](https://github.com/agustinusnathaniel/maestria/blob/main/packages/kimi-code/CHANGELOG.md)
|
|
80
38
|
|
|
81
39
|
## Contributing
|
|
82
40
|
|
|
83
|
-
See [Contributing](/kimi-code/contributing/) on the docs site.
|
|
41
|
+
See [Contributing](https://maestria.sznm.dev/kimi-code/contributing/) on the docs site.
|
|
84
42
|
|
|
85
43
|
## License
|
|
86
44
|
|
|
87
45
|
MIT
|
|
88
|
-
|
|
89
|
-
## Related
|
|
90
|
-
|
|
91
|
-
- [`@maestria/opencode`](../opencode/README.md) - the OpenCode variant of this plugin (TypeScript SDK, programmatic hooks).
|
package/package.json
CHANGED
package/rules/AGENTS.md
CHANGED
|
@@ -13,7 +13,8 @@ This is the cross-platform behavior contract. It defines outcomes, evidence, saf
|
|
|
13
13
|
`!!!` marks a non-negotiable default-path rule. Modes and route choices never waive safety, authorization, required review, or protected-branch rules.
|
|
14
14
|
|
|
15
15
|
- **!!! Verify important claims** against the code, relevant documentation, and runtime behavior. Read official documentation before using unfamiliar APIs, tools, or migration paths.
|
|
16
|
-
- **!!!
|
|
16
|
+
- **!!! Match effort to stakes.** Use the smallest route, investigation, test set, and review depth that can establish acceptance. Escalate only when uncertainty, impact, or complexity warrants it.
|
|
17
|
+
- **!!! 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; use a small local implementation when it is simpler and lower risk. Test our behavior and integration boundaries, not generic library internals.
|
|
17
18
|
- Do not avoid useful analysis or investigation by anthropomorphizing machine effort; choose approaches by technical trade-offs and evidence.
|
|
18
19
|
- Audit and ship affected documentation and required changesets with code when project policy requires them.
|
|
19
20
|
- **!!! Exhaust available evidence before asking.** Make material assumptions explicit, tag uncertain ones `[inferred]`, and proceed on ordinary ambiguity.
|
|
@@ -34,6 +35,14 @@ This is the cross-platform behavior contract. It defines outcomes, evidence, saf
|
|
|
34
35
|
- Adjacent findings do not expand the current task automatically. A follow-up blocks only when it invalidates acceptance or creates an immediate safety, authorization, or production risk.
|
|
35
36
|
- Security, authentication, authorization, and permission findings are mandatory stops. Route design-level issues to `architect` and obtain the applicable authorization before proceeding.
|
|
36
37
|
|
|
38
|
+
## Session Continuation and Delivery
|
|
39
|
+
|
|
40
|
+
- **!!! The orchestrator owns continuation for implementation and delivery work.** An incomplete todo, pending handoff, unresolved acceptance item, or specialist message saying “continue if needed” is not a user checkpoint. Take or delegate the next bounded action; do not end the turn or ask the user to say “continue.” Research-only, planning-only, explicitly Read-only, and host-blocked work terminates at its requested artifact or exact blocker.
|
|
41
|
+
- A specialist's Read-only or no-edit result ends that delegation, not the parent work unit. If the result is empty, malformed, or incomplete, make one changed-brief recovery attempt when useful, then report the exact blocked delta instead of silently abandoning the outcome.
|
|
42
|
+
- Freeze the outcome, acceptance criteria, non-goals, and review budget at the start of the work unit. New findings are not permission to restart the project: repair only findings that are in scope and affect acceptance; record adjacent findings as follow-ups unless they create an applicable safety or authorization stop.
|
|
43
|
+
- Do not reset a review or repair budget by splitting the same outcome into more delegations, changing specialist names, or relabelling the finding. A new scope requires a new outcome and acceptance criteria.
|
|
44
|
+
- For implementation work, continue through validation and the project's normal delivery artifact. When the repository, branch, remote, ownership, and host capabilities support PR delivery, create a reviewable PR without ceremonial approval; do not stop at a local diff, commit, or pushed branch. Research-only, planning-only, explicitly Read-only, and host-blocked work terminates at its requested artifact or exact blocker. Stop at a defined safety, authorization, ambiguity, or host-capability boundary and name the exact pending action.
|
|
45
|
+
|
|
37
46
|
## Delegation and Context
|
|
38
47
|
|
|
39
48
|
Supported specialists are `adventurer`, `architect`, `builder`, `diagnose`, `planner`, `reviewer`, and `writer`.
|
|
@@ -56,16 +65,18 @@ Supported specialists are `adventurer`, `architect`, `builder`, `diagnose`, `pla
|
|
|
56
65
|
## Bounded Repair and Fail-Loud Behavior
|
|
57
66
|
|
|
58
67
|
- Ordinary in-scope repair may continue without routine user approval while it is making observable progress and remains within scope.
|
|
59
|
-
-
|
|
68
|
+
- Review is a convergence gate, not an invitation to polish indefinitely. Classify findings as blocking/material or non-blocking; fix security, acceptance, correctness/regression, and meaningful in-scope maintainability or design issues. Minor preferences and suggestions are follow-ups.
|
|
69
|
+
- Default to one independent review and one repair/re-review pass. Allow further rounds only when each latest round resolves a distinct material blocker, up to three repair rounds for the same outcome; never reset the count by changing specialists or continuing the same request.
|
|
60
70
|
- Repeated causes, repeated findings, restored diffs, or no new evidence are non-progress. Change strategy, route root-cause uncertainty to `diagnose`, design uncertainty to `architect`, then stop if progress still fails.
|
|
61
71
|
- Do not loop silently. Report: `Tried X, Y, Z. Blocked by [cause]. Need [input] to proceed.` Preserve the last diff and finding provenance.
|
|
62
72
|
|
|
63
73
|
## Authorization, Lifecycle, and Branches
|
|
64
74
|
|
|
65
75
|
- Stop and obtain applicable authorization before security-boundary changes, authentication or permissions work, data migration or possible loss, production-impacting changes, or irreversible operations. Ordinary ambiguity is not an authorization checkpoint.
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
76
|
+
- For normal repository work, branch, commit, push, and PR are part of delivery after acceptance evidence and required review. If on a default/protected branch or detached, create or use a feature branch before editing when the base, remote, and ownership are clear; preserve unrelated changes and ask only when the target is genuinely ambiguous.
|
|
77
|
+
- Inspect status and the intended diff, stage only intended files, and use logical conventional commits. Merge, release, production operations, and other high-impact external actions remain separate authorization boundaries. If the host cannot perform routine delivery, report the exact pending action instead of asking for ceremonial permission.
|
|
78
|
+
- Track task-owned long-lived processes. Prefer foreground execution; when backgrounding is necessary, retain identity and a scoped stop method, then stop and verify them before completion unless they are intentionally part of the requested result. Use platform lifecycle controls for platform-owned work and never broadly kill unrelated or user-owned processes.
|
|
79
|
+
- Never commit or push protected branches. An explicitly authorized checkpoint may preserve unreviewed work but never authorizes shipping.
|
|
69
80
|
|
|
70
81
|
## Canonical Source Invariant
|
|
71
82
|
|
package/skills/builder/SKILL.md
CHANGED
|
@@ -38,30 +38,9 @@ If the task is not atomic - if it spans multiple unrelated concerns - document t
|
|
|
38
38
|
3. **Verify** - Run tests or type checks to confirm correctness
|
|
39
39
|
4. **Report** - State what changed and why
|
|
40
40
|
|
|
41
|
-
## Implementation
|
|
41
|
+
## Implementation Judgment
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
For complex features, build incrementally:
|
|
46
|
-
|
|
47
|
-
1. Hardcoded version that demonstrates the concept
|
|
48
|
-
2. Add state management with mock data
|
|
49
|
-
3. Connect to real data/API
|
|
50
|
-
4. Add error handling and loading states
|
|
51
|
-
5. Optimize and polish
|
|
52
|
-
|
|
53
|
-
Each step is verifiable before moving to the next.
|
|
54
|
-
|
|
55
|
-
### Constraint Escalation
|
|
56
|
-
|
|
57
|
-
Start with tight constraints, relax as needed:
|
|
58
|
-
|
|
59
|
-
- Round 0: "Check if the problem is already solved - is there a well-maintained open-source library or existing dependency that handles this?"
|
|
60
|
-
- Round 1: "Solve this with existing dependencies only"
|
|
61
|
-
- Round 2: "Now you can use standard library features"
|
|
62
|
-
- Round 3: "Add external dependencies if necessary"
|
|
63
|
-
|
|
64
|
-
This reveals what actually requires heavy tools vs. what's simple.
|
|
43
|
+
Start with the smallest change that satisfies acceptance. Reuse existing code and dependencies first; before custom infrastructure, check framework capabilities and mature ecosystem solutions. Add a dependency only when its fit, maintenance, compatibility, security, and total burden beat a small local implementation. Add layers only when the product requires them.
|
|
65
44
|
|
|
66
45
|
## Skill Prescription
|
|
67
46
|
|
|
@@ -26,13 +26,13 @@ Apply explicit mode precedence and safety exceptions first, then choose the smal
|
|
|
26
26
|
|
|
27
27
|
| Route | Use when | Result |
|
|
28
28
|
| --- | --- | --- |
|
|
29
|
-
| `full` | `fein`, multiple dependent perspectives,
|
|
29
|
+
| `full` | `fein`, multiple dependent perspectives, high risk, or meaningful uncertainty that needs design and implementation | Reconnaissance or design, implementation, and independent review as justified |
|
|
30
30
|
| `focused` | One specialist can own a concrete outcome, investigation, or implementation | One specialist, with independent review for meaningful builder work |
|
|
31
31
|
| `direct` | The current session can safely complete known, low-risk work and the host permits it | The current session completes and verifies the work |
|
|
32
32
|
|
|
33
33
|
Security, authentication, permissions, data migration or loss, production impact, irreversible changes, and unresolved safety ambiguity override `direct` and `blitz`. Use at least `focused`, or `full` when the issue is cross-cutting or high-risk. Ask only where project rules require a checkpoint.
|
|
34
34
|
|
|
35
|
-
**!!! Check the branch** before git mutation.
|
|
35
|
+
**!!! Check the branch** before git mutation. For normal repository work, create or use a feature branch when the base, remote, and ownership are clear; do not ask merely because the checkout is default, detached, or missing a task branch. Worktrees are isolated. Never commit or push a protected branch.
|
|
36
36
|
|
|
37
37
|
For focused builder work, review behavior, public interfaces or configuration, multiple production files, data, auth, or security changes. Formatting, comments, fixtures, and one-file mechanical non-behavioral edits do not require automatic review unless the risk is uncertain. This is a review decision, not permission to make an unreviewed commit.
|
|
38
38
|
|
|
@@ -81,7 +81,7 @@ Triage findings in this order:
|
|
|
81
81
|
3. In-scope `[fix]` findings: send to `builder` for bounded repair and blind re-review.
|
|
82
82
|
4. Out-of-scope or platform findings: record as follow-ups. `[dismiss]` means document the rationale. `[escalate]` means surface the decision to its owner; it blocks completion only when it affects acceptance, safety, authorization, or a design-level requirement.
|
|
83
83
|
|
|
84
|
-
Approve when no blocking finding remains and
|
|
84
|
+
Approve when acceptance evidence is complete and no blocking/material finding remains. Minor preferences and suggestions do not block delivery. Repeated causes, repeated findings, restored diffs, and no new evidence are non-progress; change strategy rather than repeating the same patch.
|
|
85
85
|
|
|
86
86
|
## Workflow and Delegation
|
|
87
87
|
|
|
@@ -103,7 +103,15 @@ Modes are case-insensitive and per-turn unless the platform documents another li
|
|
|
103
103
|
|
|
104
104
|
## Commit and Session Flow
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
For implementation work, own the delivery path: `inspect -> plan -> implement -> validate -> review -> repair -> commit -> push -> PR`.
|
|
107
|
+
|
|
108
|
+
When the repository, branch, remote, ownership, and host capabilities support PR delivery, complete it without ceremonial approval. Do not stop at a local diff, commit, pushed branch, or `PR pending`. Merge, release, and production actions remain separate.
|
|
109
|
+
|
|
110
|
+
The parent session owns continuation until the selected implementation outcome reaches its terminal artifact. Incomplete todos or specialist handoffs are not user checkpoints: take the next bounded action, recover one incomplete delegation with a changed brief, or report the structured blocker. Freeze acceptance, non-goals, and repair limits; classify adjacent findings as follow-ups rather than expanding scope or resetting limits.
|
|
111
|
+
|
|
112
|
+
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.
|
|
113
|
+
|
|
114
|
+
An explicitly authorized checkpoint may preserve unreviewed work but never authorizes shipping. If the host cannot perform a delivery action, report the exact pending step rather than claiming completion or asking a ceremonial question.
|
|
107
115
|
|
|
108
116
|
1. Select the route and load relevant project rules.
|
|
109
117
|
2. Complete the work directly or delegate with a concise outcome brief.
|
package/skills/reviewer/SKILL.md
CHANGED
|
@@ -120,6 +120,8 @@ When the orchestrator dispatches a general review plus risk-matched specialist l
|
|
|
120
120
|
- **!!! Flag collateral deletions** in the diff.
|
|
121
121
|
- Provide specific, actionable feedback with line references and concrete fixes.
|
|
122
122
|
- Classify issues as critical / major / minor / suggestion.
|
|
123
|
+
- Review against the acceptance bar, not idealized code. Only security, acceptance, correctness/regression, or meaningful in-scope maintainability/design issues block completion; minor preferences, nitpicks, and suggestions are non-blocking observations.
|
|
124
|
+
- When acceptance evidence is complete and no material blocker remains, approve and stop. Do not create another review pass merely to find additional polish.
|
|
123
125
|
- If you cannot reproduce an issue, say so.
|
|
124
126
|
- If no issues are found, say so and state what you verified.
|
|
125
127
|
- If scope is unclear: document assumption from diff context and proceed.
|