kyro-ai 3.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.
- package/.claude-plugin/README.md +29 -0
- package/.claude-plugin/marketplace.json +52 -0
- package/.claude-plugin/plugin.json +40 -0
- package/.claude-plugin/settings.json +16 -0
- package/LICENSE +201 -0
- package/README.md +331 -0
- package/WORKFLOW.yaml +36 -0
- package/agents/orchestrator.md +393 -0
- package/commands/forge.md +55 -0
- package/commands/status.md +92 -0
- package/commands/wrap-up.md +85 -0
- package/config.json +17 -0
- package/contexts/init.md +64 -0
- package/contexts/review.md +89 -0
- package/contexts/sprint.md +90 -0
- package/dist/cli/adapters/codex.d.ts +3 -0
- package/dist/cli/adapters/codex.d.ts.map +1 -0
- package/dist/cli/adapters/codex.js +55 -0
- package/dist/cli/adapters/codex.js.map +1 -0
- package/dist/cli/adapters/command-skills.d.ts +5 -0
- package/dist/cli/adapters/command-skills.d.ts.map +1 -0
- package/dist/cli/adapters/command-skills.js +41 -0
- package/dist/cli/adapters/command-skills.js.map +1 -0
- package/dist/cli/adapters/opencode.d.ts +5 -0
- package/dist/cli/adapters/opencode.d.ts.map +1 -0
- package/dist/cli/adapters/opencode.js +41 -0
- package/dist/cli/adapters/opencode.js.map +1 -0
- package/dist/cli/adapters/registry-types.d.ts +13 -0
- package/dist/cli/adapters/registry-types.d.ts.map +1 -0
- package/dist/cli/adapters/registry-types.js +3 -0
- package/dist/cli/adapters/registry-types.js.map +1 -0
- package/dist/cli/adapters/registry.d.ts +7 -0
- package/dist/cli/adapters/registry.d.ts.map +1 -0
- package/dist/cli/adapters/registry.js +46 -0
- package/dist/cli/adapters/registry.js.map +1 -0
- package/dist/cli/app.d.ts +2 -0
- package/dist/cli/app.d.ts.map +1 -0
- package/dist/cli/app.js +46 -0
- package/dist/cli/app.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +133 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/install.d.ts +4 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +42 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/tui.d.ts +2 -0
- package/dist/cli/commands/tui.d.ts.map +1 -0
- package/dist/cli/commands/tui.js +35 -0
- package/dist/cli/commands/tui.js.map +1 -0
- package/dist/cli/commands/uninstall.d.ts +3 -0
- package/dist/cli/commands/uninstall.d.ts.map +1 -0
- package/dist/cli/commands/uninstall.js +33 -0
- package/dist/cli/commands/uninstall.js.map +1 -0
- package/dist/cli/constants.d.ts +23 -0
- package/dist/cli/constants.d.ts.map +1 -0
- package/dist/cli/constants.js +27 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/fs.d.ts +12 -0
- package/dist/cli/fs.d.ts.map +1 -0
- package/dist/cli/fs.js +133 -0
- package/dist/cli/fs.js.map +1 -0
- package/dist/cli/help.d.ts +4 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +28 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/install-plan.d.ts +3 -0
- package/dist/cli/install-plan.d.ts.map +1 -0
- package/dist/cli/install-plan.js +93 -0
- package/dist/cli/install-plan.js.map +1 -0
- package/dist/cli/options.d.ts +8 -0
- package/dist/cli/options.d.ts.map +1 -0
- package/dist/cli/options.js +99 -0
- package/dist/cli/options.js.map +1 -0
- package/dist/cli/state.d.ts +4 -0
- package/dist/cli/state.d.ts.map +1 -0
- package/dist/cli/state.js +13 -0
- package/dist/cli/state.js.map +1 -0
- package/dist/cli/types.d.ts +50 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +3 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +10 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/docs/HOW-TO-USE-CODEX.md +82 -0
- package/docs/HOW-TO-USE-OPENCODE.md +93 -0
- package/docs/agent-adapters.md +152 -0
- package/docs/agents-reference.md +153 -0
- package/docs/architecture.md +159 -0
- package/docs/architecture.mmd +21 -0
- package/docs/cli.md +87 -0
- package/docs/commands-reference.md +138 -0
- package/docs/context-management.md +92 -0
- package/docs/getting-started.md +165 -0
- package/docs/harness-migration.md +95 -0
- package/docs/programmatic-usage.md +109 -0
- package/docs/rules-guide.md +216 -0
- package/package.json +78 -0
- package/rules/context-persistence.md +54 -0
- package/rules/estimation.md +56 -0
- package/rules/learning-rules.md +66 -0
- package/rules/quality-gates.md +65 -0
- package/rules/sprint-discipline.md +49 -0
- package/scripts/check-markdown-links.mjs +97 -0
- package/scripts/check-versions.mjs +46 -0
- package/scripts/make-cli-executable.mjs +12 -0
- package/settings.example.json +27 -0
- package/skills/qa-review/SKILL.md +660 -0
- package/skills/qa-review/manifest.json +41 -0
- package/skills/sprint-forge/SKILL.md +260 -0
- package/skills/sprint-forge/assets/README.md +31 -0
- package/skills/sprint-forge/assets/helpers/analysis-guide.md +207 -0
- package/skills/sprint-forge/assets/helpers/analyzer.md +83 -0
- package/skills/sprint-forge/assets/helpers/debt-tracker.md +122 -0
- package/skills/sprint-forge/assets/helpers/handoff.md +103 -0
- package/skills/sprint-forge/assets/helpers/learner.md +69 -0
- package/skills/sprint-forge/assets/helpers/metrics.md +81 -0
- package/skills/sprint-forge/assets/helpers/reentry-generator.md +121 -0
- package/skills/sprint-forge/assets/helpers/reviewer.md +71 -0
- package/skills/sprint-forge/assets/helpers/sprint-generator.md +145 -0
- package/skills/sprint-forge/assets/modes/INIT.md +204 -0
- package/skills/sprint-forge/assets/modes/SPRINT.md +253 -0
- package/skills/sprint-forge/assets/modes/STATUS.md +145 -0
- package/skills/sprint-forge/assets/templates/PROJECT-README.md +107 -0
- package/skills/sprint-forge/assets/templates/REENTRY-PROMPTS.md +132 -0
- package/skills/sprint-forge/assets/templates/ROADMAP.md +126 -0
- package/skills/sprint-forge/assets/templates/SPRINT.md +189 -0
- package/skills/sprint-forge/manifest.json +165 -0
- package/templates/split-claude-md/AGENTS.md +96 -0
- package/templates/split-claude-md/CLAUDE.md +67 -0
- package/templates/split-claude-md/COMMANDS.md +37 -0
- package/templates/split-claude-md/LEARNED.md +39 -0
- package/templates/split-claude-md/SOUL.md +107 -0
package/contexts/init.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init
|
|
3
|
+
description: Read-only analysis context for project exploration and roadmap generation. No code changes allowed.
|
|
4
|
+
mode: analysis
|
|
5
|
+
agent: orchestrator
|
|
6
|
+
model: opus
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Context: INIT — Analysis Mode
|
|
10
|
+
|
|
11
|
+
Activated during project initialization and analysis phases. This context puts Kyro in **read-only exploration mode** where the goal is understanding, not action.
|
|
12
|
+
|
|
13
|
+
## When Active
|
|
14
|
+
|
|
15
|
+
- `/kyro:forge` Phase 1 (Analyze)
|
|
16
|
+
- Explicit user request to analyze or audit a project
|
|
17
|
+
- First contact with a new codebase
|
|
18
|
+
|
|
19
|
+
## Behavior
|
|
20
|
+
|
|
21
|
+
### What This Context Does
|
|
22
|
+
|
|
23
|
+
- **Explores architecture** — module structure, boundaries, dependency graph
|
|
24
|
+
- **Identifies patterns** — coding conventions, framework usage, configuration approach
|
|
25
|
+
- **Surfaces risks** — fragile areas, missing tests, complex modules, security concerns
|
|
26
|
+
- **Maps dependencies** — external packages, version health, upgrade paths
|
|
27
|
+
- **Discovers debt** — TODOs, FIXMEs, deprecated APIs, workarounds, dead code
|
|
28
|
+
|
|
29
|
+
### What This Context Does NOT Do
|
|
30
|
+
|
|
31
|
+
- No file creation or modification
|
|
32
|
+
- No code generation or scaffolding
|
|
33
|
+
- No dependency installation
|
|
34
|
+
- No git operations (commits, branches, merges)
|
|
35
|
+
- No running commands that modify state
|
|
36
|
+
|
|
37
|
+
## Delegation
|
|
38
|
+
|
|
39
|
+
All exploration work is handled by the **orchestrator** using its analysis protocol, which self-constrains to:
|
|
40
|
+
|
|
41
|
+
- Tools: `Read`, `Glob`, `Grep`, `Bash` (read-only commands only)
|
|
42
|
+
- Isolation: worktree (when available)
|
|
43
|
+
- Memory: project-scoped
|
|
44
|
+
|
|
45
|
+
## Output
|
|
46
|
+
|
|
47
|
+
The context produces an **Analysis Report** containing:
|
|
48
|
+
|
|
49
|
+
1. Work type classification
|
|
50
|
+
2. Architecture overview
|
|
51
|
+
3. Risk inventory (with severity ratings)
|
|
52
|
+
4. Dependency health summary
|
|
53
|
+
5. Visible debt catalog
|
|
54
|
+
6. Numbered recommendations for the roadmap
|
|
55
|
+
|
|
56
|
+
## Gate
|
|
57
|
+
|
|
58
|
+
This context concludes with **Gate 1**: the analysis findings are presented to the user for approval before transitioning to sprint planning.
|
|
59
|
+
|
|
60
|
+
## Rules in Effect
|
|
61
|
+
|
|
62
|
+
- All rules from `rules/sprint-discipline.md` (sprint sequencing)
|
|
63
|
+
- All rules from `rules/learning-rules.md` (apply existing learned rules during analysis)
|
|
64
|
+
- `rules/context-persistence.md` R-CP-01 (update re-entry prompts after INIT)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Assessment context for sprint status reporting and retrospectives. Read-only — no code changes.
|
|
4
|
+
mode: assessment
|
|
5
|
+
agent: orchestrator
|
|
6
|
+
model: opus
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Context: REVIEW — Assessment Mode
|
|
10
|
+
|
|
11
|
+
Activated during status checks and retrospectives. This context puts Kyro in **analysis-only mode** focused on measuring, reflecting, and planning improvements.
|
|
12
|
+
|
|
13
|
+
## When Active
|
|
14
|
+
|
|
15
|
+
- `/kyro:status` — project progress and debt summary
|
|
16
|
+
- `/kyro:forge` Phase 4 (Review & Close)
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
### Status Assessment (`/kyro:status`)
|
|
21
|
+
|
|
22
|
+
1. Read the current sprint file and extract task statuses.
|
|
23
|
+
2. Summarize progress:
|
|
24
|
+
- Tasks completed / total tasks
|
|
25
|
+
- Story points completed / total story points
|
|
26
|
+
- Estimation accuracy (actual vs estimated per task)
|
|
27
|
+
3. Produce a debt summary showing:
|
|
28
|
+
- Open debt items
|
|
29
|
+
- Age of each item (sprints since creation)
|
|
30
|
+
- Items flagged as `[AGED]` (open > 3 sprints)
|
|
31
|
+
|
|
32
|
+
### Retrospective (forge Phase 4)
|
|
33
|
+
|
|
34
|
+
1. Read the completed sprint file.
|
|
35
|
+
2. Evaluate each task:
|
|
36
|
+
- Was it completed within estimate?
|
|
37
|
+
- Were there blockers or emergent work?
|
|
38
|
+
- What quality issues were found?
|
|
39
|
+
3. Generate the retro document:
|
|
40
|
+
- **What went well** — tasks completed smoothly, good estimates
|
|
41
|
+
- **What went wrong** — blockers, underestimates, regressions
|
|
42
|
+
- **Recommendations** — numbered list of improvements for Sprint N+1
|
|
43
|
+
- **Estimation corrections** — adjusted buffers for task types
|
|
44
|
+
- **New learned rules** — proposed additions to `.agents/kyro/scopes/rules.md`
|
|
45
|
+
4. Update the debt table with any new items or status changes.
|
|
46
|
+
|
|
47
|
+
### Progress Analysis
|
|
48
|
+
|
|
49
|
+
The metrics helper provides:
|
|
50
|
+
|
|
51
|
+
- Sprint completion status
|
|
52
|
+
- Estimate variance noted in sprint retros
|
|
53
|
+
- Debt movement (new items vs resolved)
|
|
54
|
+
- Most common BLOCKER categories
|
|
55
|
+
- Task type distribution
|
|
56
|
+
|
|
57
|
+
### Feed Forward
|
|
58
|
+
|
|
59
|
+
Review outputs feed directly into next sprint planning:
|
|
60
|
+
|
|
61
|
+
- Recommendations become the disposition table in Sprint N+1.
|
|
62
|
+
- Estimation corrections update buffer percentages.
|
|
63
|
+
- New rules are proposed for `.agents/kyro/scopes/rules.md`.
|
|
64
|
+
- Unresolved debt items carry forward with updated age.
|
|
65
|
+
|
|
66
|
+
## Constraints
|
|
67
|
+
|
|
68
|
+
- **No code changes.** This context is analysis only.
|
|
69
|
+
- **No file creation** except sprint retro documents and metrics reports in the output directory.
|
|
70
|
+
- **No git operations** that modify history.
|
|
71
|
+
|
|
72
|
+
## Delegation
|
|
73
|
+
|
|
74
|
+
- **Primary agent**: orchestrator (using review checklist protocol)
|
|
75
|
+
- Tools: `Read`, `Glob`, `Grep`, `Bash` (read-only commands only)
|
|
76
|
+
- Helpers: `metrics`, `reviewer` (in `skills/sprint-forge/assets/helpers/`)
|
|
77
|
+
|
|
78
|
+
## Output
|
|
79
|
+
|
|
80
|
+
- Status report with progress and debt summary
|
|
81
|
+
- Retro document with recommendations and estimation corrections
|
|
82
|
+
- Proposed learned rules
|
|
83
|
+
|
|
84
|
+
## Rules in Effect
|
|
85
|
+
|
|
86
|
+
- All rules from `rules/sprint-discipline.md` (retro is mandatory, debt inheritance)
|
|
87
|
+
- All rules from `rules/estimation.md` (flag >30% errors, track trends)
|
|
88
|
+
- All rules from `rules/learning-rules.md` (propose and validate new rules)
|
|
89
|
+
- All rules from `rules/context-persistence.md` (update re-entry prompts after retro)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sprint
|
|
3
|
+
description: Execution context for task-by-task sprint implementation with quality gates, review validation, and emergent phase handling.
|
|
4
|
+
mode: execution
|
|
5
|
+
agent: orchestrator
|
|
6
|
+
model: opus
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Context: SPRINT — Execution Mode
|
|
10
|
+
|
|
11
|
+
Activated during sprint implementation. This context puts Kyro in **active execution mode** where tasks are implemented one by one with quality validation at each step.
|
|
12
|
+
|
|
13
|
+
## When Active
|
|
14
|
+
|
|
15
|
+
- `/kyro:forge` Phase 3 (Implement)
|
|
16
|
+
- Resuming a sprint from a checkpoint
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
### Task Execution Loop
|
|
21
|
+
|
|
22
|
+
For each task in the sprint plan:
|
|
23
|
+
|
|
24
|
+
1. **Execute** — Implement the task according to its description and acceptance criteria.
|
|
25
|
+
2. **Checkpoint** — Save the sprint file after the task completes.
|
|
26
|
+
3. **Review** — Run the **review checklist** for quality validation.
|
|
27
|
+
4. **Resolve** — If the review finds BLOCKERs, run the **debug protocol**.
|
|
28
|
+
5. **Record** — Log actual time, notes, and any discovered work.
|
|
29
|
+
|
|
30
|
+
### Quality Gates
|
|
31
|
+
|
|
32
|
+
Quality gates run after every task (not just at the end):
|
|
33
|
+
|
|
34
|
+
- Typecheck: `npm run typecheck` (or project-configured command)
|
|
35
|
+
- Build: `npm run build` (or project-configured command)
|
|
36
|
+
- Tests/lint: run only when the target project defines those commands
|
|
37
|
+
|
|
38
|
+
A task is not closed until all gates pass or WARNINGs are explicitly justified.
|
|
39
|
+
|
|
40
|
+
### Emergent Phases
|
|
41
|
+
|
|
42
|
+
When implementation reveals work not in the original plan:
|
|
43
|
+
|
|
44
|
+
1. Document the discovery in the sprint file under "Emergent Work."
|
|
45
|
+
2. Assess impact on remaining tasks and timeline.
|
|
46
|
+
3. If the emergent work is a prerequisite for planned tasks, insert a new phase.
|
|
47
|
+
4. If it is independent, add it to the backlog or current sprint (with user approval).
|
|
48
|
+
|
|
49
|
+
### Review Validation
|
|
50
|
+
|
|
51
|
+
The **review checklist** runs after each task:
|
|
52
|
+
|
|
53
|
+
- Does the change match the task description?
|
|
54
|
+
- Are there regressions?
|
|
55
|
+
- Are quality gates passing?
|
|
56
|
+
- Is there new debt to track?
|
|
57
|
+
- Any SUGGESTION-level improvements?
|
|
58
|
+
|
|
59
|
+
### Debug on Failure
|
|
60
|
+
|
|
61
|
+
When a task fails (tests break, type errors, runtime errors):
|
|
62
|
+
|
|
63
|
+
1. Automatically run the **debug protocol**.
|
|
64
|
+
2. The orchestrator performs root cause analysis.
|
|
65
|
+
3. Fix is applied and the task re-enters the review cycle.
|
|
66
|
+
4. If the debug protocol cannot resolve, escalate to the user.
|
|
67
|
+
|
|
68
|
+
## Delegation
|
|
69
|
+
|
|
70
|
+
- **Primary agent**: orchestrator (coordinates the full flow)
|
|
71
|
+
- **Review checklist**: run after each task
|
|
72
|
+
- **Debug protocol**: run on failure
|
|
73
|
+
- Tools: all tools available (Read, Write, Edit, Glob, Grep, Bash)
|
|
74
|
+
|
|
75
|
+
## Output
|
|
76
|
+
|
|
77
|
+
The context produces:
|
|
78
|
+
|
|
79
|
+
- Updated sprint file with task statuses, actuals, and notes
|
|
80
|
+
- Checkpoints after each phase
|
|
81
|
+
- Emergent work documentation
|
|
82
|
+
- Quality gate results per task
|
|
83
|
+
|
|
84
|
+
## Rules in Effect
|
|
85
|
+
|
|
86
|
+
- All rules from `rules/quality-gates.md` (mandatory)
|
|
87
|
+
- All rules from `rules/sprint-discipline.md` (checkpoints, debt inheritance)
|
|
88
|
+
- All rules from `rules/estimation.md` (track actuals vs estimates)
|
|
89
|
+
- All rules from `rules/context-persistence.md` (checkpoints, handoffs)
|
|
90
|
+
- All rules from `rules/learning-rules.md` (capture corrections in real time)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/codex.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAK1D,eAAO,MAAM,YAAY,EAAE,iBAwC1B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.codexAdapter = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
const fs_1 = require("../fs");
|
|
6
|
+
const command_skills_1 = require("./command-skills");
|
|
7
|
+
const opencode_1 = require("./opencode");
|
|
8
|
+
const AGENTS_PATH = 'AGENTS.md';
|
|
9
|
+
const KYRO_AGENTS_BLOCK = 'agents-md';
|
|
10
|
+
exports.codexAdapter = {
|
|
11
|
+
agent: constants_1.AGENT.CODEX,
|
|
12
|
+
displayName: 'Codex',
|
|
13
|
+
status: 'implemented',
|
|
14
|
+
buildProjection(plan) {
|
|
15
|
+
(0, command_skills_1.addCommandSkillProjection)(plan);
|
|
16
|
+
plan.push({
|
|
17
|
+
action: 'upsert-block',
|
|
18
|
+
path: AGENTS_PATH,
|
|
19
|
+
blockName: KYRO_AGENTS_BLOCK,
|
|
20
|
+
content: buildAgentsBlock(),
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
buildManagedFiles() {
|
|
24
|
+
return (0, command_skills_1.buildCommandSkillManagedFiles)();
|
|
25
|
+
},
|
|
26
|
+
buildManagedBlocks() {
|
|
27
|
+
return [`${AGENTS_PATH}#${KYRO_AGENTS_BLOCK}`];
|
|
28
|
+
},
|
|
29
|
+
buildInstalledAdapter(scope, installedAt) {
|
|
30
|
+
return {
|
|
31
|
+
agent: constants_1.AGENT.CODEX,
|
|
32
|
+
scope,
|
|
33
|
+
installedAt,
|
|
34
|
+
corePath: constants_1.KYRO_ROOT,
|
|
35
|
+
commandsPath: constants_1.AGENT_SKILLS_ROOT,
|
|
36
|
+
skillsPath: constants_1.AGENT_SKILLS_ROOT,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
doctor(manifest) {
|
|
40
|
+
if (!manifest?.adapters.some((adapter) => adapter.agent === constants_1.AGENT.CODEX)) {
|
|
41
|
+
return { status: 'warn', name: 'Codex adapter', detail: 'not installed in this workspace' };
|
|
42
|
+
}
|
|
43
|
+
const commandCheck = (0, opencode_1.checkCommandProjection)('Codex adapter');
|
|
44
|
+
if (commandCheck.status !== 'pass')
|
|
45
|
+
return commandCheck;
|
|
46
|
+
if (!(0, fs_1.hasManagedBlock)(AGENTS_PATH, KYRO_AGENTS_BLOCK)) {
|
|
47
|
+
return { status: 'fail', name: 'Codex adapter', detail: `missing Kyro block in ${AGENTS_PATH}`, remedy: 'Run kyro sync --agent codex.' };
|
|
48
|
+
}
|
|
49
|
+
return { status: 'pass', name: 'Codex adapter', detail: 'projected Kyro command skills and root AGENTS.md block present' };
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
function buildAgentsBlock() {
|
|
53
|
+
return `## Kyro AI\n\nKyro is installed in this workspace.\n\n### Rules\n\n- Prefer installed Kyro command skills from \`${constants_1.AGENT_SKILLS_ROOT}/\` when invoking Kyro workflows.\n- Read command definitions from \`${constants_1.KYRO_COMMANDS_ROOT}/\` only when a Kyro command skill asks for them.\n- Persist workflow artifacts under \`${constants_1.ARTIFACT_ROOT}/{scope}/\`.\n- Do not ask users to describe Kyro workflows in natural language when an installed command or skill exists.\n- Preserve all non-Kyro content in this AGENTS.md file. Kyro owns only this marked block.\n\n### Core\n\nThe managed Kyro core lives in \`${constants_1.KYRO_ROOT}/\`.\n`;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/cli/adapters/codex.ts"],"names":[],"mappings":";;;AAAA,4CAAsG;AACtG,8BAAwC;AACxC,qDAA4F;AAC5F,yCAAoD;AAGpD,MAAM,WAAW,GAAG,WAAW,CAAC;AAChC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEzB,QAAA,YAAY,GAAsB;IAC7C,KAAK,EAAE,iBAAK,CAAC,KAAK;IAClB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,aAAa;IACrB,eAAe,CAAC,IAAI;QAClB,IAAA,0CAAyB,EAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC;YACR,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,iBAAiB;YAC5B,OAAO,EAAE,gBAAgB,EAAE;SAC5B,CAAC,CAAC;IACL,CAAC;IACD,iBAAiB;QACf,OAAO,IAAA,8CAA6B,G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@@
|
|
|
1
|
+
import type { KyroCommandName, OperationPlan } from '../types';
|
|
2
|
+
export declare function addCommandSkillProjection(plan: OperationPlan[]): void;
|
|
3
|
+
export declare function buildCommandSkillManagedFiles(): string[];
|
|
4
|
+
export declare function getCommandSkillPath(command: KyroCommandName): string;
|
|
5
|
+
//# sourceMappingURL=command-skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-skills.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/command-skills.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE/D,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,CAYrE;AAED,wBAAgB,6BAA6B,IAAI,MAAM,EAAE,CAExD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAEpE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addCommandSkillProjection = addCommandSkillProjection;
|
|
4
|
+
exports.buildCommandSkillManagedFiles = buildCommandSkillManagedFiles;
|
|
5
|
+
exports.getCommandSkillPath = getCommandSkillPath;
|
|
6
|
+
const constants_1 = require("../constants");
|
|
7
|
+
function addCommandSkillProjection(plan) {
|
|
8
|
+
for (const command of constants_1.COMMAND_NAMES) {
|
|
9
|
+
const path = getCommandSkillPath(command);
|
|
10
|
+
if (plan.some((operation) => operation.action === 'write' && operation.path === path)) {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
plan.push({
|
|
14
|
+
action: 'write',
|
|
15
|
+
path,
|
|
16
|
+
content: buildCommandSkill(command),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function buildCommandSkillManagedFiles() {
|
|
21
|
+
return constants_1.COMMAND_NAMES.map((command) => getCommandSkillPath(command));
|
|
22
|
+
}
|
|
23
|
+
function getCommandSkillPath(command) {
|
|
24
|
+
return `${constants_1.AGENT_SKILLS_ROOT}/kyro-${command}/SKILL.md`;
|
|
25
|
+
}
|
|
26
|
+
function buildCommandSkill(command) {
|
|
27
|
+
const title = command === 'wrap-up' ? 'Kyro Wrap-Up' : `Kyro ${capitalize(command)}`;
|
|
28
|
+
const description = getCommandDescription(command);
|
|
29
|
+
return `---\nname: kyro-${command}\ndescription: ${description}\nlicense: Apache-2.0\nmetadata:\n author: synapsync\n version: "1.0"\n scope: [root]\n---\n\n# ${title}\n\nUse this skill when the user invokes the Kyro ${command} workflow.\n\n## Execution\n\n1. Read \`${constants_1.KYRO_COMMANDS_ROOT}/${command}.md\`.\n2. Read required core assets from \`${constants_1.KYRO_ROOT}/\` only when the command asks for them.\n3. Persist Kyro workflow artifacts under \`${constants_1.ARTIFACT_ROOT}/{scope}/\`.\n4. Do not ask the user to describe this command in natural language; this skill is the command projection for agents that discover \`.agents/skills/\`.\n\n## Source of Truth\n\nThe managed Kyro core lives in \`${constants_1.KYRO_ROOT}/\`. Do not duplicate lifecycle logic in this projected skill.\n`;
|
|
30
|
+
}
|
|
31
|
+
function getCommandDescription(command) {
|
|
32
|
+
if (command === 'forge')
|
|
33
|
+
return 'Run the Kyro forge workflow through the installed workspace harness';
|
|
34
|
+
if (command === 'status')
|
|
35
|
+
return 'Show Kyro project status through the installed workspace harness';
|
|
36
|
+
return 'Close the Kyro session through the installed workspace harness';
|
|
37
|
+
}
|
|
38
|
+
function capitalize(value) {
|
|
39
|
+
return `${value.slice(0, 1).toUpperCase()}${value.slice(1)}`;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=command-skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-skills.js","sourceRoot":"","sources":["../../../src/cli/adapters/command-skills.ts"],"names":[],"mappings":";;AAGA,8DAYC;AAED,sEAEC;AAED,kDAEC;AAvBD,4CAA8G;AAG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AC;IACpG,OAAO,gEAAgE,CAAC;AAC1E,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AdapterDefinition } from './registry-types';
|
|
2
|
+
import type { CheckResult } from '../types';
|
|
3
|
+
export declare const openCodeAdapter: AdapterDefinition;
|
|
4
|
+
export declare function checkCommandProjection(name: string): CheckResult;
|
|
5
|
+
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/opencode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,eAAe,EAAE,iBAyB7B,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAMhE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.openCodeAdapter = void 0;
|
|
4
|
+
exports.checkCommandProjection = checkCommandProjection;
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const fs_1 = require("../fs");
|
|
7
|
+
const command_skills_1 = require("./command-skills");
|
|
8
|
+
exports.openCodeAdapter = {
|
|
9
|
+
agent: constants_1.AGENT.OPENCODE,
|
|
10
|
+
displayName: 'OpenCode',
|
|
11
|
+
status: 'implemented',
|
|
12
|
+
buildProjection: command_skills_1.addCommandSkillProjection,
|
|
13
|
+
buildManagedFiles: command_skills_1.buildCommandSkillManagedFiles,
|
|
14
|
+
buildManagedBlocks() {
|
|
15
|
+
return [];
|
|
16
|
+
},
|
|
17
|
+
buildInstalledAdapter(scope, installedAt) {
|
|
18
|
+
return {
|
|
19
|
+
agent: constants_1.AGENT.OPENCODE,
|
|
20
|
+
scope,
|
|
21
|
+
installedAt,
|
|
22
|
+
corePath: constants_1.KYRO_ROOT,
|
|
23
|
+
commandsPath: constants_1.AGENT_SKILLS_ROOT,
|
|
24
|
+
skillsPath: constants_1.AGENT_SKILLS_ROOT,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
doctor(manifest) {
|
|
28
|
+
if (!manifest?.adapters.some((adapter) => adapter.agent === constants_1.AGENT.OPENCODE)) {
|
|
29
|
+
return { status: 'warn', name: 'OpenCode adapter', detail: 'not installed in this workspace' };
|
|
30
|
+
}
|
|
31
|
+
return checkCommandProjection('OpenCode adapter');
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
function checkCommandProjection(name) {
|
|
35
|
+
const missing = (0, command_skills_1.buildCommandSkillManagedFiles)().filter((file) => !(0, fs_1.workspaceFileExists)(file));
|
|
36
|
+
if (missing.length > 0) {
|
|
37
|
+
return { status: 'fail', name, detail: `missing ${missing.join(', ')}`, remedy: 'Run kyro sync.' };
|
|
38
|
+
}
|
|
39
|
+
return { status: 'pass', name, detail: 'projected Kyro command skills present' };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=opencode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/cli/adapters/opencode.ts"],"names":[],"mappings":";;;AAiCA,wDAMC;AAvCD,4CAAmE;AACnE,8BAA4C;AAG5C,qDAA4F;AAE/E,QAAA,eAAe,GAAsB;IAChD,KAAK,EAAE,iBAAK,CAAC,QAAQ;IACrB,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE,aAAa;IACrB,eAAe,EAAE,0CAAyB;IAC1C,iBAAiB,EAAE,8CAA6B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AdapterStatus = 'implemented' | 'planned';
|
|
3
|
+
export interface AdapterDefinition {
|
|
4
|
+
agent: Agent;
|
|
5
|
+
displayName: string;
|
|
6
|
+
status: AdapterStatus;
|
|
7
|
+
buildProjection(plan: OperationPlan[]): void;
|
|
8
|
+
buildManagedFiles(): string[];
|
|
9
|
+
buildManagedBlocks(): string[];
|
|
10
|
+
buildInstalledAdapter(scope: InstallScope, installedAt: string): KyroInstalledAdapter;
|
|
11
|
+
doctor(manifest: KyroManifest | null): CheckResult;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=registry-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-types.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/registry-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEpH,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,SAAS,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;IAC7C,iBAAiB,IAAI,MAAM,EAAE,CAAC;IAC9B,kBAAkB,IAAI,MAAM,EAAE,CAAC;IAC/B,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,GAAG,oBAAoB,CAAC;IACtF,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,GAAG,WAAW,CAAC;CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-types.js","sourceRoot":"","sources":["../../../src/cli/adapters/registry-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Agent } from '../types';
|
|
2
|
+
import type { AdapterDefinition } from './registry-types';
|
|
3
|
+
export declare const ADAPTERS: AdapterDefinition[];
|
|
4
|
+
export declare function getAdapterDefinition(agent: Agent): AdapterDefinition;
|
|
5
|
+
export declare function getInstallableAdapters(): AdapterDefinition[];
|
|
6
|
+
export declare function getInstalledAdapterDefinitions(agents: Agent[]): AdapterDefinition[];
|
|
7
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/cli/adapters/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAqB1D,eAAO,MAAM,QAAQ,EAAE,iBAAiB,EAKvC,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,iBAAiB,CAIpE;AAED,wBAAgB,sBAAsB,IAAI,iBAAiB,EAAE,CAE5D;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,iBAAiB,EAAE,CAEnF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ADAPTERS = void 0;
|
|
4
|
+
exports.getAdapterDefinition = getAdapterDefinition;
|
|
5
|
+
exports.getInstallableAdapters = getInstallableAdapters;
|
|
6
|
+
exports.getInstalledAdapterDefinitions = getInstalledAdapterDefinitions;
|
|
7
|
+
const constants_1 = require("../constants");
|
|
8
|
+
const codex_1 = require("./codex");
|
|
9
|
+
const opencode_1 = require("./opencode");
|
|
10
|
+
const plannedAdapter = (agent, displayName) => ({
|
|
11
|
+
agent,
|
|
12
|
+
displayName,
|
|
13
|
+
status: 'planned',
|
|
14
|
+
buildProjection() { },
|
|
15
|
+
buildManagedFiles() {
|
|
16
|
+
return [];
|
|
17
|
+
},
|
|
18
|
+
buildManagedBlocks() {
|
|
19
|
+
return [];
|
|
20
|
+
},
|
|
21
|
+
buildInstalledAdapter(scope, installedAt) {
|
|
22
|
+
return { agent, scope, installedAt, corePath: '.agents/kyro/internal' };
|
|
23
|
+
},
|
|
24
|
+
doctor() {
|
|
25
|
+
return { status: 'warn', name: `${displayName} adapter`, detail: 'planned but not implemented yet' };
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
exports.ADAPTERS = [
|
|
29
|
+
opencode_1.openCodeAdapter,
|
|
30
|
+
codex_1.codexAdapter,
|
|
31
|
+
plannedAdapter(constants_1.AGENT.CLAUDE, 'Claude plugin'),
|
|
32
|
+
plannedAdapter(constants_1.AGENT.CURSOR, 'Cursor'),
|
|
33
|
+
];
|
|
34
|
+
function getAdapterDefinition(agent) {
|
|
35
|
+
const definition = exports.ADAPTERS.find((adapter) => adapter.agent === agent);
|
|
36
|
+
if (!definition)
|
|
37
|
+
throw new Error(`Unknown adapter: ${agent}`);
|
|
38
|
+
return definition;
|
|
39
|
+
}
|
|
40
|
+
function getInstallableAdapters() {
|
|
41
|
+
return exports.ADAPTERS.filter((adapter) => adapter.status === 'implemented');
|
|
42
|
+
}
|
|
43
|
+
function getInstalledAdapterDefinitions(agents) {
|
|
44
|
+
return agents.map((agent) => getAdapterDefinition(agent));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/cli/adapters/registry.ts"],"names":[],"mappings":";;;AAgCA,oDAIC;AAED,wDAEC;AAED,wEAEC;AA5CD,4CAAqC;AAErC,mCAAuC;AACvC,yCAA6C;AAG7C,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,WAAmB,EAAqB,EAAE,CAAC,CAAC;IAChF,KAAK;IACL,WAAW;IACX,MAAM,EAAE,SAAS;IACjB,eAAe,KA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li/app.ts"],"names":[],"mappings":"AAOA,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAyC5C"}
|
package/dist/cli/app.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runCli = runCli;
|
|
4
|
+
const doctor_1 = require("./commands/doctor");
|
|
5
|
+
const install_1 = require("./commands/install");
|
|
6
|
+
const tui_1 = require("./commands/tui");
|
|
7
|
+
const uninstall_1 = require("./commands/uninstall");
|
|
8
|
+
const help_1 = require("./help");
|
|
9
|
+
const options_1 = require("./options");
|
|
10
|
+
async function runCli() {
|
|
11
|
+
const [command = '', ...args] = process.argv.slice(2);
|
|
12
|
+
if (command === '' || command === 'tui') {
|
|
13
|
+
await (0, tui_1.runTui)();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (command === '--help' || command === '-h' || command === 'help') {
|
|
17
|
+
(0, help_1.printHelp)();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (command === '--version' || command === '-v' || command === 'version') {
|
|
21
|
+
console.log((0, help_1.readPackageVersion)());
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const options = (0, options_1.parseOptions)(args);
|
|
25
|
+
if (options.help) {
|
|
26
|
+
(0, help_1.printCommandHelp)(command);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
switch (command) {
|
|
30
|
+
case 'install':
|
|
31
|
+
(0, install_1.install)(options);
|
|
32
|
+
break;
|
|
33
|
+
case 'doctor':
|
|
34
|
+
(0, doctor_1.doctor)();
|
|
35
|
+
break;
|
|
36
|
+
case 'sync':
|
|
37
|
+
(0, install_1.sync)(options);
|
|
38
|
+
break;
|
|
39
|
+
case 'uninstall':
|
|
40
|
+
(0, uninstall_1.uninstall)(options);
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
throw new Error(`Unknown command: ${command}. Run kyro --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