@mytegroupinc/myte-core 0.0.24 → 0.0.27
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 +105 -0
- package/cli.js +484 -126
- package/package.json +4 -5
- package/scripts/mission-live-disposable-harness.js +226 -0
- package/scripts/mission-live-full-harness.js +824 -0
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ This package exists so the public wrapper can stay small and versioned cleanly.
|
|
|
15
15
|
- `MYTE_API_KEY` for project-scoped commands
|
|
16
16
|
- `MYTEAI_API_KEY` for `myte ai`
|
|
17
17
|
- `git` only when using `query --with-diff`
|
|
18
|
+
- No runtime npm dependencies. The CLI uses Node 18+ built-ins for env loading, argument parsing, HTTP, and local context serialization.
|
|
18
19
|
|
|
19
20
|
## Behavior Summary
|
|
20
21
|
|
|
@@ -25,6 +26,109 @@ This package exists so the public wrapper can stay small and versioned cleanly.
|
|
|
25
26
|
- `query --with-diff` requires project repos to be configured for diff collection and fails fast when no matching local project repo can be resolved.
|
|
26
27
|
- Public package documentation is intentionally minimal. Internal rollout and design notes are not part of the npm package contract.
|
|
27
28
|
|
|
29
|
+
## Agent Usage Contract
|
|
30
|
+
|
|
31
|
+
Coding agents should treat `MYTE_API_KEY` as a project-scoped Project Assistant key:
|
|
32
|
+
|
|
33
|
+
- Load it from the workspace `.env` or environment. `MYTE_PROJECT_API_KEY` is accepted as a compatibility fallback.
|
|
34
|
+
- Call `myte config --json` first when project identity or local repo detection is uncertain.
|
|
35
|
+
- Hydrate mission context with `bootstrap` first instead of scraping the web UI. `bootstrap` writes mission cards and mission suggestion thread state.
|
|
36
|
+
- Use `suggestions sync` only when you need to refresh mission review-thread state without refreshing the full board.
|
|
37
|
+
- Use `query --with-diff` for project-scoped code review, planning, and implementation questions.
|
|
38
|
+
- Use `create-prd` only with reviewed markdown files. The markdown file body is the PRD document; `description` is only the short board/card summary.
|
|
39
|
+
- Use `feedback status|edit|assign|archive` for reviewable local artifacts, `feedback submit` for owner review, and `feedback review` for owner/delegate decisions.
|
|
40
|
+
- Use `suggestions create` for both existing-mission edits and new-mission proposals. The only valid `change_type` values are `update` and `create`.
|
|
41
|
+
- Use `suggestions revise` only against an existing `suggestion_id`; do not send `change_type` on revisions because the backend keeps the thread's original type.
|
|
42
|
+
- Use `suggestions review` for owner/elevated mission-review decisions: `approve`, `request_changes`, or `reject`.
|
|
43
|
+
- Use `mission archive` for project-key lifecycle archival. Do not send `Archived` through `mission status`; restore archived missions from the web archived-board view.
|
|
44
|
+
- Use `feedback move` only when a direct audited state move is intended and include a concrete `--reason`.
|
|
45
|
+
- Use `update-team` when an agent needs to leave a project-level implementation note or verification comment.
|
|
46
|
+
|
|
47
|
+
Do not use `MYTE_API_KEY` against account/JWT web endpoints. The direct project-key surface is `/api/project-assistant/*`.
|
|
48
|
+
|
|
49
|
+
PRD document contract:
|
|
50
|
+
|
|
51
|
+
- Always put the complete PRD in the markdown file passed to `myte create-prd`.
|
|
52
|
+
- `title` maps to the feedback/board title.
|
|
53
|
+
- `description` maps to the short feedback/card summary and must not contain the full PRD.
|
|
54
|
+
- Raw markdown uploads send `{ title, description?, prd_markdown }`.
|
|
55
|
+
- `myte-kanban` uploads send `{ ticket_markdown }`, where the leading JSON block contains metadata and the remaining markdown is the PRD body.
|
|
56
|
+
- The backend stores the markdown as `prd_markdown`, mirrors it as PRD text for search/sync, generates a DOCX attachment from it, and marks `prd_format=markdown`.
|
|
57
|
+
- The UI renders the PRD from stored PRD text/document content, not from `description`.
|
|
58
|
+
|
|
59
|
+
Feedback comment support:
|
|
60
|
+
|
|
61
|
+
- `feedback-sync` includes existing feedback comment turns in local context.
|
|
62
|
+
- Feedback-specific comment creation exists in the web backend at `/api/feedbacks/<feedback_id>/comments`, protected by JWT/project assignment.
|
|
63
|
+
- There is no project-key CLI command for `myte feedback comment` yet. That requires a Project Assistant feedback-comment route plus npm command before agents should rely on it.
|
|
64
|
+
|
|
65
|
+
## Mission Action Map
|
|
66
|
+
|
|
67
|
+
| Action | Command / Surface | Contract |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| Sync mission cards and review threads | `myte bootstrap --json` | Refreshes `MyteCommandCenter/data/missions/*.yml`, project structure, and `MyteCommandCenter/data/mission-ops.yml`. |
|
|
70
|
+
| Sync only mission review threads | `myte suggestions sync --json` | Refreshes `MyteCommandCenter/data/mission-ops.yml` while preserving local workspace drafts. |
|
|
71
|
+
| Suggest edit to existing mission | `myte suggestions create` with `change_type: update` and `mission_id` | Creates or appends to an active review thread; live mission is unchanged until approval. |
|
|
72
|
+
| Suggest new mission | `myte suggestions create` with `change_type: create` | Requires `change_set.title` and `change_set.description`; creates a review thread only; the mission card is created only after approval. |
|
|
73
|
+
| Revise a suggestion | `myte suggestions revise` with `suggestion_id` | Adds another revision to the same thread. Do not include `change_type`. |
|
|
74
|
+
| Review a suggestion | `myte suggestions review` with `review_action: approve|request_changes|reject` | Project Owner or elevated mission-review delegate required. Approval mutates/creates the mission once; reject archives the thread only; request_changes keeps it actionable. |
|
|
75
|
+
| Update mission status | `myte mission status --mission-ids "M001" --status todo|in_progress|done` | Project-key surface updates canonical mission status for active cards and refreshes local bootstrap + mission-ops by default. |
|
|
76
|
+
| Archive mission | `myte mission archive --mission-ids "M001[,M002]" --reason "..."` | Project Owner or elevated delegate required. Sets `Archived`, removes cards from normal bootstrap/board state, writes mission activity, and refreshes local bootstrap + mission-ops by default. |
|
|
77
|
+
|
|
78
|
+
Create payloads:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
items:
|
|
82
|
+
- change_type: update
|
|
83
|
+
mission_id: M001
|
|
84
|
+
change_description: Tighten acceptance criteria
|
|
85
|
+
change_set:
|
|
86
|
+
acceptance_criteria:
|
|
87
|
+
- The API returns a stable error code for invalid input.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
items:
|
|
92
|
+
- change_type: create
|
|
93
|
+
change_description: Add observability mission
|
|
94
|
+
change_set:
|
|
95
|
+
title: Add mission observability
|
|
96
|
+
description: Track mission lifecycle actions with safe audit metadata.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Revise payload:
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
items:
|
|
103
|
+
- suggestion_id: 507f1f77bcf86cd799439302
|
|
104
|
+
expected_revision: 1
|
|
105
|
+
change_description: Revise after review
|
|
106
|
+
change_set:
|
|
107
|
+
description: Updated proposed mission description.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
YAML note: quote scalar values that contain `:` or other YAML-significant punctuation.
|
|
111
|
+
|
|
112
|
+
## Finding Mission And Suggestion IDs
|
|
113
|
+
|
|
114
|
+
Run this first:
|
|
115
|
+
|
|
116
|
+
```powershell
|
|
117
|
+
myte bootstrap --json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Then read:
|
|
121
|
+
|
|
122
|
+
| Needed Value | Local Source |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| Existing mission business id | `MyteCommandCenter/data/missions/*.yml` -> `mission_id`, for example `M001`. |
|
|
125
|
+
| Pending suggestion id | `MyteCommandCenter/data/mission-ops.yml` -> `queue[].suggestion_id` or `threads[].suggestion_id`. |
|
|
126
|
+
| Existing suggestion latest revision | `MyteCommandCenter/data/mission-ops.yml` -> `threads[].latest_revision` or `threads[].latest_server_revision.revision`. |
|
|
127
|
+
| Existing suggestion review revision | `MyteCommandCenter/data/mission-ops.yml` -> `threads[].review_revision`. |
|
|
128
|
+
| Thread type | `MyteCommandCenter/data/mission-ops.yml` -> `threads[].change_type`, either `update` or `create`. |
|
|
129
|
+
|
|
130
|
+
Agent rule: never guess `suggestion_id`. If `mission-ops.yml` is missing or stale, run `myte bootstrap --json` again. Use `myte suggestions sync --json` only for a narrow refresh after a mutation.
|
|
131
|
+
|
|
28
132
|
## Feedback Action Map
|
|
29
133
|
|
|
30
134
|
| Command | What It Does | Governance |
|
|
@@ -72,6 +176,7 @@ Mutation routes:
|
|
|
72
176
|
- `POST /api/project-assistant/query`
|
|
73
177
|
- `POST /api/project-assistant/run-qaqc`
|
|
74
178
|
- `POST /api/project-assistant/mission-status-update`
|
|
179
|
+
- `POST /api/project-assistant/mission-archive`
|
|
75
180
|
- `POST /api/project-assistant/project-comment`
|
|
76
181
|
- `POST /api/project-assistant/update-owner`
|
|
77
182
|
- `POST /api/project-assistant/client-update-drafts`
|