@konductro/codex-plugin 2.3.0 → 2.4.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/README.md +15 -1
- package/package.json +1 -1
- package/servers/konductro-api.js +240 -1
- package/skills/demand-analysis/SKILL.md +98 -0
- package/skills/technical-analysis/SKILL.md +19 -1
package/README.md
CHANGED
|
@@ -68,6 +68,7 @@ Skills are guided, multi-step workflows invoked by asking Codex naturally:
|
|
|
68
68
|
| `konductro-profile-repository` | Scan the current repo and submit its profile to Konductro |
|
|
69
69
|
| `konductro-start-ticket` | Pick up an assigned ticket and start work |
|
|
70
70
|
| `konductro-bug-enrich` | Enrich a bug ticket with technical analysis — explores codebase and submits structured context |
|
|
71
|
+
| `konductro-demand-analysis` | Size a demand against the real code and propose the phases the forum will commit to |
|
|
71
72
|
|
|
72
73
|
## Tools
|
|
73
74
|
|
|
@@ -154,9 +155,22 @@ These are answers, not errors — none of them is worth retrying as-is.
|
|
|
154
155
|
| Tool | What it does |
|
|
155
156
|
|---|---|
|
|
156
157
|
| `list_tech_analysis_tasks` | List your pending technical analysis assignments |
|
|
157
|
-
| `get_task_context` | Load requirements and project context for a technical analysis task |
|
|
158
|
+
| `get_task_context` | Load requirements and project context for a technical analysis task, plus the requester's context message when a refresh was asked for |
|
|
158
159
|
| `submit_tech_analysis` | Submit your analysis document back to Konductro |
|
|
159
160
|
|
|
161
|
+
### Demand Analysis
|
|
162
|
+
|
|
163
|
+
A demand sits above projects: a business request that has passed the demand forum and now
|
|
164
|
+
needs sizing against the real code before the forum will commit to it. Unlike a phase's
|
|
165
|
+
analysis, the repositories are not known in advance — deciding which projects the work
|
|
166
|
+
lands in is part of the job.
|
|
167
|
+
|
|
168
|
+
| Tool | What it does |
|
|
169
|
+
|---|---|
|
|
170
|
+
| `list_demand_analyses` | List the demand analyses assigned to you |
|
|
171
|
+
| `get_demand_analysis_context` | Load the pitch as the requester answered it, what the forum asked, and every repository in the workspace |
|
|
172
|
+
| `submit_demand_analysis` | Submit the analysis, the repositories the change actually touches, and the phases you propose |
|
|
173
|
+
|
|
160
174
|
### Story Decomposition
|
|
161
175
|
|
|
162
176
|
| Tool | What it does |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konductro/codex-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Codex plugin for the Konductro platform: technical analysis, delivery tasks, repository profiling, and prototype workflows.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
package/servers/konductro-api.js
CHANGED
|
@@ -32,6 +32,24 @@ function loadFileConfig() {
|
|
|
32
32
|
const fileConfig = loadFileConfig();
|
|
33
33
|
const KONDUCTRO_URL = (process.env.KONDUCTRO_URL || fileConfig.url || fileConfig.konductroUrl || '').replace(/\/$/, '');
|
|
34
34
|
const CLI_TOKEN = process.env.KONDUCTRO_CLI_TOKEN || fileConfig.token || fileConfig.cliToken || '';
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* What this plugin tells the server it is, on every request.
|
|
38
|
+
*
|
|
39
|
+
* READ FROM package.json, never a constant. The server's refusal of an outdated plugin is
|
|
40
|
+
* based on this string, so a hand-maintained copy that drifts from the published version
|
|
41
|
+
* is worse than no header at all: it would be believed.
|
|
42
|
+
*
|
|
43
|
+
* `readFileSync` rather than a JSON import assertion, whose syntax differs between Node 18
|
|
44
|
+
* and 20 and would break for whichever developers are on the other one.
|
|
45
|
+
*
|
|
46
|
+
* The shape is `<plugin>/<version>` and is identical across all four plugins, so the
|
|
47
|
+
* server parses one format rather than four.
|
|
48
|
+
*/
|
|
49
|
+
const PLUGIN_VERSION = JSON.parse(
|
|
50
|
+
readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
|
|
51
|
+
).version;
|
|
52
|
+
const PLUGIN_ID = `codex/${PLUGIN_VERSION}`;
|
|
35
53
|
const NOT_CONFIGURED_MESSAGE =
|
|
36
54
|
'Konductro is not configured. Run `konductro-codex-setup --url <URL> --token <TOKEN>`, or set KONDUCTRO_URL and KONDUCTRO_CLI_TOKEN in the MCP server environment.';
|
|
37
55
|
|
|
@@ -39,6 +57,7 @@ async function konductroFetch(path, options = {}) {
|
|
|
39
57
|
const url = `${KONDUCTRO_URL}${path}`;
|
|
40
58
|
const headers = {
|
|
41
59
|
'Authorization': `Bearer ${CLI_TOKEN}`,
|
|
60
|
+
'X-Konductro-Plugin': PLUGIN_ID,
|
|
42
61
|
...options.headers,
|
|
43
62
|
};
|
|
44
63
|
// Only set Content-Type and default body for methods that send JSON
|
|
@@ -111,6 +130,15 @@ function refusalText(err) {
|
|
|
111
130
|
return 'Refused: your role on this project is read-only (viewer or stakeholder), so you cannot create or change work items here. Ask an SDM to give you a writing role on the project.';
|
|
112
131
|
case 'NOT_PROJECT_MEMBER':
|
|
113
132
|
return 'Refused: you are not a member of this project, so you cannot create or change work items in it. Ask an SDM to add you to the project team.';
|
|
133
|
+
// KON-608: the demand-analysis refusals. A demand is assigned to ONE person, and
|
|
134
|
+
// the stage moves on without them, so both of these are ordinary outcomes rather
|
|
135
|
+
// than faults — they need to read as "here is where it went", not as an error.
|
|
136
|
+
case 'NOT_ASSIGNED':
|
|
137
|
+
return 'Refused: this demand analysis is assigned to somebody else. `list_demand_analyses` shows the ones that are yours. If it should be yours, ask the demand forum chair to reassign it.';
|
|
138
|
+
case 'WRONG_STAGE':
|
|
139
|
+
return 'Refused: this demand is not waiting on a technical analysis. It has either been sized already or gone back to the forum, so there is nothing to submit — check the demand in Konductro to see where it got to.';
|
|
140
|
+
case 'PROJECT_NOT_FOUND':
|
|
141
|
+
return 'Refused: one of the projects in your proposed phases is not in this workspace. Use the projectId values from `get_demand_analysis_context`, which lists every repository and the project it belongs to.';
|
|
114
142
|
default:
|
|
115
143
|
return null;
|
|
116
144
|
}
|
|
@@ -226,7 +254,7 @@ server.tool(
|
|
|
226
254
|
}
|
|
227
255
|
|
|
228
256
|
const taskList = tasks.map((t, i) =>
|
|
229
|
-
`${i + 1}. **${t.projectName}** — ${t.phaseName}\n Client: ${t.clientName}\n Phase ID: ${t.phaseId}\n ${t.hasExistingDraft ? '(has existing draft)' : '(new analysis)'}`
|
|
257
|
+
`${i + 1}. **${t.projectName}** — ${t.phaseName}\n Client: ${t.clientName}\n Phase ID: ${t.phaseId}\n ${t.refreshRequested ? '(refresh requested)' : t.hasExistingDraft ? '(has existing draft)' : '(new analysis)'}`
|
|
230
258
|
).join('\n\n');
|
|
231
259
|
|
|
232
260
|
return {
|
|
@@ -256,6 +284,25 @@ server.tool(
|
|
|
256
284
|
if (context.phase.description) contextText += `**Description:** ${context.phase.description}\n`;
|
|
257
285
|
contextText += `\n`;
|
|
258
286
|
|
|
287
|
+
// KON-320: a refresh was requested, so this is a revision of an approved
|
|
288
|
+
// analysis rather than a first pass. Sits above the repositories and the
|
|
289
|
+
// previous document deliberately — it changes what is being asked for, so
|
|
290
|
+
// it has to be read before the material it applies to. Absent on a normal
|
|
291
|
+
// task, in which case the output is exactly what it was before.
|
|
292
|
+
if (context.refreshContext) {
|
|
293
|
+
const { requestedBy, message } = context.refreshContext;
|
|
294
|
+
contextText += `### Refresh Requested\n\n`;
|
|
295
|
+
contextText += `A refresh of this technical analysis was requested`;
|
|
296
|
+
if (requestedBy) contextText += ` by ${requestedBy}`;
|
|
297
|
+
contextText += `.\n\n`;
|
|
298
|
+
if (message) {
|
|
299
|
+
contextText += `**Context from the requester:**\n\n${message}\n\n`;
|
|
300
|
+
} else {
|
|
301
|
+
contextText += `No further context was given.\n\n`;
|
|
302
|
+
}
|
|
303
|
+
contextText += `Revise the existing analysis below rather than starting over.\n\n`;
|
|
304
|
+
}
|
|
305
|
+
|
|
259
306
|
if (context.repositories.length > 0) {
|
|
260
307
|
contextText += `### Repositories\n\n`;
|
|
261
308
|
for (const repo of context.repositories) {
|
|
@@ -282,6 +329,8 @@ server.tool(
|
|
|
282
329
|
}
|
|
283
330
|
}
|
|
284
331
|
|
|
332
|
+
contextText += renderDocumentTemplate(context.documentTemplate);
|
|
333
|
+
|
|
285
334
|
return {
|
|
286
335
|
content: [{
|
|
287
336
|
type: 'text',
|
|
@@ -291,6 +340,51 @@ server.tool(
|
|
|
291
340
|
}
|
|
292
341
|
);
|
|
293
342
|
|
|
343
|
+
/**
|
|
344
|
+
* The document structure this workspace requires, as the agent must read it.
|
|
345
|
+
*
|
|
346
|
+
* APPENDED, never woven into the blob above. Four plugins share that server response and
|
|
347
|
+
* the agent's prompt is sensitive to its shape, so everything before this point is
|
|
348
|
+
* byte-identical to what it has always been. A workspace with no template gets an empty
|
|
349
|
+
* string here and therefore exactly today's context.
|
|
350
|
+
*
|
|
351
|
+
* THE WORDING IS IDENTICAL IN ALL FOUR PLUGINS, deliberately. The story this belongs to
|
|
352
|
+
* requires the same behaviour from Claude, Amazon Q, Codex and Cursor, and four separately
|
|
353
|
+
* worded prompts is precisely how that stops being true. Change it here and copy it, do
|
|
354
|
+
* not improve it in one place.
|
|
355
|
+
*
|
|
356
|
+
* Standing content is reproduced WORD FOR WORD rather than summarised. It is usually a
|
|
357
|
+
* compliance clause the workspace requires verbatim, which is the whole reason the field
|
|
358
|
+
* exists.
|
|
359
|
+
*/
|
|
360
|
+
function renderDocumentTemplate(template) {
|
|
361
|
+
if (!template) return '';
|
|
362
|
+
|
|
363
|
+
let text = `### Required Document Structure\n\n`;
|
|
364
|
+
text += `This workspace requires technical analysis documents to follow **${template.name}** `;
|
|
365
|
+
text += `(v${template.version}). Produce these sections, in this order, using these exact headings.\n\n`;
|
|
366
|
+
|
|
367
|
+
for (const [index, section] of template.sections.entries()) {
|
|
368
|
+
text += `${index + 1}. **${section.title}**`;
|
|
369
|
+
if (section.intent) text += ` — ${section.intent}`;
|
|
370
|
+
if (section.mustCover) text += ` _(must cover: do not produce the document until you can answer this)_`;
|
|
371
|
+
text += `\n`;
|
|
372
|
+
if (section.diagram && section.diagram !== 'none') {
|
|
373
|
+
const kind = section.diagram === 'any' ? 'a Mermaid diagram of whichever type fits' : `a Mermaid ${section.diagram} diagram`;
|
|
374
|
+
text += ` Include ${kind} inside this section.\n`;
|
|
375
|
+
}
|
|
376
|
+
if (section.standingContent) {
|
|
377
|
+
text += ` Reproduce this text inside the section, word for word:\n`;
|
|
378
|
+
text += ` > ${section.standingContent.split('\n').join('\n > ')}\n`;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
text += `\nThis structure replaces any default you would otherwise use. `;
|
|
383
|
+
text += `The sections marked "must cover" are what your exploration and your questions `;
|
|
384
|
+
text += `must be able to answer before you produce the document.\n\n`;
|
|
385
|
+
return text;
|
|
386
|
+
}
|
|
387
|
+
|
|
294
388
|
// Tool: Submit tech analysis
|
|
295
389
|
server.tool(
|
|
296
390
|
'submit_tech_analysis',
|
|
@@ -315,6 +409,151 @@ server.tool(
|
|
|
315
409
|
}
|
|
316
410
|
);
|
|
317
411
|
|
|
412
|
+
// ══ DEMAND ANALYSIS ════════════════════════════════════════════════════════
|
|
413
|
+
//
|
|
414
|
+
// The demand-level counterpart of the three tools above. A DEMAND has no project yet —
|
|
415
|
+
// which projects it lands in is decided at IT Eval, from what this analysis finds — so
|
|
416
|
+
// the context carries the whole workspace's repositories and the submission reports
|
|
417
|
+
// which of them the change actually touches.
|
|
418
|
+
//
|
|
419
|
+
// All three go through workItemCall, like the KON-519 tools: it asserts the token is
|
|
420
|
+
// configured, turns a refusal into a sentence via refusalText, and keeps 401 separate
|
|
421
|
+
// because an expired token is a setup problem rather than a permission one. Written
|
|
422
|
+
// bare, a 403 from an analysis assigned to somebody else surfaced as an unhandled
|
|
423
|
+
// error rather than an answer.
|
|
424
|
+
|
|
425
|
+
/** A demand question and its answer, or a plain note that it was left blank. */
|
|
426
|
+
function answerLine(q) {
|
|
427
|
+
const answer = q.answer && String(q.answer).trim() ? q.answer : '_Not answered._';
|
|
428
|
+
return [`**${q.question}**`, q.help ? `_${q.help}_` : null, '', answer].filter((l) => l !== null).join('\n');
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// Tool: List pending demand analyses
|
|
432
|
+
server.tool(
|
|
433
|
+
'list_demand_analyses',
|
|
434
|
+
'List demand technical analyses assigned to you in Konductro. A demand sits above projects: it is a business request that has passed the demand forum and now needs sizing against the real code.',
|
|
435
|
+
{},
|
|
436
|
+
async () => workItemCall(async () => {
|
|
437
|
+
const { tasks } = await konductroFetch('/api/cli/demand-analyses');
|
|
438
|
+
|
|
439
|
+
if (!tasks || tasks.length === 0) {
|
|
440
|
+
return 'No demand analyses assigned to you.';
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
const lines = tasks.map((t) => {
|
|
444
|
+
const parts = [`### ${t.key} — ${t.title}`];
|
|
445
|
+
if (t.businessUnit) parts.push(`**Business unit:** ${t.businessUnit}`);
|
|
446
|
+
if (t.nextSitting) parts.push(`**Back at the forum:** ${new Date(t.nextSitting).toISOString().slice(0, 10)}`);
|
|
447
|
+
if (t.startWith && t.startWith.length) parts.push(`**Start with:** ${t.startWith.join(', ')}`);
|
|
448
|
+
if (t.askedFor) parts.push(`**They asked:** ${t.askedFor}`);
|
|
449
|
+
parts.push(`\`get_demand_analysis_context\` with demandId ${t.key} to load it.`);
|
|
450
|
+
return parts.join('\n');
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
return `## Demand analyses assigned to you (${tasks.length})\n\n${lines.join('\n\n')}`;
|
|
454
|
+
})
|
|
455
|
+
);
|
|
456
|
+
|
|
457
|
+
// Tool: Load one demand's analysis context
|
|
458
|
+
server.tool(
|
|
459
|
+
'get_demand_analysis_context',
|
|
460
|
+
"Load everything needed to run a demand's technical analysis: the pitch as the requester answered it, the workspace's own questions, what the forum asked you to answer, and every repository in the workspace.",
|
|
461
|
+
{
|
|
462
|
+
demandId: z.string().describe('The demand key (e.g. DEM-4) or its UUID, from list_demand_analyses'),
|
|
463
|
+
},
|
|
464
|
+
async ({ demandId }) => workItemCall(async () => {
|
|
465
|
+
const ctx = await konductroFetch(`/api/cli/demand-analyses/${demandId}/context`);
|
|
466
|
+
const d = ctx && ctx.demand;
|
|
467
|
+
if (!d) {
|
|
468
|
+
return `No demand context came back for ${demandId}. Check the key, and that the analysis is assigned to you.`;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
const repos = (ctx.repositories || [])
|
|
472
|
+
.map((r) => `- \`${r.name}\` (${r.projectName}${r.type ? `, ${r.type}` : ''}) — ${r.url}\n projectId: \`${r.projectId}\``)
|
|
473
|
+
.join('\n') || '- None linked to any project yet';
|
|
474
|
+
|
|
475
|
+
const conversation = (ctx.conversation || [])
|
|
476
|
+
.map((c) => `- **${c.by}**${c.kind === 'amendment' ? ' (amendment)' : ''}: ${c.body}`)
|
|
477
|
+
.join('\n');
|
|
478
|
+
|
|
479
|
+
// THE PITCH AS THE WORKSPACE ACTUALLY ASKED IT.
|
|
480
|
+
//
|
|
481
|
+
// This renders ctx.template, not the demand's own columns. Every workspace writes
|
|
482
|
+
// its own pitch template — questions it added, questions it deleted, its own
|
|
483
|
+
// wording — and the demand is answered against the version it was RAISED on. The
|
|
484
|
+
// backend maps the nine shipped answers into that same template (KON-604), so this
|
|
485
|
+
// one shape carries both, in the order the requester saw.
|
|
486
|
+
//
|
|
487
|
+
// Reading the columns instead would have dropped every question the workspace added
|
|
488
|
+
// — "Which regulator requires this?" would be invisible to the analysis — which is
|
|
489
|
+
// the whole point of the templating feature. The backend had exactly this bug and it
|
|
490
|
+
// was caught in review; the same mistake is available here.
|
|
491
|
+
const pitch = ctx.template
|
|
492
|
+
? [
|
|
493
|
+
`_Answered against **${ctx.template.name}** v${ctx.template.version}._`,
|
|
494
|
+
...(ctx.template.sections || []).map((section) => [
|
|
495
|
+
`## ${section.name}`,
|
|
496
|
+
section.help ? `_${section.help}_` : null,
|
|
497
|
+
'',
|
|
498
|
+
(section.questions || []).map(answerLine).join('\n\n'),
|
|
499
|
+
].filter((l) => l !== null).join('\n')),
|
|
500
|
+
].join('\n\n')
|
|
501
|
+
// A demand raised before templates existed has none pinned. Fall back to the
|
|
502
|
+
// columns rather than showing the analyst nothing.
|
|
503
|
+
: [
|
|
504
|
+
'## What they need', d.need || 'Not given',
|
|
505
|
+
'', '## What happens today', d.currentState || 'Not given',
|
|
506
|
+
'', '## Who it affects', [d.affects, d.affectsWho].filter(Boolean).join(' — ') || 'Not given',
|
|
507
|
+
'', '## How they would know it worked', d.successLooksLike || 'Not given',
|
|
508
|
+
].join('\n');
|
|
509
|
+
|
|
510
|
+
return [
|
|
511
|
+
`# ${d.key} — ${d.title}`,
|
|
512
|
+
'',
|
|
513
|
+
`**Raised by:** ${d.raisedBy}${d.businessUnit ? ` (${d.businessUnit})` : ''}`,
|
|
514
|
+
'',
|
|
515
|
+
pitch,
|
|
516
|
+
'',
|
|
517
|
+
'## What the forum asked you to answer',
|
|
518
|
+
ctx.askedFor || 'Nothing specific. Answer the pitch.',
|
|
519
|
+
'',
|
|
520
|
+
'## Where to start looking',
|
|
521
|
+
(ctx.startWith && ctx.startWith.length) ? ctx.startWith.map((r) => `\`${r}\``).join(', ') : 'Nothing named — use your judgement.',
|
|
522
|
+
'',
|
|
523
|
+
'## Every repository in this workspace',
|
|
524
|
+
'The starting point above is a hint, not a boundary. Report what the change ACTUALLY touches.',
|
|
525
|
+
'',
|
|
526
|
+
repos,
|
|
527
|
+
conversation ? `\n## Conversation on the demand\n${conversation}` : '',
|
|
528
|
+
].join('\n');
|
|
529
|
+
})
|
|
530
|
+
);
|
|
531
|
+
|
|
532
|
+
// Tool: Submit a demand analysis
|
|
533
|
+
server.tool(
|
|
534
|
+
'submit_demand_analysis',
|
|
535
|
+
'Push a finished demand technical analysis back to Konductro: what you found, which repositories the change actually touches, and the phase breakdown you propose. The breakdown is a PROPOSAL — the demand forum decides at IT Eval.',
|
|
536
|
+
{
|
|
537
|
+
demandId: z.string().describe('The demand key (e.g. DEM-4) or its UUID'),
|
|
538
|
+
summary: z.string().describe('What the analysis found, in markdown. What is already there, what has to change, the risks, and the assumptions the estimate rests on.'),
|
|
539
|
+
foundRepos: z.array(z.string()).optional().describe('The repositories the change actually touches, by name. Not the ones you were told to start with.'),
|
|
540
|
+
proposedPhases: z.array(z.object({
|
|
541
|
+
name: z.string().describe('What this phase delivers'),
|
|
542
|
+
projectId: z.string().uuid().optional().describe('The project it lands in, from the context. Omit if it genuinely belongs nowhere yet.'),
|
|
543
|
+
points: z.number().int().min(0).max(1000).describe('Story points for this phase alone. Never send a total; Konductro derives it.'),
|
|
544
|
+
why: z.string().optional().describe('Why it is its own phase rather than part of another'),
|
|
545
|
+
})).optional().describe('The phases you propose. A phase belongs to ONE project; work spanning two projects is two phases.'),
|
|
546
|
+
},
|
|
547
|
+
async ({ demandId, summary, foundRepos, proposedPhases }) => workItemCall(async () => {
|
|
548
|
+
const result = await konductroFetch(`/api/cli/demand-analyses/${demandId}/submit`, {
|
|
549
|
+
method: 'POST',
|
|
550
|
+
body: JSON.stringify({ summary, foundRepos, proposedPhases }),
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
return `## Demand analysis submitted\n\n${result.message}\n\n- Demand: ${result.key}\n- Submitted: ${result.submittedAt}\n\nThe demand forum has been notified and can now record the IT Eval.`;
|
|
554
|
+
})
|
|
555
|
+
);
|
|
556
|
+
|
|
318
557
|
// Tool: List pending decomposition tasks
|
|
319
558
|
server.tool(
|
|
320
559
|
'list_decomposition_tasks',
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: konductro-demand-analysis
|
|
3
|
+
description: Size a Konductro DEMAND against the real code. Use when an architect has been assigned a demand technical analysis — a business request that has passed the demand forum and now needs to be broken into phases and estimated before the forum will commit to it.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Bash, mcp__konductro__list_demand_analyses, mcp__konductro__get_demand_analysis_context, mcp__konductro__submit_demand_analysis
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Konductro Demand Analysis
|
|
8
|
+
|
|
9
|
+
A demand is a business request that sits ABOVE projects. It has passed the demand forum,
|
|
10
|
+
and the forum will not commit to it until somebody has read the actual code and said what
|
|
11
|
+
it entails. That is this job.
|
|
12
|
+
|
|
13
|
+
## What makes this different from a phase's technical analysis
|
|
14
|
+
|
|
15
|
+
A phase already belongs to a project, so its repositories are known. **A demand does not.**
|
|
16
|
+
Which projects the work lands in is decided at IT Eval, FROM WHAT YOU FIND. So:
|
|
17
|
+
|
|
18
|
+
- The context lists **every repository in the workspace**, not a project's few.
|
|
19
|
+
- The "start with" list is a hint from whoever assigned it. It is not a boundary, and it
|
|
20
|
+
is regularly wrong: the work turns out to be in a repository nobody expected.
|
|
21
|
+
- You report which repositories the change **actually touches**. That is what the forum
|
|
22
|
+
reads, and it is stored separately from the hint you were given.
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
### Step 1: See what is assigned
|
|
27
|
+
|
|
28
|
+
Call `list_demand_analyses`. Present the list and ask which one to work on. Each shows
|
|
29
|
+
what the forum asked to have answered and when it is next sitting — that date is the
|
|
30
|
+
deadline, so say it out loud.
|
|
31
|
+
|
|
32
|
+
### Step 2: Load the context
|
|
33
|
+
|
|
34
|
+
Call `get_demand_analysis_context` with the demand key. Read the whole thing before
|
|
35
|
+
touching any code. It carries:
|
|
36
|
+
|
|
37
|
+
- The pitch, in the business's own words, and what happens today
|
|
38
|
+
- The value case: who it affects, and what it costs to not have it
|
|
39
|
+
- What the forum specifically asked you to answer
|
|
40
|
+
- Every repository in the workspace, with its project
|
|
41
|
+
|
|
42
|
+
**Say the value case back to the user in one line.** An estimate has to be proportionate
|
|
43
|
+
to the thing being bought, and this is the only place that number appears.
|
|
44
|
+
|
|
45
|
+
### Step 3: Read the code
|
|
46
|
+
|
|
47
|
+
The repositories are on this machine. Use Glob, Grep and Read. Konductro never clones
|
|
48
|
+
anything and neither do you: if a repository named in the context is not present locally,
|
|
49
|
+
say so rather than guessing at it.
|
|
50
|
+
|
|
51
|
+
Start with the repositories you were pointed at, then follow the work wherever it goes.
|
|
52
|
+
|
|
53
|
+
What you are trying to establish, in this order:
|
|
54
|
+
|
|
55
|
+
1. **What already exists.** Half of every demand turns out to be built. Say what is there
|
|
56
|
+
before you say what is needed.
|
|
57
|
+
2. **What actually has to change**, per repository, concretely enough that somebody could
|
|
58
|
+
argue with it.
|
|
59
|
+
3. **What is in the way.** Missing data, an integration nobody has written, a migration
|
|
60
|
+
with no way back.
|
|
61
|
+
4. **What the estimate rests on.** Every assumption you make is a way the number could be
|
|
62
|
+
wrong, and the forum is told which one when it is.
|
|
63
|
+
|
|
64
|
+
### Step 4: Propose the phases
|
|
65
|
+
|
|
66
|
+
This is the part the forum needs most, and the part it cannot do itself.
|
|
67
|
+
|
|
68
|
+
- **A phase belongs to ONE project.** Work spanning two projects is two phases. This is
|
|
69
|
+
not a formality: each phase becomes a real Phase in that project when the demand is
|
|
70
|
+
green lit.
|
|
71
|
+
- **Order them by what has to land first.** If phase two cannot start until phase one is
|
|
72
|
+
deployed, say so in its `why`.
|
|
73
|
+
- **Points per phase, never a total.** Konductro derives the total. Sending your own is
|
|
74
|
+
how the headline number and the breakdown behind it end up disagreeing.
|
|
75
|
+
- **A phase with no obvious home** is allowed: omit `projectId` and say why in the `why`.
|
|
76
|
+
A visible gap beats a phase filed in whichever project came first.
|
|
77
|
+
|
|
78
|
+
### Step 5: Submit
|
|
79
|
+
|
|
80
|
+
Call `submit_demand_analysis` with:
|
|
81
|
+
|
|
82
|
+
- `summary` — what you found. Structure it as: what exists, what has to change, risks,
|
|
83
|
+
assumptions. Markdown.
|
|
84
|
+
- `foundRepos` — the repositories the change actually touches. Not the hint you were given.
|
|
85
|
+
- `proposedPhases` — the breakdown above.
|
|
86
|
+
|
|
87
|
+
The forum is notified and records the IT Eval from your proposal. They can change any of
|
|
88
|
+
it; you are advising, not deciding.
|
|
89
|
+
|
|
90
|
+
## The bar
|
|
91
|
+
|
|
92
|
+
**Never estimate something you have not read.** An unfamiliar name is a reason to go and
|
|
93
|
+
look, never a reason to assume it is small. If a repository you need is not on this
|
|
94
|
+
machine, the honest output is a summary that says which one and what it blocks — not a
|
|
95
|
+
number with a shrug behind it.
|
|
96
|
+
|
|
97
|
+
**Say what you did not check.** The forum is about to commit money against this. A gap you
|
|
98
|
+
name costs an hour; a gap you paper over costs the quarter.
|
|
@@ -19,11 +19,20 @@ Once the user picks a task, call `get_task_context` with the phase ID. This load
|
|
|
19
19
|
- The approved requirements document (what needs to be built)
|
|
20
20
|
- Project and client context
|
|
21
21
|
- Repository information
|
|
22
|
+
- A "Refresh Requested" section, when someone has asked for an existing analysis
|
|
23
|
+
to be redone. Read it first: it carries the requester's reason, and the job is
|
|
24
|
+
to revise the previous analysis rather than start from scratch.
|
|
22
25
|
|
|
23
26
|
Share a summary of the requirements with the user and confirm you're ready to begin.
|
|
24
27
|
|
|
25
28
|
### Step 3: Explore the Codebase
|
|
26
29
|
|
|
30
|
+
**If the context carried a "Required Document Structure", that is your brief.** Every section in it is something you must be able to answer by the end of this step, and the ones marked "must cover" are not optional. Explore with those sections in mind rather than working through the generic list below and hoping it covers them — a workspace that asks for a Regulatory Impact section is telling you what to go and find out, and nothing in the generic list will lead you there.
|
|
31
|
+
|
|
32
|
+
Where the structure asks for something the generic list does not cover, go and look for it. Where it omits something, you do not need to chase it.
|
|
33
|
+
|
|
34
|
+
If no structure was supplied, use the list below as-is.
|
|
35
|
+
|
|
27
36
|
Now analyse the local codebase. The user has the repository/repositories cloned in their current working directory. Use fast repository search and focused file reads to explore:
|
|
28
37
|
|
|
29
38
|
- **Project structure** — folder layout, module organisation
|
|
@@ -40,6 +49,10 @@ Discuss your findings with the user as you go. Ask clarifying questions about de
|
|
|
40
49
|
|
|
41
50
|
### Step 4: Impact Analysis
|
|
42
51
|
|
|
52
|
+
**Before moving on, check yourself against the required structure.** Take each section, and each "must cover" section especially, and ask whether you could write it now from what you have found. Where you could not, that is a question for the user or another pass over the codebase — ask it now rather than discovering the gap while writing the document, when the honest options are guessing or going back.
|
|
53
|
+
|
|
54
|
+
This is the step that makes the structure mean something. Producing the right headings over content that does not answer them is worse than the default document, because it looks like compliance.
|
|
55
|
+
|
|
43
56
|
Based on the requirements and your codebase exploration, assess:
|
|
44
57
|
|
|
45
58
|
- **What needs to change** — which files, modules, or services need modification
|
|
@@ -50,7 +63,11 @@ Based on the requirements and your codebase exploration, assess:
|
|
|
50
63
|
|
|
51
64
|
### Step 5: Produce the Document
|
|
52
65
|
|
|
53
|
-
|
|
66
|
+
**If the context carried a "Required Document Structure", follow it exactly** — those sections, in that order, under those headings. It replaces the default list below rather than supplementing it: do not add the default sections alongside it, and do not reorder it to something you find more natural. Where a section carries standing content, reproduce that text word for word; it is usually a clause the workspace is required to publish, and paraphrasing it defeats the point of it being there. Where a section asks for a diagram, draw one, as Mermaid, inside that section.
|
|
67
|
+
|
|
68
|
+
A document produced here must be indistinguishable from one produced for the same workspace in Konductro itself. That is the whole purpose of the structure being sent.
|
|
69
|
+
|
|
70
|
+
**If no structure was supplied**, use this default list:
|
|
54
71
|
|
|
55
72
|
1. **Codebase Overview** — what exists today (structure, stack, patterns)
|
|
56
73
|
2. **Technical Stack** — frameworks, versions, build tools, deployment
|
|
@@ -79,4 +96,5 @@ After submission, confirm success and let the user know the document is availabl
|
|
|
79
96
|
- Be thorough but focused — analyse what's relevant to the requirements
|
|
80
97
|
- Ask the user questions — they know the codebase context you don't
|
|
81
98
|
- Produce a complete, standalone document that an architect can use without additional context
|
|
99
|
+
- When a required document structure is supplied, it wins over anything in this file. It is the workspace's own standard, and your job is to meet it, not to improve on it
|
|
82
100
|
- The conversation summary should capture the "why" behind decisions, not just the findings
|