thoth-agents 0.2.5 → 0.2.7
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/dist/agents/prompt-sections.d.ts +5 -1
- package/dist/{chunk-C3VQMXQL.js → chunk-32672NLJ.js} +1 -1
- package/dist/{chunk-YZNH23HZ.js → chunk-4AC2TTUO.js} +1 -1
- package/dist/{chunk-HFZAL6NE.js → chunk-N7GFXGFJ.js} +34 -12
- package/dist/cli/index.js +3 -3
- package/dist/cli/tui/index.js +2 -2
- package/dist/harness/core/sdd.d.ts +5 -2
- package/dist/index.js +2 -2
- package/dist/sdd/artifact-governance/artifact-loader.d.ts +75 -0
- package/dist/sdd/artifact-governance/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/skills/_shared/openspec-convention.md +4 -0
- package/src/skills/_shared/persistence-contract.md +2 -0
- package/src/skills/_shared/thoth-mem-convention.md +2 -0
- package/src/skills/plan-reviewer/SKILL.md +14 -0
|
@@ -12,6 +12,9 @@ export interface SubagentRulesSection {
|
|
|
12
12
|
progressConcept: 'progress';
|
|
13
13
|
userQuestionConcept: 'userQuestion';
|
|
14
14
|
}
|
|
15
|
+
export interface ReasoningDisciplineSection {
|
|
16
|
+
kind: 'reasoning-discipline';
|
|
17
|
+
}
|
|
15
18
|
export interface ResponseBudgetSection {
|
|
16
19
|
kind: 'response-budget';
|
|
17
20
|
}
|
|
@@ -28,13 +31,14 @@ export interface RoleTextSection {
|
|
|
28
31
|
kind: 'role-text';
|
|
29
32
|
template: string;
|
|
30
33
|
}
|
|
31
|
-
export type PromptSection = QuestionProtocolSection | SubagentRulesSection | ResponseBudgetSection | StepBudgetSection | ModelFamilySection | RoleTextSection;
|
|
34
|
+
export type PromptSection = QuestionProtocolSection | SubagentRulesSection | ReasoningDisciplineSection | ResponseBudgetSection | StepBudgetSection | ModelFamilySection | RoleTextSection;
|
|
32
35
|
export type RolePromptSection = PromptSection;
|
|
33
36
|
export interface PromptSectionRenderer<TSection extends PromptSection> {
|
|
34
37
|
render(section: TSection, dialect: HarnessPromptDialect): string;
|
|
35
38
|
}
|
|
36
39
|
export declare function createQuestionProtocolSection(): QuestionProtocolSection;
|
|
37
40
|
export declare function createSubagentRulesSection(memoryAccess?: SemanticMemoryAccess): SubagentRulesSection;
|
|
41
|
+
export declare function createReasoningDisciplineSection(): ReasoningDisciplineSection;
|
|
38
42
|
export declare function createResponseBudgetSection(): ResponseBudgetSection;
|
|
39
43
|
export declare function createStepBudgetSection(steps?: number): StepBudgetSection | undefined;
|
|
40
44
|
export declare function detectModelFamilyFromModel(model?: string | ModelEntry[]): ModelFamily | undefined;
|
|
@@ -921,11 +921,14 @@ var SDD_PHASES = [
|
|
|
921
921
|
order: 8,
|
|
922
922
|
requiredFor: ["accelerated", "full"],
|
|
923
923
|
prerequisites: ["tasks"],
|
|
924
|
-
producesArtifact:
|
|
924
|
+
producesArtifact: true,
|
|
925
925
|
gate: "oracle-review",
|
|
926
926
|
owner: "oracle",
|
|
927
|
+
artifactSkill: "plan-reviewer",
|
|
928
|
+
artifactMeaning: "durable-plan-review-result",
|
|
927
929
|
defaultAgentRole: "oracle",
|
|
928
|
-
|
|
930
|
+
persistenceAgentRole: "quick",
|
|
931
|
+
delegationReason: "Independent read-only executability review of tasks before implementation; quick persists the durable review artifact when writes are required."
|
|
929
932
|
},
|
|
930
933
|
{
|
|
931
934
|
id: "implementation-confirmation",
|
|
@@ -986,12 +989,14 @@ var SDD_WORKFLOW_CONTRACT = {
|
|
|
986
989
|
artifactRules: [
|
|
987
990
|
"SDD delegation defaults are phase-specific: sdd-propose, sdd-spec, and sdd-design default to deep.",
|
|
988
991
|
"sdd-tasks defaults to quick with deep as fallback when the task plan is complex.",
|
|
992
|
+
"plan-reviewer defaults to oracle for independent read-only review; quick persists the plan-review artifact when repository or memory writes are required.",
|
|
989
993
|
"sdd-verify defaults to oracle for independent review; quick persists the report when repository or memory writes are required.",
|
|
990
994
|
"sdd-archive defaults to quick for mechanical closeout.",
|
|
991
995
|
"OpenSpec design.md is technical solution design, not UI/UX design; sdd-design itself never routes to designer.",
|
|
992
996
|
"Designer participates during apply only for user-facing UI, visual work, screenshots, or visual QA.",
|
|
993
997
|
"Full-pipeline tasks require proposal, spec, and design artifacts.",
|
|
994
|
-
"Oracle is read-only and performs plan review plus independent verification review; it does not persist artifacts."
|
|
998
|
+
"Oracle is read-only and performs plan review plus independent verification review; it does not persist artifacts.",
|
|
999
|
+
"A fresh persisted plan-review approval satisfies only the plan-review gate; user implementation confirmation remains separate."
|
|
995
1000
|
],
|
|
996
1001
|
verificationRules: [
|
|
997
1002
|
"Plan review must complete before implementation confirmation.",
|
|
@@ -1031,6 +1036,9 @@ function createSubagentRulesSection(memoryAccess = "base") {
|
|
|
1031
1036
|
userQuestionConcept: "userQuestion"
|
|
1032
1037
|
};
|
|
1033
1038
|
}
|
|
1039
|
+
function createReasoningDisciplineSection() {
|
|
1040
|
+
return { kind: "reasoning-discipline" };
|
|
1041
|
+
}
|
|
1034
1042
|
function createResponseBudgetSection() {
|
|
1035
1043
|
return { kind: "response-budget" };
|
|
1036
1044
|
}
|
|
@@ -1135,6 +1143,9 @@ You are ${role}.
|
|
|
1135
1143
|
${responsibility}
|
|
1136
1144
|
</responsibility>
|
|
1137
1145
|
|
|
1146
|
+
`),
|
|
1147
|
+
createReasoningDisciplineSection(),
|
|
1148
|
+
roleText(`
|
|
1138
1149
|
<rules>`),
|
|
1139
1150
|
createSubagentRulesSection(memoryAccess),
|
|
1140
1151
|
roleText(`${rules.join("\n")}
|
|
@@ -1158,7 +1169,8 @@ the harness does not name this agent "orchestrator".
|
|
|
1158
1169
|
<style>
|
|
1159
1170
|
Respond in the user's language. Be warm, direct, evidence-led, and concise.
|
|
1160
1171
|
Push back when context, risk, or assumptions are weak. Avoid verbosity.
|
|
1161
|
-
</style
|
|
1172
|
+
</style>`),
|
|
1173
|
+
roleText(`
|
|
1162
1174
|
|
|
1163
1175
|
<core-rules>
|
|
1164
1176
|
- Mode: primary coordinator. Mutation: coordination artifacts only.
|
|
@@ -1178,10 +1190,11 @@ Push back when context, risk, or assumptions are weak. Avoid verbosity.
|
|
|
1178
1190
|
</core-rules>
|
|
1179
1191
|
|
|
1180
1192
|
<epistemic-rigor>
|
|
1181
|
-
- Verify material user
|
|
1182
|
-
-
|
|
1183
|
-
-
|
|
1184
|
-
-
|
|
1193
|
+
- Verify material user/agent claims before relying on them in implementation, architecture, verification, safety, or guidance.
|
|
1194
|
+
- Before solving/editing, post one short commentary update naming reasoning/root-cause check.
|
|
1195
|
+
- Do thought experiments: test competing explanations, edge cases, failure modes, root-cause fit.
|
|
1196
|
+
- Do not stop at first plausible explanation/superficial answer; validate with evidence, edge cases, tests, or fitting check.
|
|
1197
|
+
- If evidence disproves an assumption, correct it plainly, explain tradeoffs, and offer alternatives.
|
|
1185
1198
|
</epistemic-rigor>
|
|
1186
1199
|
|
|
1187
1200
|
<session-bootstrap>
|
|
@@ -1261,7 +1274,7 @@ ${renderSddDelegationMatrix()}
|
|
|
1261
1274
|
Hard gates:
|
|
1262
1275
|
- Use the SDD delegation matrix as canonical phase routing.
|
|
1263
1276
|
- Load the matching skill when a phase has one.
|
|
1264
|
-
- {{role.oracle}} is read-only for plan-reviewer and sdd-verify review; {{role.quick}} persists verify
|
|
1277
|
+
- {{role.oracle}} is read-only for plan-reviewer and sdd-verify review; {{role.quick}} persists plan-review and verify artifacts when writes are required.
|
|
1265
1278
|
- Never skip artifacts or jump from requirements-interview to implementation when SDD is selected.
|
|
1266
1279
|
- Before SDD execution, load \`executing-plans\`; then track progress in {{progressTool}} plus the persistent artifact.
|
|
1267
1280
|
- If openspec persistence is selected and openspec/ is missing or stale (partial structure or missing mechanism sections), dispatch sdd-init first.
|
|
@@ -1277,9 +1290,9 @@ Artifact governance handoff:
|
|
|
1277
1290
|
- Root thoth-mem ownership stays with you; sub-agents must not own session memory, prompts, or progress checkpoints.
|
|
1278
1291
|
|
|
1279
1292
|
Plan gate: after tasks, ask with \`{{userQuestionTool}}\`: "Review plan with {{role.oracle}} before executing (Recommended)" or "Proceed to execution".
|
|
1280
|
-
|
|
1281
|
-
If {{role.oracle}} returns [OKAY], give
|
|
1282
|
-
Do not dispatch \`sdd-apply\`
|
|
1293
|
+
Plan review is complete only after fresh [OKAY] evidence in \`plan-review.md\` or \`sdd/{change-name}/plan-review\`; missing, stale, rejected, or unparsable evidence reruns oracle unless a user override is logged.
|
|
1294
|
+
Fresh [OKAY] satisfies only plan-review. If {{role.oracle}} returns [OKAY], or recovery accepts it, give an approved-plan overview, then ask with \`{{userQuestionTool}}\` whether to implement or stop. Cover scope, sequence, decisions, verification, risks, and uncertainty.
|
|
1295
|
+
Do not dispatch \`sdd-apply\` until user confirmation; never treat plan-review recovery as implementation confirmation.
|
|
1283
1296
|
Post-execution verify-loop (mirrors the plan-review loop's discipline; bounded to 3 rounds = initial apply->verify plus up to 2 fix->re-verify):
|
|
1284
1297
|
- Dispatch \`sdd-verify\` as an iterative gate, not a single shot; round 1 is the first verify after apply. Treat the \`round N\` marker in the verify report as the source of truth for the round counter and surface it in {{progressTool}}.
|
|
1285
1298
|
- On clean \`pass\`: proceed through the existing pre-archive user gate above, then delegate \`sdd-archive\`. Do not auto-advance to archive merely because a verify report exists.
|
|
@@ -1499,6 +1512,13 @@ function renderSubagentRules(section, dialect) {
|
|
|
1499
1512
|
}
|
|
1500
1513
|
return rules.join("\n");
|
|
1501
1514
|
}
|
|
1515
|
+
function renderReasoningDiscipline() {
|
|
1516
|
+
return `<reasoning-discipline>
|
|
1517
|
+
- Before solving/editing, post one short commentary update naming reasoning/root-cause check.
|
|
1518
|
+
- Do thought experiments: test competing explanations, edge cases, failure modes, root-cause fit.
|
|
1519
|
+
- Do not stop at first plausible explanation/superficial answer; validate with evidence, edge cases, tests, or fitting check.
|
|
1520
|
+
</reasoning-discipline>`;
|
|
1521
|
+
}
|
|
1502
1522
|
function renderResponseBudget() {
|
|
1503
1523
|
return "Return concise structured results: status, summary, files, verification/issues. Never return raw file dumps.";
|
|
1504
1524
|
}
|
|
@@ -1579,6 +1599,8 @@ function renderPromptSection(section, dialect) {
|
|
|
1579
1599
|
return renderQuestionProtocol(section, dialect);
|
|
1580
1600
|
case "subagent-rules":
|
|
1581
1601
|
return renderSubagentRules(section, dialect);
|
|
1602
|
+
case "reasoning-discipline":
|
|
1603
|
+
return renderReasoningDiscipline();
|
|
1582
1604
|
case "response-budget":
|
|
1583
1605
|
return renderResponseBudget();
|
|
1584
1606
|
case "step-budget":
|
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getOpenCodeVersion,
|
|
5
5
|
isOpenCodeInstalled,
|
|
6
6
|
opencodeAdapter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-4AC2TTUO.js";
|
|
8
8
|
import {
|
|
9
9
|
CODEX_ROLE_NAMES,
|
|
10
10
|
RECOMMENDED_SKILLS,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
getOperationHarness,
|
|
37
37
|
installRecommendedSkill,
|
|
38
38
|
listOperationHarnesses
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-32672NLJ.js";
|
|
40
40
|
import {
|
|
41
41
|
ALL_AGENT_NAMES,
|
|
42
42
|
CUSTOM_SKILLS,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
getExistingLiteConfigPath,
|
|
49
49
|
installCustomSkills,
|
|
50
50
|
writeLiteConfig
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-N7GFXGFJ.js";
|
|
52
52
|
|
|
53
53
|
// src/cli/index.ts
|
|
54
54
|
import { pathToFileURL } from "url";
|
package/dist/cli/tui/index.js
CHANGED
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
listOperationHarnesses,
|
|
26
26
|
parseRoleTomlModel,
|
|
27
27
|
parseSubagentModel
|
|
28
|
-
} from "../../chunk-
|
|
28
|
+
} from "../../chunk-32672NLJ.js";
|
|
29
29
|
import {
|
|
30
30
|
ALL_AGENT_NAMES,
|
|
31
31
|
DEFAULT_MODELS,
|
|
32
32
|
getExistingLiteConfigPath,
|
|
33
33
|
parseConfig
|
|
34
|
-
} from "../../chunk-
|
|
34
|
+
} from "../../chunk-N7GFXGFJ.js";
|
|
35
35
|
|
|
36
36
|
// src/cli/tui/index.tsx
|
|
37
37
|
import { render } from "ink";
|
|
@@ -123,11 +123,14 @@ export declare const SDD_PHASES: readonly [{
|
|
|
123
123
|
readonly order: 8;
|
|
124
124
|
readonly requiredFor: ["accelerated", "full"];
|
|
125
125
|
readonly prerequisites: ["tasks"];
|
|
126
|
-
readonly producesArtifact:
|
|
126
|
+
readonly producesArtifact: true;
|
|
127
127
|
readonly gate: "oracle-review";
|
|
128
128
|
readonly owner: "oracle";
|
|
129
|
+
readonly artifactSkill: "plan-reviewer";
|
|
130
|
+
readonly artifactMeaning: "durable-plan-review-result";
|
|
129
131
|
readonly defaultAgentRole: "oracle";
|
|
130
|
-
readonly
|
|
132
|
+
readonly persistenceAgentRole: "quick";
|
|
133
|
+
readonly delegationReason: "Independent read-only executability review of tasks before implementation; quick persists the durable review artifact when writes are required.";
|
|
131
134
|
}, {
|
|
132
135
|
readonly id: "implementation-confirmation";
|
|
133
136
|
readonly order: 9;
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
renderOpenCodeAgentConfigs,
|
|
4
4
|
spawn,
|
|
5
5
|
spawnSync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4AC2TTUO.js";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_THOTH_COMMAND,
|
|
9
9
|
POLL_INTERVAL_BACKGROUND_MS,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
installCustomSkills,
|
|
15
15
|
loadPluginConfig,
|
|
16
16
|
stripJsonComments
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-N7GFXGFJ.js";
|
|
18
18
|
|
|
19
19
|
// src/index.ts
|
|
20
20
|
import path4 from "path";
|
|
@@ -49,7 +49,82 @@ export interface ArtifactLoaderResult extends ArtifactGovernanceResult {
|
|
|
49
49
|
openspec: ArtifactSnapshot | null;
|
|
50
50
|
}>;
|
|
51
51
|
}
|
|
52
|
+
export type PlanReviewRecoveryDecision = 'fresh-approval' | 'missing' | 'unparsable' | 'non-approval-status' | 'stale';
|
|
53
|
+
export interface PlanReviewReviewedArtifactInput {
|
|
54
|
+
role: string;
|
|
55
|
+
path: string;
|
|
56
|
+
required?: boolean;
|
|
57
|
+
content: string;
|
|
58
|
+
}
|
|
59
|
+
export interface PlanReviewReviewedArtifactDigest {
|
|
60
|
+
role: string;
|
|
61
|
+
path: string;
|
|
62
|
+
required: boolean;
|
|
63
|
+
sha256: string;
|
|
64
|
+
}
|
|
65
|
+
export interface PlanReviewOverride {
|
|
66
|
+
occurred: boolean;
|
|
67
|
+
at: string | null;
|
|
68
|
+
surface: string | null;
|
|
69
|
+
context: string | null;
|
|
70
|
+
}
|
|
71
|
+
export interface CreatePlanReviewArtifactInput {
|
|
72
|
+
changeName: string;
|
|
73
|
+
status: string;
|
|
74
|
+
reviewedAt: string;
|
|
75
|
+
pipeline: 'accelerated' | 'full';
|
|
76
|
+
persistenceMode: ArtifactGovernanceMode;
|
|
77
|
+
reviewerRole?: string;
|
|
78
|
+
comments?: readonly string[];
|
|
79
|
+
nonBlockingNotes?: readonly string[];
|
|
80
|
+
blockers?: readonly string[];
|
|
81
|
+
override?: PlanReviewOverride;
|
|
82
|
+
userOverrideContext?: string | null;
|
|
83
|
+
reviewedArtifacts: readonly PlanReviewReviewedArtifactInput[];
|
|
84
|
+
}
|
|
85
|
+
export interface PlanReviewArtifact {
|
|
86
|
+
schema: 'thoth-agents/sdd-plan-review/v1';
|
|
87
|
+
artifact: 'plan-review';
|
|
88
|
+
change: string;
|
|
89
|
+
gate: 'oracle-review';
|
|
90
|
+
status: string;
|
|
91
|
+
reviewerRole: string;
|
|
92
|
+
reviewedAt: string;
|
|
93
|
+
pipeline: 'accelerated' | 'full';
|
|
94
|
+
persistenceMode: ArtifactGovernanceMode;
|
|
95
|
+
memoryTopicKey: string;
|
|
96
|
+
reviewedArtifacts: readonly PlanReviewReviewedArtifactDigest[];
|
|
97
|
+
override: PlanReviewOverride;
|
|
98
|
+
}
|
|
99
|
+
export interface MaterializedPlanReviewArtifact {
|
|
100
|
+
descriptor: ArtifactLoaderDescriptor;
|
|
101
|
+
artifact: PlanReviewArtifact;
|
|
102
|
+
content: string;
|
|
103
|
+
}
|
|
104
|
+
export type ParsePlanReviewArtifactResult = {
|
|
105
|
+
ok: true;
|
|
106
|
+
artifact: PlanReviewArtifact;
|
|
107
|
+
} | {
|
|
108
|
+
ok: false;
|
|
109
|
+
reason: 'unparsable';
|
|
110
|
+
message: string;
|
|
111
|
+
};
|
|
112
|
+
export interface EvaluatePlanReviewRecoveryInput {
|
|
113
|
+
content: string | null | undefined;
|
|
114
|
+
currentArtifacts: Readonly<Record<string, string>>;
|
|
115
|
+
}
|
|
116
|
+
export interface PlanReviewRecoveryResult {
|
|
117
|
+
gateSatisfied: boolean;
|
|
118
|
+
implementationConfirmed: false;
|
|
119
|
+
decision: PlanReviewRecoveryDecision;
|
|
120
|
+
status: string | null;
|
|
121
|
+
staleArtifacts: readonly string[];
|
|
122
|
+
message: string;
|
|
123
|
+
}
|
|
52
124
|
export declare function getArtifactTopicKey(changeName: string, artifact: string): string;
|
|
53
125
|
export declare function getArtifactOpenSpecPath(changeName: string, artifact: string): string;
|
|
54
126
|
export declare function loadArtifactSnapshot(request: ArtifactLoaderRequest, dependencies?: ArtifactLoaderDependencies): Promise<ArtifactLoaderResult>;
|
|
127
|
+
export declare function createPlanReviewArtifact(input: CreatePlanReviewArtifactInput): MaterializedPlanReviewArtifact;
|
|
128
|
+
export declare function parsePlanReviewArtifact(content: string): ParsePlanReviewArtifactResult;
|
|
129
|
+
export declare function evaluatePlanReviewRecovery(input: EvaluatePlanReviewRecoveryInput): PlanReviewRecoveryResult;
|
|
55
130
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { ArtifactComparisonMetadata, ArtifactLoaderDependencies, ArtifactLoaderDescriptor, ArtifactLoaderRequest, ArtifactLoaderResult, ArtifactSnapshot, ArtifactSnapshotInput, ArtifactSnapshotSource, } from './artifact-loader';
|
|
2
|
-
export { getArtifactOpenSpecPath, getArtifactTopicKey, loadArtifactSnapshot, } from './artifact-loader';
|
|
1
|
+
export type { ArtifactComparisonMetadata, ArtifactLoaderDependencies, ArtifactLoaderDescriptor, ArtifactLoaderRequest, ArtifactLoaderResult, ArtifactSnapshot, ArtifactSnapshotInput, ArtifactSnapshotSource, CreatePlanReviewArtifactInput, EvaluatePlanReviewRecoveryInput, MaterializedPlanReviewArtifact, ParsePlanReviewArtifactResult, PlanReviewArtifact, PlanReviewOverride, PlanReviewRecoveryDecision, PlanReviewRecoveryResult, PlanReviewReviewedArtifactDigest, PlanReviewReviewedArtifactInput, } from './artifact-loader';
|
|
2
|
+
export { createPlanReviewArtifact, evaluatePlanReviewRecovery, getArtifactOpenSpecPath, getArtifactTopicKey, loadArtifactSnapshot, parsePlanReviewArtifact, } from './artifact-loader';
|
|
3
3
|
export type { ValidateTasksArtifactPersistence, ValidateTasksArtifactRequest, } from './tasks-validator';
|
|
4
4
|
export { validateTasksArtifact } from './tasks-validator';
|
|
5
5
|
export type { ArtifactGovernanceEnforcementMode, ArtifactGovernanceFinding, ArtifactGovernanceMetadataValue, ArtifactGovernanceMode, ArtifactGovernanceReport, ArtifactGovernanceResult, ArtifactGovernanceSeverity, ArtifactGovernanceSummary, CreateArtifactGovernanceReportOptions, CreateArtifactGovernanceResultOptions, } from './types';
|
package/package.json
CHANGED
|
@@ -64,6 +64,7 @@ openspec/
|
|
|
64
64
|
├── contracts/ # optional sub-artifact subdir (gated)
|
|
65
65
|
├── quickstart.md # optional sub-artifact (gated)
|
|
66
66
|
├── tasks.md
|
|
67
|
+
├── plan-review.md
|
|
67
68
|
└── verify-report.md
|
|
68
69
|
```
|
|
69
70
|
|
|
@@ -77,6 +78,7 @@ openspec/
|
|
|
77
78
|
| Design | `openspec/changes/{change-name}/design.md` | Architecture and file plan; always produced |
|
|
78
79
|
| Sub-artifacts (optional, gated) | `openspec/changes/{change-name}/{research.md,data-model.md,contracts/,quickstart.md}` | Optional design sub-artifacts; gated by `rules.design.sub_artifacts` + `complexity_threshold` |
|
|
79
80
|
| Tasks | `openspec/changes/{change-name}/tasks.md` | Checkbox checklist updated by apply |
|
|
81
|
+
| Plan review | `openspec/changes/{change-name}/plan-review.md` | Oracle plan-review result with status, notes, blockers, override context, and SHA-256 reviewed-artifact freshness data |
|
|
80
82
|
| Verify report | `openspec/changes/{change-name}/verify-report.md` | Compliance matrix and evidence |
|
|
81
83
|
| Requirements checklist | `openspec/changes/{change-name}/checklists/requirements.md` | Domain-typed requirement-quality gate, consumed before tasks |
|
|
82
84
|
| Constitution | `openspec/memory/constitution.md` | Semver-versioned native principles + Sync-Impact Report |
|
|
@@ -85,6 +87,8 @@ openspec/
|
|
|
85
87
|
primarily persisted through thoth-mem topic keys when the mode includes
|
|
86
88
|
thoth-mem.
|
|
87
89
|
|
|
90
|
+
A saved `plan-review.md` approval is reusable only when it contains `[OKAY]` and every recorded reviewed-artifact SHA-256 digest still matches the current planning artifacts. Missing, stale, rejected, or unparsable plan-review evidence fails closed and requires a fresh Oracle review unless a separate explicit user override is captured through the normal blocking-input surface. A fresh plan-review approval satisfies only the plan-review gate; implementation confirmation remains separate.
|
|
91
|
+
|
|
88
92
|
The canonical OpenSpec copy is the filesystem representation of these artifacts
|
|
89
93
|
for `openspec` and `hybrid` modes. thoth-mem topic keys are the memory
|
|
90
94
|
representation when the mode includes thoth-mem; neither representation changes
|
|
@@ -118,6 +118,7 @@ context. Supplemental context does not replace the recall funnel.
|
|
|
118
118
|
- `sdd-spec` persists `sdd/{change-name}/spec`
|
|
119
119
|
- `sdd-design` persists `sdd/{change-name}/design`
|
|
120
120
|
- `sdd-tasks` persists `sdd/{change-name}/tasks`
|
|
121
|
+
- `plan-reviewer` returns a read-only result; the orchestrator or `quick` persistence helper persists `sdd/{change-name}/plan-review` and/or `openspec/changes/{change-name}/plan-review.md` according to the selected mode
|
|
121
122
|
- `sdd-apply` persists `sdd/{change-name}/apply-progress` and re-persists
|
|
122
123
|
updated `sdd/{change-name}/tasks`
|
|
123
124
|
- `sdd-verify` persists `sdd/{change-name}/verify-report`
|
|
@@ -150,6 +151,7 @@ original intent, accepted scope, deferred areas, and justified exclusions.
|
|
|
150
151
|
|
|
151
152
|
## Recovery Notes
|
|
152
153
|
|
|
154
|
+
- For plan-review recovery, accept saved approval only when canonical evidence contains `[OKAY]` and reviewed-artifact SHA-256 digests still match. Missing, stale, rejected, or unparsable evidence fails closed; user implementation confirmation remains a distinct later gate.
|
|
153
155
|
- Prefer exact topic-key queries over broad natural-language recall.
|
|
154
156
|
- Always apply the recall funnel (`mem_recall(mode="compact")` ->
|
|
155
157
|
`mem_recall(mode="context")` -> `mem_get(...)`) before treating memory as
|
|
@@ -46,6 +46,7 @@ Supported artifact names:
|
|
|
46
46
|
- `design`
|
|
47
47
|
- `design-brief`
|
|
48
48
|
- `tasks`
|
|
49
|
+
- `plan-review`
|
|
49
50
|
- `apply-progress`
|
|
50
51
|
- `verify-report`
|
|
51
52
|
- `archive-report`
|
|
@@ -69,6 +70,7 @@ artifacts:
|
|
|
69
70
|
spec: false # always false in accelerated pipeline
|
|
70
71
|
design: false # always false in accelerated pipeline
|
|
71
72
|
tasks: false
|
|
73
|
+
plan-review: false
|
|
72
74
|
apply-progress: false
|
|
73
75
|
verify-report: false
|
|
74
76
|
archive-report: false
|
|
@@ -29,6 +29,9 @@ mode.
|
|
|
29
29
|
The artifact governance validator is not part of this review. Plan-reviewer is
|
|
30
30
|
only the pre-execution approval gate for the task plan; it does not run the
|
|
31
31
|
validator, enforce its findings, or manage the future pre-`sdd-apply` handoff.
|
|
32
|
+
Plan-reviewer remains read-only: it returns the durable review payload, while the
|
|
33
|
+
orchestrator or `quick` persistence helper writes `plan-review.md` and/or
|
|
34
|
+
`sdd/{change-name}/plan-review` when the selected persistence mode requires it.
|
|
32
35
|
Invoke the semantic oracle role through the available role dispatch surface.
|
|
33
36
|
|
|
34
37
|
Focus on whether the plan can be executed as written, not whether you would have
|
|
@@ -168,6 +171,17 @@ Check only what affects executability:
|
|
|
168
171
|
|
|
169
172
|
## Output Format
|
|
170
173
|
|
|
174
|
+
Return the status token plus enough structured payload for durable persistence at
|
|
175
|
+
`openspec/changes/{change-name}/plan-review.md` and topic key
|
|
176
|
+
`sdd/{change-name}/plan-review` when the selected store includes those targets.
|
|
177
|
+
The persisted payload must preserve status, reviewer role, timestamp, pipeline,
|
|
178
|
+
persistence mode, comments, non-blocking notes, blockers, user override context
|
|
179
|
+
when applicable, and reviewed artifact freshness data. Use SHA-256 freshness
|
|
180
|
+
digests over reviewed artifact content when the coordinator asks for a concrete
|
|
181
|
+
manifest. Missing, stale, rejected, or unparsable saved evidence fails closed on
|
|
182
|
+
recovery. A fresh `[OKAY]` satisfies only plan-review; it is not implementation
|
|
183
|
+
confirmation.
|
|
184
|
+
|
|
171
185
|
If the plan is executable:
|
|
172
186
|
|
|
173
187
|
```text
|