@mindfoldhq/trellis 0.5.9 → 0.5.10

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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.5.10",
3
+ "description": "Patch: prevent runaway `git add -f .trellis/` on gitignored projects + Pi platform workflow-state injection + Pi pi-subagents project isolation.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(scripts): `add_session.py` and `task.py archive` no longer print a generic `git add .trellis && git commit` fallback when the repo's `.gitignore` excludes `.trellis/`. They now stage only specific Trellis-owned paths (journal, index.md, active task dir, archive subtree) and auto-retry with `git add -f -- <specific-paths>` only on `ignored by` stderr. The warning text explicitly states `Do NOT use \\`git add -f .trellis/\\``, naming `.trellis/.backup-*`, `.trellis/worktrees/`, `.trellis/.template-hashes.json`, `.trellis/.runtime/`, `.trellis/.cache/` as the subpaths users should ignore individually instead. Helper centralized in `templates/trellis/scripts/common/safe_commit.py`.\n- fix(pi): Pi extension now injects `<workflow-state>` breadcrumb on every `input` and `before_agent_start` event, plus a `<session-overview>` block sourced from `.trellis/scripts/get_context.py`. The `subagent` tool registration carries a `promptSnippet` with the `Active task: <path>` dispatch protocol. Pi sessions previously skipped the `task.py create → brainstorm → implement → check` flow because the AI saw no workflow guidance after session start. Closes #249.\n- fix(pi): Project-level `packages[\"npm:pi-subagents\"]` override added to `.pi/settings.json` so a globally-installed `npm:pi-subagents` cannot inject `extensions / skills / prompts / themes` into the current Trellis project. `scrubPiSettings` reverses the override on `trellis uninstall`. Closes #246.",
7
+ "migrations": [],
8
+ "notes": "Patch on top of 0.5.9. Run `trellis update` (no `--migrate` needed). All three fixes auto-apply on next session."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.1",
3
+ "description": "Beta patch: same Codex dispatch fix as 0.5.9 — defaults to inline + workflow.md namespaced into codex-inline / codex-sub-agent.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:** (mirrors 0.5.9)\n- fix(codex): default `codex.dispatch_mode` flipped from `sub-agent` to `inline`. Codex sub-agents run with `fork_turns=\"none\"` isolation and can't inherit the parent session's task context, so they exit silently or recursively dispatch. Inline keeps the main Codex agent in charge so context isn't lost. Set `codex.dispatch_mode: sub-agent` in `.trellis/config.yaml` to opt back into the legacy dispatch flow. Invalid values fall back to inline.\n- fix(workflow): namespace `--platform codex` into virtual platforms `codex-inline` / `codex-sub-agent` so `workflow.md` `[Platform A, B, ...]` blocks render the correct guidance per mode. `inject-workflow-state.py` emits a `<codex-mode>` banner in the per-turn UserPromptSubmit prompt so Codex knows which mode it is in, and `[workflow-state:STATUS-inline]` blocks now drive the breadcrumb path for inline mode.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.0. Run `trellis update` (no `--migrate` needed). Behavior change matches 0.5.9 — if you previously uncommented `dispatch_mode: sub-agent`, that opt-in still routes to the legacy dispatch flow; if commented (the default), behavior switches to inline."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.2",
3
+ "description": "Beta patch: tl mem list/search --since now respects cross-day session activity (interval-overlap filter).",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(mem): `tl mem list / search --since X` was dropping sessions whose first event fell before the window even when the session stayed active inside it. A 29 MB Claude session that started 5/7 and was still being written 5/8 returned 0 matches under `--since 2026-05-08` despite containing 19 occurrences of the searched keyword written that day. Root cause: `claudeListSessions` and `codexListSessions` filtered by `created` only (single-point `inRange`); `opencodeListSessions` used `updated`-first which masked the bug there but was also strictly wrong for the `--until` direction. Fix: `inRangeOverlap(start, end, f)` keeps a session iff its `[created, updated]` interval overlaps `[f.since, f.until]`. Three list sites switched over; the early `tsFromName` short-circuit in codex was a misoptimization that re-introduced the cross-day bug, so it is removed.\n- chore(spec): internal Trellis spec drift cleanup — `script-conventions.md` drops removed `task_context.py init-context`; `workflow-state-contract.md` writer-table line numbers refreshed; `directory-structure.md` configurators / utils / commands trees aligned with current code; `docs-site/advanced/architecture.mdx` corrected the false `.trellis/.current-task` fallback claim (EN + ZH lockstep). User-facing artifact unchanged; only `.trellis/spec/*` docs.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.1. Run `trellis update` (no `--migrate` needed). Behavior change: `tl mem list / search --since X` now returns sessions that were active inside the window even if they started before it (this was the documented intent). Codex perf trade-off: every session now does `readJsonlFirst` since the filename-ts short-circuit is gone — acceptable; a future patch may add a one-sided `--until`-only fast prune that does not reintroduce the bug."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.3",
3
+ "description": "Beta patch: tl mem --phase brainstorm slicing, 5-9x perf, OpenCode SQLite reader for 1.2+ users.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Enhancements:**\n- feat(mem): `tl mem extract <id> --phase brainstorm|implement|all` slices a session into discussion vs implementation parts. Multi-task sessions get `--- task: <slug> ---` separators. Claude and Codex supported; OpenCode falls back to full dialogue.\n- perf(mem): 5-9× faster. `mem list` 3.5s → 0.67s, `mem list --platform codex` 3.2s → 0.33s, `mem extract --phase brainstorm` 5.8s → 0.73s.\n\n**Bug Fixes:**\n- fix(mem): OpenCode 1.2+ users no longer see 0 sessions. OpenCode 1.2 moved storage to SQLite; the old JSON-directory reader has been replaced. OpenCode 1.1.x is no longer supported.\n- fix(mem): `--phase` parser handles `$(... --slug NAME)` substitution, multiple `task.py` invocations per Bash command, and `task.py start` quoted in commit-message heredocs.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.2. Run `trellis update` (no `--migrate` needed). New dependency `better-sqlite3` for OpenCode — standard `npm install` handles it via prebuilt binaries; if the native binding fails, `tl mem` still works on other platforms."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.4",
3
+ "description": "Reverts better-sqlite3 dependency added in 0.6.0-beta.3.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(mem): `better-sqlite3` dependency removed. Reverts the OpenCode SQLite reader added in 0.6.0-beta.3. Fixes `npm install -g @mindfoldhq/trellis@beta` failure when the prebuilt binary download fails and no local C toolchain is available.\n- fix(mem): OpenCode platform degraded — `tl mem list / search / extract` on platform `opencode` returns empty + a one-shot stderr warning. Claude and Codex paths unchanged.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.3. Run `trellis update`."
9
+ }
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
2
2
  import { createHash, randomBytes } from "node:crypto";
