intentdna 1.7.4 → 1.8.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/LICENSE +201 -0
- package/README.md +143 -194
- package/dist/assets/candidates.d.ts +124 -0
- package/dist/assets/candidates.js +1249 -0
- package/dist/assets/catalog.d.ts +101 -0
- package/dist/assets/catalog.js +311 -0
- package/dist/assets/evidence.d.ts +93 -0
- package/dist/assets/evidence.js +391 -0
- package/dist/assets/index.d.ts +4 -0
- package/dist/assets/index.js +4 -0
- package/dist/assets/metadata.d.ts +19 -0
- package/dist/assets/metadata.js +227 -0
- package/dist/cli/commands/assets.d.ts +65 -0
- package/dist/cli/commands/assets.js +2871 -0
- package/dist/cli/commands/auth.d.ts +322 -0
- package/dist/cli/commands/auth.js +1592 -0
- package/dist/cli/commands/cloud-auth-guidance.d.ts +2 -0
- package/dist/cli/commands/cloud-auth-guidance.js +4 -0
- package/dist/cli/commands/cloud.d.ts +1359 -0
- package/dist/cli/commands/cloud.js +8364 -0
- package/dist/cli/commands/evolve.js +18 -2
- package/dist/cli/commands/generate.js +25 -2
- package/dist/cli/commands/guard.d.ts +1 -1
- package/dist/cli/commands/guard.js +1 -1
- package/dist/cli/commands/guide.d.ts +15 -0
- package/dist/cli/commands/guide.js +1747 -0
- package/dist/cli/commands/init.d.ts +12 -0
- package/dist/cli/commands/init.js +95 -60
- package/dist/cli/commands/org.d.ts +16 -0
- package/dist/cli/commands/org.js +2393 -0
- package/dist/cli/commands/release.d.ts +59 -0
- package/dist/cli/commands/release.js +716 -0
- package/dist/cli/commands/report.d.ts +82 -0
- package/dist/cli/commands/report.js +1516 -0
- package/dist/cli/commands/run.d.ts +6 -1
- package/dist/cli/commands/run.js +95 -26
- package/dist/cli/commands/sync.d.ts +8 -1
- package/dist/cli/commands/sync.js +436 -141
- package/dist/cli/commands/templates.d.ts +64 -0
- package/dist/cli/commands/templates.js +2151 -1
- package/dist/cli/commands/workflow.d.ts +26 -0
- package/dist/cli/commands/workflow.js +3053 -0
- package/dist/cli/index.js +719 -42
- package/dist/compiler/cascade.js +4 -9
- package/dist/compiler/compile.js +1 -0
- package/dist/governance/evidence-capture-attribution.d.ts +12 -0
- package/dist/governance/evidence-capture-attribution.js +46 -0
- package/dist/governance/index.d.ts +2 -0
- package/dist/governance/index.js +1 -0
- package/dist/hooks/cli.d.ts +6 -0
- package/dist/hooks/cli.js +168 -12
- package/dist/hooks/enforce.d.ts +1 -0
- package/dist/hooks/protocol.d.ts +1 -1
- package/dist/hooks/protocol.js +1 -1
- package/dist/hooks/state.d.ts +41 -0
- package/dist/hooks/state.js +126 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/mcp/tools-state.js +2 -0
- package/dist/organization/index.d.ts +121 -0
- package/dist/organization/index.js +413 -0
- package/dist/runtime/claude-sync-target.d.ts +49 -0
- package/dist/runtime/claude-sync-target.js +280 -0
- package/dist/runtime/codex-adapter.d.ts +254 -0
- package/dist/runtime/codex-adapter.js +1204 -0
- package/dist/runtime/codex-sync-target.d.ts +33 -0
- package/dist/runtime/codex-sync-target.js +241 -0
- package/dist/runtime/index.d.ts +8 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/output-artifact-registry.d.ts +1 -1
- package/dist/runtime/output-artifact-registry.js +2 -0
- package/dist/runtime/settings-adapter.d.ts +1 -1
- package/dist/runtime/settings-adapter.js +1 -1
- package/dist/runtime/skill-adapter.d.ts +5 -1
- package/dist/runtime/skill-adapter.js +120 -34
- package/dist/runtime/sync-artifact-registry.d.ts +99 -0
- package/dist/runtime/sync-artifact-registry.js +194 -0
- package/dist/runtime/sync-target-plan.d.ts +45 -0
- package/dist/runtime/sync-target-plan.js +19 -0
- package/dist/schema/controller-registry.d.ts +8 -1
- package/dist/schema/controller-registry.js +8 -0
- package/dist/schema/types.d.ts +35 -23
- package/dist/schema/types.js +10 -1
- package/dist/schema/validate.js +22 -22
- package/dist/schema/validators/controllers.js +38 -20
- package/dist/schema/workflow-authoring-contract.d.ts +29 -0
- package/dist/schema/workflow-authoring-contract.js +109 -0
- package/dist/schema/yaml-parser.js +18 -0
- package/dist/templates/api-backend.dna.yaml +19 -0
- package/dist/templates/brainstorming-first.dna.yaml +19 -0
- package/dist/templates/code-cleanup.dna.yaml +19 -0
- package/dist/templates/code-review-pipeline.dna.yaml +18 -0
- package/dist/templates/documentation-writer.dna.yaml +19 -0
- package/dist/templates/flutter-behavior-lock.dna.yaml +19 -0
- package/dist/templates/flutter-refactoring-rescue.dna.yaml +19 -0
- package/dist/templates/flutter-rewrite-diagnosis-review.dna.yaml +210 -0
- package/dist/templates/flutter-rewrite-fix-review-loop.dna.yaml +260 -0
- package/dist/templates/flutter-rewrite-new.dna.yaml +506 -0
- package/dist/templates/flutter-rewrite.dna.yaml +20 -0
- package/dist/templates/frontend-quality.dna.yaml +19 -0
- package/dist/templates/full-pipeline.dna.yaml +20 -0
- package/dist/templates/marketplace.d.ts +92 -0
- package/dist/templates/marketplace.js +502 -0
- package/dist/templates/metadata.d.ts +25 -0
- package/dist/templates/metadata.js +136 -3
- package/dist/templates/mobile-dev.dna.yaml +19 -0
- package/dist/templates/multi-agent-handoff-coordination.dna.yaml +156 -0
- package/dist/templates/multi-perspective-review.dna.yaml +19 -0
- package/dist/templates/persistent-executor.dna.yaml +19 -0
- package/dist/templates/qa-loop.dna.yaml +18 -0
- package/dist/templates/release-evidence-gate.dna.yaml +131 -0
- package/dist/templates/requirements-gate.dna.yaml +19 -0
- package/dist/templates/research-orchestration.dna.yaml +19 -0
- package/dist/templates/root-cause-analysis.dna.yaml +19 -0
- package/dist/templates/safe-refactoring.dna.yaml +321 -0
- package/dist/templates/secure-dev.dna.yaml +19 -0
- package/dist/templates/subagent-parallel.dna.yaml +19 -0
- package/dist/templates/systematic-debugging.dna.yaml +19 -0
- package/dist/templates/tdd-strict.dna.yaml +19 -0
- package/dist/templates/ui-visual-regression-qa.dna.yaml +133 -0
- package/dist/templates/workflow-author.dna.yaml +302 -0
- package/dist/templates/workflow-blocked-scope-triage.dna.yaml +242 -0
- package/dist/templates/workflow-completion-audit.dna.yaml +254 -0
- package/dist/templates/workflow-cross-boundary-resource-approval.dna.yaml +249 -0
- package/dist/templates/workflow-evidence-review.dna.yaml +198 -0
- package/dist/templates/workflow-module-inventory.dna.yaml +257 -0
- package/dist/templates/workflow-runtime-smoke-review.dna.yaml +252 -0
- package/dist/templates/workflow-verification-command-routing.dna.yaml +278 -0
- package/dist/workflow/authoring-packet.d.ts +67 -0
- package/dist/workflow/authoring-packet.js +218 -0
- package/dist/workflow/draft.d.ts +159 -0
- package/dist/workflow/draft.js +800 -0
- package/dist/workflow/index.d.ts +3 -0
- package/dist/workflow/index.js +3 -0
- package/dist/workflow/suggestion-review.d.ts +65 -0
- package/dist/workflow/suggestion-review.js +245 -0
- package/package.json +1 -1
- package/spec/README.md +15 -48
- package/spec/codex-adapter-contract.md +176 -0
- package/spec/sync-target-plan.md +158 -0
- package/spec/workflow-capability-ir.md +153 -0
- package/spec/agent-dispatch-fix.md +0 -116
- package/spec/control-plane-convergence-handoff-2026-04-24.md +0 -432
- package/spec/flutter-rewrite-template-optimization.md +0 -301
- package/spec/foundation-hardening.md +0 -178
- package/spec/hooks-infra-harness-hardening.md +0 -741
- package/spec/multi-config.md +0 -172
- package/spec/parallel-isolation.md +0 -268
- package/spec/template-version-namespace-fix.md +0 -653
- package/spec/workflow-pipeline.md +0 -101
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# flutter-rewrite-fix-review-loop: diagnosis-backed fix, review, and verification loop
|
|
2
|
+
# Source: extracted from Flutter rewrite dogfood fix workflow
|
|
3
|
+
# Purpose: reuse the inner implementation/review/verify loop without adopting the full rewrite asset
|
|
4
|
+
|
|
5
|
+
version: "0.1.0"
|
|
6
|
+
id: template_flutter_rewrite_fix_review_loop
|
|
7
|
+
name: Flutter Rewrite Fix Review Loop
|
|
8
|
+
purpose: Run the smallest approved Flutter rewrite fix with independent review, fresh verification, and durable progress evidence.
|
|
9
|
+
maturity: reviewed
|
|
10
|
+
fit:
|
|
11
|
+
- Rewrite slices with an approved diagnosis and review verdict.
|
|
12
|
+
- Behavior-preserving fixes that need independent review before completion or rollout.
|
|
13
|
+
not_for:
|
|
14
|
+
- Starting implementation without approved diagnosis.
|
|
15
|
+
- Broad refactors, opportunistic improvements, or self-approved fixes.
|
|
16
|
+
inputs:
|
|
17
|
+
- approved diagnosis artifact
|
|
18
|
+
- diagnosis review verdict
|
|
19
|
+
- v1 behavior reference
|
|
20
|
+
- focused verification command
|
|
21
|
+
outputs:
|
|
22
|
+
- scoped fix diff summary
|
|
23
|
+
- independent fix review verdict
|
|
24
|
+
- verification and progress evidence
|
|
25
|
+
lineage:
|
|
26
|
+
source: Flutter rewrite dogfood fix-review-verify loop
|
|
27
|
+
reference: /Users/samuel/lawark/lwk_flutter_v2-rewrite/.dna/fix-progress
|
|
28
|
+
type: project
|
|
29
|
+
namespace: frfrl
|
|
30
|
+
|
|
31
|
+
cascade:
|
|
32
|
+
inherits: ["species:default"]
|
|
33
|
+
priority: 100
|
|
34
|
+
|
|
35
|
+
variables:
|
|
36
|
+
diagnosis_path:
|
|
37
|
+
description: "Approved diagnosis artifact path"
|
|
38
|
+
default: ".dna/specs/diagnosis-$ARGUMENTS.md"
|
|
39
|
+
diagnosis_review_path:
|
|
40
|
+
description: "Diagnosis review verdict path"
|
|
41
|
+
default: ".dna/specs/diagnosis-$ARGUMENTS.review.json"
|
|
42
|
+
progress_path:
|
|
43
|
+
description: "Module progress JSON path"
|
|
44
|
+
default: ".dna/fix-progress/$ARGUMENTS.json"
|
|
45
|
+
behavior_docs:
|
|
46
|
+
description: "Behavior evidence directory"
|
|
47
|
+
default: "docs/behavior"
|
|
48
|
+
|
|
49
|
+
evidence:
|
|
50
|
+
- label: Flutter rewrite fix-loop progress
|
|
51
|
+
kind: reference
|
|
52
|
+
path: /Users/samuel/lawark/lwk_flutter_v2-rewrite/.dna/fix-progress
|
|
53
|
+
description: Module-level progress JSON and test logs showing the diagnosis-backed fix/review/verify loop.
|
|
54
|
+
- label: Flutter rewrite diagnosis specs
|
|
55
|
+
kind: reference
|
|
56
|
+
path: /Users/samuel/lawark/lwk_flutter_v2-rewrite/.dna/specs
|
|
57
|
+
description: Approved diagnosis and review artifacts consumed before implementation starts.
|
|
58
|
+
|
|
59
|
+
genes:
|
|
60
|
+
approved_diagnosis_required:
|
|
61
|
+
description: Implementation can start only from an approved diagnosis and review verdict
|
|
62
|
+
codons:
|
|
63
|
+
- type: attract
|
|
64
|
+
target: reviewed_diagnosis
|
|
65
|
+
- type: repel
|
|
66
|
+
target: edit_without_diagnosis
|
|
67
|
+
- type: threshold
|
|
68
|
+
condition: "diagnosis_review_verdict == APPROVE"
|
|
69
|
+
action: block
|
|
70
|
+
|
|
71
|
+
behavior_equivalence:
|
|
72
|
+
description: Fixes preserve v1 behavior and prove equivalence with fresh evidence
|
|
73
|
+
codons:
|
|
74
|
+
- type: attract
|
|
75
|
+
target: v1_behavior_reference
|
|
76
|
+
- type: attract
|
|
77
|
+
target: logic_equivalence_check
|
|
78
|
+
- type: repel
|
|
79
|
+
target: opportunistic_improvement
|
|
80
|
+
- type: threshold
|
|
81
|
+
condition: "fresh_verification_evidence == true"
|
|
82
|
+
action: block
|
|
83
|
+
|
|
84
|
+
small_reversible_rounds:
|
|
85
|
+
description: Each fix round stays small, reviewable, and reversible
|
|
86
|
+
codons:
|
|
87
|
+
- type: attract
|
|
88
|
+
target: minimal_diff
|
|
89
|
+
- type: attract
|
|
90
|
+
target: after_change_verification
|
|
91
|
+
- type: repel
|
|
92
|
+
target: broad_refactor_batch
|
|
93
|
+
- type: threshold
|
|
94
|
+
condition: "files_changed_per_round <= 5"
|
|
95
|
+
action: escalate
|
|
96
|
+
|
|
97
|
+
contexts: {}
|
|
98
|
+
|
|
99
|
+
roles:
|
|
100
|
+
fixer:
|
|
101
|
+
description: Implements the smallest diagnosis-approved fix while preserving v1 behavior.
|
|
102
|
+
tool_permissions:
|
|
103
|
+
allow: [Read, Edit, Write, Grep, Glob, Bash]
|
|
104
|
+
deny: [NotebookEdit]
|
|
105
|
+
scope:
|
|
106
|
+
read: ["**/*", ".dna/**", "docs/**"]
|
|
107
|
+
write: ["lib/**", "v2/**", "test/**", ".dna/fix-progress/**"]
|
|
108
|
+
instructions:
|
|
109
|
+
- Read {{diagnosis_path}} and {{diagnosis_review_path}} before any Edit.
|
|
110
|
+
- Confirm the diagnosis review verdict is APPROVE before changing code.
|
|
111
|
+
- Read the relevant v1 source and behavior evidence before implementing.
|
|
112
|
+
- Fix only the approved breakpoint or missing implementation.
|
|
113
|
+
- Preserve behavior, including old edge cases and bugs, unless the approved diagnosis explicitly says otherwise.
|
|
114
|
+
- Keep the diff small and reversible; avoid unrelated cleanup, new abstractions, or broad refactors.
|
|
115
|
+
- Run focused verification after each meaningful change and record evidence.
|
|
116
|
+
|
|
117
|
+
fix_reviewer:
|
|
118
|
+
description: Reviews the fix against diagnosis, v1 behavior, and scope boundaries.
|
|
119
|
+
tool_permissions:
|
|
120
|
+
allow: [Read, Grep, Glob, Bash]
|
|
121
|
+
deny: [Edit, Write, NotebookEdit]
|
|
122
|
+
scope:
|
|
123
|
+
read: ["**/*", ".dna/**", "docs/**"]
|
|
124
|
+
write: []
|
|
125
|
+
instructions:
|
|
126
|
+
- Compare the diff to {{diagnosis_path}} and {{diagnosis_review_path}}.
|
|
127
|
+
- Verify every changed file is necessary for the approved diagnosis.
|
|
128
|
+
- Check for behavior drift, opportunistic improvement, unrelated refactor, or missing v1 reference.
|
|
129
|
+
- Reject the round if evidence is stale, missing, or too broad.
|
|
130
|
+
- "Produce a concise verdict: APPROVE, REQUEST_CHANGES, or BLOCKED."
|
|
131
|
+
|
|
132
|
+
verifier:
|
|
133
|
+
description: Runs focused verification and updates progress evidence for the module.
|
|
134
|
+
tool_permissions:
|
|
135
|
+
allow: [Read, Edit, Write, Grep, Glob, Bash]
|
|
136
|
+
deny: [NotebookEdit]
|
|
137
|
+
scope:
|
|
138
|
+
read: ["**/*", ".dna/**", "docs/**"]
|
|
139
|
+
write: [".dna/fix-progress/**"]
|
|
140
|
+
instructions:
|
|
141
|
+
- Run the smallest meaningful test/analyze/build command that proves the fix.
|
|
142
|
+
- Record command, result, evidence paths, remaining failures, and next focus in {{progress_path}}.
|
|
143
|
+
- If verification cannot run, record the blocker and required human/environment action.
|
|
144
|
+
- Do not claim completion without fresh evidence.
|
|
145
|
+
|
|
146
|
+
manager_reviewer:
|
|
147
|
+
description: Turns fix/review/verify results into a manager-readable route decision.
|
|
148
|
+
tool_permissions:
|
|
149
|
+
allow: [Read, Grep, Glob]
|
|
150
|
+
deny: [Edit, Write, Bash, NotebookEdit]
|
|
151
|
+
scope:
|
|
152
|
+
read: ["**/*", ".dna/**", "docs/**"]
|
|
153
|
+
write: []
|
|
154
|
+
instructions:
|
|
155
|
+
- Summarize whether the module is PASS, CONTINUE, REQUEST_CHANGES, or BLOCKED.
|
|
156
|
+
- Name the diagnosis, review verdict, test evidence, and progress artifact.
|
|
157
|
+
- If active work remains, route back to the fix loop or asset suggestions before sync/evolution.
|
|
158
|
+
- Keep Obsidian/wiki as internal memory only; use machine artifacts as workflow evidence.
|
|
159
|
+
|
|
160
|
+
workflows:
|
|
161
|
+
fix-review-loop:
|
|
162
|
+
name: Fix Review Loop
|
|
163
|
+
description: Implement from approved diagnosis, independently review behavior equivalence, verify, and record manager-readable progress.
|
|
164
|
+
steps:
|
|
165
|
+
- id: fix
|
|
166
|
+
role: fixer
|
|
167
|
+
description: Implement the smallest diagnosis-approved behavior-preserving fix.
|
|
168
|
+
prompt: |
|
|
169
|
+
Fix $ARGUMENTS using {{diagnosis_path}} and {{diagnosis_review_path}}.
|
|
170
|
+
Confirm the review verdict is APPROVE, read v1 behavior references, then make the smallest necessary code/test changes.
|
|
171
|
+
Preserve v1 behavior and avoid unrelated refactors.
|
|
172
|
+
checkpoints:
|
|
173
|
+
- assert: diagnosis_review_verdict_present
|
|
174
|
+
command: "test -s \"{{diagnosis_review_path}}\""
|
|
175
|
+
message: "Diagnosis review verdict must exist before fixing."
|
|
176
|
+
action: block
|
|
177
|
+
handoff:
|
|
178
|
+
consumes:
|
|
179
|
+
- type: file
|
|
180
|
+
path: "{{diagnosis_path}}"
|
|
181
|
+
description: Approved diagnosis artifact.
|
|
182
|
+
- type: file
|
|
183
|
+
path: "{{diagnosis_review_path}}"
|
|
184
|
+
description: Diagnosis review verdict.
|
|
185
|
+
produces:
|
|
186
|
+
- type: summary
|
|
187
|
+
name: fix_diff_summary
|
|
188
|
+
description: Changed files, target diagnosis item, and verification commands run.
|
|
189
|
+
- id: review-fix
|
|
190
|
+
role: fix_reviewer
|
|
191
|
+
depends_on: [fix]
|
|
192
|
+
description: Review the fix against approved diagnosis and v1 behavior.
|
|
193
|
+
prompt: |
|
|
194
|
+
Review the current diff for $ARGUMENTS.
|
|
195
|
+
Check scope, v1 behavior equivalence, diagnosis alignment, and evidence freshness.
|
|
196
|
+
Return APPROVE, REQUEST_CHANGES, or BLOCKED with reasons.
|
|
197
|
+
handoff:
|
|
198
|
+
consumes:
|
|
199
|
+
- type: summary
|
|
200
|
+
name: fix_diff_summary
|
|
201
|
+
from: fix
|
|
202
|
+
description: Fix round summary.
|
|
203
|
+
produces:
|
|
204
|
+
- type: summary
|
|
205
|
+
name: fix_review_verdict
|
|
206
|
+
description: Independent review verdict for the fix round.
|
|
207
|
+
- id: verify
|
|
208
|
+
role: verifier
|
|
209
|
+
depends_on: [review-fix]
|
|
210
|
+
description: Run focused verification and update progress evidence.
|
|
211
|
+
prompt: |
|
|
212
|
+
Run focused verification for $ARGUMENTS after review.
|
|
213
|
+
Update {{progress_path}} with verdict, commands, evidence paths, remaining failures, and next focus.
|
|
214
|
+
checkpoints:
|
|
215
|
+
- assert: progress_artifact_written
|
|
216
|
+
command: "test -s \"{{progress_path}}\""
|
|
217
|
+
message: "Progress JSON must be written before manager route."
|
|
218
|
+
action: block
|
|
219
|
+
handoff:
|
|
220
|
+
consumes:
|
|
221
|
+
- type: summary
|
|
222
|
+
name: fix_review_verdict
|
|
223
|
+
from: review-fix
|
|
224
|
+
description: Fix review verdict.
|
|
225
|
+
produces:
|
|
226
|
+
- type: file
|
|
227
|
+
path: "{{progress_path}}"
|
|
228
|
+
description: Updated module progress evidence.
|
|
229
|
+
- id: manager-route
|
|
230
|
+
role: manager_reviewer
|
|
231
|
+
depends_on: [verify]
|
|
232
|
+
description: Produce manager-readable next action from progress evidence.
|
|
233
|
+
prompt: |
|
|
234
|
+
Read {{progress_path}}, {{diagnosis_path}}, and {{diagnosis_review_path}}.
|
|
235
|
+
State PASS, CONTINUE, REQUEST_CHANGES, or BLOCKED; include evidence paths and next command.
|
|
236
|
+
handoff:
|
|
237
|
+
consumes:
|
|
238
|
+
- type: file
|
|
239
|
+
path: "{{progress_path}}"
|
|
240
|
+
from: verify
|
|
241
|
+
description: Module progress evidence.
|
|
242
|
+
produces:
|
|
243
|
+
- type: summary
|
|
244
|
+
name: fix_loop_route
|
|
245
|
+
description: Manager-readable next action for the module.
|
|
246
|
+
|
|
247
|
+
controllers:
|
|
248
|
+
fix-review-loop:
|
|
249
|
+
name: Fix Review Loop
|
|
250
|
+
description: "Run diagnosis-backed fix, independent review, verification, and manager route for one module or risky slice."
|
|
251
|
+
kind: sequential
|
|
252
|
+
workflow: fix-review-loop
|
|
253
|
+
max_rounds: 3
|
|
254
|
+
progress_artifact_path: ".dna/fix-progress/$ARGUMENTS.json"
|
|
255
|
+
roles:
|
|
256
|
+
fixer: fixer
|
|
257
|
+
fix_reviewer: fix_reviewer
|
|
258
|
+
verifier: verifier
|
|
259
|
+
manager_reviewer: manager_reviewer
|
|
260
|
+
stop_format: configured_stop_report
|