@rpamis/comet 0.4.2 → 0.4.3

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 (72) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +332 -332
  3. package/assets/manifest.json +1 -1
  4. package/assets/skills/comet/scripts/comet-check.mjs +89 -89
  5. package/assets/skills/comet/scripts/comet-guard.mjs +102 -102
  6. package/assets/skills/comet/scripts/comet-hook-router.mjs +106 -106
  7. package/assets/skills/comet/scripts/comet-runtime.mjs +227 -227
  8. package/assets/skills/comet/scripts/comet-state.mjs +124 -124
  9. package/assets/skills/comet-classic/SKILL.md +2 -0
  10. package/assets/skills/comet-classic/reference/scripts.md +8 -0
  11. package/assets/skills/comet-hotfix/SKILL.md +1 -0
  12. package/assets/skills/comet-native/SKILL.md +3 -1
  13. package/assets/skills/comet-native/reference/commands.md +10 -0
  14. package/assets/skills/comet-native/scripts/comet-native-next.mjs +13 -13
  15. package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +31 -31
  16. package/assets/skills/comet-native/scripts/comet-native-show.mjs +26 -26
  17. package/assets/skills/comet-tweak/SKILL.md +1 -0
  18. package/assets/skills-zh/comet-classic/SKILL.md +2 -0
  19. package/assets/skills-zh/comet-classic/reference/scripts.md +2 -0
  20. package/assets/skills-zh/comet-hotfix/SKILL.md +1 -0
  21. package/assets/skills-zh/comet-native/SKILL.md +3 -1
  22. package/assets/skills-zh/comet-native/reference/commands.md +10 -0
  23. package/assets/skills-zh/comet-tweak/SKILL.md +1 -0
  24. package/bin/comet-daemon-router.js +35 -7
  25. package/dist/app/commands/daemon-server.d.ts.map +1 -1
  26. package/dist/app/commands/daemon-server.js +1 -0
  27. package/dist/app/commands/daemon-server.js.map +1 -1
  28. package/dist/app/commands/project-knowledge.d.ts.map +1 -1
  29. package/dist/app/commands/project-knowledge.js +0 -1
  30. package/dist/app/commands/project-knowledge.js.map +1 -1
  31. package/dist/domains/comet-classic/classic-check-snapshot.d.ts +2 -0
  32. package/dist/domains/comet-classic/classic-check-snapshot.d.ts.map +1 -1
  33. package/dist/domains/comet-classic/classic-check-snapshot.js +22 -1
  34. package/dist/domains/comet-classic/classic-check-snapshot.js.map +1 -1
  35. package/dist/domains/comet-native/native-portable-checks.d.ts +1 -0
  36. package/dist/domains/comet-native/native-portable-checks.d.ts.map +1 -1
  37. package/dist/domains/comet-native/native-portable-checks.js +8 -6
  38. package/dist/domains/comet-native/native-portable-checks.js.map +1 -1
  39. package/dist/domains/project-knowledge/corpus.d.ts +5 -0
  40. package/dist/domains/project-knowledge/corpus.d.ts.map +1 -1
  41. package/dist/domains/project-knowledge/corpus.js +34 -9
  42. package/dist/domains/project-knowledge/corpus.js.map +1 -1
  43. package/dist/domains/project-knowledge/index-store.d.ts +5 -2
  44. package/dist/domains/project-knowledge/index-store.d.ts.map +1 -1
  45. package/dist/domains/project-knowledge/index-store.js +95 -52
  46. package/dist/domains/project-knowledge/index-store.js.map +1 -1
  47. package/dist/domains/project-knowledge/local-provider.d.ts.map +1 -1
  48. package/dist/domains/project-knowledge/local-provider.js +14 -3
  49. package/dist/domains/project-knowledge/local-provider.js.map +1 -1
  50. package/dist/domains/project-knowledge/local-store.d.ts +2 -2
  51. package/dist/domains/project-knowledge/local-store.d.ts.map +1 -1
  52. package/dist/domains/project-knowledge/local-store.js +2 -2
  53. package/dist/domains/project-knowledge/local-store.js.map +1 -1
  54. package/dist/domains/project-knowledge/plugin.d.ts.map +1 -1
  55. package/dist/domains/project-knowledge/plugin.js +5 -4
  56. package/dist/domains/project-knowledge/plugin.js.map +1 -1
  57. package/dist/domains/project-knowledge/provider-factory.d.ts.map +1 -1
  58. package/dist/domains/project-knowledge/provider-factory.js +7 -5
  59. package/dist/domains/project-knowledge/provider-factory.js.map +1 -1
  60. package/dist/domains/project-knowledge/types.d.ts +1 -0
  61. package/dist/domains/project-knowledge/types.d.ts.map +1 -1
  62. package/dist/domains/skill/platform-install.d.ts.map +1 -1
  63. package/dist/domains/skill/platform-install.js +31 -3
  64. package/dist/domains/skill/platform-install.js.map +1 -1
  65. package/dist/platform/process/comet-daemon.d.ts.map +1 -1
  66. package/dist/platform/process/comet-daemon.js +1 -0
  67. package/dist/platform/process/comet-daemon.js.map +1 -1
  68. package/dist/platform/process/windows-process-broker.d.ts +12 -0
  69. package/dist/platform/process/windows-process-broker.d.ts.map +1 -0
  70. package/dist/platform/process/windows-process-broker.js +91 -0
  71. package/dist/platform/process/windows-process-broker.js.map +1 -0
  72. package/package.json +1 -1
