@autonoma-ai/planner 0.1.14-canary.9e91c81 → 0.1.14

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/index.js CHANGED
@@ -4841,10 +4841,10 @@ var init_rubrics = __esm({
4841
4841
  "Are all step verbs valid (click/type/scroll/assert/hover/drag/read/refresh)? Are asserts visual-only (no URLs, network, console)? No code selectors? No login steps?"
4842
4842
  ),
4843
4843
  intentQuality: dimensionResultSchema.describe(
4844
- "Is the intent a specific, falsifiable behavioral claim \u2014 not just 'verify X is visible'?"
4844
+ "Is the intent (the `description` frontmatter field) a specific, falsifiable behavioral claim \u2014 not just 'verify X is visible'?"
4845
4845
  ),
4846
4846
  missionAlignment: dimensionResultSchema.describe(
4847
- "Does the test's intent + steps verify the feature's core purpose? Not just UI appearance."
4847
+ "Does the test's intent (the `description` field) + steps verify the feature's core purpose? Not just UI appearance."
4848
4848
  )
4849
4849
  }),
4850
4850
  systemPrompt: `You are a structural reviewer for E2E test plans. Each test will be executed by a VISUAL agent that sees the screen like a human user \u2014 it cannot inspect code, network, URLs, or any non-visual state.
@@ -4863,13 +4863,13 @@ Your job is to EVALUATE tests against a rubric, NOT to rewrite them. You have to
4863
4863
  - Assertions must reference specific visible text, not vague descriptions ("success indicator", "results are displayed")
4864
4864
 
4865
4865
  ### 2. Intent quality
4866
- Is the intent a specific, falsifiable behavioral claim?
4866
+ Is the intent \u2014 the \`description\` frontmatter field \u2014 a specific, falsifiable behavioral claim?
4867
4867
  FAIL: "When a user clicks the clock icon, the Wait modal should open" (just UI mechanics)
4868
4868
  PASS: "Adding a 5-second wait step should insert a Wait action into the step list with the configured duration"
4869
4869
 
4870
4870
  ### 3. Mission alignment
4871
- Does the test's intent + steps actually verify the feature's core purpose?
4872
- FAIL if the intent just describes UI appearance when the feature is about functionality.
4871
+ Does the test's intent (the \`description\` field) + steps actually verify the feature's core purpose?
4872
+ FAIL if the description just describes UI appearance when the feature is about functionality.
4873
4873
 
4874
4874
  When done reviewing, call finish with your structured evaluation.`
4875
4875
  };
@@ -5479,6 +5479,9 @@ function validateTestContent(content) {
5479
5479
  } else {
5480
5480
  try {
5481
5481
  const { data } = matter4(content);
5482
+ if (!data.description || typeof data.description !== "string" || data.description.length < 20) {
5483
+ errors.push("Missing or insufficient 'description' field in frontmatter \u2014 must state the test's intent as a specific, falsifiable behavioral claim (min 20 chars)");
5484
+ }
5482
5485
  if (!data.verification || typeof data.verification !== "string" || data.verification.length < 20) {
5483
5486
  errors.push("Missing or insufficient 'verification' field in frontmatter \u2014 must describe WHERE to navigate and WHAT to assert at the source of truth");
5484
5487
  }
@@ -5486,9 +5489,6 @@ function validateTestContent(content) {
5486
5489
  errors.push("Failed to parse frontmatter");
5487
5490
  }
5488
5491
  }
5489
- if (!/\*\*Intent\*\*:/.test(content)) {
5490
- errors.push("Missing **Intent**: section");
5491
- }
5492
5492
  const stepMatches = content.match(
5493
5493
  /^\d+\.\s+(click|type|scroll|assert|hover|drag|read|refresh):/gm
5494
5494
  ) || [];
@@ -5573,9 +5573,6 @@ function buildWriteTestTool(state, outputDir) {
5573
5573
  error: `Invalid frontmatter: ${parsed.error.issues.map((i) => i.message).join(", ")}`
5574
5574
  };
5575
5575
  }
5576
- if (!/\*\*Intent\*\*:/.test(input.content)) {
5577
- return { error: "Test must include an **Intent**: section between Setup and Steps describing what behavior is being tested" };
5578
- }
5579
5576
  const allSteps = input.content.match(/^\d+\.\s+(\w+):/gm) || [];
