@odla-ai/cli 0.48.4 → 0.49.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/README.md CHANGED
@@ -132,6 +132,7 @@ then read open bugs and recent decisions:
132
132
  npx --yes @odla-ai/cli@latest pm project list --app <productId>
133
133
  npx --yes @odla-ai/cli@latest pm project add --app <productId> --name "My project"
134
134
  npx --yes @odla-ai/cli@latest pm project use <projectId>
135
+ npx --yes @odla-ai/cli@latest pm brief --app <appId> --project <projectId>
135
136
  npx --yes @odla-ai/cli@latest pm next --app <appId> --project <projectId>
136
137
  npx --yes @odla-ai/cli@latest pm handoff --app <appId>
137
138
  npx --yes @odla-ai/cli@latest pm watch --app <appId> --entity task --jsonl
@@ -142,7 +143,11 @@ npx --yes @odla-ai/cli@latest pm goal list --app <appId> --status open
142
143
  npx --yes @odla-ai/cli@latest pm decision list --app <appId> --limit 20
143
144
  ```
144
145
 
145
- `pm handoff` is the authoritative unresolved-state view: unmet goals, every
146
+ `pm brief` is the bounded agent intake: exact totals, current-principal work,
147
+ the top Ready candidates, only their context goals, and explicit expansion
148
+ commands. `pm next --brief` and `pm handoff --brief` are aliases for that
149
+ projection. `pm handoff` without `--brief` remains the authoritative full
150
+ unresolved-state view: unmet goals, every
146
151
  non-done task, and every open or triaged bug. File bugs with actionable context
147
152
  (`pm bug add ... --description "reproduction/evidence"`); a title-only bug is
148
153
  rejected. When an accepted decision resolves or explicitly retains a bug, link
package/dist/bin.cjs CHANGED
@@ -1777,6 +1777,7 @@ var init_surface = __esm({
1777
1777
  pm: {
1778
1778
  ...PM_ENTITIES,
1779
1779
  project: { list: {}, add: {}, create: {}, use: {}, set: {} },
1780
+ brief: {},
1780
1781
  handoff: {},
1781
1782
  next: {},
1782
1783
  start: {},
@@ -12439,7 +12440,8 @@ Usage:
12439
12440
  odla-ai pm bug list [--app <id>|--platform-wide] [--status <s>] [--severity <s>] [--goal <id>] [--assignee <id>] [--decision <id>] [--q <text>] [--limit <n>] [--offset <n>] [--json]
12440
12441
  odla-ai pm goal add --app <id> --title <t> [--status <s>] [--proof <text>] [--target <pct>] [--mutation-id <id>] [--json]
12441
12442
  odla-ai pm task add --app <id> --title <t> [--column <backlog|ready|doing|review|done>] [--goal <id>|--alignment-decision <id>] [--assignee <id>] [--description <text>|--body <text>] [--acceptance <text>] [--execution <human|agent|either>] [--due <epoch-ms>] [--mutation-id <id>] [--json]
12442
- odla-ai pm next --app <id> [--project <id>] [--verbose] [--json]
12443
+ odla-ai pm brief --app <id> [--project <id>] [--json] [bounded counts + actionable windows]
12444
+ odla-ai pm next --app <id> [--project <id>] [--brief|--verbose] [--json]
12443
12445
  odla-ai pm start --app <id> [<task-id>] [--goal <id>] [--verbose] [--mutation-id <id>] [--json] [claims the top Ready task in one call]
12444
12446
  odla-ai pm watch --app <id> [--cursor <cursor>] [--entity goal|task|decision|bug] [--action created|updated|deleted|comment.created|comment.updated] [--state <state>] [--by <principalId>] [--self <principalId>] [--interval <s>] [--timeout <s>] [--json|--jsonl]
12445
12447
  odla-ai pm task ready <id> --expected-revision <n> [--goal <id>|--alignment-decision <id>] [--description <text>|--body <text>] [--acceptance <text>] [--execution <human|agent|either>] [--mutation-id <id>] [--json]
@@ -12461,7 +12463,7 @@ Usage:
12461
12463
  odla-ai pm <goal|task|decision|bug> comments <id> [--json]
12462
12464
  odla-ai pm <goal|task|decision|bug> history <id> [--limit <n>] [--json]
12463
12465
  odla-ai pm <goal|task|decision|bug> rm <id>
12464
- odla-ai pm handoff --app <id> [--project <id>] [--verbose] [--json]
12466
+ odla-ai pm handoff --app <id> [--project <id>] [--brief|--verbose] [--json]
12465
12467
  odla-ai discuss groups [--json]
12466
12468
  odla-ai discuss list [--app <id>] [--q <text>] [--state open|resolved|all] [--mentions] [--json]
12467
12469
  odla-ai discuss read <topic> [--limit <n> --offset <n>] [--json]
@@ -13797,7 +13799,36 @@ function requireApp(ctx, parsed, command) {
13797
13799
  if (!appId) throw new Error(`pm ${command} needs --app <appId>`);
13798
13800
  return { appId, projectId: stringOpt(parsed.options.project) ?? ctx.projectId };
13799
13801
  }
13802
+ function printBriefingSection(ctx, label, entity, section) {
13803
+ ctx.out.log(`${label}: ${section.shown} shown of ${section.total}`);
13804
+ if (!section.records.length) ctx.out.log("- (none)");
13805
+ else for (const record12 of section.records) printRecord(ctx, entity, record12);
13806
+ if (section.truncated) ctx.out.log(` expand: ${section.expand}`);
13807
+ }
13808
+ async function pmBrief(ctx, parsed) {
13809
+ const { appId, projectId } = requireApp(ctx, parsed, "brief");
13810
+ const q = new URLSearchParams({ app: appId });
13811
+ if (projectId) q.set("project", projectId);
13812
+ const result = await pmRequest(ctx, "GET", `/briefing?${q}`);
13813
+ emit2(ctx, result, () => {
13814
+ ctx.out.log(`${appId}: bounded PM briefing (read only)`);
13815
+ ctx.out.log(
13816
+ `counts: goals ${result.counts.openGoals}; Ready ${result.counts.ready}; active tasks ${result.counts.activeTasks}; Doing ${result.counts.doing}; yours ${result.counts.currentPrincipal}; bugs ${result.counts.openBugs}`
13817
+ );
13818
+ printBriefingSection(ctx, "your current work", "task", result.currentWork);
13819
+ printBriefingSection(ctx, "top Ready", "task", result.ready);
13820
+ printBriefingSection(ctx, "context goals", "goal", result.goals);
13821
+ printBriefingSection(ctx, "open bugs", "bug", result.openBugs);
13822
+ if (result.counts.doing > 0) {
13823
+ ctx.out.log(`doing expansion: ${result.expansions.doing}`);
13824
+ }
13825
+ ctx.out.log(`next: ${result.next}`);
13826
+ ctx.out.log(`monitor: ${result.monitor}`);
13827
+ ctx.out.log(`full handoff: ${result.expandFull}`);
13828
+ });
13829
+ }
13800
13830
  async function pmNext(ctx, parsed) {
13831
+ if (parsed.options.brief === true) return pmBrief(ctx, parsed);
13801
13832
  const { appId, projectId } = requireApp(ctx, parsed, "next");
13802
13833
  const verbose = wantsVerbose(parsed);
13803
13834
  const [goals, tasks] = await Promise.all([
@@ -13834,6 +13865,7 @@ async function pmNext(ctx, parsed) {
13834
13865
  });
13835
13866
  }
13836
13867
  async function pmHandoff(ctx, parsed) {
13868
+ if (parsed.options.brief === true) return pmBrief(ctx, parsed);
13837
13869
  const { appId, projectId } = requireApp(ctx, parsed, "handoff");
13838
13870
  const verbose = wantsVerbose(parsed);
13839
13871
  const [goals, tasks, bugs] = await Promise.all([
@@ -14472,9 +14504,13 @@ async function pmCommand(parsed, deps = {}) {
14472
14504
  rejectWord(["pm", "project"], action3);
14473
14505
  }
14474
14506
  if (word === "next") {
14475
- assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose"], 2);
14507
+ assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose", "brief"], 2);
14476
14508
  return pmNext(await buildContext2(parsed, deps), parsed);
14477
14509
  }
14510
+ if (word === "brief") {
14511
+ assertArgs(parsed, [...COMMON_OPTIONS, "app", "project"], 2);
14512
+ return pmBrief(await buildContext2(parsed, deps), parsed);
14513
+ }
14478
14514
  if (word === "start") {
14479
14515
  assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "goal", "verbose", "mutation-id"], 3);
14480
14516
  return pmStart(await buildContext2(parsed, deps), parsed);
@@ -14496,7 +14532,7 @@ async function pmCommand(parsed, deps = {}) {
14496
14532
  return pmWatch(await buildContext2(parsed, deps), parsed).then(() => void 0);
14497
14533
  }
14498
14534
  if (word === "handoff") {
14499
- assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose"], 2);
14535
+ assertArgs(parsed, [...COMMON_OPTIONS, "app", "project", "verbose", "brief"], 2);
14500
14536
  return pmHandoff(await buildContext2(parsed, deps), parsed);
14501
14537
  }
14502
14538
  const entity = ALIASES[word];