@@ -34,6 +34,8 @@ After binding the workspace and obtaining phase, read and follow [Task Context a
34
34
 
35
35
  Memory learning submits only reusable user information; never save task summaries, progress, command output, or test results as Personal Memory. Complete the learning check in the task context reference before task completion and record `submitted`, `no-observation`, or `not-run`.
36
36
 
37
+ Project experience and personal preferences are stored separately: before task completion, write project-validated and reusable experience to Project Memory with `comet knowledge remember`; only user preferences and stable collaboration habits go to Personal Memory. See [Task Context and Artifact Language](reference/scripts.md#task-context-and-artifact-language) for the commands and filtering rules.
38
+
37
39
  | Runtime route or phase | Entry and responsibility |
38
40
  | ----------------------------- | --------------------------------------------------------------------------------------------------------------- |
39
41
  | new full / open | `/comet-open`: clarify scope, create required artifacts, and obtain the user's review and confirmation |
@@ -131,6 +131,14 @@ If `<active_policies>` includes `<verification command="...">`, add those comman
131
131
 
132
132
  Use `comet memory remember ... --scope global|project` when the user explicitly asks to retain a preference or project convention long-term. Use `comet memory observe --text "<preference>" --workflow <classic|native> --change <change-id> --candidate-key <change-id>-<behavior-slug>` only for stable collaboration habits reusable across tasks without an explicit request (all three options are required; build `--candidate-key` from the change ID plus a short behavior slug). Neither may store task summaries, progress, command output, or test results.
133
133
 
134
+ Project Memory and Personal Memory are separate. Before every task ends, write project-validated and reusable experience to Project Memory:
135
+
136
+ ```text
137
+ comet knowledge remember <project-root> --title "<concise title>" --text "<symptom, approach, verification>" --type <fact|decision|pattern|procedure|constraint|failure-resolution> --json
138
+ ```
139
+
140
+ The same title updates the existing entry instead of creating a duplicate. Skip the write when nothing is reusable. The project memory index is injected with task context; expand an entry with the same task arguments plus `--expand-context "project-memory:<slug>"`. Never save task summaries, one-off command output, or unverified guesses in Project Memory.
141
+
134
142
  Before every task ends, complete one learning check. If there is a user correction, preference, or collaboration habit with a clear reuse condition, call `comet memory observe` and pass `--learning-check submitted` to the completion command. If you checked and found no qualifying observation, pass `--learning-check no-observation`; if no check was performed, pass `--learning-check not-run`. The first observation creates only a `trial` candidate, while a second independent successful observation from another change may promote it. Use the observation JSON `learning.result` and `status.learning.lastCheck` to diagnose the result.
135
143
 
136
144
  After actually using an item and learning its result, take `applications[].applicationId` from JSON (or `application_id` from Hook text) and run `comet task <project-root> --task "<original user request>" --application "<application-id>" --outcome used-successfully|ignored|overridden|corrected|contributed-to-failure --json`. Report outcomes truthfully; never mark unused items as successfully used. At task end, still run `comet task` with `--complete --workflow <workflow> --change <change-id> --learning-check submitted|no-observation|not-run` to record the checkpoint.
@@ -35,6 +35,7 @@ After entering the hotfix workspace and reading current `phase`, run `comet task
35
35
 
36
36
  - Add only returned `text` to the current context. Context Manifest (`manifest` / `<context_manifest>`) contains only summaries, application reasons, and stable IDs. Add `--expand-context "<id>"` when source text, provenance, or validation details are needed. When path, operation, or phase changes, select applicable entries again using the same `--session`.
37
37
  - Use `comet memory remember ... --scope global|project` when the user explicitly asks for long-term memory. Use `comet memory observe` only for implicit, reusable, stable collaboration patterns. Do not save task summaries, progress, command output, or test results.
38
+ - Before task completion, write project-validated and reusable experience to Project Memory with `comet knowledge remember <project-root> --title "<concise title>" --text "<symptom, approach, verification>" --type <fact|decision|pattern|procedure|constraint|failure-resolution> --json`. The same title updates the existing entry; skip the write when nothing is reusable, and never save task summaries, one-off command output, or unverified guesses in Project Memory.
38
39
  - After actually using an entry and determining its outcome, take `applications[].applicationId` (`application_id` in Hook text) and run `comet task <project-root> --task "<original-user-request>" --application "<application-id>" --outcome used-successfully|ignored|overridden|corrected|contributed-to-failure --json` to record the result.
39
40
  - Before task completion, complete one learning check: when a user correction, preference, or collaboration habit has a clear reuse condition, call `comet memory observe` and pass `--learning-check submitted` to the completion command; pass `--learning-check no-observation` when you checked and found none, or `--learning-check not-run` when no check occurred. Use observation JSON `learning.result` and `status.learning.lastCheck` to distinguish candidate, promotion, deduplication, and skip; do not submit task summaries or test results.
40
41
  - At task completion, still run `comet task` with `--complete --workflow <workflow> --change <change-id> --learning-check submitted|no-observation|not-run`. Without Hooks, this Skill uses the same interface. `comet memory context` is a compatibility entry only. Plugin failures do not block the repair.
@@ -20,10 +20,12 @@ Native saves complete requirements, progress, and acceptance results in the proj
20
20
 
21
21
  1. If the name is known, run `comet native select <change-name> --json`. When an active change exists, enter the returned `workspace.projectRoot`; select returns the same discovery and state information as status, so a separate status call is not needed. Otherwise run `comet native status --json`. Let Runtime locate the workspace; ask the user only when multiple workspaces match equally well.
22
22
  2. If there is no matching active change, select isolation and create it using [workspace selection](reference/workspace.md#create-a-change), then enter `preparation.projectRoot`. If preparation fails, preserve any branches and directories already created and address the reported cause.
23
- 3. After entering the workspace and obtaining `phase`, retrieve context once using [memory integration](reference/commands.md#memory-integration). Expand details only when needed, record actual use outcomes, and call `comet task --complete` at the end as specified there.
23
+ 3. After entering the workspace and obtaining `phase`, retrieve context once using [memory integration](reference/commands.md#memory-integration). Expand details only when needed, record actual use outcomes, handle Project Memory and Personal Memory separately at task completion, and call `comet task --complete` as specified there.
24
24
 
25
25
  Never save task summaries, progress, command output, or test results as Personal Memory; complete the learning check.
26
26
 
27
+ Project experience and personal preferences are stored separately: before task completion, write project-validated and reusable experience to Project Memory with `comet knowledge remember`; only user preferences and stable collaboration habits go to Personal Memory. See [memory integration](reference/commands.md#memory-integration) for the commands and completion conditions.
28
+
27
29
  ## Read only what the action needs
28
30
 
29
31
  Read the section for the current action. Follow links within it only when their stated conditions apply; do not load the entire command reference or all references at once.
@@ -22,6 +22,16 @@ Save memory as follows:
22
22
  - Only when the user has not requested long-term memory, but a collaboration practice is stable and reusable in future tasks, call `comet memory observe <project-root> --text "<collaboration practice>" --workflow <workflow> --change <change-id> --candidate-key <stable-topic-key> --json`.
23
23
  - Neither command may save task summaries, implementation progress, command output, or test results.
24
24
 
25
+ ### Project memory
26
+
27
+ Project Memory is separate from Personal Memory. Before task completion, write facts, decisions, patterns, procedures, constraints, or failure resolutions that are verified in the current project and reusable in future tasks:
28
+
29
+ ```text
30
+ comet knowledge remember <project-root> --title "<concise title>" --text "<symptom, approach, verification>" --type <fact|decision|pattern|procedure|constraint|failure-resolution> --json
31
+ ```
32
+
33
+ The same title updates the existing entry instead of creating a duplicate. Skip the write when nothing is reusable. The project memory index is injected with task context; expand one entry with the same task arguments plus `--expand-context "project-memory:<slug>"`. Never save task summaries, one-off command output, or unverified guesses in Project Memory.
34
+
25
35
  Before every task ends, complete one learning check. When the task contains a user correction, preference, or collaboration practice with a clear reuse condition, call `comet memory observe` and then pass `--learning-check submitted` to `comet task ... --complete`. If you checked and found no qualifying observation, pass `--learning-check no-observation`; if no check was performed, pass `--learning-check not-run`. The first observation creates only a `trial` candidate; a second independent successful observation from a different change may promote it. Do not submit a task summary or test result to manufacture a record.
26
36
 
27
37
  The observation JSON `learning.result` reports `candidate-created`, `candidate-promoted`, `deduplicated`, `ignored`, or `skipped`. `status.learning.lastCheck: not-run` means the host did not submit this task's learning check; it does not mean that no reusable information exists.