5580
5577
  for (const step of allSteps) {
5581
5578
  const verbMatch = step.match(/^\d+\.\s+(\w+):/);
@@ -5741,8 +5738,7 @@ var init_tools2 = __esm({
5741
5738
  init_validation();
5742
5739
  testFrontmatterSchema = z21.object({
5743
5740
  title: z21.string().min(1),
5744
- description: z21.string().min(1),
5745
- intent: z21.string().min(30, "Intent must be at least 30 characters \u2014 describe the BEHAVIOR being tested, not the steps"),
5741
+ description: z21.string().min(20, "Description must state the test's intent \u2014 a specific, falsifiable behavioral claim (what the user does, what the feature produces, why it matters), not the steps. At least 20 characters."),
5746
5742
  criticality: z21.enum(["critical", "high", "mid", "low"]),
5747
5743
  scenario: z21.string().min(1),
5748
5744
  flow: z21.string().min(1),
@@ -5894,8 +5890,7 @@ Every test file must start with YAML frontmatter:
5894
5890
  \`\`\`yaml
5895
5891
  ---
5896
5892
  title: "Toggle recording stops active session"
5897
- description: "Verify toggling recording OFF stops the session"
5898
- intent: "When the recording toggle is ON (default), clicking it should stop recording and show a confirmation toast"
5893
+ description: "When the recording toggle is ON (default), clicking it should stop recording and show a confirmation toast"
5899
5894
  criticality: critical
5900
5895
  scenario: standard
5901
5896
  flow: "User Settings"
@@ -5905,12 +5900,17 @@ verification: "Refresh the Settings page, assert the recording toggle is in the
5905
5900
 
5906
5901
  ### Frontmatter rules
5907
5902
  - title: Short, descriptive test name
5908
- - description: One sentence explaining what the test verifies
5909
- - intent: A specific, falsifiable claim derived from the feature's MISSION \u2014 what the user does, what the feature produces, and why it matters. Focus on OUTCOMES, not UI mechanics.
5903
+ - description: (REQUIRED \u2014 write tool rejects without it, min 20 chars) The test's INTENT \u2014 a specific, falsifiable claim derived from the feature's MISSION. States what the user does, what should happen, and WHY it matters. This is the test's immutable "what it does" anchor and the "north star" the execution agent uses to adapt if steps don't match reality. Write it BEFORE the steps; if your steps conflict with the description, fix the STEPS. Focus on OUTCOMES, not UI mechanics.
5904
+ The description is NOT "what UI appears" \u2014 it's "what the feature DOES".
5905
+ Include in the description:
5906
+ - The expected INITIAL STATE of relevant elements
5907
+ - The ACTION the user takes
5908
+ - The EXPECTED OUTCOME (what the feature produces, not what UI appears)
5909
+ - Why this matters to the user
5910
5910
  GOOD: "Toggling recording from ON to OFF stops the active session and shows a confirmation toast"
5911
5911
  BAD: "Click the recording toggle" (that's a step, not an intent)
5912
5912
  BAD: "Verify the page displays correctly" (visibility check, not a behavior)
5913
- Derive from the mission: if the mission is "Generate valid config files", every test's intent must be about generating, previewing, or copying config \u2014 not about UI elements appearing.
5913
+ Derive from the mission: if the mission is "Generate valid config files", every test's description must be about generating, previewing, or copying config \u2014 not about UI elements appearing.
5914
5914
  - criticality: One of: critical, high, mid, low
5915
5915
  - scenario: Which scenario this test uses (usually "standard")
5916
5916
  - flow: Which feature/flow this belongs to (must match a feature from AUTONOMA.md)
@@ -5928,17 +5928,7 @@ After frontmatter:
5928
5928
  NEVER write "Login as..." or "Log in" in Setup. The user is ALWAYS already authenticated. Setup only describes WHERE the user is, not authentication.
5929
5929
  NEVER write tests that require navigating to invalid URLs, 404 pages, or error states.
5930
5930
 
5931
- **Intent**: A specific, falsifiable claim derived from the feature's MISSION. States what the user does, what should happen, and WHY it matters. Write this BEFORE writing steps \u2014 it's the "north star" that the execution agent uses to adapt if steps don't match reality.
5932
-
5933
- The intent is NOT "what UI appears" \u2014 it's "what the feature DOES".
5934
-
5935
- Include in your intent:
5936
- - The expected INITIAL STATE of relevant elements
5937
- - The ACTION the user takes
5938
- - The EXPECTED OUTCOME (what the feature produces, not what UI appears)
5939
- - Why this matters to the user
5940
-
5941
- The intent is the source of truth. If your steps conflict with the intent, fix the STEPS.
5931
+ The test's intent lives ONLY in the \`description\` frontmatter field (see Frontmatter rules above) \u2014 write it FIRST as your north star, and do NOT repeat it as an "Intent" section in the body. The body contains only Setup, Steps, Verification, and Expected Result.
5942
5932
 
5943
5933
  **Steps**: Numbered list using ONLY these actions (any other verb is INVALID):
5944
5934
  - click: Click a button, link, or element
@@ -6647,7 +6637,7 @@ Each journey test:
6647
6637
  - Uses EXACT data values from scenarios.md \u2014 NEVER use "Dynamic:", "{variable}", or "e.g."
6648
6638
  - Has criticality: critical
6649
6639
  - Has scenario: standard
6650
- - Includes an **Intent**: section explaining the cross-feature flow being tested
6640
+ - Has a \`description\` frontmatter field stating the cross-feature flow being tested as a specific, falsifiable behavioral claim
6651
6641
  - Verifies that the OUTPUT of one feature is correctly consumed by the NEXT feature
6652
6642
  - Goes in the "journeys" folder
6653
6643