Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ At the end it offers an interactive opt-in — **"Also initialize KiroCrew? (y/N
What it installs:
1. `~/.kiro/agents/*.json` — the four agent specs (also valid KiroCrew templates)
2. `~/.kiro/prompts/*.md` — their system prompts
3. `~/.kiro/skills/` — workflow skills (incl. the `upgrade-guardian` skill)
3. `~/.kiro/skills/` — workflow skills (incl. the `potr-upgrade-guardian` skill)
4. `~/.kiro/hooks/` — safety-gate, barrel-export, etc.
5. `~/.kiro/steering/` — shared steering docs

Expand Down Expand Up @@ -196,10 +196,10 @@ These agents are distributed by `dev init-kiro` for use across all BePower proje

| Agent | Description |
|-------|-------------|
| `bepower-setup` | Analyzes a project and generates optimal `.kiro/` configuration (steering, agent, prompt, skills) |
| `functional-analyst` | Interactive functional analysis — collects requirements through conversation, produces approval docs and technical briefs (Italian-first) |
| `upgrade-guardian` | Assesses the safety of a dependency/framework upgrade in an isolated worktree and returns a reasoned **LOW/MEDIUM/HIGH** risk verdict with real breaking-change analysis, project impact and verification |
| `rev-eng` | Reverse-engineers a target web app's internal API via Playwright and documents it for a TypeScript client |
| `potr-setup` | Analyzes a project and generates optimal `.kiro/` configuration (steering, agent, prompt, skills) |
| `potr-functional-analyst` | Interactive functional analysis — collects requirements through conversation, produces approval docs and technical briefs (Italian-first) |
| `potr-upgrade-guardian` | Assesses the safety of a dependency/framework upgrade in an isolated worktree and returns a reasoned **LOW/MEDIUM/HIGH** risk verdict with real breaking-change analysis, project impact and verification |
| `potr-rev-eng` | Reverse-engineers a target web app's internal API via Playwright and documents it for a TypeScript client |

## Using the Agents

Expand All @@ -212,7 +212,7 @@ Pass the agent name to `kiro-cli chat`:
```bash
# in the repo you want it to work on
cd ~/projects/bepower/bep-cdk
kiro-cli chat --agent upgrade-guardian
kiro-cli chat --agent potr-upgrade-guardian
```

