@mytegroupinc/myte-core 0.0.19 → 0.0.21

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 (3) hide show
  1. package/README.md +15 -142
  2. package/cli.js +1043 -49
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,151 +1,24 @@
1
1
  # @mytegroupinc/myte-core
2
2
 
3
- Internal implementation package for the `myte` CLI.
3
+ Implementation package for the `myte` CLI.
4
4
 
5
- Most users should install the unscoped wrapper instead:
6
- - `npm install myte` then `npx myte ai "Explain this repository"`
7
- - `npm install myte` then `npx myte ai "Return a JSON object with risks and next_steps" --json-response`
8
- - `npm install myte` then `npx myte bootstrap`
9
- - `npm install myte` then `npx myte run-qaqc --mission-ids M001 --wait --sync`
10
- - `npm install myte` then `npx myte mission status --mission-ids M001 --status done`
11
- - `npm install myte` then `npx myte sync-qaqc`
12
- - `npm install myte` then `npx myte feedback-sync`
13
- - `npm install myte` then `npx myte suggestions sync`
14
- - `npm install myte` then `npx myte suggestions create`
15
- - `npm install myte` then `npx myte suggestions revise`
16
- - `npm install myte` then `npx myte suggestions review`
17
- - `npm install myte` then `npx myte query "..." --with-diff`
18
- - `npm install myte` then `npm exec myte -- query "..." --with-diff`
19
- - `npm install myte` then `npx myte update-team "Backend deploy completed; QAQC rerun queued."`
20
- - `npm install myte` then `npx myte update-owner --subject "QAQC progress" --body-file ./updates/owner.md`
21
- - `npm install myte` then `npx myte update-client --subject "Weekly client update" --body-file ./updates/week-12.md`
22
- - `npm i -g myte` then `myte bootstrap`
23
- - `npm i -g myte` then `myte run-qaqc --mission-ids M001 --wait --sync`
24
- - `npm i -g myte` then `myte mission status --mission-ids M001 --status done`
25
- - `npm i -g myte` then `myte sync-qaqc`
26
- - `npm i -g myte` then `myte feedback-sync`
27
- - `npm i -g myte` then `myte suggestions sync`
28
- - `npm i -g myte` then `myte suggestions create`
29
- - `npm i -g myte` then `myte suggestions revise`
30
- - `npm i -g myte` then `myte suggestions review`
31
- - `npm i -g myte` then `myte query "..." --with-diff`
32
- - `npm i -g myte` then `myte update-team "Backend deploy completed; QAQC rerun queued."`
33
- - `npm i -g myte` then `myte update-owner --subject "QAQC progress" --body-file ./updates/owner.md`
34
- - `npm i -g myte` then `myte update-client --subject "Weekly client update" --body-file ./updates/week-12.md`
35
- - `npx myte@latest bootstrap`
36
- - `npx myte@latest run-qaqc --mission-ids M001 --wait --sync`
37
- - `npx myte@latest mission status --mission-ids M001 --status done`
38
- - `npx myte@latest sync-qaqc`
39
- - `npx myte@latest feedback-sync`
40
- - `npx myte@latest suggestions sync`
41
- - `npx myte@latest suggestions create`
42
- - `npx myte@latest suggestions revise`
43
- - `npx myte@latest suggestions review`
44
- - `npx myte@latest query "..." --with-diff`
45
- - `npx myte@latest update-team "Backend deploy completed; QAQC rerun queued."`
46
- - `npx myte@latest update-owner --subject "QAQC progress" --body-file ./updates/owner.md`
47
- - `npx myte@latest update-client --subject "Weekly client update" --body-file ./updates/week-12.md`
48
- - `npm install myte` then `npx myte create-prd ./drafts/auth-prd.md`
49
- - `npm install myte` then `npx myte create-prd ./drafts/auth-prd.md ./drafts/billing-prd.md`
50
- - `cat ./drafts/auth-prd.md | npx myte create-prd --stdin`
5
+ Most users should install the public wrapper instead:
51
6
 
52
- Requirements:
53
- - Node `18+`
54
- - macOS, Linux, or Windows
55
- - `git` in `PATH` for `--with-diff`
56
- - `MYTEAI_API_KEY=<inference_api_key>` in env or `.env` for `myte ai`
57
- - `MYTE_API_KEY=<project_api_key>` in env or `.env`
58
- - repo folder names must match the project repo names configured in Myte, including casing on case-sensitive filesystems
7
+ - `npm install myte`
8
+ - run with `npx myte ...`
59
9
 
