agent-scenario-loop 0.1.1 → 0.1.3
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/README.md +15 -9
- package/app/profile-session.ts +98 -4
- package/dist/core/agent-summary.d.ts +3 -2
- package/dist/core/agent-summary.js +44 -2
- package/dist/core/artifact-contract.d.ts +22 -4
- package/dist/core/artifact-contract.js +512 -11
- package/dist/core/comparison.d.ts +57 -3
- package/dist/core/comparison.js +113 -1
- package/dist/core/planner.d.ts +32 -1
- package/dist/core/planner.js +144 -0
- package/dist/core/run-index.d.ts +4 -0
- package/dist/core/run-index.js +55 -1
- package/dist/core/schema-validator.d.ts +1 -0
- package/dist/core/schema-validator.js +1 -0
- package/dist/runner/compare-latest.d.ts +8 -4
- package/dist/runner/compare-latest.js +24 -5
- package/dist/runner/example-android-live.d.ts +10 -1
- package/dist/runner/example-android-live.js +55 -0
- package/dist/runner/example-ios-live.d.ts +10 -1
- package/dist/runner/example-ios-live.js +55 -0
- package/dist/runner/init-project.d.ts +4 -1
- package/dist/runner/init-project.js +26 -4
- package/dist/runner/ios-simctl.d.ts +5 -0
- package/dist/runner/ios-simctl.js +6 -0
- package/dist/runner/live-comparison.d.ts +2 -2
- package/dist/runner/live-comparison.js +2 -1
- package/dist/runner/live-proof-summary.d.ts +5 -4
- package/dist/runner/live-proof-summary.js +12 -2
- package/dist/runner/live-proof.d.ts +3 -2
- package/dist/runner/live-proof.js +9 -2
- package/dist/runner/profile-android.d.ts +5 -0
- package/dist/runner/profile-android.js +148 -24
- package/dist/runner/profile-ios.d.ts +11 -1
- package/dist/runner/profile-ios.js +128 -9
- package/dist/runner/profile-mobile.d.ts +8 -0
- package/dist/runner/profile-mobile.js +267 -28
- package/docs/adapters.md +4 -0
- package/docs/api.md +1 -1
- package/docs/architecture.md +90 -0
- package/docs/authoring.md +7 -1
- package/docs/concepts.md +3 -24
- package/docs/consumer-rehearsal.md +4 -0
- package/docs/contracts.md +30 -100
- package/docs/external-adapter-protocol.md +219 -0
- package/docs/live-proofs.md +83 -2
- package/docs/principles.md +9 -15
- package/examples/mobile-app/README.md +12 -0
- package/examples/mobile-app/runner-manifests/primary-runner.json +1 -0
- package/examples/runners/README.md +1 -0
- package/examples/runners/adb-android.json +1 -0
- package/examples/runners/agent-device-android.json +1 -0
- package/examples/runners/agent-device-ios.json +1 -0
- package/examples/runners/argent-android.json +1 -0
- package/examples/runners/argent-ios.json +1 -0
- package/examples/runners/xcodebuildmcp-ios.json +1 -0
- package/package.json +2 -1
- package/schemas/causal-run.schema.json +85 -2
- package/schemas/comparison.schema.json +130 -2
- package/schemas/external-adapter-message.schema.json +693 -0
- package/schemas/health.schema.json +72 -0
- package/schemas/live-proof-set.schema.json +1 -1
- package/schemas/live-proof.schema.json +14 -6
- package/schemas/manifest.schema.json +442 -1
- package/schemas/runner-capabilities.schema.json +20 -0
- package/schemas/scenario.schema.json +16 -0
- package/templates/primary-runner.json +1 -0
- package/templates/skills/agent-scenario-loop/SKILL.md +93 -0
- package/templates/skills/agent-scenario-loop/references/adoption-checklist.md +17 -0
- package/templates/skills/agent-scenario-loop/references/artifact-interpretation.md +26 -0
|
@@ -331,6 +331,9 @@
|
|
|
331
331
|
"selector": {
|
|
332
332
|
"$ref": "#/$defs/selector"
|
|
333
333
|
},
|
|
334
|
+
"uiContext": {
|
|
335
|
+
"$ref": "#/$defs/uiContext"
|
|
336
|
+
},
|
|
334
337
|
"timeoutMs": {
|
|
335
338
|
"type": "integer",
|
|
336
339
|
"minimum": 1
|
|
@@ -361,6 +364,19 @@
|
|
|
361
364
|
"collectPerfSignals"
|
|
362
365
|
]
|
|
363
366
|
},
|
|
367
|
+
"uiContext": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"enum": [
|
|
370
|
+
"app",
|
|
371
|
+
"systemDialog",
|
|
372
|
+
"notificationShade",
|
|
373
|
+
"externalBrowser",
|
|
374
|
+
"webView",
|
|
375
|
+
"shareSheet",
|
|
376
|
+
"picker",
|
|
377
|
+
"otherApp"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
364
380
|
"selector": {
|
|
365
381
|
"type": "object",
|
|
366
382
|
"additionalProperties": false,
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-scenario-loop
|
|
3
|
+
description: Use Agent Scenario Loop when implementing, debugging, optimizing, or validating mobile app behavior through durable scenarios, Android or iOS live proofs, evidence artifacts, health checks, budgets, or before-and-after comparisons. Do not use for ordinary unit-test-only changes or work unrelated to observable app behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Scenario Loop
|
|
7
|
+
|
|
8
|
+
Use ASL to establish trustworthy evidence about changes to this mobile app.
|
|
9
|
+
|
|
10
|
+
## Discover The Project Contract
|
|
11
|
+
|
|
12
|
+
1. Inspect `package.json` for installed ASL commands and project-owned `asl:*` scripts.
|
|
13
|
+
2. Locate `asl.config.json` or the configured alternative.
|
|
14
|
+
3. Inspect scenario manifests and runner manifests.
|
|
15
|
+
4. Identify the scenario representing the app behavior affected by the task.
|
|
16
|
+
5. Reuse an existing scenario when it expresses the intended behavior.
|
|
17
|
+
|
|
18
|
+
Do not copy runner infrastructure into the application.
|
|
19
|
+
|
|
20
|
+
## Validate Before Execution
|
|
21
|
+
|
|
22
|
+
Run the project validation command configured by the repository. Then validate the selected scenario and execution plan.
|
|
23
|
+
|
|
24
|
+
Stop before live execution when required capabilities are unavailable. Report the missing capability, selected platform, runner, and the command needed to reproduce the failure.
|
|
25
|
+
|
|
26
|
+
## Select The Proof Lane
|
|
27
|
+
|
|
28
|
+
Use fixture proof when validating:
|
|
29
|
+
|
|
30
|
+
- package installation;
|
|
31
|
+
- scenario parsing;
|
|
32
|
+
- artifact contracts;
|
|
33
|
+
- comparison behavior;
|
|
34
|
+
- agent summaries.
|
|
35
|
+
|
|
36
|
+
Use Android or iOS live proof when making claims about actual app behavior. Use both platforms when the task or release gate requires cross-platform evidence.
|
|
37
|
+
|
|
38
|
+
## Interpret Results
|
|
39
|
+
|
|
40
|
+
Read evidence in this order:
|
|
41
|
+
|
|
42
|
+
1. `health.json`
|
|
43
|
+
2. `verdict.json`
|
|
44
|
+
3. `comparison.json`, when present
|
|
45
|
+
4. `agent-summary.md`
|
|
46
|
+
5. supporting raw evidence and captures when diagnosis is needed
|
|
47
|
+
|
|
48
|
+
If health is not passed:
|
|
49
|
+
|
|
50
|
+
- do not trust dependent timing or budget conclusions;
|
|
51
|
+
- classify the failure as execution, environment, instrumentation, lifecycle, or evidence capture;
|
|
52
|
+
- fix or report the evidence problem before claiming a product regression.
|
|
53
|
+
|
|
54
|
+
If health passed but verdict failed:
|
|
55
|
+
|
|
56
|
+
- treat the run as trustworthy evidence of product failure;
|
|
57
|
+
- diagnose the failed budget, event, milestone, or expectation.
|
|
58
|
+
|
|
59
|
+
Only interpret a comparison when ASL considers the baseline compatible.
|
|
60
|
+
|
|
61
|
+
## Non-Negotiable Rules
|
|
62
|
+
|
|
63
|
+
- Run planner validation before expensive device work.
|
|
64
|
+
- Prefer an existing durable scenario over inventing an ad hoc script.
|
|
65
|
+
- Never infer product improvement from unhealthy or partial evidence.
|
|
66
|
+
- Treat passed health plus failed verdict as trustworthy evidence of failure.
|
|
67
|
+
- Do not silently retry and discard failed attempts.
|
|
68
|
+
- Do not change budgets or scenarios merely to turn a failure green.
|
|
69
|
+
- Keep selectors, app identifiers, authentication assumptions, routes, and truth events inside the consuming app.
|
|
70
|
+
- Preserve the artifact directory and cite exact artifact paths in the final report.
|
|
71
|
+
- Use fixture proof for package and contract validation; use live proof for product claims.
|
|
72
|
+
- Avoid adding new runners when an existing capability already satisfies the plan.
|
|
73
|
+
|
|
74
|
+
## Report
|
|
75
|
+
|
|
76
|
+
Include:
|
|
77
|
+
|
|
78
|
+
- scenario ID;
|
|
79
|
+
- platform;
|
|
80
|
+
- run ID;
|
|
81
|
+
- health status;
|
|
82
|
+
- product verdict;
|
|
83
|
+
- comparison status;
|
|
84
|
+
- failed evidence dependencies;
|
|
85
|
+
- relevant artifact paths;
|
|
86
|
+
- recommended next action.
|
|
87
|
+
|
|
88
|
+
Do not summarize a run as simply "passed" or "failed" when health and verdict differ.
|
|
89
|
+
|
|
90
|
+
## References
|
|
91
|
+
|
|
92
|
+
- `references/artifact-interpretation.md`
|
|
93
|
+
- `references/adoption-checklist.md`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Adoption Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when bringing ASL into a consuming app or validating an existing adoption.
|
|
4
|
+
|
|
5
|
+
1. Confirm `agent-scenario-loop` is installed from the registry, not a local tarball or link.
|
|
6
|
+
2. Inspect `package.json` for project-owned `asl:*` scripts.
|
|
7
|
+
3. Locate `asl.config.json` and verify app identifiers, artifact roots, and supported drivers are project-owned.
|
|
8
|
+
4. Inspect scenario manifests under the configured scenario root.
|
|
9
|
+
5. Inspect runner and evidence-provider manifests.
|
|
10
|
+
6. Run the project validation script.
|
|
11
|
+
7. Run the selected scenario's plan check before live device work.
|
|
12
|
+
8. Use fixture/profile proof for package, parsing, and artifact-contract validation.
|
|
13
|
+
9. Use Android or iOS live proof for product behavior claims.
|
|
14
|
+
10. Use both platforms when a release or task requires cross-platform evidence.
|
|
15
|
+
11. Preserve generated artifacts; do not delete failed attempts to make a later run look cleaner.
|
|
16
|
+
12. Cite `health.json`, `verdict.json`, `comparison.json` when present, and `agent-summary.md` in the final report.
|
|
17
|
+
13. Keep selectors, app identifiers, credentials, routes, and truth events in the consuming app, not ASL core.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Artifact Interpretation
|
|
2
|
+
|
|
3
|
+
ASL separates evidence health, product verdict, and comparison status. Keep those meanings distinct.
|
|
4
|
+
|
|
5
|
+
## Read Order
|
|
6
|
+
|
|
7
|
+
1. `health.json`: whether the evidence-producing run completed with enough trustworthy data to interpret downstream artifacts.
|
|
8
|
+
2. `verdict.json`: whether the product behavior satisfied the scenario's expectations, budgets, milestones, and required events.
|
|
9
|
+
3. `comparison.json`: whether a compatible baseline/current pair improved, regressed, stayed unchanged, or remained inconclusive.
|
|
10
|
+
4. `agent-summary.md`: compressed outcome for humans and agents after the structured artifacts are understood.
|
|
11
|
+
|
|
12
|
+
## Health
|
|
13
|
+
|
|
14
|
+
When health is not passed, do not claim product improvement or regression from dependent timing, budget, or comparison artifacts. Classify the issue as execution, environment, instrumentation, lifecycle, or evidence capture.
|
|
15
|
+
|
|
16
|
+
## Verdict
|
|
17
|
+
|
|
18
|
+
Passed health plus failed verdict is trustworthy evidence of a product failure. Diagnose the failed event, milestone, budget, or expectation instead of treating the run as untrusted.
|
|
19
|
+
|
|
20
|
+
## Comparison
|
|
21
|
+
|
|
22
|
+
Only interpret comparison output when ASL selected or accepted a compatible baseline. If no trusted compatible prior exists, keep the current run as evidence and avoid before/after claims.
|
|
23
|
+
|
|
24
|
+
## Reporting
|
|
25
|
+
|
|
26
|
+
Reports must cite exact artifact paths and distinguish health status, product verdict, and comparison status.
|