@blxzer/cursor-trellis 0.3.0 → 0.3.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.
- package/CHANGELOG.md +45 -0
- package/README.md +51 -10
- package/README.zh-CN.md +21 -7
- package/bin/cstl.js +1 -1
- package/bin/smart-search.js +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +17 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/capability-smoke.js +2 -2
- package/dist/commands/capability-smoke.js.map +1 -1
- package/dist/commands/channel/agent-loader.d.ts +1 -1
- package/dist/commands/channel/agent-loader.js +4 -4
- package/dist/commands/channel/agent-loader.js.map +1 -1
- package/dist/commands/channel/guard.d.ts +2 -2
- package/dist/commands/channel/guard.js +3 -3
- package/dist/commands/channel/guard.js.map +1 -1
- package/dist/commands/channel/index.js +3 -3
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/list.d.ts +1 -1
- package/dist/commands/channel/list.js +1 -1
- package/dist/commands/channel/rm.d.ts +1 -1
- package/dist/commands/channel/rm.js +1 -1
- package/dist/commands/channel/store/lock.d.ts +1 -1
- package/dist/commands/channel/store/lock.js +1 -1
- package/dist/commands/channel/store/paths.js +1 -1
- package/dist/commands/channel/store/paths.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +105 -59
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +3 -3
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +69 -15
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +6 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +83 -28
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +4 -4
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +10 -9
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +1 -1
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.js +6 -6
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +4 -4
- package/dist/configurators/workflow.js +1 -1
- package/dist/constants/paths.d.ts +24 -24
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +16 -16
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.3.1.json +32 -0
- package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +11 -11
- package/dist/templates/common/bundled-skills/cstl-meta/SKILL.md +15 -15
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/add-project-local-conventions.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-agents.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-context-loading.md +21 -21
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-hooks.md +9 -9
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-skills-or-commands.md +7 -7
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-spec-structure.md +15 -15
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-task-lifecycle.md +27 -27
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-workflow.md +7 -7
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/overview.md +11 -11
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/context-injection.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/generated-files.md +21 -21
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/overview.md +14 -14
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/spec-system.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/task-system.md +23 -23
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/workflow.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/workspace-memory.md +16 -16
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/agents.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/hooks-and-settings.md +6 -6
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/platform-map.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/skills-and-commands.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-skill-creator/SKILL.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/review-checklist.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/SKILL.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/repository-analysis.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/spec-task-planning.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/spec-writing.md +1 -1
- package/dist/templates/common/commands/continue.md +6 -6
- package/dist/templates/common/commands/finish-work.md +5 -5
- package/dist/templates/common/commands/start.md +8 -8
- package/dist/templates/common/skills/before-dev.md +4 -4
- package/dist/templates/common/skills/brainstorm.md +5 -5
- package/dist/templates/common/skills/break-loop.md +3 -3
- package/dist/templates/common/skills/check.md +5 -5
- package/dist/templates/common/skills/update-spec.md +4 -4
- package/dist/templates/cursor/agents/cstl-check.md +6 -6
- package/dist/templates/cursor/agents/cstl-implement.md +7 -7
- package/dist/templates/cursor/agents/cstl-research.md +9 -9
- package/dist/templates/cursor/commands/cursor2plus-setup.md +10 -10
- package/dist/templates/cursor/rules/cstl-subagent-dispatch.mdc +2 -2
- package/dist/templates/cursor/rules/cstl-triage.mdc +2 -2
- package/dist/templates/cursor/rules/retrieval-routing.mdc +4 -4
- package/dist/templates/extract.d.ts +1 -1
- package/dist/templates/extract.js +1 -1
- package/dist/templates/markdown/agents.md +11 -11
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +5 -5
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +3 -3
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +11 -11
- package/dist/templates/markdown/spec/guides/cursor-trellis-release-coexistence-guide.md.txt +166 -0
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +8 -8
- package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +3 -3
- package/dist/templates/markdown/spec/guides/index.md.txt +1 -0
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +10 -10
- package/dist/templates/markdown/workspace-index.md +3 -3
- package/dist/templates/markdown/worktree.yaml.txt +1 -1
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.js +1 -1
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +3 -3
- package/dist/templates/shared-hooks/inject-shell-session-context.py +7 -7
- package/dist/templates/shared-hooks/inject-subagent-context.py +1 -1
- package/dist/templates/shared-hooks/inject-workflow-state.py +11 -11
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +1 -1
- package/dist/templates/shared-hooks/session-start.py +13 -13
- package/dist/templates/trellis/config.yaml +2 -22
- package/dist/templates/trellis/index.d.ts +2 -2
- package/dist/templates/trellis/index.js +2 -2
- package/dist/templates/trellis/local/README.md +3 -3
- package/dist/templates/trellis/local/patch_wpelc8.py +4 -4
- package/dist/templates/trellis/scripts/add_session.py +20 -20
- package/dist/templates/trellis/scripts/common/active_task.py +2 -2
- package/dist/templates/trellis/scripts/common/artifact_search.py +587 -587
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +6 -6
- package/dist/templates/trellis/scripts/common/config.py +3 -3
- package/dist/templates/trellis/scripts/common/developer.py +2 -2
- package/dist/templates/trellis/scripts/common/packages_context.py +23 -23
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +16 -16
- package/dist/templates/trellis/scripts/common/paths.py +107 -107
- package/dist/templates/trellis/scripts/common/project_file_stats.py +1 -1
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +1 -1
- package/dist/templates/trellis/scripts/common/safe_commit.py +31 -31
- package/dist/templates/trellis/scripts/common/session_memory.py +360 -360
- package/dist/templates/trellis/scripts/common/smart_search_evidence.py +514 -514
- package/dist/templates/trellis/scripts/common/smart_search_resolve.py +1 -1
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +2 -2
- package/dist/templates/trellis/scripts/common/task_context.py +1 -1
- package/dist/templates/trellis/scripts/common/task_dashboard.py +140 -140
- package/dist/templates/trellis/scripts/common/task_gates.py +23 -23
- package/dist/templates/trellis/scripts/common/task_store.py +5 -5
- package/dist/templates/trellis/scripts/common/task_utils.py +3 -3
- package/dist/templates/trellis/scripts/common/tasks.py +1 -1
- package/dist/templates/trellis/scripts/common/trellis_config.py +3 -3
- package/dist/templates/trellis/scripts/common/workflow_phase.py +1 -1
- package/dist/templates/trellis/scripts/cursor_retrieval_probe.py +3 -3
- package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +11 -11
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +8 -8
- package/dist/templates/trellis/scripts/init_developer.py +2 -2
- package/dist/templates/trellis/scripts/retrieval_probe_matrix_template.json +4 -4
- package/dist/templates/trellis/scripts/route_codebase_retrieval.py +1 -1
- package/dist/templates/trellis/scripts/task.py +918 -918
- package/dist/templates/trellis/tasks/templates/release-readiness/implement.md +2 -2
- package/dist/templates/trellis/workflow.md +64 -64
- package/dist/types/migration.d.ts +1 -1
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/agents-md.d.ts +47 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +107 -0
- package/dist/utils/agents-md.js.map +1 -0
- package/dist/utils/codebase-retrieval-router.js +5 -5
- package/dist/utils/codebase-retrieval-router.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts +2 -2
- package/dist/utils/manifest-prune.js +4 -4
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/mirror-check.d.ts +3 -1
- package/dist/utils/mirror-check.d.ts.map +1 -1
- package/dist/utils/mirror-check.js +22 -11
- package/dist/utils/mirror-check.js.map +1 -1
- package/dist/utils/project-capabilities.js +5 -5
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/retrieval-agent-instructions.js +1 -1
- package/dist/utils/retrieval-agent-instructions.js.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.js +1 -1
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/dist/utils/template-fetcher.js +1 -1
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/template-hash.d.ts +2 -2
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +51 -18
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/workflow-dir.d.ts +13 -0
- package/dist/utils/workflow-dir.d.ts.map +1 -0
- package/dist/utils/workflow-dir.js +35 -0
- package/dist/utils/workflow-dir.js.map +1 -0
- package/dist/utils/workflow-ownership.d.ts +36 -0
- package/dist/utils/workflow-ownership.d.ts.map +1 -0
- package/dist/utils/workflow-ownership.js +137 -0
- package/dist/utils/workflow-ownership.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +1 -1
- package/dist/utils/workflow-resolver.js +1 -1
- package/package.json +2 -2
|
@@ -3,24 +3,24 @@ Safe git-add helpers for Trellis-owned paths.
|
|
|
3
3
|
|
|
4
4
|
Why this module exists
|
|
5
5
|
----------------------
|
|
6
|
-
A real user incident: a project's `.gitignore` listed `.
|
|
6
|
+
A real user incident: a project's `.gitignore` listed `.cstl/` (company-wide
|
|
7
7
|
template / personal habit). When `add_session.py` and `task.py archive` ran
|
|
8
8
|
their auto-commit and `git add` failed with `ignored by .gitignore`, the AI
|
|
9
9
|
agent driving the workflow "fixed" it by retrying with
|
|
10
|
-
`git add -f .
|
|
11
|
-
(`.
|
|
12
|
-
`.
|
|
10
|
+
`git add -f .cstl/` — which fan-out-included every ignored subtree
|
|
11
|
+
(`.cstl/.backup-*/`, `.cstl/worktrees/`, `.cstl/.template-hashes.json`,
|
|
12
|
+
`.cstl/.runtime/`), committing 548 files / 83474 lines of caches/backups.
|
|
13
13
|
|
|
14
14
|
Design
|
|
15
15
|
------
|
|
16
16
|
- Scripts only stage SPECIFIC product paths (journal files, index.md, the
|
|
17
|
-
current task dir, the archive dir). Never the whole `.
|
|
17
|
+
current task dir, the archive dir). Never the whole `.cstl/` tree.
|
|
18
18
|
- If plain `git add <specific>` fails with "ignored by", DO NOT retry with
|
|
19
|
-
``-f``. The presence of `.
|
|
20
|
-
intent ("keep .
|
|
19
|
+
``-f``. The presence of `.cstl/` in `.gitignore` is treated as user
|
|
20
|
+
intent ("keep .cstl/ local-only"). The script warns and skips the
|
|
21
21
|
auto-commit; users who want auto-staging can either fix their `.gitignore`
|
|
22
22
|
or set ``session_auto_commit: false`` and manage git themselves.
|
|
23
|
-
- The warning includes a negative example: ``Do NOT use `git add -f .
|
|
23
|
+
- The warning includes a negative example: ``Do NOT use `git add -f .cstl/` ...``
|
|
24
24
|
so any AI rereading the log doesn't reinvent the bug.
|
|
25
25
|
|
|
26
26
|
History note: 0.5.10 introduced an automatic ``git add -f`` retry on the
|
|
@@ -46,15 +46,15 @@ from .paths import (
|
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
# Paths under .
|
|
49
|
+
# Paths under .cstl/ that must NEVER be auto-staged. Listed here so the
|
|
50
50
|
# warning to the user can show concrete subpaths to ignore individually
|
|
51
|
-
# instead of ignoring the whole `.
|
|
51
|
+
# instead of ignoring the whole `.cstl/` tree.
|
|
52
52
|
TRELLIS_IGNORED_SUBPATHS = (
|
|
53
|
-
".
|
|
54
|
-
".
|
|
55
|
-
".
|
|
56
|
-
".
|
|
57
|
-
".
|
|
53
|
+
".cstl/.backup-*",
|
|
54
|
+
".cstl/worktrees/",
|
|
55
|
+
".cstl/.template-hashes.json",
|
|
56
|
+
".cstl/.runtime/",
|
|
57
|
+
".cstl/.cache/",
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
|
|
@@ -66,14 +66,14 @@ def safe_trellis_paths_to_add(repo_root: Path) -> list[str]:
|
|
|
66
66
|
checking afterwards.
|
|
67
67
|
|
|
68
68
|
Included:
|
|
69
|
-
- .
|
|
70
|
-
- .
|
|
71
|
-
- .
|
|
72
|
-
- .
|
|
69
|
+
- .cstl/workspace/<developer>/journal-*.md
|
|
70
|
+
- .cstl/workspace/<developer>/index.md
|
|
71
|
+
- .cstl/tasks/<task-dir>/ (every active task directory)
|
|
72
|
+
- .cstl/tasks/archive/ (whole archive subtree, if present)
|
|
73
73
|
|
|
74
74
|
Excluded (intentionally — these must not be staged):
|
|
75
|
-
- .
|
|
76
|
-
.
|
|
75
|
+
- .cstl/.backup-*, .cstl/worktrees/,
|
|
76
|
+
.cstl/.template-hashes.json, .cstl/.runtime/, .cstl/.cache/
|
|
77
77
|
"""
|
|
78
78
|
paths: list[str] = []
|
|
79
79
|
|
|
@@ -133,7 +133,7 @@ def safe_archive_paths_to_add(
|
|
|
133
133
|
commit boundary.
|
|
134
134
|
|
|
135
135
|
Backwards-compat: with no arguments, the function walks the whole
|
|
136
|
-
`.
|
|
136
|
+
`.cstl/tasks/` subtree the old way (active tasks + archive). New
|
|
137
137
|
callers should always pass `task_name`.
|
|
138
138
|
"""
|
|
139
139
|
paths: list[str] = []
|
|
@@ -206,11 +206,11 @@ def print_gitignore_warning(paths: list[str]) -> None:
|
|
|
206
206
|
"""Explain to the user (and any AI reading the log) what to do.
|
|
207
207
|
|
|
208
208
|
CRITICAL: includes the negative example
|
|
209
|
-
``Do NOT use `git add -f .
|
|
209
|
+
``Do NOT use `git add -f .cstl/``` — agents reading the warning are
|
|
210
210
|
known to invent that command, which fans out to ignored caches/backups.
|
|
211
211
|
"""
|
|
212
212
|
print(
|
|
213
|
-
"[WARN] git add failed because .
|
|
213
|
+
"[WARN] git add failed because .cstl/ paths are ignored by your .gitignore.",
|
|
214
214
|
file=sys.stderr,
|
|
215
215
|
)
|
|
216
216
|
print(
|
|
@@ -231,20 +231,20 @@ def print_gitignore_warning(paths: list[str]) -> None:
|
|
|
231
231
|
print(f"[WARN] {p}", file=sys.stderr)
|
|
232
232
|
else:
|
|
233
233
|
print(
|
|
234
|
-
"[WARN] .
|
|
234
|
+
"[WARN] .cstl/workspace/<developer>/{journal-*.md,index.md}",
|
|
235
235
|
file=sys.stderr,
|
|
236
236
|
)
|
|
237
237
|
print(
|
|
238
|
-
"[WARN] .
|
|
238
|
+
"[WARN] .cstl/tasks/<task-dir>/",
|
|
239
239
|
file=sys.stderr,
|
|
240
240
|
)
|
|
241
241
|
print(
|
|
242
|
-
"[WARN] .
|
|
242
|
+
"[WARN] .cstl/tasks/archive/",
|
|
243
243
|
file=sys.stderr,
|
|
244
244
|
)
|
|
245
245
|
print("[WARN]", file=sys.stderr)
|
|
246
246
|
print(
|
|
247
|
-
"[WARN] Recommended: change your .gitignore from `.
|
|
247
|
+
"[WARN] Recommended: change your .gitignore from `.cstl/` to specific",
|
|
248
248
|
file=sys.stderr,
|
|
249
249
|
)
|
|
250
250
|
print(
|
|
@@ -255,11 +255,11 @@ def print_gitignore_warning(paths: list[str]) -> None:
|
|
|
255
255
|
print(f"[WARN] {sub}", file=sys.stderr)
|
|
256
256
|
print("[WARN]", file=sys.stderr)
|
|
257
257
|
print(
|
|
258
|
-
"[WARN] Or, if you intentionally keep .
|
|
258
|
+
"[WARN] Or, if you intentionally keep .cstl/ local-only, set in",
|
|
259
259
|
file=sys.stderr,
|
|
260
260
|
)
|
|
261
261
|
print(
|
|
262
|
-
"[WARN] .
|
|
262
|
+
"[WARN] .cstl/config.yaml:",
|
|
263
263
|
file=sys.stderr,
|
|
264
264
|
)
|
|
265
265
|
print(
|
|
@@ -276,7 +276,7 @@ def print_gitignore_warning(paths: list[str]) -> None:
|
|
|
276
276
|
)
|
|
277
277
|
print("[WARN]", file=sys.stderr)
|
|
278
278
|
print(
|
|
279
|
-
"[WARN] Do NOT use `git add -f .
|
|
279
|
+
"[WARN] Do NOT use `git add -f .cstl/` — it pulls in backups, worktrees,",
|
|
280
280
|
file=sys.stderr,
|
|
281
281
|
)
|
|
282
282
|
print(
|