60
- Notes:
61
- - `npm install myte` installs the wrapper locally; use `npx myte` or `npm exec myte -- ...` to run it.
62
- - `npm install myte` means the CLI is available locally; bare `myte ...` still requires a global install.
63
- - `bootstrap` is a local file materialization path, not a hosted file download.
64
- - `bootstrap` expects to run from a wrapper root that contains the project's configured repo folders.
65
- - `bootstrap` writes `MyteCommandCenter/data/project.yml` plus itemized `phases`, `epics`, `stories`, and `missions`.
66
- - `bootstrap` materializes a public Command Center DTO, not raw backend documents.
67
- - `bootstrap` mission cards now include richer execution context like `complexity`, `estimated_hours`, `due_date`, `subtasks`, `technical_requirements`, `resources_needed`, `labels`, and normalized `test_cases`.
68
- - `bootstrap` excludes internal keys like `_id`, `org_id`, `project_id`, `created_by`, `assigned_to`, and raw `qa_qc_results`.
69
- - rerunning current commands on an older workspace automatically prunes legacy artifacts like `bootstrap-manifest.json`, `data/qaqc/`, and `data/feedback/` as the new files are written.
70
- - `run-qaqc` queues QAQC for up to 10 explicit mission ids through `/api/project-assistant/run-qaqc`.
71
- - On PowerShell, quote comma-separated multi-id values: `--mission-ids "M001,M002"`.
72
- - `run-qaqc --wait` polls `/api/project-assistant/run-qaqc/<batch_id>` until the batch is terminal.
73
- - `run-qaqc --sync` refreshes `MyteCommandCenter/data/qaqc.yml` after a completed batch.
74
- - `mission status` updates one or many mission business ids through `/api/project-assistant/mission-status-update`.
75
- - `mission status` normalizes status aliases like `todo`, `in_progress`, and `done`, then sends the canonical mission status values `Todo`, `In Progress`, or `Done`.
76
- - `mission status` updates only the mission `status` field used by the app. It does not run QAQC and it does not rewrite `MyteCommandCenter/data/qaqc.yml`.
77
- - project-key QAQC runs through the dedicated `project_api_qaqc` queue inside the existing Celery service, with a global budget of `20` dispatch starts/minute and `20` live jobs.
78
- - a saturated `run-qaqc --wait` batch can take roughly `5-10` minutes before `--sync` has final data to write.
79
- - `sync-qaqc` works without `bootstrap`; it creates `MyteCommandCenter/data/qaqc.yml` automatically if missing.
80
- - `sync-qaqc` writes the active mission QAQC working set to `MyteCommandCenter/data/qaqc.yml`.
81
- - `sync-qaqc` only exports active `Todo` / `In Progress` missions plus a public QAQC summary and sanitized latest batch metadata.
82
- - `sync-qaqc` keeps QAQC state in one deterministic file so the working set grows and shrinks with current active-mission reality.
83
- - `sync-qaqc` fully rewrites `MyteCommandCenter/data/qaqc.yml` on every sync and does not delete `MyteCommandCenter/data/missions/*.yml`.
84
- - `feedback-sync` writes one deterministic feedback snapshot under `MyteCommandCenter/data/feedback.yml`.
85
- - `feedback-sync` defaults to pending feedback unless `--status` is provided.
86
- - `feedback-sync` keeps feedback metadata plus comment turns in `MyteCommandCenter/data/feedback.yml`.
87
- - `feedback-sync` writes full PRD context into `MyteCommandCenter/PRD/feedback-sync/*.md` and points to those files from `feedback.yml`.
88
- - `feedback-sync` fully replaces the feedback-owned sync file to avoid stale local feedback noise.
89
- - `feedback-sync` fully rewrites `MyteCommandCenter/data/feedback.yml` on every sync and does not delete `MyteCommandCenter/data/missions/*.yml`.
90
- - `suggestions sync` writes one merge-safe workflow file at `MyteCommandCenter/data/mission-ops.yml`.
91
- - `suggestions sync` should be the first step before ideating locally so new submissions start from the latest aggregated thread state.
92
- - `suggestions sync` rewrites the canonical synced state into `threads[]` and preserves top-level `workspace.<actor_scope>` blocks plus per-thread `workspace.<actor_scope>` drafts from the existing file.
93
- - synced `threads[]` include aggregate diffs, conflict summaries, and archived decision lineage so local agents do not need to reconstruct review state.
94
- - `suggestions create` reads a structured file payload or local `workspace.<actor_scope>.draft_submissions[]` blocks from `mission-ops.yml`.
95
- - `suggestions revise` reads structured file payloads or local per-thread `workspace.<actor_scope>` drafts only when `draft_status` is `submit`, `ready`, or `pending_submit`.
96
- - `suggestions review` is owner-only, reads structured file payloads or local per-thread owner review intent, and refreshes `data/missions/*.yml` when approvals apply changes.
97
- - `suggestions review` requires an explicit `review_action` of `request_changes`, `approve`, or `reject`; there is no persisted save-draft review action.
98
- - suggestion notifications deep-link into the project Reviews workspace for the affected thread.
99
- - create/revise/review resync `mission-ops.yml` by default unless `--no-sync` is passed.
100
- - create/revise/review automatically send `X-Idempotency-Key` and a default `client_session_id` so retries stay deterministic and auditable.
101
- - `--print-context` prints the JSON payload that would be submitted for create/revise/review.
102
- - `mission-ops.yml` keeps synced thread lineage plus actor-local draft space in one file; terminal items fall out of `queue` after sync but remain in `threads[]`.
103
- - `create-prd` is the deterministic PRD upload path, not an LLM generation command.
104
- - `update-team` creates a project comment through `/api/project-assistant/project-comment`.
105
- - `update-owner` sends a direct owner email through `/api/project-assistant/update-owner`.
106
- - `update-owner` requires `--subject` plus body markdown from `--body-markdown`, `--body-file`, positional input, or `--stdin`.
107
- - `update-client` creates a client update draft through `/api/project-assistant/client-update-drafts`.
108
- - `update-client` requires `--subject` plus body markdown from `--body-markdown`, `--body-file`, positional input, or `--stdin`.
109
- - `update-client` accepts optional `--target-contact-id` repeats or `--target-contact-ids <id1,id2>`.
110
- - If no linked client contacts exist, the backend falls back to the project owner for internal projects.
111
- - `--with-diff` only searches repo folders whose names match the project repo names configured in Myte.
112
- - `--with-diff` includes per-repo diagnostics in `print-context` payload:
113
- - missing repo directories
114
- - per-repo errors (for example fetch or command failures)
115
- - clean/no-change repo summaries
116
- - `--with-diff` query payload includes `diff_diagnostics` so backend/UI can report exactly why context may be missing.
10
+ This package exists so the public wrapper can stay small and versioned cleanly. It is not the recommended public install target.
117
11
 