3
3
  import { delimiter, dirname, join, resolve } from "node:path";
4
- import { spawn } from "node:child_process";
4
+ import { spawn, spawnSync } from "node:child_process";
5
5
 
6
6
  type JsonObject = Record<string, unknown>;
7
7
  type TextContent = { type: "text"; text: string };
@@ -632,6 +632,166 @@ function buildTrellisContext(
632
632
  ].join("\n");
633
633
  }
634
634
 
635
+ // ---------------------------------------------------------------------------
636
+ // Workflow-state breadcrumb (TypeScript port of the shared workflow-state
637
+ // hook used by class-1 platforms).
638
+ //
639
+ // Pi is extension-backed and MUST NOT receive Python hook scripts under .pi/.
640
+ // We therefore parse `.trellis/workflow.md` `[workflow-state:STATUS]...
641
+ // [/workflow-state:STATUS]` blocks directly in TypeScript and emit the
642
+ // per-turn `<workflow-state>` breadcrumb in `before_agent_start` and `input`.
643
+ // Tag regex mirrors the shared parser so the breadcrumb body stays
644
+ // byte-identical with hook-driven platforms.
645
+ // ---------------------------------------------------------------------------
646
+
647
+ const WORKFLOW_STATE_TAG_RE =
648
+ /\[workflow-state:([A-Za-z0-9_-]+)\]\s*\n([\s\S]*?)\n\s*\[\/workflow-state:\1\]/g;
649
+
650
+ function loadWorkflowBreadcrumbs(projectRoot: string): Record<string, string> {
651
+ const workflow = readText(join(projectRoot, ".trellis", "workflow.md"));
652
+ if (!workflow) return {};
653
+ const result: Record<string, string> = {};
654
+ for (const match of workflow.matchAll(WORKFLOW_STATE_TAG_RE)) {
655
+ const status = match[1] ?? "";
656
+ const body = (match[2] ?? "").trim();
657
+ if (status && body) result[status] = body;
658
+ }
659
+ return result;
660
+ }
661
+
662
+ function readActiveTaskStatus(
663
+ projectRoot: string,
664
+ taskDir: string,
665
+ ): { taskId: string; status: string } | null {
666
+ try {
667
+ const data = JSON.parse(
668
+ readText(join(taskDir, "task.json")),
669
+ ) as JsonObject;
670
+ const status = stringValue(data.status);
671
+ if (!status) return null;
672
+ const id = stringValue(data.id) ?? taskDir.split(/[\\/]/).pop() ?? "";
673
+ return { taskId: id, status };
674
+ } catch {
675
+ return null;
676
+ }
677
+ }
678
+
679
+ function buildWorkflowStateBreadcrumb(
680
+ projectRoot: string,
681
+ contextKey: string | null,
682
+ ): string {
683
+ const templates = loadWorkflowBreadcrumbs(projectRoot);
684
+ const taskDir = readCurrentTask(
685
+ projectRoot,
686
+ undefined,
687
+ undefined,
688
+ contextKey,
689
+ );
690
+ let header: string;
691
+ let lookupKey: string;
692
+ if (!taskDir) {
693
+ header = "Status: no_task\nSource: session";
694
+ lookupKey = "no_task";
695
+ } else {
696
+ const info = readActiveTaskStatus(projectRoot, taskDir);
697
+ if (!info) {
698
+ header = "Status: no_task\nSource: session";
699
+ lookupKey = "no_task";
700
+ } else {
701
+ header = `Task: ${info.taskId} (${info.status})\nSource: session`;
702
+ lookupKey = info.status;
703
+ }
704
+ }
705
+ const body = templates[lookupKey] ?? "Refer to workflow.md for current step.";
706
+ return `<workflow-state>\n${header}\n${body}\n</workflow-state>`;
707
+ }
708
+
709
+ // ---------------------------------------------------------------------------
710
+ // Session overview (developer / git branch / active tasks)
711
+ //
712
+ // Spawns `python3 .trellis/scripts/get_context.py` (the same script other
713
+ // platform session-start hooks invoke) to keep developer/git/active-task
714
+ // summary byte-identical with class-1 platforms. Failure is non-fatal — we
715
+ // emit an empty overview rather than block the conversation.
716
+ // ---------------------------------------------------------------------------
717
+
718
+ const SESSION_OVERVIEW_TIMEOUT_MS = 5000;
719
+
720
+ function pythonExecutable(): string {
721
+ const override = stringValue(process.env.TRELLIS_PYTHON);
722
+ if (override) return override;
723
+ return process.platform === "win32" ? "python" : "python3";
724
+ }
725
+
726
+ function buildSessionOverview(
727
+ projectRoot: string,
728
+ contextKey: string | null,
729
+ ): string {
730
+ const script = join(projectRoot, ".trellis", "scripts", "get_context.py");
731
+ if (!isExistingFile(script)) return "";
732
+ try {
733
+ const result = spawnSync(pythonExecutable(), [script], {
734
+ cwd: projectRoot,
735
+ env: contextKey
736
+ ? { ...process.env, TRELLIS_CONTEXT_ID: contextKey }
737
+ : process.env,
738
+ encoding: "utf-8",
739
+ timeout: SESSION_OVERVIEW_TIMEOUT_MS,
740
+ windowsHide: true,
741
+ });
742
+ if (result.status !== 0) return "";
743
+ const stdout = (result.stdout ?? "").trim();
744
+ if (!stdout) return "";
745
+ return `<session-overview>\n${stdout}\n</session-overview>`;
746
+ } catch {
747
+ return "";
748
+ }
749
+ }
750
+
751
+ // Per-turn cache so input + before_agent_start in the same turn don't double-spawn.
752
+ class TurnContextCache {
753
+ private key: string | null = null;
754
+ private timestamp = 0;
755
+ private workflowState = "";
756
+ private sessionOverview = "";
757
+ // Refresh window: per-turn injections that fire close together share a
758
+ // single python3 spawn; anything older than this re-runs the resolver.
759
+ private static readonly TTL_MS = 1500;
760
+
761
+ get(
762
+ projectRoot: string,
763
+ contextKey: string | null,
764
+ ): { workflowState: string; sessionOverview: string } {
765
+ const now = Date.now();
766
+ if (this.key === contextKey && now - this.timestamp < TurnContextCache.TTL_MS) {
767
+ return {
768
+ workflowState: this.workflowState,
769
+ sessionOverview: this.sessionOverview,
770
+ };
771
+ }
772
+ this.workflowState = buildWorkflowStateBreadcrumb(projectRoot, contextKey);
773
+ this.sessionOverview = buildSessionOverview(projectRoot, contextKey);
774
+ this.key = contextKey;
775
+ this.timestamp = now;
776
+ return {
777
+ workflowState: this.workflowState,
778
+ sessionOverview: this.sessionOverview,
779
+ };
780
+ }
781
+ }
782
+
783
+ // ---------------------------------------------------------------------------
784
+ // Sub-agent dispatch protocol snippet (registered with the `subagent` tool).
785
+ // Mirrors the [workflow-state:in_progress] dispatch protocol text in
786
+ // trellis/workflow.md so the AI sees the same `Active task: <path>` rule
787
+ // whether it reads workflow.md, the per-turn breadcrumb, or the tool prompt.
788
+ // ---------------------------------------------------------------------------
789
+
790
+ const SUBAGENT_DISPATCH_PROTOCOL = `Sub-agent dispatch protocol (Trellis): your dispatch prompt MUST start with one line "Active task: <task path from \`task.py current\`>" before any other instructions. No exceptions. On class-2 platforms (codex / copilot / gemini / qoder) the sub-agent depends on this line because there is no hook to inject task context. On class-1 platforms (claude / cursor / opencode / kiro / codebuddy / droid) and on Pi, the line is the canonical fallback when hook/extension injection misses. trellis-research uses the line to know which {task_dir}/research/ to write into.
791
+
792
+ Wrong: prompt: "implement the new feature"
793
+ Correct: prompt: "Active task: .trellis/tasks/05-09-pi-workflow-state-injection\\n\\nImplement the new feature ..."`;
794
+
635
795
  function normalizeAgentName(agent: string): string {
636
796
  return agent.startsWith("trellis-") ? agent : `trellis-${agent}`;
637
797
  }
