@emiliosp/pi-maestro 0.21.0 → 0.23.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/CHANGELOG.md +5 -0
- package/README.md +42 -79
- package/agents/builder.md +7 -7
- package/agents/maestro.md +62 -45
- package/agents/simplifier.md +6 -5
- package/agents/verifier.md +13 -13
- package/docs/adr/0001-keep-the-workflow-independent-of-git.md +25 -0
- package/docs/adr/0002-store-escalation-decisions-in-builder-handoffs.md +24 -0
- package/docs/adr/0003-route-builder-failures-through-owner-escalations.md +23 -0
- package/docs/adr/0004-require-git-only-for-the-simplifier.md +35 -0
- package/docs/adr/0005-approve-a-specification-document-set-as-one-contract.md +32 -0
- package/docs/adr/0006-maintain-the-roadmap-in-linear.md +25 -0
- package/docs/adr/0007-maintain-the-roadmap-in-the-repository.md +27 -0
- package/docs/adr/0008-use-pis-registry-for-model-availability.md +23 -0
- package/docs/adr/0009-select-optional-phases-in-the-transition-table.md +24 -0
- package/docs/adr/0010-use-the-pi-sdk-for-sequential-agent-delegation.md +109 -0
- package/docs/adr/0011-separate-initial-setup-ui-from-configuration-rules.md +25 -0
- package/docs/adr/0012-filter-main-maestro-registrations-after-native-discovery.md +21 -0
- package/docs/adr/README.md +21 -0
- package/docs/configuration.md +33 -12
- package/docs/glossary.md +38 -49
- package/docs/inspiration.md +32 -0
- package/docs/roadmap/README.md +42 -0
- package/docs/roadmap/maestro-10-improve-status-presentation-and-activation-feedback.md +18 -0
- package/docs/roadmap/maestro-11-introduce-maestro-at-activation.md +19 -0
- package/docs/roadmap/maestro-12-verify-code-quality-against-agentsmd-instructions.md +21 -0
- package/docs/roadmap/maestro-13-check-subagent-extensions-at-activation.md +21 -0
- package/docs/roadmap/maestro-14-rename-the-test-support-directory.md +16 -0
- package/docs/roadmap/maestro-15-match-handoff-criteria-to-the-approved-spec.md +19 -0
- package/docs/roadmap/maestro-16-route-finding-driven-spec-revisions-through-drafting-spec.md +19 -0
- package/docs/roadmap/maestro-17-keep-acceptance-criterion-numbering-continuous.md +19 -0
- package/docs/roadmap/maestro-18-record-escalation-resolutions-when-the-spec-changes.md +18 -0
- package/docs/roadmap/maestro-19-guide-initial-configuration.md +22 -0
- package/docs/roadmap/maestro-20-rename-the-npm-package.md +17 -0
- package/docs/roadmap/maestro-21-label-acceptance-criterion-coverage.md +18 -0
- package/docs/roadmap/maestro-22-avoid-acceptance-criteria-already-covered-by-tests.md +16 -0
- package/docs/roadmap/maestro-23-change-agent-models-before-a-builder-run.md +14 -0
- package/docs/roadmap/maestro-24-add-a-simplifier-with-one-clear-purpose-per-agent.md +23 -0
- package/docs/roadmap/maestro-25-define-workflow-reconciliation.md +19 -0
- package/docs/roadmap/maestro-26-exit-maestro-mode-automatically-at-workflow-completion.md +18 -0
- package/docs/roadmap/maestro-27-make-all-implementation-phases-optional.md +26 -0
- package/docs/roadmap/maestro-28-add-maestro-role-instructions-alongside-the-other-agents.md +14 -0
- package/docs/roadmap/maestro-6-display-specs-in-a-browser.md +14 -0
- package/docs/roadmap/maestro-7-route-builder-failures-through-owner-escalations.md +19 -0
- package/docs/roadmap/maestro-8-store-escalations-and-owner-decisions-in-builder-handoffs.md +19 -0
- package/docs/roadmap/maestro-9-format-glossary-terms-consistently.md +14 -0
- package/docs/roadmap/maestro-free-1-require-pi-150.md +16 -0
- package/docs/roadmap/maestro-free-2-remove-maestro-run-timeouts.md +18 -0
- package/docs/roadmap/maestro-free-3-run-the-builder-through-the-pi-sdk.md +31 -0
- package/docs/roadmap/maestro-free-4-run-the-verifier-through-the-pi-sdk.md +22 -0
- package/docs/roadmap/maestro-free-5-run-the-simplifier-through-the-pi-sdk.md +22 -0
- package/docs/roadmap/maestro-free-6-show-sdk-agent-activity-through-pi.md +21 -0
- package/docs/roadmap/maestro-free-7-remove-the-pi-subagents-dependency.md +21 -0
- package/docs/roadmap/maestro-free-pre-3-implement-internal-sdk-delegation.md +37 -0
- package/docs/subagent-integration.md +9 -29
- package/docs/workflow.md +62 -246
- package/extensions/maestro.ts +96 -19
- package/package.json +2 -6
- package/src/MaestroPaths.ts +9 -0
- package/src/config/assertConfiguration.ts +23 -21
- package/src/config/defaults.ts +2 -1
- package/src/config/loadConfiguration.ts +3 -2
- package/src/config/saveConfiguration.ts +38 -14
- package/src/config/schema.ts +13 -0
- package/src/maestro/checks/assertEnvironment.ts +8 -33
- package/src/maestro/selectAgentModels.ts +70 -0
- package/src/maestro/setupInitialConfiguration.ts +26 -0
- package/src/maestro/status/formatMaestroStatus.ts +3 -0
- package/src/score/collectWorkflowEvidence.ts +170 -0
- package/src/score/parseClassifierScores.ts +51 -0
- package/src/score/questions.json +24 -0
- package/src/score/requestEvaluation.ts +54 -0
- package/src/score/scoreWorkflow.ts +100 -0
- package/src/tools/child/record-builder-handoff.ts +1 -0
- package/src/tools/child/record-simplifier-handoff.ts +2 -1
- package/src/tools/child/record-verifier-handoff.ts +1 -0
- package/src/tools/main/create-spec.ts +1 -0
- package/src/tools/main/mark-spec-ready.ts +1 -0
- package/src/tools/main/resolve-escalations.ts +1 -0
- package/src/tools/main/resolve-findings.ts +6 -1
- package/src/tools/main/run-builder.ts +8 -1
- package/src/tools/main/run-simplifier.ts +26 -6
- package/src/tools/main/run-verifier.ts +8 -1
- package/src/tools/main/score-workflow.ts +43 -0
- package/src/ui/selectModel.ts +23 -15
- package/src/ui/showAgentRolesSetupMenu.ts +65 -0
- package/src/workflow/spec/markSpecReady.ts +13 -3
- package/src/workflow/state/schema.ts +3 -0
- package/src/workflow/transitions.ts +9 -2
- package/templates/spec.md +1 -1
- package/ADR.md +0 -457
- package/ROADMAP.md +0 -641
- package/src/maestro/setupConfiguration.ts +0 -50
- package/src/ui/selectSpec.ts +0 -14
- package/src/ui/showSetupMenu.ts +0 -44
- package/src/ui/showSpecMenu.ts +0 -36
- /package/{MISSION.md → docs/MISSION.md} +0 -0
- /package/{TECH_STACK.md → docs/TECH_STACK.md} +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Objective: Coordinate first-use setup without mixing UI and configuration rules.
|
|
3
|
-
* Used: By /maestro when interactive projects have no configuration.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ExtensionContext } from '@earendil-works/pi-coding-agent';
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
saveConfiguration,
|
|
10
|
-
SETUP_ROLES,
|
|
11
|
-
type AgentModelSelections,
|
|
12
|
-
} from '#config/saveConfiguration.ts';
|
|
13
|
-
import { setupChoices } from '#config/setupChoices.ts';
|
|
14
|
-
import { selectModel } from '#src/ui/selectModel.ts';
|
|
15
|
-
import { selectThinking } from '#src/ui/selectThinking.ts';
|
|
16
|
-
import { CONFIRM_SETUP, showSetupMenu } from '#src/ui/showSetupMenu.ts';
|
|
17
|
-
|
|
18
|
-
export const setupConfiguration = async (context: ExtensionContext): Promise<boolean> => {
|
|
19
|
-
if (context.mode !== 'tui') {
|
|
20
|
-
throw new Error('Initial Maestro configuration requires interactive Pi.');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const choices = setupChoices(context.modelRegistry.getAvailable());
|
|
24
|
-
const selections: AgentModelSelections = {};
|
|
25
|
-
|
|
26
|
-
while (true) {
|
|
27
|
-
const action = await showSetupMenu({
|
|
28
|
-
ui: context.ui,
|
|
29
|
-
roles: Object.values(SETUP_ROLES),
|
|
30
|
-
selections,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
if (action === undefined) return false;
|
|
34
|
-
|
|
35
|
-
if (action === CONFIRM_SETUP) {
|
|
36
|
-
await saveConfiguration({ cwd: context.cwd, agentModelSelections: selections });
|
|
37
|
-
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const model = await selectModel({ ui: context.ui, choices: choices.map(({ value }) => value) });
|
|
42
|
-
const choice = choices.find(({ value }) => value === model);
|
|
43
|
-
|
|
44
|
-
if (!choice) continue;
|
|
45
|
-
const thinking = await selectThinking({ ui: context.ui, choices: choice.thinkingLevels });
|
|
46
|
-
|
|
47
|
-
if (thinking === undefined) continue;
|
|
48
|
-
selections[action] = { model: choice.value, thinking };
|
|
49
|
-
}
|
|
50
|
-
};
|
package/src/ui/selectSpec.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Objective: Collect an existing spec selection from the supplied identifiers.
|
|
3
|
-
* Used: When the owner chooses to restart a spec during Maestro activation.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ExtensionContext } from '@earendil-works/pi-coding-agent';
|
|
7
|
-
|
|
8
|
-
type SelectSpecInput = {
|
|
9
|
-
ui: ExtensionContext['ui'];
|
|
10
|
-
choices: string[];
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const selectSpec = ({ ui, choices }: SelectSpecInput): Promise<string | undefined> =>
|
|
14
|
-
ui.select('Restart spec', choices);
|
package/src/ui/showSetupMenu.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Objective: Display completed role choices and the setup confirmation action.
|
|
3
|
-
* Used: Between role edits during first-use configuration.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ExtensionContext } from '@earendil-works/pi-coding-agent';
|
|
7
|
-
|
|
8
|
-
import type { SetupRole, AgentModelSelections } from '#config/saveConfiguration.ts';
|
|
9
|
-
|
|
10
|
-
export const CONFIRM_SETUP = 'confirm';
|
|
11
|
-
|
|
12
|
-
const ROLE_LABELS: Record<SetupRole, string> = {
|
|
13
|
-
builder: 'Builder',
|
|
14
|
-
verifier: 'Verifier',
|
|
15
|
-
simplifier: 'Simplifier',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
type ShowSetupMenuInput = {
|
|
19
|
-
ui: ExtensionContext['ui'];
|
|
20
|
-
roles: SetupRole[];
|
|
21
|
-
selections: AgentModelSelections;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const showSetupMenu = async ({ ui, roles, selections }: ShowSetupMenuInput) => {
|
|
25
|
-
const actions = roles.map((role) => {
|
|
26
|
-
const selection = selections[role];
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
role,
|
|
30
|
-
label: selection
|
|
31
|
-
? `${ROLE_LABELS[role]}: ${selection.model} (${selection.thinking})`
|
|
32
|
-
: `Select ${role}`,
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const choice = await ui.select('Maestro setup', [
|
|
37
|
-
...actions.map(({ label }) => label),
|
|
38
|
-
'Confirm',
|
|
39
|
-
]);
|
|
40
|
-
|
|
41
|
-
if (choice === 'Confirm') return CONFIRM_SETUP;
|
|
42
|
-
|
|
43
|
-
return actions.find(({ label }) => label === choice)?.role;
|
|
44
|
-
};
|
package/src/ui/showSpecMenu.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Objective: Collect a new spec action or an existing spec identifier.
|
|
3
|
-
* Used: During Maestro activation when existing specs are available.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { readdir } from 'node:fs/promises';
|
|
7
|
-
|
|
8
|
-
import type { ExtensionContext } from '@earendil-works/pi-coding-agent';
|
|
9
|
-
|
|
10
|
-
import { isValidSpecId } from '#ids/isValidSpecId.ts';
|
|
11
|
-
import { selectSpec } from '#src/ui/selectSpec.ts';
|
|
12
|
-
|
|
13
|
-
export const SPEC_ACTIONS = { NEW: 'New spec', RESTART: 'Restart spec' } as const;
|
|
14
|
-
|
|
15
|
-
type ShowSpecMenuInput = {
|
|
16
|
-
ui: ExtensionContext['ui'];
|
|
17
|
-
specDirectory: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const showSpecMenu = async ({
|
|
21
|
-
ui,
|
|
22
|
-
specDirectory,
|
|
23
|
-
}: ShowSpecMenuInput): Promise<string | undefined> => {
|
|
24
|
-
const choice = await ui.select('Start Maestro workflow', Object.values(SPEC_ACTIONS));
|
|
25
|
-
|
|
26
|
-
if (choice === undefined || choice === SPEC_ACTIONS.NEW) return choice;
|
|
27
|
-
|
|
28
|
-
const entries = await readdir(specDirectory, { withFileTypes: true });
|
|
29
|
-
|
|
30
|
-
const specIds = entries
|
|
31
|
-
.filter((entry) => entry.isDirectory() && isValidSpecId(entry.name))
|
|
32
|
-
.map((entry) => entry.name)
|
|
33
|
-
.sort();
|
|
34
|
-
|
|
35
|
-
return selectSpec({ ui, choices: specIds });
|
|
36
|
-
};
|
|
File without changes
|
|
File without changes
|