118
- Deterministic `create-prd` contract:
119
- - Required: `MYTE_API_KEY`, a PRD markdown body, and a title.
120
- - Accepts one file or many files per command. The CLI uses `/project-assistant/create-prd` for one item and automatically uses the batch upload path for multi-file requests.
121
- - Title source: `myte-kanban.title`, the first markdown `# Heading`, or `--title`.
122
- - Description source: `myte-kanban.description` or `--description`.
123
- - The markdown body (`prd_markdown`, or the body portion of `ticket_markdown`) is stored verbatim as PRD content and is what the backend uses to build the PRD DOCX.
124
- - Legacy `feedback_text` is still accepted for older payloads, but new callers should use `description`.
125
- - Optional structured fields: `priority`, `status`, `tags`, `assigned_user_email`, `assigned_user_id`, `due_date`, `repo_name`, `repo_id`, `preview_url`, `source`.
12
+ ## Requirements
126
13
 
127
- Examples:
128
- - `npx myte ai "Explain what this project does"`
129
- - `npx myte ai "Return a JSON object with risks and next_steps" --json-response`
130
- - `npx myte bootstrap`
131
- - `npx myte run-qaqc --mission-ids "M001,M002" --wait --sync`
132
- - `npx myte mission status --mission-ids "M001,M002" --status done`
133
- - `npx myte sync-qaqc`
134
- - `npx myte feedback-sync`
135
- - `npx myte suggestions sync`
136
- - `npx myte suggestions create --file ./changes/create.yml`
137
- - `npx myte suggestions create`
138
- - `npx myte suggestions revise`
139
- - `npx myte suggestions review`
140
- - `npx myte bootstrap --dry-run --json`
141
- - `npx myte sync-qaqc --dry-run --json`
142
- - `npx myte create-prd ./drafts/auth-prd.md --description "Short card summary"`
143
- - `npx myte create-prd ./drafts/auth-prd.md ./drafts/billing-prd.md`
144
- - `npx myte create-prd ./drafts/auth-prd.md --print-context`
145
- - `npx myte update-team "Backend deploy completed; QAQC rerun queued."`
146
- - `npx myte update-owner --subject "QAQC progress" --body-file ./updates/owner.md`
147
- - `npx myte update-client --subject "Weekly client update" --body-file ./updates/week-12.md`
14
+ - Node `18+`
15
+ - `MYTE_API_KEY` for project-scoped commands
16
+ - `MYTEAI_API_KEY` for `myte ai`
17
+ - `git` only when using `query --with-diff`
148
18
 
149
- This package is published under the org scope for governance; the public `myte` wrapper delegates here.
19
+ ## Behavior Summary
150
20
 
151
- `--json-response` sends both the Myte convenience flag (`myte_json_response: true`) and the OpenAI-compatible chat-completions shape (`response_format: { type: "json_object" }`). On the public developer API, that strict-JSON path also defaults to `medium` reasoning unless the caller explicitly overrides reasoning.
21
+ - Snapshot-style commands such as `bootstrap`, `sync-qaqc`, `feedback-sync`, and `suggestions sync` write local `MyteCommandCenter` data.
22
+ - `feedback status|edit|assign|archive` writes reviewable local YAML artifacts, while `feedback validate|apply` sends those artifacts to the backend so business rules stay server-side.
23
+ - `query --with-diff` requires project repos to be configured for diff collection and fails fast when no matching local project repo can be resolved.
24
+ - Public package documentation is intentionally minimal. Internal rollout and design notes are not part of the npm package contract.