feat(trellis): enhance bundled skills and workflow integration

- Updated bundled skills documentation to clarify the structure and usage across all platforms, ensuring consistency in skill root paths.
- Introduced a new `inject-spec-context.py` hook for path-scoped spec context injection, improving the relevance of injected specs during file interactions.
- Enhanced existing hooks to support workflow resolution, allowing for dynamic selection of workflows based on task context.
- Added a command to manage workflow selections for active tasks, enabling better task management and workflow adherence.
- Updated configuration options for spec injection, including character limits and refresh windows, to optimize performance and usability.
This commit is contained in:
yuxuanhui
2026-09-07 11:23:15 +08:00
parent ca3bd7a4b1
commit e567e5f717
23 changed files with 2525 additions and 130 deletions
+18
View File
@@ -281,6 +281,24 @@ def get_codex_dispatch_mode(repo_root: Path | None = None) -> str:
return "inline"
def get_default_workflow(repo_root: Path | None = None) -> str | None:
"""Return the team-shared default workflow id from config.yaml.
Reads the top-level ``default_workflow`` key — a slug naming a variant in
``.trellis/workflows/<id>.md``. Returns None when unset or blank. This is
the git-tracked, team-shared default; a per-developer override lives in the
gitignored ``.developer`` file (``workflow=<id>``, see
``paths.get_developer_workflow``) and outranks it. Fail-open: a missing or
non-string value simply means "no team default" — no warning (this is read
on every turn by hooks and must not add per-turn noise).
"""
config = _load_config(repo_root)
raw = config.get("default_workflow")
if not isinstance(raw, str):
return None
return raw.strip() or None
DEFAULT_CONTEXT_INJECTION_MAX_FILE_BYTES = 32768
DEFAULT_CONTEXT_INJECTION_MAX_ARTIFACT_BYTES = 65536
DEFAULT_CONTEXT_INJECTION_MAX_TOTAL_BYTES = 131072