@guanlin4924/devflow-pi 0.1.95 → 0.1.97

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.
Files changed (49) hide show
  1. package/README.md +42 -2
  2. package/package.json +2 -1
  3. package/plugins/devflow-core/extensions/devflow-core.ts +679 -91
  4. package/plugins/devflow-core/runtime/hooks/hook_common.py +245 -0
  5. package/plugins/devflow-core/runtime/hooks/index_gate.py +18 -0
  6. package/plugins/devflow-core/skills/wireframe-render/SKILL.md +1 -1
  7. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_runner.py +98 -2
  8. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_suite.rb +6 -1
  9. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +64 -8
  10. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dsl_coverage.py +3 -0
  11. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dsl_draft.py +53 -0
  12. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dsl_v1.py +52 -2
  13. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +2 -0
  14. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/explore_preflight.py +58 -0
  15. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +1 -0
  16. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/locator_map.py +156 -0
  17. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/machine_evidence.rb +1 -0
  18. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/playwright_adapter.py +1 -1
  19. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_graph.rb +50 -15
  20. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/session_rollover.rb +60 -0
  21. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/startup_preflight.py +167 -0
  22. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +5 -0
  23. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_render.py +262 -56
  24. package/plugins/devflow-core/skills/workflow-orchestrator/templates/regression-acceptance.yaml +126 -0
  25. package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +2 -0
  26. package/plugins/devflow-intel/extensions/devflow-intel.ts +1 -1
  27. package/plugins/devflow-quality/runtime/playwright/devflow-test-dsl-v1.schema.json +103 -88
  28. package/plugins/devflow-quality/runtime/playwright/explore-host.mjs +879 -0
  29. package/plugins/devflow-quality/runtime/playwright/runner.spec.mjs +297 -15
  30. package/plugins/devflow-quality/runtime/playwright/runtime-manifest.json +3 -2
  31. package/plugins/devflow-quality/skills/workflow-acceptance-test-design/SKILL.md +4 -0
  32. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +10 -2
  33. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/intermediate-format.md +6 -2
  34. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +3 -1
  35. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/ui-mainflow-rules.md +4 -2
  36. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +98 -15
  37. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/locator_report.py +73 -0
  38. package/plugins/devflow-quality/skills/workflow-human-acceptance/SKILL.md +3 -1
  39. package/plugins/devflow-quality/skills/workflow-regression-test-design/SKILL.md +69 -0
  40. package/plugins/devflow-quality/skills/workflow-release-closeout/SKILL.md +1 -1
  41. package/plugins/devflow-quality/skills/workflow-run-acceptance-tests/SKILL.md +4 -2
  42. package/src/cli.ts +10 -0
  43. package/src/constants.ts +1 -1
  44. package/src/doctor.ts +9 -0
  45. package/src/mcp/auth.ts +103 -0
  46. package/src/mcp/core.ts +102 -0
  47. package/src/mcp/server.ts +193 -0
  48. package/src/mcp/types.ts +5 -0
  49. package/src/startup-briefing.ts +109 -0
@@ -147,97 +147,66 @@
147
147
  "type": "boolean"
148
148
  },
