@chamba/core 0.6.2 → 0.7.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  /** The roles a model can play when the editor delegates work. */
4
- type AgentRole = 'orchestrator' | 'planner' | 'reviewer' | 'implementer' | 'tester' | 'summarizer' | 'researcher';
4
+ type AgentRole = 'orchestrator' | 'planner' | 'reviewer' | 'implementer' | 'tester' | 'qa' | 'summarizer' | 'researcher';
5
5
  /** Canonical order — this is also the order the install wizard walks. */
6
6
  declare const AGENT_ROLES: readonly AgentRole[];
7
7
  /**
package/dist/index.js CHANGED
@@ -12,6 +12,8 @@ var DEFAULT_CONFIG = {
12
12
  implementer: { model: "claude-sonnet-4-6", effort: "medium", reasoning_priority: "balanced" },
13
13
  // Tests over already-implemented code; same profile as the implementer.
14
14
  tester: { model: "claude-sonnet-4-6", effort: "medium", reasoning_priority: "balanced" },
15
+ // Acceptance QA: reasons about criteria and drives the running app. Capable model.
16
+ qa: { model: "claude-opus-4-7", effort: "high", reasoning_priority: "thoroughness" },
15
17
  // Summaries are mechanical; a fast, cheap model is perfect.
16
18
  summarizer: { model: "claude-haiku-4-5", effort: "low", reasoning_priority: "speed" },
17
19
  // Research and synthesis; high reasoning, but doesn't need Opus 4.8.
@@ -26,6 +28,7 @@ var AGENT_ROLES = [
26
28
  "reviewer",
27
29
  "implementer",
28
30
  "tester",
31
+ "qa",
29
32
  "summarizer",
30
33
  "researcher"
31
34
  ];
@@ -41,6 +44,7 @@ var ROLE_DESCRIPTIONS = {
41
44
  reviewer: "Audits the plan and code with critical judgement.",
42
45
  implementer: "Writes code against a clear, reviewed spec.",
43
46
  tester: "Writes and runs tests over already-implemented code.",
47
+ qa: "Acceptance QA: exercises the running app and validates acceptance criteria.",
44
48
  summarizer: "Summarizes what happened \u2014 mechanical, cheap.",
45
49
  researcher: "Investigates context, reads docs, synthesizes."
46
50
  };
@@ -676,6 +680,7 @@ var PLACEHOLDER_RE = /\b(todo|tbd|fixme|placeholder)\b/i;
676
680
  var DELETION_RE = /\b(delete[ds]?|deleting|remove[ds]?|removing|removal|drop(?:ping|s|ped)?|eliminat\w*|deprecat\w*|elimina\w*|borra\w*|quita\w*)\b/i;
677
681
  var ORPHAN_CHECK_RE = /\b(orphan\w*|dead[-\s]?code|unused\s+(?:export|import|symbol|function|code|reference)|referential|callers?|knip|ts-prune|depcheck|type-?check|typecheck|tsc|build\s+(?:passes|green|clean))\b/i;
678
682
  var RESOLVED_MARKER_RE = /\b(answers?|answered|resolved|resuelt\w*|respuesta|respondid\w*|decidid\w*|confirmed|confirmad\w*)\b|→|=>/i;
683
+ var FRONTEND_RE = /\b(react|vue|angular|next\.?js|nextjs|svelte|frontend|front-end|user interface|screen|browser)\b|\bUI\b|\.(tsx|jsx|vue|svelte)\b/i;
679
684
  var DEFAULT_MODULES = /* @__PURE__ */ new Set([
680
685
  "packages",
681
686
  "examples",
@@ -788,6 +793,17 @@ function validatePlan(input) {
788
793
  'Resolve the "Open questions" with the human (or mark each one answered) before creating worktrees.'
789
794
  );
790
795
  }
796
+ const hasQaSection = hasSection(sec, "qa plan") || hasSection(sec, "qa") || hasSection(sec, "acceptance test") || hasSection(sec, "manual test");
797
+ if (FRONTEND_RE.test(plan) && !hasQaSection) {
798
+ issues.push({
799
+ code: "missing-qa-plan",
800
+ severity: "warning",
801
+ message: 'The plan looks user-facing but has no "## QA plan": how to seed data, which users/URL to test with, and the acceptance criteria to walk through the running app.'
802
+ });
803
+ suggestions.push(
804
+ 'Add a "## QA plan" (seed, test users, URL, login steps, expected behaviour per acceptance criterion) so the qa agent can validate it.'
805
+ );
806
+ }
791
807
  return { issues, suggestions, riskFlags };
792
808
  }
793
809
  function sections(plan) {
@@ -810,6 +826,12 @@ function getSection(map, name) {
810
826
  }
811
827
  return [];
812
828
  }
829
+ function hasSection(map, name) {
830
+ for (const heading of map.keys()) {
831
+ if (heading.includes(name)) return true;
832
+ }
833
+ return false;
834
+ }
813
835
  function listItems(lines) {
814
836
  const items = [];
815
837
  for (const line of lines) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chamba/core",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "Core logic for chamba: workspace scanner, plan + heuristic reviewer, git worktrees, Obsidian, memory — no Node APIs, no LLM",
5
5
  "license": "MIT",
6
6
  "type": "module",