@@ -886,6 +1046,15 @@ export default function trellisExtension(pi: {
886
1046
  const projectRoot = findProjectRoot(pi.cwd ?? process.cwd());
887
1047
  const processContextKey = createProcessContextKey(projectRoot);
888
1048
  let currentContextKey: string | null = null;
1049
+ const turnContextCache = new TurnContextCache();
1050
+
1051
+ const buildPerTurnInjection = (contextKey: string | null): string => {
1052
+ const { workflowState, sessionOverview } = turnContextCache.get(
1053
+ projectRoot,
1054
+ contextKey,
1055
+ );
1056
+ return [workflowState, sessionOverview].filter(Boolean).join("\n\n");
1057
+ };
889
1058
 
890
1059
  const getContextKey = (input?: unknown, ctx?: PiExtensionContext): string => {
891
1060
  const resolvedContextKey = resolveContextKey(
@@ -904,6 +1073,8 @@ export default function trellisExtension(pi: {
904
1073
  name: "subagent",
905
1074
  label: "Subagent",
906
1075
  description: "Run a Trellis project sub-agent with active task context.",
1076
+ promptSnippet: SUBAGENT_DISPATCH_PROTOCOL,
1077
+ promptGuidelines: SUBAGENT_DISPATCH_PROTOCOL,
907
1078
  parameters: {
908
1079
  type: "object",
909
1080
  properties: {
@@ -976,8 +1147,9 @@ export default function trellisExtension(pi: {
976
1147
  ctx,
977
1148
  contextKey,
978
1149
  );
1150
+ const perTurn = buildPerTurnInjection(contextKey);
979
1151
  return {
980
- systemPrompt: [current, context].filter(Boolean).join("\n\n"),
1152
+ systemPrompt: [current, context, perTurn].filter(Boolean).join("\n\n"),
981
1153
  };
982
1154
  });
983
1155
  pi.on?.("context", (event, ctx) => {
@@ -986,8 +1158,11 @@ export default function trellisExtension(pi: {
986
1158
  return Array.isArray(messages) ? { messages } : undefined;
987
1159
  });
988
1160
  pi.on?.("input", (event, ctx) => {
989
- getContextKey(event, ctx);
990
- return { action: "continue" };
1161
+ const contextKey = getContextKey(event, ctx);
1162
+ const additionalContext = buildPerTurnInjection(contextKey);
1163
+ return additionalContext
1164
+ ? { action: "continue", additionalContext, systemPrompt: additionalContext }
1165
+ : { action: "continue" };
991
1166
  });
992
1167
  pi.on?.("tool_call", (event, ctx) => {
993
1168
  const contextKey = getContextKey(event, ctx);
@@ -8,5 +8,14 @@
8
8
  ],
9
9
  "prompts": [
10
10
  "./prompts"
11
+ ],
12
+ "packages": [
13
+ {
14
+ "source": "npm:pi-subagents",
15
+ "extensions": [],
16
+ "skills": [],
17
+ "prompts": [],
18
+ "themes": []
19
+ }
11
20
  ]
12
21
  }
@@ -36,6 +36,7 @@ export declare const commonSessionContext: string;
36
36
  export declare const commonPackagesContext: string;
37
37
  export declare const commonWorkflowPhase: string;
38
38
  export declare const commonTrellisConfig: string;
39
+ export declare const commonSafeCommit: string;
39
40
  export declare const getDeveloperScript: string;
40
41
  export declare const initDeveloperScript: string;
41
42
  export declare const taskScript: string;
@@ -1 +1 @@
1
- {"version":3,"file":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yC,CAAC;AAGvE,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqCnD"}
@@ -46,6 +46,7 @@ export const commonSessionContext = readTemplate("scripts/common/session_context
46
46
  export const commonPackagesContext = readTemplate("scripts/common/packages_context.py");
47
47
  export const commonWorkflowPhase = readTemplate("scripts/common/workflow_phase.py");
48
48
  export const commonTrellisConfig = readTemplate("scripts/common/trellis_config.py");
49
+ export const commonSafeCommit = readTemplate("scripts/common/safe_commit.py");
49
50
  // Python scripts - main
50
51
  export const getDeveloperScript = readTemplate("scripts/get_developer.py");
51
52
  export const initDeveloperScript = readTemplate("scripts/init_developer.py");
@@ -84,6 +85,7 @@ export function getAllScripts() {
84
85
  scripts.set("common/packages_context.py", commonPackagesContext);
85
86
  scripts.set("common/workflow_phase.py", commonWorkflowPhase);
86
87
  scripts.set("common/trellis_config.py", commonTrellisConfig);
88
+ scripts.set("common/safe_commit.py", commonSafeCommit);
87
89
  // Main
88
90
  scripts.set("get_developer.py", getDeveloperScript);
89
91
  scripts.set("init_developer.py", initDeveloperScript);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,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,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 from __future__ import annotations
23
23
 
24
24
  import argparse
25
25
  import re
26
- import subprocess
27
26
  import sys
28
27
  from datetime import datetime
29
28
  from pathlib import Path
@@ -37,6 +36,11 @@ from common.paths import (
37
36
  )
38
37
  from common.developer import ensure_developer
39
38
  from common.git import run_git
39
+ from common.safe_commit import (
40
+ print_gitignore_warning,
41
+ safe_git_add,
42
+ safe_trellis_paths_to_add,
43
+ )
40
44
  from common.tasks import load_task
41
45
  from common.config import (
42
46
  get_packages,
@@ -314,36 +318,52 @@ def update_index(
314
318
  # =============================================================================
315
319
 
316
320
  def _auto_commit_workspace(repo_root: Path) -> None:
317
- """Stage .trellis/workspace and .trellis/tasks, then commit with a configured message."""
321
+ """Stage Trellis-owned workspace + task paths and commit.
322
+
323
+ Path scope is restricted to specific products (journal files, index.md,
324
+ active task dirs, the archive subtree). We never `git add` the whole
325
+ `.trellis/` tree, and if `.gitignore` blocks the specific paths we retry
326
+ with `git add -f <those-specific-paths>` — never `-f .trellis/`.
327
+ """
318
328
  commit_msg = get_session_commit_message(repo_root)
319
- add_result = subprocess.run(
320
- ["git", "add", "-A", ".trellis/workspace", ".trellis/tasks"],
321
- cwd=repo_root,
322
- capture_output=True,
323
- text=True,
324
- )
325
- if add_result.returncode != 0:
326
- print(f"[WARN] git add failed (exit {add_result.returncode}): {add_result.stderr.strip()}", file=sys.stderr)
327
- print("[WARN] Please commit .trellis/ changes manually: git add .trellis && git commit", file=sys.stderr)
329
+ paths = safe_trellis_paths_to_add(repo_root)
330
+ if not paths:
331
+ print("[OK] No workspace changes to commit.", file=sys.stderr)
332
+ return
333
+
334
+ success, used_force, err = safe_git_add(paths, repo_root)
335
+ if not success:
336
+ if err and "ignored by" in err.lower():
337
+ print_gitignore_warning(paths)
338
+ else:
339
+ print(
340
+ f"[WARN] git add failed: {err.strip() if err else 'unknown error'}",
341
+ file=sys.stderr,
342
+ )
328
343
  return
329
- # Check if there are staged changes
330
- result = subprocess.run(
331
- ["git", "diff", "--cached", "--quiet", "--", ".trellis/workspace", ".trellis/tasks"],
332
- cwd=repo_root,
344
+
345
+ if used_force:
346
+ print(
347
+ "[OK] Staged Trellis-owned paths with -f (specific paths, not .trellis/).",
348
+ file=sys.stderr,
349
+ )
350
+
351
+ # Check if there are staged changes for the paths we just staged.
352
+ rc, _, _ = run_git(
353
+ ["diff", "--cached", "--quiet", "--", *paths], cwd=repo_root
333
354
  )
334
- if result.returncode == 0:
355
+ if rc == 0:
335
356
  print("[OK] No workspace changes to commit.", file=sys.stderr)
336
357
  return
337
- commit_result = subprocess.run(
338
- ["git", "commit", "-m", commit_msg],
339
- cwd=repo_root,
340
- capture_output=True,
341
- text=True,
342
- )
343
- if commit_result.returncode == 0:
358
+
359
+ rc, _, commit_err = run_git(["commit", "-m", commit_msg], cwd=repo_root)
360
+ if rc == 0:
344
361
  print(f"[OK] Auto-committed: {commit_msg}", file=sys.stderr)
345
362
  else:
346
- print(f"[WARN] Auto-commit failed: {commit_result.stderr.strip()}", file=sys.stderr)
363
+ print(
364
+ f"[WARN] Auto-commit failed: {commit_err.strip()}",
365
+ file=sys.stderr,
366
+ )
347
367
 
348
368
 
349
369
  def add_session(
@@ -0,0 +1,229 @@
1
+ """
2
+ Safe git-add helpers for Trellis-owned paths.
3
+
4
+ Why this module exists
5
+ ----------------------
6
+ A real user incident: a project's `.gitignore` listed `.trellis/` (company-wide
7
+ template / personal habit). When `add_session.py` and `task.py archive` ran
8
+ their auto-commit and `git add` failed with `ignored by .gitignore`, the AI
9
+ agent driving the workflow "fixed" it by retrying with
10
+ `git add -f .trellis/` — which fan-out-included every ignored subtree
11
+ (`.trellis/.backup-*/`, `.trellis/worktrees/`, `.trellis/.template-hashes.json`,
12
+ `.trellis/.runtime/`), committing 548 files / 83474 lines of caches/backups.
13
+
14
+ Design
15
+ ------
16
+ - Scripts only stage SPECIFIC product paths (journal files, index.md, the
17
+ current task dir, the archive dir). Never the whole `.trellis/` tree.
18
+ - If plain `git add <specific>` fails with "ignored by", retry with
19
+ `git add -f <specific>` — forcing only the paths the script knows it owns.
20
+ This is safe because the paths are narrow; it is NOT equivalent to
21
+ `git add -f .trellis/` (which would fan out to backups/worktrees/runtime).
22
+ - If the -f retry also fails, print an explicit warning that includes a
23
+ negative example: ``Do NOT use `git add -f .trellis/` ...``
24
+
25
+ The wider-grain forbidden command stays forbidden.
26
+ """
27
+
28
+ from __future__ import annotations
29
+
30
+ import sys
31
+ from pathlib import Path
32
+
33
+ from .git import run_git
34
+ from .paths import (
35
+ DIR_ARCHIVE,
36
+ DIR_TASKS,
37
+ DIR_WORKFLOW,
38
+ DIR_WORKSPACE,
39
+ FILE_JOURNAL_PREFIX,
40
+ get_developer,
41
+ )
42
+
43
+
44
+ # Paths under .trellis/ that must NEVER be auto-staged. Listed here so the
45
+ # warning to the user can show concrete subpaths to ignore individually
46
+ # instead of ignoring the whole `.trellis/` tree.
47
+ TRELLIS_IGNORED_SUBPATHS = (
48
+ ".trellis/.backup-*",
49
+ ".trellis/worktrees/",
50
+ ".trellis/.template-hashes.json",
51
+ ".trellis/.runtime/",
52
+ ".trellis/.cache/",
53
+ )
54
+
55
+
56
+ def safe_trellis_paths_to_add(repo_root: Path) -> list[str]:
57
+ """Return the list of repo-relative paths the auto-commit should stage.
58
+
59
+ Only includes paths that exist on disk so callers don't pass non-existent
60
+ arguments to git. The caller is responsible for `git diff --cached`
61
+ checking afterwards.
62
+
63
+ Included:
64
+ - .trellis/workspace/<developer>/journal-*.md
65
+ - .trellis/workspace/<developer>/index.md
66
+ - .trellis/tasks/<task-dir>/ (every active task directory)
67
+ - .trellis/tasks/archive/ (whole archive subtree, if present)
68
+
69
+ Excluded (intentionally — these must not be staged):
70
+ - .trellis/.backup-*, .trellis/worktrees/,
71
+ .trellis/.template-hashes.json, .trellis/.runtime/, .trellis/.cache/
72
+ """
73
+ paths: list[str] = []
74
+
75
+ # Workspace journal files + index.md
76
+ developer = get_developer(repo_root)
77
+ if developer:
78
+ ws = repo_root / DIR_WORKFLOW / DIR_WORKSPACE / developer
79
+ if ws.is_dir():
80
+ for f in sorted(ws.glob(f"{FILE_JOURNAL_PREFIX}*.md")):
81
+ if f.is_file():
82
+ paths.append(
83
+ f"{DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/{f.name}"
84
+ )
85
+ index_md = ws / "index.md"
86
+ if index_md.is_file():
87
+ paths.append(
88
+ f"{DIR_WORKFLOW}/{DIR_WORKSPACE}/{developer}/index.md"
89
+ )
90
+
91
+ # Active tasks: each direct child of tasks/ that is a directory and not
92
+ # the archive root. The archive subtree is added as a single path below.
93
+ tasks_dir = repo_root / DIR_WORKFLOW / DIR_TASKS
94
+ if tasks_dir.is_dir():
95
+ for child in sorted(tasks_dir.iterdir()):
96
+ if not child.is_dir():
97
+ continue
98
+ if child.name == DIR_ARCHIVE:
99
+ continue
100
+ paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{child.name}")
101
+
102
+ archive_dir = tasks_dir / DIR_ARCHIVE
103
+ if archive_dir.is_dir():
104
+ paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{DIR_ARCHIVE}")
105
+
106
+ return paths
107
+
108
+
109
+ def safe_archive_paths_to_add(repo_root: Path) -> list[str]:
110
+ """Return paths to stage after `task.py archive`.
111
+
112
+ Limited to the archive subtree (where the freshly-moved task lives) plus
113
+ the source task directory's parent area to capture the deletion in the
114
+ same commit. We pass the whole `.trellis/tasks/` path so deletions of the
115
+ pre-move path are tracked, but only as a SPECIFIC subpath — not the whole
116
+ `.trellis/` tree.
117
+ """
118
+ paths: list[str] = []
119
+ tasks_dir = repo_root / DIR_WORKFLOW / DIR_TASKS
120
+ if tasks_dir.is_dir():
121
+ # The archive copy.
122
+ archive_dir = tasks_dir / DIR_ARCHIVE
123
+ if archive_dir.is_dir():
124
+ paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{DIR_ARCHIVE}")
125
+ # Active tasks (some may have been re-touched, e.g. parent's
126
+ # children list). This captures the source-path deletion too because
127
+ # `git add` on a directory records removals.
128
+ for child in sorted(tasks_dir.iterdir()):
129
+ if not child.is_dir():
130
+ continue
131
+ if child.name == DIR_ARCHIVE:
132
+ continue
133
+ paths.append(f"{DIR_WORKFLOW}/{DIR_TASKS}/{child.name}")
134
+ return paths
135
+
136
+
137
+ def _stderr_indicates_ignored(stderr: str) -> bool:
138
+ """git add error indicates the path is excluded by .gitignore."""
139
+ if not stderr:
140
+ return False
141
+ lowered = stderr.lower()
142
+ return "ignored by" in lowered
143
+
144
+
145
+ def safe_git_add(
146
+ paths: list[str], repo_root: Path
147
+ ) -> tuple[bool, bool, str]:
148
+ """Run `git add` on specific paths, retrying with -f if .gitignore blocks.
149
+
150
+ Returns (success, used_force, stderr). On success, callers should still
151
+ `git diff --cached` to detect whether anything was actually staged.
152
+
153
+ Behavior:
154
+ - No paths passed → success, no force, empty stderr.
155
+ - Plain `git add <paths>` succeeds → return.
156
+ - Plain fails with "ignored by" → retry with `git add -f <paths>`.
157
+ - Retry succeeds → return success with used_force=True.
158
+ - Retry fails → return failure; caller should print the gitignore
159
+ warning (see :func:`print_gitignore_warning`).
160
+ - Plain fails with a non-ignored error → return failure; do NOT retry
161
+ with -f (we only force when ignore is the cause).
162
+ """
163
+ if not paths:
164
+ return True, False, ""
165
+
166
+ rc, _, err = run_git(["add", "--", *paths], cwd=repo_root)
167
+ if rc == 0:
168
+ return True, False, ""
169
+
170
+ if not _stderr_indicates_ignored(err):
171
+ return False, False, err
172
+
173
+ rc2, _, err2 = run_git(["add", "-f", "--", *paths], cwd=repo_root)
174
+ if rc2 == 0:
175
+ return True, True, err2 or err
176
+ return False, True, err2 or err
177
+
178
+
179
+ def print_gitignore_warning(paths: list[str]) -> None:
180
+ """Explain to the user (and any AI reading the log) what to do.
181
+
182
+ CRITICAL: includes the negative example
183
+ ``Do NOT use `git add -f .trellis/``` — agents reading the warning are
184
+ known to invent that command, which fans out to ignored caches/backups.
185
+ """
186
+ print(
187
+ "[WARN] git add failed because .trellis/ paths are ignored by your .gitignore.",
188
+ file=sys.stderr,
189
+ )
190
+ print(
191
+ "[WARN] Trellis manages these specific paths and they should be tracked:",
192
+ file=sys.stderr,
193
+ )
194
+ if paths:
195
+ for p in paths:
196
+ print(f"[WARN] {p}", file=sys.stderr)
197
+ else:
198
+ print(
199
+ "[WARN] .trellis/workspace/<developer>/{journal-*.md,index.md}",
200
+ file=sys.stderr,
201
+ )
202
+ print(
203
+ "[WARN] .trellis/tasks/<task-dir>/",
204
+ file=sys.stderr,
205
+ )
206
+ print(
207
+ "[WARN] .trellis/tasks/archive/",
208
+ file=sys.stderr,
209
+ )
210
+ print("[WARN]", file=sys.stderr)
211
+ print(
212
+ "[WARN] Recommended: change your .gitignore from `.trellis/` to specific",
213
+ file=sys.stderr,
214
+ )
215
+ print(
216
+ "[WARN] subpaths that should remain ignored, e.g.:",
217
+ file=sys.stderr,
218
+ )
219
+ for sub in TRELLIS_IGNORED_SUBPATHS:
220
+ print(f"[WARN] {sub}", file=sys.stderr)
221
+ print("[WARN]", file=sys.stderr)
222
+ print(
223
+ "[WARN] Do NOT use `git add -f .trellis/` — it pulls in backups, worktrees,",
224
+ file=sys.stderr,
225
+ )
226
+ print(
227
+ "[WARN] and runtime caches that should never be committed.",
228
+ file=sys.stderr,
229
+ )
@@ -41,6 +41,11 @@ from .paths import (
41
41
  get_repo_root,
42
42
  get_tasks_dir,
43
43
  )
44
+ from .safe_commit import (
45
+ print_gitignore_warning,
46
+ safe_archive_paths_to_add,
47
+ safe_git_add,
48
+ )
44
49
  from .task_utils import (
45
50
  archive_task_complete,
46
51
  find_task_by_name,
@@ -383,13 +388,37 @@ def cmd_archive(args: argparse.Namespace) -> int:
383
388
 
384
389
 
385
390
  def _auto_commit_archive(task_name: str, repo_root: Path) -> None:
386
- """Stage .trellis/tasks/ changes and commit after archive."""
387
- tasks_rel = f"{DIR_WORKFLOW}/{DIR_TASKS}"
388
- run_git(["add", "-A", tasks_rel], cwd=repo_root)
391
+ """Stage Trellis-owned task paths and commit after archive.
392
+
393
+ Only stages specific subpaths (the archive subtree and active task dirs),
394
+ never the whole `.trellis/` tree. If `.gitignore` excludes `.trellis/`,
395
+ falls back to `git add -f <specific>` and emits a warning that explicitly
396
+ forbids `git add -f .trellis/` (which would fan out to caches/backups).
397
+ """
398
+ paths = safe_archive_paths_to_add(repo_root)
399
+ if not paths:
400
+ print("[OK] No task changes to commit.", file=sys.stderr)
401
+ return
402
+
403
+ success, used_force, err = safe_git_add(paths, repo_root)
404
+ if not success:
405
+ if err and "ignored by" in err.lower():
406
+ print_gitignore_warning(paths)
407
+ else:
408
+ print(
409
+ f"[WARN] git add failed: {err.strip() if err else 'unknown error'}",
410
+ file=sys.stderr,
411
+ )
412
+ return
413
+
414
+ if used_force:
415
+ print(
416
+ "[OK] Staged Trellis-owned paths with -f (specific paths, not .trellis/).",
417
+ file=sys.stderr,
418
+ )
389
419
 
390
- # Check if there are staged changes
391
420
  rc, _, _ = run_git(
392
- ["diff", "--cached", "--quiet", "--", tasks_rel], cwd=repo_root
421
+ ["diff", "--cached", "--quiet", "--", *paths], cwd=repo_root
393
422
  )
394
423
  if rc == 0:
395
424
  print("[OK] No task changes to commit.", file=sys.stderr)
@@ -38,6 +38,7 @@ export declare function scrubOpencodePackageJson(content: string): ScrubResult;
38
38
  * Scrub `.pi/settings.json`:
39
39
  * - drop `enableSkillCommands` (trellis-flagged)
40
40
  * - remove trellis entries from `extensions`/`skills`/`prompts` arrays
41
+ * - remove trellis-managed `packages["npm:pi-subagents"]` isolation override
41
42
  * - drop arrays that become empty
42
43
  */
43
44
  export declare function scrubPiSettings(content: string): ScrubResult;
@@ -1 +1 @@
1
- {"version":3,"file":"uninstall-scrubbers.d.ts","sourceRoot":"","sources":["../../src/utils/uninstall-scrubbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;CACrB;AAmDD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,IAAI,EAAE,QAAQ,GAAG,MAAM,GACtB,WAAW,CAgGb;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CA+BrE;AAgBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAuC5D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAoDjE"}
1
+ {"version":3,"file":"uninstall-scrubbers.d.ts","sourceRoot":"","sources":["../../src/utils/uninstall-scrubbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;CACrB;AAmDD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,IAAI,EAAE,QAAQ,GAAG,MAAM,GACtB,WAAW,CAgGb;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CA+BrE;AAiBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CA4D5D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAoDjE"}
@@ -201,6 +201,7 @@ export function scrubOpencodePackageJson(content) {
201
201
  const PI_TRELLIS_EXTENSION = "./extensions/trellis/index.ts";
202
202
  const PI_TRELLIS_SKILLS = "./skills";
203
203
  const PI_TRELLIS_PROMPTS = "./prompts";
204
+ const PI_SUBAGENTS_PACKAGE = "npm:pi-subagents";
204
205
  function isTrellisPiEntry(value, target) {
205
206
  return typeof value === "string" && value === target;
206
207
  }
@@ -208,6 +209,7 @@ function isTrellisPiEntry(value, target) {
208
209
  * Scrub `.pi/settings.json`:
209
210
  * - drop `enableSkillCommands` (trellis-flagged)
210
211
  * - remove trellis entries from `extensions`/`skills`/`prompts` arrays
212
+ * - remove trellis-managed `packages["npm:pi-subagents"]` isolation override
211
213
  * - drop arrays that become empty
212
214
  */
213
215
  export function scrubPiSettings(content) {
@@ -243,6 +245,25 @@ export function scrubPiSettings(content) {
243
245
  root[key] = filtered;
244
246
  }
245
247
  }
248
+ const packagesValue = root.packages;
249
+ if (Array.isArray(packagesValue)) {
250
+ const filtered = packagesValue.filter((entry) => {
251
+ if (entry !== null &&
252
+ typeof entry === "object" &&
253
+ !Array.isArray(entry)) {
254
+ const obj = entry;
255
+ return obj.source !== PI_SUBAGENTS_PACKAGE;
256
+ }
257
+ // String entries — keep unless they exactly match the package name
258
+ return entry !== PI_SUBAGENTS_PACKAGE;
259
+ });
260
+ if (filtered.length === 0) {
261
+ delete root.packages;
262
+ }
263
+ else {
264
+ root.packages = filtered;
265
+ }
266
+ }
246
267
  const fullyEmpty = Object.keys(root).length === 0;
247
268
  return {
248
269
  content: JSON.stringify(root, null, 2) + "\n",
@@ -1 +1 @@
1
- {"version":3,"file":"uninstall-scrubbers.js","sourceRoot":"","sources":["../../src/utils/uninstall-scrubbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH;;;;;;;;;;;;;GAaG;AACH,SAAS,yBAAyB,CAChC,OAAe,EACf,YAA+B;IAE/B,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAEvC,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,C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,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;QAC5C,IAAI,OAAO,IAAI,YAAY,EAAE,CAAC;YAC5B,SAAS,CAAC,8CAA8C;QAC1D,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClB,YAAY,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,6BAA6B;IAC7B,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,GAAG,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;IAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;AACzC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindfoldhq/trellis",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "AI capabilities grow like ivy — Trellis provides the structure to guide them along a disciplined path",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",