149
149
  "target": {
150
- "description": "Exactly one locator form. Strict: more than one match fails the step. XPath is not supported.",
150
+ "description": "Exactly one locator form, optionally restricted by within, table/column, or row. XPath is not supported.",
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "properties": {
154
+ "testid": { "$ref": "#/$defs/text" },
155
+ "role": { "type": "string", "pattern": "^[a-z]+$" },
156
+ "name": { "$ref": "#/$defs/text" },
157
+ "label": { "$ref": "#/$defs/text" },
158
+ "placeholder": { "$ref": "#/$defs/text" },
159
+ "text": { "$ref": "#/$defs/text" },
160
+ "css": { "$ref": "#/$defs/text" },
161
+ "exact": { "$ref": "#/$defs/exactFlag" },
162
+ "within": { "$ref": "#/$defs/target" },
163
+ "table": { "$ref": "#/$defs/tableRef" },
164
+ "column": { "$ref": "#/$defs/text" },
165
+ "table_kind": { "enum": ["html", "element-plus"] },
166
+ "row": { "$ref": "#/$defs/rowRef" }
167
+ },
151
168
  "oneOf": [
152
169
  {
153
- "type": "object",
154
- "additionalProperties": false,
155
170
  "required": [
156
171
  "testid"
157
- ],
158
- "properties": {
159
- "testid": {
160
- "$ref": "#/$defs/text"
161
- }
162
- }
163
- },
164
- {
165
- "type": "object",
166
- "additionalProperties": false,
167
- "required": [
168
- "role",
169
- "name"
170
- ],
171
- "properties": {
172
- "role": {
173
- "type": "string",
174
- "pattern": "^[a-z]+$"
175
- },
176
- "name": {
177
- "$ref": "#/$defs/text"
178
- },
179
- "exact": {
180
- "$ref": "#/$defs/exactFlag"
181
- }
182
- }
183
- },
184
- {
185
- "type": "object",
186
- "additionalProperties": false,
187
- "required": [
188
- "label"
189
- ],
190
- "properties": {
191
- "label": {
192
- "$ref": "#/$defs/text"
193
- },
194
- "exact": {
195
- "$ref": "#/$defs/exactFlag"
196
- }
197
- }
198
- },
199
- {
200
- "type": "object",
201
- "additionalProperties": false,
202
- "required": [
203
- "placeholder"
204
- ],
205
- "properties": {
206
- "placeholder": {
207
- "$ref": "#/$defs/text"
208
- },
209
- "exact": {
210
- "$ref": "#/$defs/exactFlag"
211
- }
212
- }
172
+ ]
213
173
  },
214
174
  {
215
- "type": "object",
216
- "additionalProperties": false,
217
- "required": [
218
- "text"
219
- ],
220
- "properties": {
221
- "text": {
222
- "$ref": "#/$defs/text"
223
- },
224
- "exact": {
225
- "$ref": "#/$defs/exactFlag"
226
- }
227
- }
175
+ "required": ["role", "name"]
228
176
  },
229
- {
230
- "type": "object",
231
- "additionalProperties": false,
232
- "required": [
233
- "css"
234
- ],
235
- "properties": {
236
- "css": {
237
- "$ref": "#/$defs/text"
238
- }
239
- }
240
- }
177
+ { "required": ["label"] },
178
+ { "required": ["placeholder"] },
179
+ { "required": ["text"] },
180
+ { "required": ["css"] },
181
+ { "required": ["table", "column"] }
182
+ ]
183
+ },
184
+ "tableRef": {
185
+ "type": "object",
186
+ "additionalProperties": false,
187
+ "properties": {
188
+ "near_heading": { "$ref": "#/$defs/text" },
189
+ "testid": { "$ref": "#/$defs/text" },
190
+ "only": { "const": true }
191
+ },
192
+ "oneOf": [
193
+ { "required": ["near_heading"], "properties": { "near_heading": { "$ref": "#/$defs/text" } } },
194
+ { "required": ["testid"], "properties": { "testid": { "$ref": "#/$defs/text" } } },
195
+ { "required": ["only"], "properties": { "only": { "const": true } } }
196
+ ]
197
+ },
198
+ "rowRef": {
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "required": ["column"],
202
+ "properties": {
203
+ "column": { "$ref": "#/$defs/text" },
204
+ "equals": { "$ref": "#/$defs/text" },
205
+ "contains": { "$ref": "#/$defs/text" }
206
+ },
207
+ "oneOf": [
208
+ { "required": ["equals"] },
209
+ { "required": ["contains"] }
241
210
  ]
242
211
  },
243
212
  "match": {
@@ -306,6 +275,7 @@
306
275
  "covers": {
307
276
  "$ref": "#/$defs/covers"
308
277
  },
278
+ "source_anchor": { "$ref": "#/$defs/text" },
309
279
  "timeout_ms": {
310
280
  "$ref": "#/$defs/timeoutMs"
311
281
  },
@@ -365,17 +335,22 @@
365
335
  "^[A-Za-z_][A-Za-z0-9_]{0,63}$": {
366
336
  "type": "object",
367
337
  "additionalProperties": false,
368
- "required": [
369
- "pointer"
370
- ],
371
338
  "properties": {
372
339
  "pointer": {
373
340
  "$ref": "#/$defs/jsonPointer"
374
341
  },
342
+ "header": {
343
+ "type": "string",
344
+ "pattern": "^[A-Za-z0-9-]{1,128}$"
345
+ },
375
346
  "sensitive": {
376
347
  "type": "boolean"
377
348
  }
378
- }
349
+ },
350
+ "oneOf": [
351
+ { "required": ["pointer"] },
352
+ { "required": ["header"] }
353
+ ]
379
354
  }
380
355
  }
381
356
  },
@@ -434,6 +409,7 @@
434
409
  "covers": {
435
410
  "$ref": "#/$defs/covers"
436
411
  },
412
+ "source_anchor": { "$ref": "#/$defs/text" },
437
413
  "timeout_ms": {
438
414
  "$ref": "#/$defs/timeoutMs"
439
415
  },
@@ -465,6 +441,7 @@
465
441
  "covers": {
466
442
  "$ref": "#/$defs/covers"
467
443
  },
444
+ "source_anchor": { "$ref": "#/$defs/text" },
468
445
  "timeout_ms": {
469
446
  "$ref": "#/$defs/timeoutMs"
470
447
  },
@@ -496,6 +473,7 @@
496
473
  "covers": {
497
474
  "$ref": "#/$defs/covers"
498
475
  },
476
+ "source_anchor": { "$ref": "#/$defs/text" },
499
477
  "timeout_ms": {
500
478
  "$ref": "#/$defs/timeoutMs"
501
479
  },
@@ -531,6 +509,7 @@
531
509
  "covers": {
532
510
  "$ref": "#/$defs/covers"
533
511
  },
