@xera-ai/cli 0.12.3 → 0.13.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.
Files changed (2) hide show
  1. package/dist/index.js +18 -9
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -88,20 +88,29 @@ function pushTicketChecks(checks, cwd, ticket, acFieldConfigured) {
88
88
  return;
89
89
  }
90
90
  const ac = Array.isArray(fm.acceptanceCriteria) ? fm.acceptanceCriteria : [];
91
- if (ac.length === 0) {
92
- const hint = acFieldConfigured ? `jira.fields.acceptanceCriteria is configured but Jira returned no AC for this ticket \u2014 check the ticket in Jira` : `no AC in frontmatter; AC-level coverage will be empty. Set jira.fields.acceptanceCriteria in xera.config.ts if your project stores AC in a dedicated Jira field`;
93
- checks.push({
94
- name: `${ticket}: story.md acceptanceCriteria`,
95
- ok: false,
96
- message: hint
97
- });
98
- } else {
91
+ const source = fm.acceptanceCriteriaSource === "jira-field" || fm.acceptanceCriteriaSource === "body-extraction" || fm.acceptanceCriteriaSource === "none" ? fm.acceptanceCriteriaSource : undefined;
92
+ if (ac.length > 0) {
93
+ const suffix = source ? ` from ${source}` : "";
99
94
  checks.push({
100
95
  name: `${ticket}: story.md acceptanceCriteria`,
101
96
  ok: true,
102
- message: `${ac.length} AC item(s)`
97
+ message: `${ac.length} AC item(s)${suffix}`
103
98
  });
99
+ return;
100
+ }
101
+ let hint;
102
+ if (source === "none") {
103
+ hint = acFieldConfigured ? `jira.fields.acceptanceCriteria is configured but Jira returned no AC for this ticket, and /xera-fetch step 4 found no AC section in the body \u2014 add AC to the Jira ticket` : `AC not in Jira (no custom field configured) and /xera-fetch step 4 found no AC section in the description body \u2014 add AC/DoD to the Jira ticket, or edit story.md frontmatter manually`;
104
+ } else if (source === "body-extraction") {
105
+ hint = `acceptanceCriteriaSource: body-extraction but acceptanceCriteria is empty \u2014 re-run /xera-fetch ${ticket}`;
106
+ } else {
107
+ hint = acFieldConfigured ? `jira.fields.acceptanceCriteria is configured but Jira returned no AC for this ticket \u2014 check the ticket in Jira` : `no AC in frontmatter; AC-level coverage will be empty. Re-run /xera-fetch ${ticket} so step 4 can extract AC from the body (set jira.fields.acceptanceCriteria in xera.config.ts if your project uses a dedicated Jira field)`;
104
108
  }
109
+ checks.push({
110
+ name: `${ticket}: story.md acceptanceCriteria`,
111
+ ok: false,
112
+ message: hint
113
+ });
105
114
  }
106
115
  async function runChecks(cwd, opts = {}) {
107
116
  const checks = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xera-ai/cli",
3
- "version": "0.12.3",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "xera": "./bin/xera"
@@ -15,8 +15,8 @@
15
15
  "typecheck": "tsc --noEmit"
16
16
  },
17
17
  "dependencies": {
18
- "@xera-ai/core": "^0.12.3",
19
- "@xera-ai/skills": "^0.12.3",
18
+ "@xera-ai/core": "^0.13.0",
19
+ "@xera-ai/skills": "^0.13.0",
20
20
  "@clack/prompts": "1.4.0",
21
21
  "cac": "7.0.0",
22
22
  "picocolors": "1.1.1",