Then start the conversation by telling it what to assess, e.g.:
Expand All @@ -223,20 +223,20 @@ The agent reads the project context (`README.md`, `AGENTS.md` if present, `packa

### In the KiroCrew dashboard

After `dev init-crew` the agents appear as **members in the dashboard's agent picker**. Open a new chat, pick `upgrade-guardian` (or `rev-eng`), and start the conversation the same way — the result (e.g. an upgrade safety report) is rendered inline, with each member keeping its own dedicated memory.
After `dev init-crew` the agents appear as **members in the dashboard's agent picker**. Open a new chat, pick `potr-upgrade-guardian` (or `potr-rev-eng`), and start the conversation the same way — the result (e.g. an upgrade safety report) is rendered inline, with each member keeping its own dedicated memory.

### How to start the conversation

These agents are **task-driven**, not chatty — open with the concrete thing you want assessed:

| Agent | A good opening message |
|-------|------------------------|
| `upgrade-guardian` | _"Assess upgrading `<package>` from `<x>` to `<y>` in this repo. Is it safe to merge?"_ |
| `rev-eng` | _"Reverse-engineer the API of `<url>` and document the endpoints for a TypeScript client."_ |
| `bepower-setup` | _"Analyze this project and generate the `.kiro/` configuration for it."_ |
| `functional-analyst` | _"Raccogliamo i requisiti per `<feature>`."_ (Italian-first) |
| `potr-upgrade-guardian` | _"Assess upgrading `<package>` from `<x>` to `<y>` in this repo. Is it safe to merge?"_ |
| `potr-rev-eng` | _"Reverse-engineer the API of `<url>` and document the endpoints for a TypeScript client."_ |
| `potr-setup` | _"Analyze this project and generate the `.kiro/` configuration for it."_ |
| `potr-functional-analyst` | _"Raccogliamo i requisiti per `<feature>`."_ (Italian-first) |

The agent does the rest — reads context, analyzes, and returns a verdict or document. For `upgrade-guardian` the output is a safety report with a LOW/MEDIUM/HIGH verdict and a **suggested** (never executed) commit message; you decide whether to apply it.
The agent does the rest — reads context, analyzes, and returns a verdict or document. For `potr-upgrade-guardian` the output is a safety report with a LOW/MEDIUM/HIGH verdict and a **suggested** (never executed) commit message; you decide whether to apply it.

## Architecture

Expand Down
7 changes: 6 additions & 1 deletion cli/commands/init-crew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ const execAsync = promisify(exec);
* from the same `~/.kiro/agents/` directory, so each one only needs a crew
* member bound to it (`kirocrew agent create --kiro-agent <template>`).
*/
const CREW_AGENTS = ['upgrade-guardian', 'rev-eng', 'bepower-setup', 'functional-analyst'] as const;
const CREW_AGENTS = [
'potr-upgrade-guardian',
'potr-rev-eng',
'potr-setup',
'potr-functional-analyst',
] as const;

const CREW_WORKSPACE = 'default';

Expand Down
44 changes: 23 additions & 21 deletions cli/commands/init-kiro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,37 @@ export const initKiro = new Command()

// Agents
await mkdir(join(kiroDir, 'agents'), { recursive: true });
await cp(join(paths.kiro, 'agents/potr-setup.json'), join(kiroDir, 'agents/potr-setup.json'));
await cp(
join(paths.kiro, 'agents/bepower-setup.json'),
join(kiroDir, 'agents/bepower-setup.json'),
join(paths.kiro, 'agents/potr-functional-analyst.json'),
join(kiroDir, 'agents/potr-functional-analyst.json'),
);
await cp(
join(paths.kiro, 'agents/functional-analyst.json'),
join(kiroDir, 'agents/functional-analyst.json'),
join(paths.kiro, 'agents/potr-upgrade-guardian.json'),
join(kiroDir, 'agents/potr-upgrade-guardian.json'),
);
await cp(
join(paths.kiro, 'agents/upgrade-guardian.json'),
join(kiroDir, 'agents/upgrade-guardian.json'),
join(paths.kiro, 'agents/potr-rev-eng.json'),
join(kiroDir, 'agents/potr-rev-eng.json'),
);
await cp(join(paths.kiro, 'agents/rev-eng.json'), join(kiroDir, 'agents/rev-eng.json'));

// Prompts
await mkdir(join(kiroDir, 'prompts'), { recursive: true });
await cp(join(paths.kiro, 'prompts/potr-setup.md'), join(kiroDir, 'prompts/potr-setup.md'));
await cp(
join(paths.kiro, 'prompts/bepower-setup.md'),
join(kiroDir, 'prompts/bepower-setup.md'),
join(paths.kiro, 'prompts/potr-functional-analyst.md'),
join(kiroDir, 'prompts/potr-functional-analyst.md'),
);
await cp(
join(paths.kiro, 'prompts/functional-analyst.md'),
join(kiroDir, 'prompts/functional-analyst.md'),
join(paths.kiro, 'prompts/potr-upgrade-guardian.md'),
join(kiroDir, 'prompts/potr-upgrade-guardian.md'),
);
await cp(
join(paths.kiro, 'prompts/upgrade-guardian.md'),
join(kiroDir, 'prompts/upgrade-guardian.md'),
join(paths.kiro, 'prompts/potr-rev-eng.md'),
join(kiroDir, 'prompts/potr-rev-eng.md'),
);
await cp(join(paths.kiro, 'prompts/rev-eng.md'), join(kiroDir, 'prompts/rev-eng.md'));

// Resources (functional-analyst templates)
// Resources (potr-functional-analyst templates)
await cp(join(paths.kiro, 'resources'), join(kiroDir, 'resources'), { recursive: true });

// Skills (bepower-dev workflow skills)
Expand All @@ -82,16 +82,18 @@ export const initKiro = new Command()

console.log('✓ Kiro agents installed globally');
console.log(`\n Agents:`);
console.log(` ${join(kiroDir, 'agents/bepower-setup.json')}`);
console.log(` ${join(kiroDir, 'agents/functional-analyst.json')}`);
console.log(` ${join(kiroDir, 'agents/potr-setup.json')}`);
console.log(` ${join(kiroDir, 'agents/potr-functional-analyst.json')}`);
Comment on lines 84 to +86

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Logic Error: The success log only prints the install paths for potr-setup.json and potr-functional-analyst.json, omitting potr-upgrade-guardian.json and potr-rev-eng.json. All four agents are copied correctly above, but the console summary will tell users only 2 of 4 agents were installed, making the output misleading and potentially causing users to believe the install was incomplete or to re-run the command.

Suggested change
console.log(`\n Agents:`);
console.log(` ${join(kiroDir, 'agents/bepower-setup.json')}`);
console.log(` ${join(kiroDir, 'agents/functional-analyst.json')}`);
console.log(` ${join(kiroDir, 'agents/potr-setup.json')}`);
console.log(` ${join(kiroDir, 'agents/potr-functional-analyst.json')}`);
console.log(`\n Agents:`);
console.log(` ${join(kiroDir, 'agents/potr-setup.json')}`);
console.log(` ${join(kiroDir, 'agents/potr-functional-analyst.json')}`);
console.log(` ${join(kiroDir, 'agents/potr-upgrade-guardian.json')}`);
console.log(` ${join(kiroDir, 'agents/potr-rev-eng.json')}`);

console.log(` Prompts: ${join(kiroDir, 'prompts/')}`);
console.log(` Skills: ${skillsDest}/`);
console.log(` Hooks: ${join(kiroDir, 'hooks/')}`);
console.log('\nAvailable agents:');
console.log(' • bepower-setup — Generate .kiro/ config for a project');
console.log(' • functional-analyst — Interactive requirements gathering (Italian)');
console.log(' • upgrade-guardian — Assess dependency/framework upgrade safety (read-only)');
console.log(' • rev-eng — Reverse-engineer a web app API via Playwright (read-only)');
console.log(' • potr-setup — Generate .kiro/ config for a project');
console.log(' • potr-functional-analyst — Interactive requirements gathering (Italian)');
console.log(
' • potr-upgrade-guardian — Assess dependency/framework upgrade safety (read-only)',
);
console.log(' • potr-rev-eng — Reverse-engineer a web app API via Playwright (read-only)');

// Offer to also wire these agents into KiroCrew (dashboard members).
// Only prompts on an interactive TTY; non-interactive runs skip silently.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "functional-analyst",
"name": "potr-functional-analyst",
"description": "Agente di analisi funzionale — raccoglie requisiti, produce documentazione per approvazione e brief tecnico per il team dev",
"prompt": "file://../prompts/functional-analyst.md",
"resources": ["file://kiro/resources/functional-analyst/*.md"],
"prompt": "file://../prompts/potr-functional-analyst.md",
"resources": ["file://kiro/resources/potr-functional-analyst/*.md"],
"tools": [
"read",
"write",
Expand Down
4 changes: 2 additions & 2 deletions kiro/agents/rev-eng.json → kiro/agents/potr-rev-eng.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rev-eng",
"name": "potr-rev-eng",
"description": "Generic reverse-engineering agent — discovers a target web app's internal API via Playwright browser automation and documents it for a TypeScript client. Read-only: never commits, pushes, publishes, or mutates project source outside the docs API folder.",
"prompt": "file://../prompts/rev-eng.md",
"prompt": "file://../prompts/potr-rev-eng.md",
"resources": [
"file://README.md",
"file://AGENTS*.md",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bepower-setup",
"name": "potr-setup",
"description": "Agent that analyzes a project and generates optimal .kiro/ configuration (steering, agent, prompt, skills)",
"prompt": "file://../prompts/bepower-setup.md",
"prompt": "file://../prompts/potr-setup.md",
"resources": ["skill://.kiro/skills/**/SKILL.md"],
"tools": [
"read",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "upgrade-guardian",
"name": "potr-upgrade-guardian",
"description": "Assesses the safety of a dependency/framework upgrade in an isolated worktree. Read-only: analyzes real breaking changes, project impact and verification, then returns a reasoned LOW/MEDIUM/HIGH risk verdict. Never commits, pushes, publishes, or opens PRs.",
"prompt": "file://../prompts/upgrade-guardian.md",
"prompt": "file://../prompts/potr-upgrade-guardian.md",
"resources": [
"file://README.md",
"file://AGENTS*.md",
Expand Down
6 changes: 3 additions & 3 deletions kiro/hooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ They are **kept, not deleted**, pending a decision on whether to archive them:
## Agent distribution decision

- **All agents ship to everyone.** No conditional selection; consistent with how
`init-kiro` copies the whole `kiro/` payload. `upgrade-guardian` and the generic
`rev-eng` are distributed globally like `bepower-setup` and `functional-analyst`.
- **`rev-eng` stays global**, not scaffolded conditionally on "is this an
`init-kiro` copies the whole `kiro/` payload. `potr-upgrade-guardian` and the generic
`potr-rev-eng` are distributed globally like `potr-setup` and `potr-functional-analyst`.
- **`potr-rev-eng` stays global**, not scaffolded conditionally on "is this an
api-client project". It self-contextualizes at runtime; if the project has no
target to reverse-engineer, the agent simply has nothing to do — no conditional
install logic is needed.
4 changes: 2 additions & 2 deletions kiro/prompts/rev-eng.md → kiro/prompts/potr-rev-eng.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rev-eng — Generic API Reverse-Engineering Agent
# potr-rev-eng — Generic API Reverse-Engineering Agent

You are the **rev-eng** agent. Your job is to discover and document a target web
You are the **potr-rev-eng** agent. Your job is to discover and document a target web
application's internal API by driving it with Playwright and intercepting network
traffic, so a `dev` agent can implement a typed TypeScript client from your docs.

Expand Down
4 changes: 2 additions & 2 deletions kiro/prompts/bepower-setup.md → kiro/prompts/potr-setup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bepower-setup — Kiro Configuration Agent
# potr-setup — Kiro Configuration Agent

You are the **bepower-setup agent**. Your job is to analyze a BePower project and generate the optimal `.kiro/` configuration for it.
You are the **potr-setup agent**. Your job is to analyze a BePower project and generate the optimal `.kiro/` configuration for it.

## What You Do

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# upgrade-guardian — Dependency Upgrade Safety Agent (thin wrapper)
# potr-upgrade-guardian — Dependency Upgrade Safety Agent (thin wrapper)

You are the **upgrade-guardian** agent. You are a thin, read-only wrapper: the
substance of your job lives in the **`upgrade-guardian` skill**. Your role is to
You are the **potr-upgrade-guardian** agent. You are a thin, read-only wrapper: the
substance of your job lives in the **`potr-upgrade-guardian` skill**. Your role is to
provide the identity, the read-only guarantees, and to load and execute that skill.

## FIRST operative step — read the project context
Expand All @@ -14,7 +14,7 @@ real files — never assume. This is the first line of work, not an implicit one

## Then — load and run the skill

Load the **`upgrade-guardian`** skill (via `skill_search`) and follow it end to
Load the **`potr-upgrade-guardian`** skill (via `skill_search`) and follow it end to
end. Do **not** reproduce its playbook here — the skill is the single source of
truth for:
- semver-scaled depth (patch / minor / major),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: upgrade-guardian
name: potr-upgrade-guardian
description: "Assess whether a dependency/framework upgrade is safe. Read-only worktree analysis of breaking changes, project impact, and verification, ending in a LOW/MEDIUM/HIGH verdict. Reusable by any agent via skill_search. Use before applying any dependency bump."
---

Expand All @@ -8,7 +8,7 @@ description: "Assess whether a dependency/framework upgrade is safe. Read-only w
**Cognitive mode: Release-Safety Engineer (read-only)**

This SKILL is the **core logic** of upgrade safety assessment. Any agent can load
it on demand (`skill_search`); the `upgrade-guardian` agent is only a thin
it on demand (`skill_search`); the `potr-upgrade-guardian` agent is only a thin
read-only wrapper around it. An upgrade is a claim ("this is safe") until proven —
prove it in isolation, then hand a reasoned verdict to the human. Never mutate the repo.

Expand Down
12 changes: 10 additions & 2 deletions test/init-crew.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,23 @@ describe('init-crew command', () => {
const ran = await bootstrapCrew();

expect(ran).toBe(true);
expect(created).toEqual(['upgrade-guardian', 'rev-eng', 'bepower-setup', 'functional-analyst']);
expect(created).toEqual([
'potr-upgrade-guardian',
'potr-rev-eng',
'potr-setup',
'potr-functional-analyst',
]);
});

it('skips members that already exist (idempotent)', async () => {
const created: string[] = [];
mockExec((cmd) => {
if (cmd.includes('--version')) return { stdout: 'kirocrew 1.0.0' };
if (cmd.includes('agent list')) {
return { stdout: 'NAME\nupgrade-guardian\nrev-eng\nbepower-setup\nfunctional-analyst\n' };
return {
stdout:
'NAME\npotr-upgrade-guardian\npotr-rev-eng\npotr-setup\npotr-functional-analyst\n',
};
}
if (cmd.includes('agent create')) {
created.push(/--name '?([^' ]+)'?/.exec(cmd)?.[1] ?? '');
Expand Down
18 changes: 9 additions & 9 deletions test/init-kiro.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ describe('init-kiro command', () => {
const kiroDir = join(tempDir, '.kiro');

// Agents
expect(await fileExists(join(kiroDir, 'agents/bepower-setup.json'))).toBe(true);
expect(await fileExists(join(kiroDir, 'agents/functional-analyst.json'))).toBe(true);
expect(await fileExists(join(kiroDir, 'agents/upgrade-guardian.json'))).toBe(true);
expect(await fileExists(join(kiroDir, 'agents/rev-eng.json'))).toBe(true);
expect(await fileExists(join(kiroDir, 'agents/potr-setup.json'))).toBe(true);
expect(await fileExists(join(kiroDir, 'agents/potr-functional-analyst.json'))).toBe(true);
expect(await fileExists(join(kiroDir, 'agents/potr-upgrade-guardian.json'))).toBe(true);
expect(await fileExists(join(kiroDir, 'agents/potr-rev-eng.json'))).toBe(true);

// Prompts
expect(await fileExists(join(kiroDir, 'prompts/bepower-setup.md'))).toBe(true);
expect(await fileExists(join(kiroDir, 'prompts/functional-analyst.md'))).toBe(true);
expect(await fileExists(join(kiroDir, 'prompts/upgrade-guardian.md'))).toBe(true);
expect(await fileExists(join(kiroDir, 'prompts/rev-eng.md'))).toBe(true);
expect(await fileExists(join(kiroDir, 'prompts/potr-setup.md'))).toBe(true);
expect(await fileExists(join(kiroDir, 'prompts/potr-functional-analyst.md'))).toBe(true);
expect(await fileExists(join(kiroDir, 'prompts/potr-upgrade-guardian.md'))).toBe(true);
expect(await fileExists(join(kiroDir, 'prompts/potr-rev-eng.md'))).toBe(true);

// Resources
expect(await fileExists(join(kiroDir, 'resources/functional-analyst'))).toBe(true);
expect(await fileExists(join(kiroDir, 'resources/potr-functional-analyst'))).toBe(true);

// Skills
expect(await fileExists(join(kiroDir, 'skills/bepower-dev'))).toBe(true);
Expand Down
Loading