512
+ "source_anchor": { "$ref": "#/$defs/text" },
534
513
  "timeout_ms": {
535
514
  "$ref": "#/$defs/timeoutMs"
536
515
  },
@@ -572,6 +551,7 @@
572
551
  "action": {
573
552
  "const": "check"
574
553
  },
554
+ "source_anchor": { "$ref": "#/$defs/text" },
575
555
  "covers": {
576
556
  "$ref": "#/$defs/covers"
577
557
  },
@@ -602,6 +582,7 @@
602
582
  "action": {
603
583
  "const": "uncheck"
604
584
  },
585
+ "source_anchor": { "$ref": "#/$defs/text" },
605
586
  "covers": {
606
587
  "$ref": "#/$defs/covers"
607
588
  },
@@ -636,6 +617,7 @@
636
617
  "covers": {
637
618
  "$ref": "#/$defs/covers"
638
619
  },
620
+ "source_anchor": { "$ref": "#/$defs/text" },
639
621
  "timeout_ms": {
640
622
  "$ref": "#/$defs/timeoutMs"
641
623
  },
@@ -675,6 +657,7 @@
675
657
  "covers": {
676
658
  "$ref": "#/$defs/covers"
677
659
  },
660
+ "source_anchor": { "$ref": "#/$defs/text" },
678
661
  "timeout_ms": {
679
662
  "$ref": "#/$defs/timeoutMs"
680
663
  },
@@ -707,6 +690,7 @@
707
690
  "covers": {
708
691
  "$ref": "#/$defs/covers"
709
692
  },
693
+ "source_anchor": { "$ref": "#/$defs/text" },
710
694
  "timeout_ms": {
711
695
  "$ref": "#/$defs/timeoutMs"
712
696
  },
@@ -728,6 +712,33 @@
728
712
  },
729
713
  "description": "normalize_whitespace defaults to true, case_sensitive defaults to true."
730
714
  },
715
+ "uiAssertEachText": {
716
+ "type": "object",
717
+ "additionalProperties": false,
718
+ "required": ["id", "driver", "action", "target", "match", "expected"],
719
+ "properties": {
720
+ "id": { "$ref": "#/$defs/stepId" }, "driver": { "const": "ui" },
721
+ "action": { "const": "assert_each_text" }, "covers": { "$ref": "#/$defs/covers" }, "source_anchor": { "$ref": "#/$defs/text" },
722
+ "timeout_ms": { "$ref": "#/$defs/timeoutMs" }, "target": { "$ref": "#/$defs/target" },
723
+ "match": { "$ref": "#/$defs/match" }, "expected": { "$ref": "#/$defs/text" },
724
+ "min_count": { "type": "integer", "minimum": 1 },
725
+ "normalize_whitespace": { "type": "boolean" }, "case_sensitive": { "type": "boolean" }
726
+ },
727
+ "description": "Every matched element must satisfy the text assertion; min_count defaults to 1."
728
+ },
729
+ "uiAssertValue": {
730
+ "type": "object",
731
+ "additionalProperties": false,
732
+ "required": ["id", "driver", "action", "target", "match", "expected"],
733
+ "properties": {
734
+ "id": { "$ref": "#/$defs/stepId" }, "driver": { "const": "ui" },
735
+ "action": { "const": "assert_value" }, "covers": { "$ref": "#/$defs/covers" }, "source_anchor": { "$ref": "#/$defs/text" },
736
+ "timeout_ms": { "$ref": "#/$defs/timeoutMs" }, "target": { "$ref": "#/$defs/target" },
737
+ "match": { "$ref": "#/$defs/match" }, "expected": { "type": "string", "maxLength": 4096 },
738
+ "normalize_whitespace": { "type": "boolean" }, "case_sensitive": { "type": "boolean" }
739
+ },
740
+ "description": "Asserts the current value of exactly one input, textarea, or select; empty expected is allowed."
741
+ },
731
742
  "uiAssertUrl": {
732
743
  "type": "object",
733
744
  "additionalProperties": false,
@@ -751,6 +762,7 @@
751
762
  "covers": {
752
763
  "$ref": "#/$defs/covers"
753
764
  },
765
+ "source_anchor": { "$ref": "#/$defs/text" },
754
766
  "timeout_ms": {
755
767
  "$ref": "#/$defs/timeoutMs"
756
768
  },
@@ -783,6 +795,7 @@
783
795
  "covers": {
784
796
  "$ref": "#/$defs/covers"
785
797
  },
798
+ "source_anchor": { "$ref": "#/$defs/text" },
786
799
  "timeout_ms": {
787
800
  "$ref": "#/$defs/timeoutMs"
788
801
  },
@@ -824,6 +837,8 @@
824
837
  {
825
838
  "$ref": "#/$defs/uiAssertText"
826
839
  },
840
+ { "$ref": "#/$defs/uiAssertEachText" },
841
+ { "$ref": "#/$defs/uiAssertValue" },
827
842
  {
828
843
  "$ref": "#/$defs/uiAssertUrl"
829
844
  },