agjan 0.0.25 → 0.0.26
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/README.md +2 -0
- package/dist/cli.js +6 -0
- package/dist/commands/workflow.js +73 -0
- package/dist/workflow-view.js +67 -0
- package/dist/workflow.js +94 -0
- package/docs/guide.md +7 -1
- package/docs/workflows-and-teams.md +114 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -88,6 +88,8 @@ Fiori or BTP, in general or about files you name: `/agjan-ask`.
|
|
|
88
88
|
|
|
89
89
|
- [User guide](docs/guide.md): setup, workflow, commands, configuration, hosts, CI,
|
|
90
90
|
troubleshooting
|
|
91
|
+
- [Workflows, teams, personas and skills](docs/workflows-and-teams.md): the terms and how
|
|
92
|
+
they fit together
|
|
91
93
|
- [Design](docs/design.md): every decision and its reason
|
|
92
94
|
- [Host experiments](docs/host-experiments.md): what was verified on each host, and how
|
|
93
95
|
- [End-to-end run](docs/e2e-run.md): a guided trial on a sample CAP and Fiori app
|
package/dist/cli.js
CHANGED
|
@@ -14,6 +14,7 @@ import * as fix from './commands/fix.js';
|
|
|
14
14
|
import * as mapCommand from './commands/map.js';
|
|
15
15
|
import * as discoverCommand from './commands/discover.js';
|
|
16
16
|
import * as teamCommand from './commands/team.js';
|
|
17
|
+
import * as workflowCommand from './commands/workflow.js';
|
|
17
18
|
import * as importCommand from './commands/import.js';
|
|
18
19
|
import * as branch from './commands/branch.js';
|
|
19
20
|
import * as progress from './commands/progress.js';
|
|
@@ -57,6 +58,7 @@ const COMMANDS = {
|
|
|
57
58
|
map: mapCommand.map,
|
|
58
59
|
discover: discoverCommand.discover,
|
|
59
60
|
team: teamCommand.run,
|
|
61
|
+
workflow: workflowCommand.run,
|
|
60
62
|
import: importCommand.run,
|
|
61
63
|
baseline: mapCommand.baseline,
|
|
62
64
|
mcp: review.mcp,
|
|
@@ -119,6 +121,10 @@ Agent and human:
|
|
|
119
121
|
exact commit; shown first, confirmed in a terminal
|
|
120
122
|
team list | team show <name> the teams a unit can start with (new, fix start, discover
|
|
121
123
|
start take --team) and what their personas work with
|
|
124
|
+
workflow list [--json] | workflow show <feature|fix|map|discovery> [--team <name>] [--light] [--json]
|
|
125
|
+
the workflows, and one as this project runs it: each step,
|
|
126
|
+
the agent that does it, its persona's skills, the review
|
|
127
|
+
tiers and rounds, your gates
|
|
122
128
|
baseline refresh record the watched files in baseline.json
|
|
123
129
|
skill <spec|design|build|verify>
|
|
124
130
|
print the workflow skill (auto mode: the next skill of the run)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { parseArgs } from 'node:util';
|
|
2
|
+
import { UsageError } from '../errors.js';
|
|
3
|
+
import { allTeams, defaultTeam } from '../teams.js';
|
|
4
|
+
import { WORKFLOWS } from '../workflow.js';
|
|
5
|
+
import { resolveWorkflow, teamSource } from '../workflow-view.js';
|
|
6
|
+
const USAGE = 'usage: agjan workflow list [--json] | agjan workflow show <feature|fix|map|discovery> [--team <name>] [--light] [--json]';
|
|
7
|
+
const SOURCE = { 'built-in': 'built in', imported: 'imported', project: 'agjan.config.json' };
|
|
8
|
+
/**
|
|
9
|
+
* agjan workflow list | show <kind> (decision 90): the workflows with their default teams, and
|
|
10
|
+
* one of them as this project runs it: each stage's steps, the agent that does each, the
|
|
11
|
+
* persona it works with, the review tiers and rounds, and the person's gates. `--json` is for
|
|
12
|
+
* tools; the list then also gives the teams, for choosing one.
|
|
13
|
+
*/
|
|
14
|
+
export function run(ctx, argv) {
|
|
15
|
+
const { values, positionals } = parseArgs({ args: argv, allowPositionals: true, options: { team: { type: 'string' }, light: { type: 'boolean' }, json: { type: 'boolean' } } });
|
|
16
|
+
const s = ctx.style;
|
|
17
|
+
if (positionals[0] === 'list' && positionals.length === 1 && values.json) {
|
|
18
|
+
const workflows = Object.values(WORKFLOWS).map((w) => ({ kind: w.kind, name: w.name, skill: `/${w.skill}`, stages: w.stages, team: defaultTeam(ctx.config, w.kind) }));
|
|
19
|
+
const teams = Object.entries(allTeams(ctx.config)).map(([name, t]) => ({ name, description: t.description, workflows: t.workflows, source: teamSource(ctx.config, name) }));
|
|
20
|
+
ctx.out(JSON.stringify({ schema: 1, workflows, teams }, null, 2));
|
|
21
|
+
return 0;
|
|
22
|
+
}
|
|
23
|
+
if (positionals[0] === 'list' && positionals.length === 1) {
|
|
24
|
+
for (const w of Object.values(WORKFLOWS)) {
|
|
25
|
+
ctx.out(`${s.bold(w.kind.padEnd(11))} /${w.skill.padEnd(16)} ${w.stages.join(' → ').padEnd(30)} ${s.gray(`team ${defaultTeam(ctx.config, w.kind) ?? '-'}`)}`);
|
|
26
|
+
}
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
if (positionals[0] !== 'show' || positionals.length !== 2)
|
|
30
|
+
throw new UsageError(USAGE);
|
|
31
|
+
const kind = positionals[1];
|
|
32
|
+
if (!WORKFLOWS[kind])
|
|
33
|
+
throw new UsageError(`no workflow '${positionals[1]}' (workflows: ${Object.keys(WORKFLOWS).join(', ')})`);
|
|
34
|
+
const view = resolveWorkflow(ctx.root, ctx.config, kind, { team: values.team, light: values.light });
|
|
35
|
+
if (values.json) {
|
|
36
|
+
// The team's problems are in the data; tools read them there.
|
|
37
|
+
ctx.out(JSON.stringify(view, null, 2));
|
|
38
|
+
return 0;
|
|
39
|
+
}
|
|
40
|
+
const mode = view.workflow.mode ? ` (${view.workflow.mode})` : '';
|
|
41
|
+
ctx.out(`${s.bold(`${view.workflow.name} workflow`)}${mode}, started with ${view.workflow.skill}`);
|
|
42
|
+
if (view.team) {
|
|
43
|
+
ctx.out(`team ${s.bold(view.team.name)} ${s.gray(`(${SOURCE[view.team.source]}${view.team.default ? ', the default' : ''})`)}`);
|
|
44
|
+
if (view.team.description)
|
|
45
|
+
ctx.out(` ${s.gray(view.team.description)}`);
|
|
46
|
+
}
|
|
47
|
+
for (const stage of view.stages) {
|
|
48
|
+
ctx.out('', s.bold(stage.name));
|
|
49
|
+
for (const step of stage.steps) {
|
|
50
|
+
const details = [
|
|
51
|
+
step.review ? `${step.review.tier}${step.review.per ? `, per ${step.review.per}` : ''}, up to ${step.review.rounds} rounds` : '',
|
|
52
|
+
step.gate ? step.gate.command : '',
|
|
53
|
+
step.off ? `skipped: ${step.off}` : '',
|
|
54
|
+
].filter(Boolean);
|
|
55
|
+
const does = step.off ? s.gray(step.does) : step.does;
|
|
56
|
+
ctx.out(` ${step.agent.padEnd(21)} ${does}${details.length ? s.gray(` (${details.join('; ')})`) : ''}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const roles = [...new Set(view.stages.flatMap((st) => st.steps).filter((st) => st.role).map((st) => st.role))];
|
|
60
|
+
if (view.team && roles.length) {
|
|
61
|
+
ctx.out('', s.bold(`What the agents work with (team ${view.team.name})`));
|
|
62
|
+
for (const role of roles) {
|
|
63
|
+
const persona = view.stages.flatMap((st) => st.steps).find((st) => st.role === role)?.persona;
|
|
64
|
+
ctx.out(` ${role.padEnd(21)} ${persona?.skills.length ? persona.skills.join(', ') : s.gray('no persona')}`);
|
|
65
|
+
if (persona?.instructions?.trim())
|
|
66
|
+
ctx.out(` ${''.padEnd(21)} ${s.gray(persona.instructions.trim().replace(/\s+/g, ' '))}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
ctx.out('', s.gray(`Every workflow keeps: ${view.controls.join(', ')}. A team adds knowledge; it cannot remove a step.`));
|
|
70
|
+
for (const p of view.team?.problems ?? [])
|
|
71
|
+
ctx.out(`${s.red('problem')} ${p}`);
|
|
72
|
+
return view.team?.problems.length ? 1 : 0;
|
|
73
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { BUILT_IN_TEAMS, allTeams, defaultTeam, mainRole, teamProblems } from './teams.js';
|
|
2
|
+
import { DEFAULT_TIERS, reviewerFor, roundLimit, stepKind } from './review-policy.js';
|
|
3
|
+
import { WORKFLOWS } from './workflow.js';
|
|
4
|
+
/** Where a team comes from: agjan, an imported package (`<package>/<team>`), or the project's configuration. */
|
|
5
|
+
export function teamSource(config, name) {
|
|
6
|
+
if (name.includes('/'))
|
|
7
|
+
return 'imported';
|
|
8
|
+
return BUILT_IN_TEAMS[name] && !config.teams?.[name] ? 'built-in' : 'project';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The workflow `kind` with the team named (else its default) and, for a feature, the full or
|
|
12
|
+
* the light track (full by default).
|
|
13
|
+
*/
|
|
14
|
+
export function resolveWorkflow(root, config, kind, options = {}) {
|
|
15
|
+
const workflow = WORKFLOWS[kind];
|
|
16
|
+
const mode = kind === 'feature' ? (options.light ? 'light' : 'full') : null;
|
|
17
|
+
const fallback = defaultTeam(config, kind);
|
|
18
|
+
const name = options.team ?? fallback;
|
|
19
|
+
const team = name ? (allTeams(config)[name] ?? null) : null;
|
|
20
|
+
const roleOf = { main: mainRole(kind), reviewer: 'reviewer', qa: 'tester', human: null };
|
|
21
|
+
const qaOff = config.review?.qa === 'off';
|
|
22
|
+
const stages = workflow.track.map((stage) => ({
|
|
23
|
+
name: stage.name,
|
|
24
|
+
steps: stage.steps
|
|
25
|
+
.filter((step) => !step.mode || step.mode === mode)
|
|
26
|
+
.map((step) => {
|
|
27
|
+
const role = roleOf[step.actor];
|
|
28
|
+
const resolved = {
|
|
29
|
+
actor: step.actor,
|
|
30
|
+
agent: step.actor === 'main' ? 'main agent' : 'you',
|
|
31
|
+
does: step.does,
|
|
32
|
+
role,
|
|
33
|
+
persona: role ? (team?.personas[role] ?? null) : null,
|
|
34
|
+
};
|
|
35
|
+
if (step.review) {
|
|
36
|
+
const kindOfStep = stepKind(step.review);
|
|
37
|
+
resolved.agent = reviewerFor(config, step.review);
|
|
38
|
+
resolved.review = {
|
|
39
|
+
step: step.review,
|
|
40
|
+
tier: step.review === 'qa' ? 'qa' : (config.review?.tiers?.[kindOfStep] ?? DEFAULT_TIERS[kindOfStep] ?? 'balanced'),
|
|
41
|
+
rounds: roundLimit(config),
|
|
42
|
+
...(step.review === 'build:' ? { per: config.review?.build === 'task' ? 'task' : 'area' } : {}),
|
|
43
|
+
};
|
|
44
|
+
if (step.review === 'qa' && qaOff)
|
|
45
|
+
resolved.off = 'review.qa is off';
|
|
46
|
+
}
|
|
47
|
+
if (step.gate)
|
|
48
|
+
resolved.gate = { name: step.gate, command: `npx agjan approve ${step.gate}` };
|
|
49
|
+
return resolved;
|
|
50
|
+
}),
|
|
51
|
+
}));
|
|
52
|
+
return {
|
|
53
|
+
schema: 1,
|
|
54
|
+
workflow: { kind, name: workflow.name, skill: `/${workflow.skill}`, end: workflow.end, mode },
|
|
55
|
+
team: name
|
|
56
|
+
? {
|
|
57
|
+
name,
|
|
58
|
+
description: team?.description ?? '',
|
|
59
|
+
source: teamSource(config, name),
|
|
60
|
+
default: name === fallback,
|
|
61
|
+
problems: teamProblems(root, config, name, kind),
|
|
62
|
+
}
|
|
63
|
+
: null,
|
|
64
|
+
stages,
|
|
65
|
+
controls: workflow.controls,
|
|
66
|
+
};
|
|
67
|
+
}
|
package/dist/workflow.js
CHANGED
|
@@ -13,6 +13,42 @@ export const WORKFLOWS = {
|
|
|
13
13
|
endGate: 'verify',
|
|
14
14
|
writes: 'tasks',
|
|
15
15
|
controls: ['independent-review', 'stamped-approvals', 'scope-check', 'human-decision'],
|
|
16
|
+
track: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Spec',
|
|
19
|
+
steps: [
|
|
20
|
+
{ actor: 'main', does: 'writes the spec: what and why, with testable acceptance criteria' },
|
|
21
|
+
{ actor: 'reviewer', does: 'reviews the spec', review: 'spec', mode: 'full' },
|
|
22
|
+
{ actor: 'human', does: 'approve the spec', gate: 'spec', mode: 'full' },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Design',
|
|
27
|
+
steps: [
|
|
28
|
+
{ actor: 'main', does: 'writes the design: how, split into build tasks with file paths' },
|
|
29
|
+
{ actor: 'reviewer', does: 'reviews the design', review: 'design', mode: 'full' },
|
|
30
|
+
{ actor: 'reviewer', does: 'reviews the spec and the design together', review: 'design:light', mode: 'light' },
|
|
31
|
+
{ actor: 'human', does: 'approve the design', gate: 'design', mode: 'full' },
|
|
32
|
+
{ actor: 'human', does: 'approve the spec and the design together', gate: 'spec design', mode: 'light' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Build',
|
|
37
|
+
steps: [
|
|
38
|
+
{ actor: 'main', does: 'builds each task, one commit per task, within the approved paths' },
|
|
39
|
+
{ actor: 'reviewer', does: 'reviews the build', review: 'build:' },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Verify',
|
|
44
|
+
steps: [
|
|
45
|
+
{ actor: 'main', does: 'runs the full checks and records the test run' },
|
|
46
|
+
{ actor: 'qa', does: "writes and runs tests from the spec's acceptance criteria", review: 'qa', mode: 'full' },
|
|
47
|
+
{ actor: 'reviewer', does: 'reviews the whole change', review: 'verify' },
|
|
48
|
+
{ actor: 'human', does: 'accept the feature, then merge the pull request', gate: 'verify' },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
],
|
|
16
52
|
},
|
|
17
53
|
fix: {
|
|
18
54
|
kind: 'fix',
|
|
@@ -26,6 +62,23 @@ export const WORKFLOWS = {
|
|
|
26
62
|
end: 'merge',
|
|
27
63
|
writes: 'fix-rules',
|
|
28
64
|
controls: ['independent-review', 'stamped-approvals', 'scope-check', 'human-decision'],
|
|
65
|
+
track: [
|
|
66
|
+
{
|
|
67
|
+
name: 'Fix',
|
|
68
|
+
steps: [
|
|
69
|
+
{ actor: 'main', does: 'fixes the defect in existing files, within the fix limits' },
|
|
70
|
+
{ actor: 'main', does: 'checks the fix against the limits and protected paths' },
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Review',
|
|
75
|
+
steps: [
|
|
76
|
+
{ actor: 'reviewer', does: 'reviews the fix', review: 'fix' },
|
|
77
|
+
{ actor: 'main', does: 'records the fix' },
|
|
78
|
+
{ actor: 'human', does: 'review and merge the pull request' },
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
],
|
|
29
82
|
},
|
|
30
83
|
map: {
|
|
31
84
|
kind: 'map',
|
|
@@ -39,6 +92,22 @@ export const WORKFLOWS = {
|
|
|
39
92
|
end: 'merge',
|
|
40
93
|
writes: 'project-map',
|
|
41
94
|
controls: ['independent-review', 'stamped-approvals', 'scope-check', 'human-decision'],
|
|
95
|
+
track: [
|
|
96
|
+
{
|
|
97
|
+
name: 'Map',
|
|
98
|
+
steps: [
|
|
99
|
+
{ actor: 'main', does: 'describes the application in project.md, with pointers to real files' },
|
|
100
|
+
{ actor: 'main', does: 'records the watched files in baseline.json' },
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'Review',
|
|
105
|
+
steps: [
|
|
106
|
+
{ actor: 'reviewer', does: 'reviews the map', review: 'map' },
|
|
107
|
+
{ actor: 'human', does: 'review and merge the pull request' },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
],
|
|
42
111
|
},
|
|
43
112
|
discovery: {
|
|
44
113
|
kind: 'discovery',
|
|
@@ -53,6 +122,20 @@ export const WORKFLOWS = {
|
|
|
53
122
|
endGate: 'proposal',
|
|
54
123
|
writes: 'own-folder',
|
|
55
124
|
controls: ['independent-review', 'stamped-approvals', 'scope-check', 'human-decision'],
|
|
125
|
+
track: [
|
|
126
|
+
{
|
|
127
|
+
name: 'Proposal',
|
|
128
|
+
steps: [{ actor: 'main', does: 'prepares the proposal: context, options, a recommendation; changes no code' }],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'Review',
|
|
132
|
+
steps: [{ actor: 'reviewer', does: 'reviews the proposal', review: 'proposal' }],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'Approval',
|
|
136
|
+
steps: [{ actor: 'human', does: 'approve the proposal', gate: 'proposal' }],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
56
139
|
},
|
|
57
140
|
};
|
|
58
141
|
export function workflowOf(kind) {
|
|
@@ -79,5 +162,16 @@ export function workflowProblems(workflow) {
|
|
|
79
162
|
problems.push(`${workflow.kind}: ends with an acceptance but names no gate of its own for it`);
|
|
80
163
|
if (!workflow.stages.length)
|
|
81
164
|
problems.push(`${workflow.kind}: no stages`);
|
|
165
|
+
const names = workflow.track.map((t) => t.name);
|
|
166
|
+
if (names.join() !== workflow.stages.join())
|
|
167
|
+
problems.push(`${workflow.kind}: the track's stages (${names.join(', ')}) are not the workflow's (${workflow.stages.join(', ')})`);
|
|
168
|
+
for (const step of workflow.track.flatMap((t) => t.steps)) {
|
|
169
|
+
if (step.review && !workflow.reviewSteps.includes(step.review))
|
|
170
|
+
problems.push(`${workflow.kind}: the track names an unknown review step '${step.review}'`);
|
|
171
|
+
if (step.gate && !workflow.gates.includes(step.gate))
|
|
172
|
+
problems.push(`${workflow.kind}: the track names an unknown gate '${step.gate}'`);
|
|
173
|
+
}
|
|
174
|
+
if (!workflow.track.some((t) => t.steps.some((step) => step.actor === 'human')))
|
|
175
|
+
problems.push(`${workflow.kind}: no step of the track is the person's`);
|
|
82
176
|
return problems;
|
|
83
177
|
}
|
package/docs/guide.md
CHANGED
|
@@ -408,7 +408,8 @@ and CI waits for your approval. To build the recommendation, start a feature wit
|
|
|
408
408
|
## Teams
|
|
409
409
|
|
|
410
410
|
A team decides what knowledge the agents bring to a unit of work; the workflow decides the
|
|
411
|
-
steps, reviews and gates, and a team cannot remove any of them.
|
|
411
|
+
steps, reviews and gates, and a team cannot remove any of them. [Workflows, teams, personas and
|
|
412
|
+
skills](workflows-and-teams.md) defines the terms. Three teams are built in:
|
|
412
413
|
|
|
413
414
|
| Team | Workflows | Implementer or analyst | Reviewer | Tester |
|
|
414
415
|
|---|---|---|---|---|
|
|
@@ -442,6 +443,10 @@ starts no agent of its own: the implementer's skills reach the main agent throug
|
|
|
442
443
|
the reviewer's and the tester's through their review and QA contexts. If the team's
|
|
443
444
|
definition changes while a unit is under way, `status` and `check` say so.
|
|
444
445
|
`npx agjan team list` lists the teams, `npx agjan team show <name>` their personas.
|
|
446
|
+
`npx agjan workflow show feature` shows the whole workflow as your project runs it: each
|
|
447
|
+
step, the agent that does it and the skills it works with, the review tier and rounds from
|
|
448
|
+
your configuration, and your gates (`--team <name>` for another team, `--light` for a light
|
|
449
|
+
feature).
|
|
445
450
|
|
|
446
451
|
### Importing skills and teams
|
|
447
452
|
|
|
@@ -522,6 +527,7 @@ Run `npx agjan --help` for the full list.
|
|
|
522
527
|
| `approve proposal` | you, in a terminal | decide on a discovery's recommendation |
|
|
523
528
|
| `import <git url> --commit <id> [--dry-run]` · `import list` · `import remove <name>` | you, in a terminal | skills and teams from another repository at an exact commit, shown before they are written |
|
|
524
529
|
| `team list` · `team show <name>` | anyone | the teams, the default per workflow, and what a team's personas work with |
|
|
530
|
+
| `workflow list [--json]` · `workflow show <workflow> [--team <name>] [--light] [--json]` | anyone, tools | the workflows, and one as this project runs it: each step, the agent that does it, the skills it works with, review tiers and rounds, your gates |
|
|
525
531
|
| `status --json` | tools | per unit: its workflow, stage, whose turn, what is next and the command or skill for it, and for a feature in Build whether it is verified and what blocks it |
|
|
526
532
|
| `progress [--open]` | anyone | regenerate the progress pages, print the overview, open the HTML page |
|
|
527
533
|
| `branch <name>` · `--list` · `--use <name>` | agent (after asking you with `git.branches: "ask"`) | create the branch of a unit, list the existing branches, or switch to one |
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Workflows, teams, personas and skills
|
|
2
|
+
|
|
3
|
+
agjan separates **how** work is done from **who** does it. A workflow fixes the steps,
|
|
4
|
+
reviews and approvals. A team decides what knowledge the agents bring to those steps. This
|
|
5
|
+
page defines the four terms and how they fit together; the [user guide](guide.md#teams)
|
|
6
|
+
shows how to use them.
|
|
7
|
+
|
|
8
|
+
- [The four terms](#the-four-terms)
|
|
9
|
+
- [How they fit together](#how-they-fit-together)
|
|
10
|
+
- [The workflows](#the-workflows)
|
|
11
|
+
- [Which roles each workflow needs](#which-roles-each-workflow-needs)
|
|
12
|
+
- [Example: the built-in teams](#example-the-built-in-teams)
|
|
13
|
+
|
|
14
|
+
## The four terms
|
|
15
|
+
|
|
16
|
+
| Term | What it is | Examples | Where it is defined |
|
|
17
|
+
|---|---|---|---|
|
|
18
|
+
| **Workflow** | A kind of work and its fixed steps: stages, independent reviews, the approvals you give, and what it may change. | feature, fix, map, discovery | Built into agjan; a project cannot change it. |
|
|
19
|
+
| **Team** | A named group of personas for one or more workflows. It decides the knowledge, never the steps. | sap-delivery, sap-maintenance, sap-discovery | Built into agjan, imported from a package, or in the project's `agjan.config.json`. |
|
|
20
|
+
| **Persona** | A role inside a team, with the skills (and optional instructions) that role works with. | the reviewer of sap-delivery | Inside its team; a persona does not exist on its own. |
|
|
21
|
+
| **Skill** | A folder of instructions and references an agent reads for a specialty. | cap-developer, solution-reviewer, qa-tester | `.claude/skills/<name>/SKILL.md`: agjan's own, the project's own, or imported. |
|
|
22
|
+
|
|
23
|
+
There are four **roles**, and a persona fills one of them:
|
|
24
|
+
|
|
25
|
+
| Role | What it does |
|
|
26
|
+
|---|---|
|
|
27
|
+
| implementer | Builds a feature or a fix (the main agent). |
|
|
28
|
+
| analyst | Maps an existing application or prepares a decision (the main agent). |
|
|
29
|
+
| reviewer | Reviews every step independently, read-only (the reviewer agents). |
|
|
30
|
+
| tester | Tests the built feature against its acceptance criteria (the QA agent). |
|
|
31
|
+
|
|
32
|
+
A **unit** is one piece of work that runs a workflow: one feature, one fix, one map run or
|
|
33
|
+
one discovery.
|
|
34
|
+
|
|
35
|
+
## How they fit together
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
WORKFLOW feature · fix · map · discovery
|
|
39
|
+
│ built into agjan; the steps every team follows
|
|
40
|
+
│
|
|
41
|
+
│ many-to-many: a team serves one or more workflows, a workflow has one or more teams
|
|
42
|
+
│ one default team per workflow; exactly one team per unit
|
|
43
|
+
▼
|
|
44
|
+
TEAM sap-delivery · sap-maintenance · sap-discovery · your own
|
|
45
|
+
│
|
|
46
|
+
│ one persona per role the workflow needs
|
|
47
|
+
▼
|
|
48
|
+
PERSONA implementer · analyst · reviewer · tester
|
|
49
|
+
│
|
|
50
|
+
│ many-to-many: a persona lists its skills; a skill is reused by many personas
|
|
51
|
+
▼
|
|
52
|
+
SKILL cap-developer · fiori-developer · btp-architect · solution-reviewer · qa-tester · ...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The rules behind the arrows:
|
|
56
|
+
|
|
57
|
+
- A team lists the workflows it serves (`sap-maintenance` serves both fix and map), and
|
|
58
|
+
several teams may serve the same workflow.
|
|
59
|
+
- Each workflow has one **default** team: the one `team.<workflow>` names in
|
|
60
|
+
`agjan.config.json`, otherwise the first team that serves it.
|
|
61
|
+
- Each unit runs with **exactly one** team: the default, or the one named with `--team`
|
|
62
|
+
when the unit starts. The unit records the team and a hash of its definition, so a later
|
|
63
|
+
change to the team is reported.
|
|
64
|
+
- A team has one persona per role, and must fill every role its workflows need with at
|
|
65
|
+
least one skill.
|
|
66
|
+
- A persona starts no agent of its own. Its skills and instructions go to the agent that
|
|
67
|
+
already does that job: the main agent, the reviewer or the QA agent.
|
|
68
|
+
- A team cannot remove a step. Every workflow keeps an independent review, approvals
|
|
69
|
+
stamped by a script, scope checks, and a person who decides at the end.
|
|
70
|
+
|
|
71
|
+
## The workflows
|
|
72
|
+
|
|
73
|
+
| Workflow | Use it for | Started with | Stages | Your decision |
|
|
74
|
+
|---|---|---|---|---|
|
|
75
|
+
| feature | New or changed behaviour, spec-driven | `/agjan-spec` | Spec, Design, Build, Verify | Approve spec and design, accept the result, merge |
|
|
76
|
+
| fix | A small fix within limits, existing files only | `/agjan-fix` | Fix, Review | Review and merge the pull request |
|
|
77
|
+
| map | Describing an existing application in `project.md` | `/agjan-map` | Map, Review | Review and merge the pull request |
|
|
78
|
+
| discovery | A decision before any spec: options and a recommendation, no code | `/agjan-discover` | Proposal, Review, Approval | Approve the proposal |
|
|
79
|
+
|
|
80
|
+
## Which roles each workflow needs
|
|
81
|
+
|
|
82
|
+
| Workflow | implementer | analyst | reviewer | tester |
|
|
83
|
+
|---|---|---|---|---|
|
|
84
|
+
| feature | the main agent builds | | reviews every stage | the QA agent tests |
|
|
85
|
+
| fix | the main agent fixes | | reviews the fix | |
|
|
86
|
+
| map | | the main agent maps | reviews the map | |
|
|
87
|
+
| discovery | | the main agent proposes | reviews the proposal | |
|
|
88
|
+
|
|
89
|
+
## Example: the built-in teams
|
|
90
|
+
|
|
91
|
+
agjan ships three teams for SAP CAP, Fiori and BTP projects. The same skills appear in
|
|
92
|
+
several personas: that is the many-to-many link between personas and skills.
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
feature ────► sap-delivery
|
|
96
|
+
implementer: cap-developer, fiori-developer, btp-architect
|
|
97
|
+
reviewer: solution-reviewer, cap-developer, fiori-developer, btp-architect
|
|
98
|
+
tester: qa-tester
|
|
99
|
+
|
|
100
|
+
fix ──┐
|
|
101
|
+
map ──┴─────► sap-maintenance
|
|
102
|
+
implementer: cap-developer, fiori-developer (fix)
|
|
103
|
+
analyst: cap-developer, fiori-developer, btp-architect (map)
|
|
104
|
+
reviewer: solution-reviewer, cap-developer, fiori-developer
|
|
105
|
+
|
|
106
|
+
discovery ──► sap-discovery
|
|
107
|
+
analyst: btp-architect, cap-developer, fiori-developer
|
|
108
|
+
reviewer: solution-reviewer, btp-architect
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
To define your own team, import one, or make it a workflow's default, see
|
|
112
|
+
[Teams](guide.md#teams) in the user guide. `npx agjan team list` lists the teams of a
|
|
113
|
+
project, `npx agjan team show <name>` their personas, and `npx agjan workflow show <workflow>`
|
|
114
|
+
every step of a workflow with the agent and the skills that do it in your project.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agjan",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "Agentic engineering harness for AI coding agents: role agents, human approval gates, independent review and CI-enforced checks. SAP BTP first.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic-engineering",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"kit/",
|
|
39
39
|
"schemas/",
|
|
40
40
|
"docs/guide.md",
|
|
41
|
+
"docs/workflows-and-teams.md",
|
|
41
42
|
"docs/brand/",
|
|
42
43
|
"NOTICE"
|
|
43
44
|
],
|