@mindfoldhq/trellis 0.6.9 → 0.7.0-beta.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.
Files changed (51) hide show
  1. package/dist/cli/index.js +2 -0
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/commands/update.d.ts.map +1 -1
  4. package/dist/commands/update.js +0 -8
  5. package/dist/commands/update.js.map +1 -1
  6. package/dist/commands/workflow.d.ts +6 -0
  7. package/dist/commands/workflow.d.ts.map +1 -1
  8. package/dist/commands/workflow.js +124 -0
  9. package/dist/commands/workflow.js.map +1 -1
  10. package/dist/configurators/workflow.d.ts +0 -14
  11. package/dist/configurators/workflow.d.ts.map +1 -1
  12. package/dist/configurators/workflow.js +1 -37
  13. package/dist/configurators/workflow.js.map +1 -1
  14. package/dist/migrations/manifests/0.6.10.json +9 -0
  15. package/dist/migrations/manifests/0.7.0-beta.0.json +9 -0
  16. package/dist/templates/claude/settings.json +22 -0
  17. package/dist/templates/codex/agents/trellis-check.toml +7 -5
  18. package/dist/templates/codex/agents/trellis-implement.toml +7 -5
  19. package/dist/templates/codex/agents/trellis-research.toml +13 -8
  20. package/dist/templates/codex/hooks/session-start.py +20 -1
  21. package/dist/templates/codex/hooks.json +25 -0
  22. package/dist/templates/copilot/hooks/session-start.py +20 -1
  23. package/dist/templates/opencode/plugins/inject-workflow-state.js +111 -10
  24. package/dist/templates/pi/extensions/trellis/index.ts.txt +4 -3
  25. package/dist/templates/shared-hooks/index.d.ts +5 -1
  26. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  27. package/dist/templates/shared-hooks/index.js +10 -1
  28. package/dist/templates/shared-hooks/index.js.map +1 -1
  29. package/dist/templates/shared-hooks/inject-spec-context.py +840 -0
  30. package/dist/templates/shared-hooks/inject-subagent-context.py +4 -3
  31. package/dist/templates/shared-hooks/inject-workflow-state.py +35 -9
  32. package/dist/templates/shared-hooks/session-start.py +22 -1
  33. package/dist/templates/trellis/config.yaml +47 -0
  34. package/dist/templates/trellis/index.d.ts +4 -3
  35. package/dist/templates/trellis/index.d.ts.map +1 -1
  36. package/dist/templates/trellis/index.js +7 -3
  37. package/dist/templates/trellis/index.js.map +1 -1
  38. package/dist/templates/trellis/scripts/add_session.py +0 -45
  39. package/dist/templates/trellis/scripts/common/active_task.py +5 -2
  40. package/dist/templates/trellis/scripts/common/config.py +18 -0
  41. package/dist/templates/trellis/scripts/common/git_context.py +34 -2
  42. package/dist/templates/trellis/scripts/common/paths.py +28 -0
  43. package/dist/templates/trellis/scripts/common/spec_inject.py +439 -0
  44. package/dist/templates/trellis/scripts/common/spec_match.py +395 -0
  45. package/dist/templates/trellis/scripts/common/task_context.py +10 -8
  46. package/dist/templates/trellis/scripts/common/task_store.py +30 -0
  47. package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -2
  48. package/dist/templates/trellis/scripts/common/workflow_selection.py +177 -0
  49. package/dist/templates/trellis/scripts/task.py +82 -0
  50. package/package.json +2 -2
  51. package/dist/templates/trellis/gitattributes.txt +0 -9
@@ -38,6 +38,10 @@ function readTemplate(relativePath) {
38
38
  * (per-turn breadcrumb), and `inject-subagent-context.py` (sub-agent
39
39
  * spawn). The scripts emit a plain-text Kiro branch — Kiro adds a hook's
40
40
  * stdout directly to the conversation context (no JSON envelope).
41
+ * - `inject-spec-context.py` — path-scoped spec injection. Claude Code uses
42
+ * PostToolUse Read/Edit/Write/MultiEdit; Codex uses PreToolUse Edit|Write
43
+ * and parses the native apply_patch payload. Class-2 platforms use
44
+ * `get_context.py --mode spec` pull mode instead.
41
45
  * - Claude Code `statusLine` is intentionally not installed by default.
42
46
  * Users can add their own statusLine command in `.claude/settings.json`,
43
47
  * or opt in to the Trellis one via `trellis init --with-statusline`
@@ -54,13 +58,18 @@ export const SHARED_HOOKS_BY_PLATFORM = {
54
58
  "session-start.py",
55
59
  "inject-workflow-state.py",
56
60
  "inject-subagent-context.py",
61
+ "inject-spec-context.py",
57
62
  ],
58
63
  cursor: [
59
64
  "session-start.py",
60
65
  "inject-shell-session-context.py",
61
66
  "inject-subagent-context.py",
62
67
  ],
63
- codex: ["inject-workflow-state.py", "inject-subagent-context.py"],
68
+ codex: [
69
+ "inject-workflow-state.py",
70
+ "inject-subagent-context.py",
71
+ "inject-spec-context.py",
72
+ ],
64
73
  gemini: ["session-start.py", "inject-workflow-state.py"],
65
74
  qoder: ["session-start.py", "inject-workflow-state.py"],
66
75
  copilot: ["inject-workflow-state.py"],
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAGjC;IACF,MAAM,EAAE;QACN,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,MAAM,EAAE;QACN,kBAAkB;QAClB,iCAAiC;QACjC,4BAA4B;KAC7B;IACD,KAAK,EAAE,CAAC,0BAA0B,EAAE,4BAA4B,CAAC;IACjE,MAAM,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IACxD,KAAK,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IACvD,OAAO,EA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