pirl-framework-cli 0.0.0-stage → 1.0.1
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 +78 -0
- package/LICENSE +21 -0
- package/README.md +88 -2
- package/bundled-framework/files/.agents/evals/layer_record.py +438 -0
- package/bundled-framework/files/.agents/evals/tests/test_layer_record.py +264 -0
- package/bundled-framework/files/.agents/evals/tests/test_skills.py +210 -0
- package/bundled-framework/files/.agents/evals/tests/test_validate_layer_artifact.py +214 -0
- package/bundled-framework/files/.agents/evals/validate_layer_artifact.py +415 -0
- package/bundled-framework/files/.agents/instructions/implement.instructions.md +343 -0
- package/bundled-framework/files/.agents/instructions/layered-task-execution.instructions.md +370 -0
- package/bundled-framework/files/.agents/instructions/layout-verification.instructions.md +107 -0
- package/bundled-framework/files/.agents/instructions/plan.instructions.md +292 -0
- package/bundled-framework/files/.agents/instructions/review.instructions.md +236 -0
- package/bundled-framework/files/.agents/instructions/self-evaluation.instructions.md +146 -0
- package/bundled-framework/files/.agents/instructions/standalone-and-maintenance.instructions.md +230 -0
- package/bundled-framework/files/.agents/roles/backend-developer.role.md +45 -0
- package/bundled-framework/files/.agents/roles/business-analyst.role.md +55 -0
- package/bundled-framework/files/.agents/roles/code-analyst.role.md +63 -0
- package/bundled-framework/files/.agents/roles/code-reviewer.role.md +46 -0
- package/bundled-framework/files/.agents/roles/frontend-developer.role.md +51 -0
- package/bundled-framework/files/.agents/roles/process-auditor.role.md +62 -0
- package/bundled-framework/files/.agents/roles/solution-architect.role.md +53 -0
- package/bundled-framework/files/.agents/roles/technical-writer.role.md +68 -0
- package/bundled-framework/files/.agents/roles/ux-designer.role.md +46 -0
- package/bundled-framework/files/.skills/pirl-implement/SKILL.md +115 -0
- package/bundled-framework/files/.skills/pirl-implement/assets/implementation-record-template.md +22 -0
- package/bundled-framework/files/.skills/pirl-implement/references/implementation-record-format.md +41 -0
- package/bundled-framework/files/.skills/pirl-implement/scripts/add_implementation_record.py +58 -0
- package/bundled-framework/files/.skills/pirl-implement/scripts/new_layout_run.py +51 -0
- package/bundled-framework/files/.skills/pirl-plan/SKILL.md +100 -0
- package/bundled-framework/files/.skills/pirl-plan/assets/plan-template.md +48 -0
- package/bundled-framework/files/.skills/pirl-plan/references/plan-format.md +65 -0
- package/bundled-framework/files/.skills/pirl-plan/scripts/new_plan.py +93 -0
- package/bundled-framework/files/.skills/pirl-review/SKILL.md +106 -0
- package/bundled-framework/files/.skills/pirl-review/assets/review-template.md +92 -0
- package/bundled-framework/files/.skills/pirl-review/references/review-format.md +70 -0
- package/bundled-framework/files/.skills/pirl-review/scripts/new_review.py +83 -0
- package/bundled-framework/files/AGENTS.md +303 -0
- package/bundled-framework/files/CONTEXT.md +187 -0
- package/bundled-framework/files/LICENSE +21 -0
- package/bundled-framework/files/README.md +170 -0
- package/bundled-framework/files/gitignore.pirl-bundled +12 -0
- package/bundled-framework/manifest.json +45 -0
- package/dist/bin/main.js +128 -0
- package/dist/bin/pirl.js +6 -0
- package/dist/commands/dispatch.js +57 -0
- package/dist/commands/registry.js +39 -0
- package/dist/core/clipboard.js +70 -0
- package/dist/core/config.js +73 -0
- package/dist/core/exec.js +32 -0
- package/dist/core/paths.js +34 -0
- package/dist/core/targetRepo.js +22 -0
- package/dist/doctor/doctor.js +95 -0
- package/dist/engine/agentMerge.js +71 -0
- package/dist/engine/agents.js +67 -0
- package/dist/engine/attachments.js +251 -0
- package/dist/engine/claudeQuota.js +62 -0
- package/dist/engine/claudeRunner.js +118 -0
- package/dist/engine/claudeStream.js +205 -0
- package/dist/engine/hubData.js +176 -0
- package/dist/engine/permissions.js +67 -0
- package/dist/engine/pricing.js +24 -0
- package/dist/engine/protocol.js +98 -0
- package/dist/engine/run.js +527 -0
- package/dist/engine/runStore.js +67 -0
- package/dist/engine/types.js +3 -0
- package/dist/hub/framework.js +13 -0
- package/dist/hub/hub.js +125 -0
- package/dist/hub/services.js +38 -0
- package/dist/hub/update.js +261 -0
- package/dist/providers/claude.js +62 -0
- package/dist/providers/index.js +17 -0
- package/dist/providers/types.js +1 -0
- package/dist/ui/App.js +849 -0
- package/dist/ui/browse.js +144 -0
- package/dist/ui/components/Header.js +54 -0
- package/dist/ui/components/Input.js +76 -0
- package/dist/ui/components/Lines.js +50 -0
- package/dist/ui/components/Panels.js +73 -0
- package/dist/ui/content.js +225 -0
- package/dist/ui/frameworkConsole.js +541 -0
- package/dist/ui/inputEditor.js +86 -0
- package/dist/ui/layout.js +36 -0
- package/dist/ui/lines.js +15 -0
- package/dist/ui/listOverlay.js +97 -0
- package/dist/ui/runView.js +305 -0
- package/dist/ui/session.js +1 -0
- package/dist/ui/terminalInput.js +45 -0
- package/dist/ui/text.js +58 -0
- package/dist/ui/theme.js +139 -0
- package/dist/ui/ticker.js +48 -0
- package/package.json +67 -4
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Implement Layer Instructions"
|
|
3
|
+
description: "Implement exactly the Plan or the Review's repair instructions, have verification roles conclude the quality gates by reasoning, and write the Implementation Record into the Plan."
|
|
4
|
+
applyTo: ".agents/instructions/implement.instructions.md"
|
|
5
|
+
metadata:
|
|
6
|
+
id: ".agents/instructions/implement"
|
|
7
|
+
kind: "instruction"
|
|
8
|
+
version: "2.2.0"
|
|
9
|
+
status: "active"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Implement Layer Instructions
|
|
13
|
+
|
|
14
|
+
Apply the Implement process only when the request and the [router](layered-task-execution.instructions.md)
|
|
15
|
+
have selected this layer. Reading or updating a Plan/report file does not
|
|
16
|
+
activate another layer. Work assigned directly outside a Plan follows the
|
|
17
|
+
[standalone tasks](standalone-and-maintenance.instructions.md#standalone-tasks);
|
|
18
|
+
do not borrow this layer's wait-for-Review rules for that work.
|
|
19
|
+
|
|
20
|
+
This contract owns the decisions of the Implement layer and the content of its
|
|
21
|
+
results ledger. The goal is to carry out the settled product decisions exactly,
|
|
22
|
+
keep enough evidence for handoff and recognize when those decisions no longer
|
|
23
|
+
fit. The run is carried out through the
|
|
24
|
+
[`pirl-implement` skill](../../.skills/pirl-implement/SKILL.md), which owns the run
|
|
25
|
+
procedure, the Implementation Record format and the helper scripts.
|
|
26
|
+
|
|
27
|
+
## AI Agent roles at the Implement layer
|
|
28
|
+
|
|
29
|
+
The role catalog lives in the [standalone and maintenance instructions](standalone-and-maintenance.instructions.md#role-catalog) and the
|
|
30
|
+
assignment principles in the [router](layered-task-execution.instructions.md#assignment-principles);
|
|
31
|
+
each role's expertise lives in the role file linked in the table.
|
|
32
|
+
The Plan picks roles from the table below; a repair run uses the `repair_roles`
|
|
33
|
+
of the Review report. The Implement coordinator gives each role its role file,
|
|
34
|
+
its row in the table together with the row of the role that the "Done when"
|
|
35
|
+
column refers to with "As `<role>`" (also when that row refers on again), the
|
|
36
|
+
work, the sources and the related REQs/QGs, then merges the results by evidence.
|
|
37
|
+
|
|
38
|
+
| Role | Type | Responsibility at Implement | Done when |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| [`backend-developer`](../roles/backend-developer.role.md) | implementation | Edit non-UI code, accompanying documentation and tests under FUT for that part, within the allowed paths; self-challenge its own work | As `technical-writer` for every sentence of accompanying documentation the role writes or changes, and source/docs/tests deliver all REQs of its part; self-challenge has no open doubts; no builds, typechecks, lint or verification scripts are run |
|
|
41
|
+
| [`frontend-developer`](../roles/frontend-developer.role.md) | implementation | Edit the UI, UI strings per language, accompanying documentation and tests under FUT; capture layout with mocks when the diff changes the UI; self-challenge | As `backend-developer`, and `layout_verification` has a capture run that passes every check when the diff changes the UI (except failed checks the Plan excluded per the [layout verification instructions](layout-verification.instructions.md)); when the diff changes the size or number of elements in a row or frame of constrained width, the bounding-box measurements per the [layout verification instructions](layout-verification.instructions.md) are in `layout_verification` and protruding elements were fixed before handing over to the verification roles; general or negative claims in `layout_verification` and the handoff report have been checked against all sources per the bullet on out-of-scope findings below the table |
|
|
42
|
+
| [`technical-writer`](../roles/technical-writer.role.md) | implementation | Create/update context documentation, contract documents, indexes and specification status tables for documentation-only tasks | Documentation matches the source and the REQs; every claim in each sentence written or changed, including clauses kept from the old version, has a source and has been checked per the [role's way of working](../roles/technical-writer.role.md#how-it-works): sentences stating a rule, scope or list, and the lead-in sentence or heading of a table or list, are checked element by element and at every place of use; quantities or formulas stated in words are recalculated from their definition in the source |
|
|
43
|
+
| [`code-reviewer`](../roles/code-reviewer.role.md) | verification | Challenge the diff: bugs, regressions, permissions and security, data/state inconsistency, guards/validators/error handling, contract violations, tests that violate FUT | `PASS\|FAIL\|BLOCKED` for each assigned QG, with the path traced, counterexamples and sources; each evidence line is a readable source with reasoning per the [router](layered-task-execution.instructions.md#verification-by-reasoning), not a run result |
|
|
44
|
+
| [`code-analyst`](../roles/code-analyst.role.md) | verification | Trace the flow from the entrypoint to the final state through every affected caller/consumer; build scenario tables for QGs with many branches/states/orderings; check documentation against the source | As `code-reviewer` |
|
|
45
|
+
| [`ux-designer`](../roles/ux-designer.role.md) | verification | Check the screenshots and measurements of the layout checks per the layout verification instructions against the UI QGs and the display source | As `code-reviewer` |
|
|
46
|
+
| [`process-auditor`](../roles/process-auditor.role.md) | self-evaluation | Self-evaluate the Implement run per the [router](layered-task-execution.instructions.md#self-evaluation-and-improvement); not recorded in the Plan's role lists | Record written; improvements applied or summarized for the user |
|
|
47
|
+
|
|
48
|
+
- An implementation role does not verify its own work. A verification role
|
|
49
|
+
does not edit the output; a FAIL is returned to the implementation role that
|
|
50
|
+
owns that part.
|
|
51
|
+
- Verification roles receive the implementation roles' diff and claims as
|
|
52
|
+
things to check, not as conclusions. Team consensus is not evidence.
|
|
53
|
+
- Out-of-scope findings and every general or negative claim (a mismatch with
|
|
54
|
+
the source, "there is no", "always", "every") in an implementation role's
|
|
55
|
+
report belong to no QG, so no verification role receives them. The role
|
|
56
|
+
states them only as observations after checking them against all sources that
|
|
57
|
+
could refute them, per the
|
|
58
|
+
[Evidence rule](../../AGENTS.md#evidence). The coordinator
|
|
59
|
+
checks them against the source again before putting them in `residual_risk`,
|
|
60
|
+
the record's `summary` or a response to the user, or states that they are
|
|
61
|
+
unchecked and what was not read.
|
|
62
|
+
- When one agent takes on both implementation and verification (only when
|
|
63
|
+
delegation is not possible under the assignment principles), the
|
|
64
|
+
Implementation Record states that it was self-performed with the reason, and
|
|
65
|
+
the QGs are still reasoned again on the diff by the right verification role;
|
|
66
|
+
do not claim independent verification.
|
|
67
|
+
|
|
68
|
+
## Reading inputs and determining scope
|
|
69
|
+
|
|
70
|
+
1. The user has asked for this layer per the
|
|
71
|
+
[conditions for opening a layer](../../AGENTS.md#choosing-a-layer). Identify
|
|
72
|
+
exactly the Plan file that their words or the settled context name. Read the
|
|
73
|
+
`pirl-plan/v1` Plan, the related source and the Implementation Record if any. Check that the tasks in `depends_on` have done the part this
|
|
74
|
+
task needs; stop only the dependent part that is not ready. Do not require
|
|
75
|
+
future tasks to be complete and do not pick the next task yourself. A Plan
|
|
76
|
+
with wrong content must be clarified before dependent mutations; a missing
|
|
77
|
+
validator run does not by itself prove the Plan wrong.
|
|
78
|
+
If a QG needs work assigned to a later/parallel task, check against the
|
|
79
|
+
[Plan's task boundaries](plan.instructions.md#splitting-tasks-for-separate-implementation-and-acceptance),
|
|
80
|
+
record the affected QG as `BLOCKED` and hand exactly the task-splitting
|
|
81
|
+
decision back to Plan. Do not do the other task yourself, weaken the QG or
|
|
82
|
+
repeatedly edit code while the input has not changed; continue the
|
|
83
|
+
independent parts that are clear.
|
|
84
|
+
2. The first run uses the Plan's `implementation_roles` in order to implement,
|
|
85
|
+
then the Plan's `verification_roles` in order to verify. A repair run uses
|
|
86
|
+
the `repair_roles` of the named Review report for the same Plan/task, then
|
|
87
|
+
still the Plan's `verification_roles`. Do not merge the two teams, change
|
|
88
|
+
roles based on the name of a defect, or add or drop assigned roles. A report
|
|
89
|
+
that still has a `replan` FIND goes back to Plan; deferred risks or blockers
|
|
90
|
+
handed to another owner alone do not open a product repair run.
|
|
91
|
+
3. Check the requirements, responsibilities, allowed paths, dependencies and
|
|
92
|
+
QGs against the current state. Distinguish the user's pre-existing changes
|
|
93
|
+
from what you are about to edit. Use the permissions already granted in the
|
|
94
|
+
session; do not add routine approval checkpoints.
|
|
95
|
+
4. Each role receives its work, sources, instructions and related REQs/QGs.
|
|
96
|
+
Load only the context that serves that decision. When delegating to a
|
|
97
|
+
separate agent, pass the full settled direction; do not hide the solution
|
|
98
|
+
to create an appearance of independence. Only when delegation is not
|
|
99
|
+
possible under the assignment principles does the coordinator perform the
|
|
100
|
+
roles in turn.
|
|
101
|
+
5. Choose equivalent implementation details within the settled direction
|
|
102
|
+
yourself: helper placement, variable names or how to reuse source do not
|
|
103
|
+
need a new Plan. Hand back only decisions that change behavior, permissions,
|
|
104
|
+
data, scope or trade-offs the user has settled. State exactly what is
|
|
105
|
+
missing and continue the independent parts; do not assume the whole task is
|
|
106
|
+
blocked because one branch is unclear. A deviation from the Plan that the
|
|
107
|
+
user confirms follows the
|
|
108
|
+
[Changes to the Plan confirmed by the user](#changes-to-the-plan-confirmed-by-the-user)
|
|
109
|
+
section.
|
|
110
|
+
|
|
111
|
+
## Implementing and repairing per Review
|
|
112
|
+
|
|
113
|
+
- Trace the execution path from input to result before changing anything. Keep
|
|
114
|
+
each invariant where it is owned and update the affected writers/readers
|
|
115
|
+
within scope. Do not add abstractions, migrations, platforms or test
|
|
116
|
+
infrastructure just because it is convenient.
|
|
117
|
+
- The Plan's path list is the scope of the main work, not the boundary of
|
|
118
|
+
consistency. Once the behavior is stable, sweep the whole target repository
|
|
119
|
+
and the related context documentation, not just the task's directory, for
|
|
120
|
+
places that still describe the old behavior or lack the new behavior:
|
|
121
|
+
contract documents, indexes and status tables, API/error/configuration/
|
|
122
|
+
permission catalogs, UI strings, comments or code that only served the
|
|
123
|
+
replaced flow. These are direct consequences of the change, so fix them in
|
|
124
|
+
the same run even when they are outside the Plan's paths. Tests of the
|
|
125
|
+
functionality under development and of affected functionality that still
|
|
126
|
+
assert the old behavior are updated to the new logic, and tests that only
|
|
127
|
+
served a removed flow are deleted, all under the
|
|
128
|
+
[FUT rule](layered-task-execution.instructions.md#functional-tests-fut-rule);
|
|
129
|
+
do not touch tests of unrelated functionality and do not build new harnesses
|
|
130
|
+
or verification scripts, inside or outside the repository (the only exception
|
|
131
|
+
is layout mock and capture scripts in `.tmp/` per the
|
|
132
|
+
[layout verification instructions](layout-verification.instructions.md)).
|
|
133
|
+
Points that need a product decision are recorded where the project keeps
|
|
134
|
+
known gaps and in the residual risk, not decided by you. This sweep does not
|
|
135
|
+
edit historical records (settled Plans, Review reports, original
|
|
136
|
+
specification content); the Plan changes only per the
|
|
137
|
+
[Changes to the Plan confirmed by the user](#changes-to-the-plan-confirmed-by-the-user)
|
|
138
|
+
section. The implementation indexes and status tables of the specification
|
|
139
|
+
directory are living documents and are still kept in sync. Sweep again when
|
|
140
|
+
the behavior changes after the sweep.
|
|
141
|
+
- In a repair run, read every FIND/RISK/BLOCK, EVAL and disposition in the
|
|
142
|
+
report. Confirm the trigger and cause by reasoning on the source (reproduce
|
|
143
|
+
only when this run was asked to investigate a root cause per the router),
|
|
144
|
+
and look for guards or competing explanations that could refute the
|
|
145
|
+
conclusion. If the report is wrong, record `contradicted` with sources; do
|
|
146
|
+
not fix a defect that does not exist or substitute another cause yourself.
|
|
147
|
+
Continue the independent items that are clear and return exactly the
|
|
148
|
+
contradiction to Review before declaring the whole repair run complete.
|
|
149
|
+
- Fix `repair` FINDs and carry out the unblocking actions of `retry` BLOCKs.
|
|
150
|
+
`deferred` RISKs keep their owner and revisit condition; `escalate` BLOCKs
|
|
151
|
+
keep the owner who can provide the input. A retry must have a new, grounded
|
|
152
|
+
action/condition; do not rerun hoping for luck.
|
|
153
|
+
Items of another task (a RISK, FIND or BLOCK in another report) enter this
|
|
154
|
+
repair run only when this run's source report lists them with this run's task
|
|
155
|
+
and layer as the owner; `repair_closure_evidence` records the original report
|
|
156
|
+
and the item ID. Items without such an owner keep their owner and revisit
|
|
157
|
+
condition; if the sweep finds them, state them in `residual_risk` without
|
|
158
|
+
fixing them along the way. EVAL items record the
|
|
159
|
+
evaluation of the previous run's roles and the framework improvements the
|
|
160
|
+
Review applied; read them to know which rules changed, but do not turn them
|
|
161
|
+
into new product FINDs or QGs.
|
|
162
|
+
- Keep before/after evidence for the mechanism to fix by reasoning on the
|
|
163
|
+
source: the old execution path that led to the defect and the change point
|
|
164
|
+
that blocks it, with a counterexample that distinguishes the defect from
|
|
165
|
+
valid behavior. Do not build, typecheck, lint or run the application; test
|
|
166
|
+
results under FUT, when the Plan assigns them, are only stated next to the
|
|
167
|
+
reasoning and are not an evidence line
|
|
168
|
+
([sources of evidence](layered-task-execution.instructions.md#verification-by-reasoning)).
|
|
169
|
+
A repair run that touches the UI captures the layout again per the
|
|
170
|
+
[layout verification instructions](layout-verification.instructions.md), into a new run directory.
|
|
171
|
+
|
|
172
|
+
## Changes to the Plan confirmed by the user
|
|
173
|
+
|
|
174
|
+
The Plan is the standard that the verification roles and Review check against,
|
|
175
|
+
so when the user has settled something that differs from the Plan, the Plan
|
|
176
|
+
must match within the session, not be left for Review.
|
|
177
|
+
|
|
178
|
+
- **When:** during an Implement session (first run or repair run), the
|
|
179
|
+
implementation deviates from a value, table, scope, allowed path, REQ or QG of
|
|
180
|
+
the Plan, and the user confirms exactly that deviation in the same session,
|
|
181
|
+
including when they answer after Implement raised a decision outside the
|
|
182
|
+
Plan's text.
|
|
183
|
+
- **What:** before the verification roles conclude the QGs, edit the affected
|
|
184
|
+
Plan lines in place and add right under each edited line an annotation
|
|
185
|
+
`Confirmed change (user, <YYYY-MM-DD>): <old> -> <new>; <reason>`.
|
|
186
|
+
Recalculate every table of values or derived numbers that depends on the
|
|
187
|
+
changed value (for example the contrast ratio of a color that just changed).
|
|
188
|
+
Record each edit in the Implementation Record's `plan_amendments`. The
|
|
189
|
+
verification roles conclude the QGs against the edited Plan.
|
|
190
|
+
- **Does not apply:** deviations the agent chose itself that the user has not
|
|
191
|
+
confirmed. Do not edit the Plan to match the code: ask the user in the
|
|
192
|
+
session, and record the affected QGs as `BLOCKED` with the decision to be made
|
|
193
|
+
until they answer. Changes to roles, `depends_on` or task boundaries are not
|
|
194
|
+
covered by this section either and go back to the Plan layer. When the user
|
|
195
|
+
confirms after the Implement session has ended, editing the Plan is a Plan
|
|
196
|
+
run: use the same form of annotation with the `record_id` of that Plan run, and
|
|
197
|
+
that record is the trace in place of `plan_amendments`.
|
|
198
|
+
|
|
199
|
+
## Verifying quality gates by reasoning
|
|
200
|
+
|
|
201
|
+
Per the [router](layered-task-execution.instructions.md#verification-by-reasoning),
|
|
202
|
+
an Implement run does not build, typecheck or lint, does not run the
|
|
203
|
+
application for acceptance, and only writes, updates and runs tests under FUT.
|
|
204
|
+
Each QG evidence line comes from a source the router allows; scripts, probes,
|
|
205
|
+
browsers forcing logic branches, static tools and test results are not evidence.
|
|
206
|
+
When the diff changes the UI, `frontend-developer` (or the coordinator when
|
|
207
|
+
performing that role itself) carries out [layout verification with mocks](layout-verification.instructions.md)
|
|
208
|
+
after implementing and before handing over to the verification roles; the
|
|
209
|
+
screenshots and measurements of the checks per the layout verification instructions are a source for the
|
|
210
|
+
verification roles and do not replace their reasoning. When delegating, the
|
|
211
|
+
coordinator states which files are the measurements of the checks and which are
|
|
212
|
+
diagnostics that are not a source.
|
|
213
|
+
When the Plan assigns tests, the implementation role runs only the tests of the
|
|
214
|
+
functionality under development and the affected functionality. A red test is
|
|
215
|
+
explained from the source before fixing the product or the test; do not edit a
|
|
216
|
+
test to match wrong code, and do not add tests or widen the run to increase confidence.
|
|
217
|
+
|
|
218
|
+
Each implementation role self-challenges its own work: check the REQs and the
|
|
219
|
+
`Required logic` against the source, pick a counterexample or edge branch that
|
|
220
|
+
could refute it, and fix in-scope gaps as soon as they are found.
|
|
221
|
+
Self-challenge does not replace the verification role's conclusion.
|
|
222
|
+
|
|
223
|
+
After the implementation/repair team is done, each verification role handles
|
|
224
|
+
its assigned QGs:
|
|
225
|
+
|
|
226
|
+
1. Read the diff together with the surrounding source; trace from the
|
|
227
|
+
entrypoint through callers, guards and write/read operations to the outcome
|
|
228
|
+
and state that the `Required logic` states, including the refusal/failure
|
|
229
|
+
branches that must hold. For UI QGs, also look at the screenshots and
|
|
230
|
+
measurements of the checks per the layout verification instructions in the latest layout capture; if
|
|
231
|
+
they are missing when the diff changes the UI, return a FAIL to
|
|
232
|
+
`frontend-developer`.
|
|
233
|
+
2. Pick a counterexample that can occur within the QG's scope, look for guards
|
|
234
|
+
or competing explanations, then consider whether the source refutes the
|
|
235
|
+
claim of completion.
|
|
236
|
+
3. When the task has tests, read the tests in the diff and check them against
|
|
237
|
+
FUT: traceable to a REQ, exactly the functionality under development and
|
|
238
|
+
the affected functionality, no duplicates, no assertions the specification
|
|
239
|
+
does not require. A violation is returned as a FAIL.
|
|
240
|
+
4. Record `PASS|FAIL|BLOCKED` for each QG with the claim, the path traced, the
|
|
241
|
+
counterexample and sources. `FAIL` when a trigger → mechanism → consequence
|
|
242
|
+
that violates the QG can be shown, or when a clause of the `Required logic`
|
|
243
|
+
does not hold against the source even if the impact is small (for example
|
|
244
|
+
one element or value in a documentation sentence does not match); such a
|
|
245
|
+
point must not be recorded as a non-blocking observation with `PASS`.
|
|
246
|
+
Things seen outside the `Required logic` are recorded separately as
|
|
247
|
+
observations and do not change the conclusion. `BLOCKED` when sources or
|
|
248
|
+
decisions needed to conclude are missing, not because tests have not been run.
|
|
249
|
+
|
|
250
|
+
A FAIL is returned to the implementation role that owns that part, with the
|
|
251
|
+
trigger, mechanism and fix target; after the fix, the verification role reasons
|
|
252
|
+
again over the affected part. At most two repairs of the same cause per run;
|
|
253
|
+
if it still FAILs, record `failed` with evidence. Do not weaken a QG to match
|
|
254
|
+
the code or add QGs mid-run.
|
|
255
|
+
|
|
256
|
+
Implement checks the product itself and does not change Review conclusions.
|
|
257
|
+
After writing the Implementation Record, `process-auditor` self-evaluates the
|
|
258
|
+
Implement run, applies framework improvements and writes the record per the
|
|
259
|
+
[router](layered-task-execution.instructions.md#self-evaluation-and-improvement).
|
|
260
|
+
Output defects that `process-auditor` finds are returned to the implementation
|
|
261
|
+
role that owns that part, within the same two-repair limit above.
|
|
262
|
+
|
|
263
|
+
## Layout verification with mocks
|
|
264
|
+
|
|
265
|
+
In an Implement run of the Plan chain (first run and repair runs), when the
|
|
266
|
+
diff creates or changes something the user sees, `frontend-developer` (or the
|
|
267
|
+
coordinator when performing that role itself) sets up mocks and captures the
|
|
268
|
+
layout after implementing, before the verification roles conclude the QGs.
|
|
269
|
+
Standalone tasks and direct work outside a Plan do this only when the user asks.
|
|
270
|
+
|
|
271
|
+
- **When:** the diff changes displayed markup/templates/components, styles
|
|
272
|
+
(CSS/SCSS, tokens used for layout), adds screens, dialogs or popups, or
|
|
273
|
+
changes display states (error, empty, loading, locked) or UI strings that can
|
|
274
|
+
change the layout. Does not apply when the diff is only in the backend, pure
|
|
275
|
+
domain code with no display change, tests or documentation.
|
|
276
|
+
|
|
277
|
+
When this applies, read and follow the
|
|
278
|
+
[layout verification instructions](layout-verification.instructions.md); otherwise that file is not needed.
|
|
279
|
+
|
|
280
|
+
## Recording results
|
|
281
|
+
|
|
282
|
+
Update the Plan status and one `Implementation Record` section below the four
|
|
283
|
+
Plan content sections. Record the actual work, sources, changes, QG evidence,
|
|
284
|
+
self-challenge and limits. A repair run replaces the reference with the record
|
|
285
|
+
of that run itself. The Plan content changes only per the
|
|
286
|
+
[Changes to the Plan confirmed by the user](#changes-to-the-plan-confirmed-by-the-user)
|
|
287
|
+
section; do not edit the Plan to legitimize a direction the agent changed on its
|
|
288
|
+
own.
|
|
289
|
+
|
|
290
|
+
The Implementation Record follows the
|
|
291
|
+
[template](../../.skills/pirl-implement/assets/implementation-record-template.md) and
|
|
292
|
+
the [format reference](../../.skills/pirl-implement/references/implementation-record-format.md)
|
|
293
|
+
of the `pirl-implement` skill. After writing it, run the Plan validator (command in
|
|
294
|
+
the [`pirl-implement` skill's procedure](../../.skills/pirl-implement/SKILL.md#procedure))
|
|
295
|
+
and fix errors before handoff.
|
|
296
|
+
|
|
297
|
+
`role_work` and `role_challenge_results` cover each implementation/repair role,
|
|
298
|
+
then each verification role, exactly once and in order; `effective_implementation_roles`
|
|
299
|
+
contains only the implementation/repair team. `changed_paths` stays within the
|
|
300
|
+
paths the Plan allows; the Plan file receiving the results is the bookkeeping
|
|
301
|
+
exception. Consistency updates from the impact sweep are the second exception:
|
|
302
|
+
list them separately in `changed_paths` with the sync reason, and state in
|
|
303
|
+
`role_work` what was swept so readers know which parts were checked.
|
|
304
|
+
`root_cause_revalidation` and `review_item_disposition` are always present: the
|
|
305
|
+
first run writes `N/A`, a repair run covers every report item in order.
|
|
306
|
+
`plan_amendments` is also always present, with `N/A` when the Plan was not
|
|
307
|
+
edited. When a repair run corrects a statement of an earlier Implementation
|
|
308
|
+
Record, `repair_closure_evidence` follows the
|
|
309
|
+
[Shared snapshots and older records section](layered-task-execution.instructions.md#shared-snapshots-and-older-records)
|
|
310
|
+
of the router: state the time-stamped source showing the statement was wrong
|
|
311
|
+
when written; without such a source, record the mismatch between the record and
|
|
312
|
+
the source as a change without a record, and do not claim the old statement was
|
|
313
|
+
wrong.
|
|
314
|
+
The source report must be for the same Plan/task and use `pirl-review/v1`.
|
|
315
|
+
|
|
316
|
+
## Finishing and handoff
|
|
317
|
+
|
|
318
|
+
The coordinator and every role carry out the
|
|
319
|
+
[temporary-resource cleanup](layered-task-execution.instructions.md#cleaning-up-temporary-resources-before-handoff)
|
|
320
|
+
after the final verification, recording and self-evaluation, then check again
|
|
321
|
+
before handoff. Do not declare the Implement run complete or leave the cleanup
|
|
322
|
+
to Review; this applies even when the result is failed/blocked, keeping the
|
|
323
|
+
source and the official evidence under the shared contract.
|
|
324
|
+
|
|
325
|
+
Record `implemented` only when the requirements and role responsibilities are
|
|
326
|
+
met, the verification roles conclude every QG `PASS`, self-challenge has no
|
|
327
|
+
open doubts and, when the diff changes the UI, `layout_verification` has a
|
|
328
|
+
capture run that passes every check, except failed checks the Plan excluded per
|
|
329
|
+
the [layout verification instructions](layout-verification.instructions.md).
|
|
330
|
+
A repair run must also resolve the FINDs, record a disposition for every item
|
|
331
|
+
and clear the necessary blockers. Do not claim a finding fixed when its cause
|
|
332
|
+
was refuted.
|
|
333
|
+
`failed` reflects a violated criterion or required work not achieved;
|
|
334
|
+
`blocked` reflects missing external input/conditions.
|
|
335
|
+
`awaiting_confirmation` is used only at a checkpoint that really exists in the Plan.
|
|
336
|
+
A QG without enough evidence is recorded `BLOCKED`; do not claim PASS.
|
|
337
|
+
|
|
338
|
+
Report the result, the decisive evidence, what is incomplete, the Plan link and
|
|
339
|
+
the self-improvement result per the router's reporting section. Hand off the
|
|
340
|
+
implemented source, the exact Plan and the source report to Review or to the
|
|
341
|
+
owner who can unblock; state the conditions to continue. Finish the assigned
|
|
342
|
+
run; do not open Review, pick the next task or ask again for permission for
|
|
343
|
+
work already assigned.
|