@mindfoldhq/trellis 0.6.0-beta.19 → 0.6.0-beta.20

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.18",
3
+ "description": "Patch: archived task create collision guard, workflow-state tool routing clarification, and Codex 0.131 multi_agent_v2 timeout bounds.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(cli): `task.py create` now rejects slugs that already exist under `.trellis/tasks/archive/**` and prints the archived path (#291).\n- fix(workflow): `[workflow-state:in_progress]` now distinguishes sub-agent types from skills so agents do not call missing `trellis-implement` / `trellis-research` skills (#283).\n- fix(codex): `.codex/config.toml` emits `min_wait_timeout_ms`, `default_wait_timeout_ms`, and `max_wait_timeout_ms` together so Codex CLI 0.131+ accepts merged multi_agent_v2 timeout config (#294).",
7
+ "migrations": [],
8
+ "notes": "Patch on top of 0.5.17. Run `trellis update` to refresh task, workflow, and Codex templates. No migration command is required."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.20",
3
+ "description": "Beta patch: bundle the Trellis spec bootstrap skill in the CLI package and clarify Codex CLI 0.131+ timeout-bounds requirements.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(skills): `trellis-spec-bootstarp` is now included under `dist/templates/common/bundled-skills/`, so fresh `trellis init` and `trellis update` install the built-in spec bootstrap skill and track its reference files.\n- fix(docs): the v0.6.0-beta.19 changelog now states that the full Codex `multi_agent_v2` timeout-bounds config requires Codex CLI 0.131.0+.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.19. Run `trellis update` to install the bundled `trellis-spec-bootstarp` skill. Codex users should use Codex CLI 0.131.0+ for the full multi_agent_v2 timeout-bounds config."
9
+ }
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: trellis-spec-bootstarp
3
+ description: "Bootstrap project-specific Trellis coding specs with a platform-neutral single-agent workflow. Use when creating or refreshing .trellis/spec guidelines, analyzing a codebase with GitNexus, ABCoder, or source inspection, decomposing package/layer spec work, and writing real codebase-backed spec docs without placeholder text."
4
+ ---
5
+
6
+ # Trellis Spec Bootstarp
7
+
8
+ Use this skill to create or refresh `.trellis/spec/` guidelines from the real codebase. One capable agent owns the full loop: analyze the repository, choose the spec boundaries, write the docs, and verify the result. The workflow does not depend on a specific host, CLI, or agent brand.
9
+
10
+ ## Workflow
11
+
12
+ 1. Confirm Trellis is initialized and inspect the current `.trellis/spec/` tree.
13
+ 2. Analyze the repository architecture with the best available tools: GitNexus, ABCoder, language tooling, and direct source reads.
14
+ 3. Decompose the spec work by package and layer only when that reflects the actual codebase.
15
+ 4. Fill or reshape the spec files with concrete patterns, file paths, examples, and anti-patterns from the project.
16
+ 5. Verify that the final specs are internally consistent and contain no template placeholders.
17
+
18
+ ## Reference Routing
19
+
20
+ | Need | Read |
21
+ |------|------|
22
+ | Repository architecture analysis | [references/repository-analysis.md](references/repository-analysis.md) |
23
+ | Spec work decomposition and task planning | [references/spec-task-planning.md](references/spec-task-planning.md) |
24
+ | Writing high-signal Trellis spec files | [references/spec-writing.md](references/spec-writing.md) |
25
+ | GitNexus and ABCoder MCP setup | [references/mcp-setup.md](references/mcp-setup.md) |
26
+
27
+ ## Operating Rules
28
+
29
+ - Treat templates as starting points, not contracts. Delete, rename, split, or add spec files when the repository calls for it.
30
+ - Prefer source-backed rules over generic advice. Every important recommendation should point at a real file or repeated local pattern.
31
+ - Keep execution single-owner by default. Optional helper agents are an implementation detail, not a requirement or user-visible dependency.
32
+ - Do not write platform-specific instructions unless the target project already standardizes on that platform.
33
+ - Do not leave placeholder text, empty headings, or copied boilerplate in `.trellis/spec/`.
34
+
35
+ ## Done Criteria
36
+
37
+ - `.trellis/spec/` describes the project as it exists now.
38
+ - Each relevant package or layer has practical coding guidance with real examples.
39
+ - Non-applicable template sections are removed.
40
+ - `index.md` files match the final spec file set.
41
+ - Any required setup or analysis assumptions are documented in the relevant spec or task notes.
@@ -0,0 +1,90 @@
1
+ # MCP Setup
2
+
3
+ GitNexus and ABCoder are recommended when bootstrapping Trellis specs because they expose architecture and AST context to the agent. They are tool choices, not platform requirements. Configure them through whatever MCP mechanism your agent host provides.
4
+
5
+ ## GitNexus
6
+
7
+ GitNexus builds a code knowledge graph from the repository. Use it for module boundaries, execution flows, dependency relationships, blast radius, and graph queries.
8
+
9
+ ### Install and Index
10
+
11
+ ```bash
12
+ # Run from the repository root.
13
+ npx gitnexus analyze
14
+
15
+ # Check index status.
16
+ npx gitnexus status
17
+
18
+ # Re-index after code changes when the analysis is stale.
19
+ npx gitnexus analyze
20
+ ```
21
+
22
+ The index is written to `.gitnexus/`. Keep embeddings only if the project already uses them; otherwise a normal index is enough for spec bootstrapping.
23
+
24
+ ### MCP Server Command
25
+
26
+ Use this server command in the host's MCP configuration:
27
+
28
+ ```bash
29
+ npx -y gitnexus mcp
30
+ ```
31
+
32
+ ### Useful Tools
33
+
34
+ | Tool | Purpose |
35
+ |------|---------|
36
+ | `gitnexus_query` | Find execution flows and functional areas by concept |
37
+ | `gitnexus_context` | Inspect callers, callees, references, and process participation for a symbol |
38
+ | `gitnexus_impact` | Understand blast radius before changing a symbol |
39
+ | `gitnexus_detect_changes` | Check changed symbols and affected flows before finishing |
40
+ | `gitnexus_cypher` | Run direct graph queries |
41
+ | `gitnexus_list_repos` | List indexed repositories |
42
+
43
+ ## ABCoder
44
+
45
+ ABCoder parses code into UniAST and gives precise package, file, and node-level structure. Use it for signatures, type shapes, implementations, dependencies, and reverse references.
46
+
47
+ ### Install
48
+
49
+ ```bash
50
+ go install github.com/cloudwego/abcoder@latest
51
+ abcoder --help
52
+ ```
53
+
54
+ ### Parse Repositories
55
+
56
+ ```bash
57
+ abcoder parse /absolute/path/to/package \
58
+ --lang typescript \
59
+ --name package-name \
60
+ --output ~/abcoder-asts
61
+ ```
62
+
63
+ For monorepos, parse each package with a stable `--name` so task notes can reference the same repository names.
64
+
65
+ ### MCP Server Command
66
+
67
+ Use this server command in the host's MCP configuration:
68
+
69
+ ```bash
70
+ abcoder mcp ~/abcoder-asts
71
+ ```
72
+
73
+ ### Useful Tools
74
+
75
+ | Tool | Layer | Purpose |
76
+ |------|-------|---------|
77
+ | `list_repos` | 1 | List parsed repositories |
78
+ | `get_repo_structure` | 2 | Inspect packages and files |
79
+ | `get_package_structure` | 3 | Inspect nodes within a package |
80
+ | `get_file_structure` | 3 | Inspect functions, classes, types, and signatures in a file |
81
+ | `get_ast_node` | 4 | Retrieve code, dependencies, references, and implementations |
82
+
83
+ ## Verification
84
+
85
+ After configuration, verify from the agent host that both MCP servers are visible. Then run one simple query against each server before starting the spec writing pass.
86
+
87
+ ```bash
88
+ ls .gitnexus/meta.json
89
+ ls ~/abcoder-asts/*.json
90
+ ```
@@ -0,0 +1,59 @@
1
+ # Repository Analysis
2
+
3
+ The goal is to discover the project's real architecture before writing rules. Do not start from generic spec templates and fill blanks. Start from the code, then let the spec structure follow.
4
+
5
+ ## Analysis Order
6
+
7
+ 1. Read the existing `.trellis/spec/` tree and note which files are templates, outdated, or already project-specific.
8
+ 2. Inspect package manifests, build scripts, workspace config, and top-level documentation to identify packages and runtime layers.
9
+ 3. Use GitNexus for execution flows, module clusters, dependency hubs, and impact-sensitive areas.
10
+ 4. Use ABCoder or language-native tooling for exact signatures, types, class boundaries, and implementation examples.
11
+ 5. Read representative source and test files directly before turning any finding into a spec rule.
12
+
13
+ ## What To Capture
14
+
15
+ | Area | Questions |
16
+ |------|-----------|
17
+ | Package boundaries | What does each package own? What imports cross boundaries? |
18
+ | Runtime layers | Which code is CLI, backend, frontend, worker, shared library, test-only, or tooling? |
19
+ | Core abstractions | Which types, services, stores, commands, routes, or adapters define the system shape? |
20
+ | Data flow | Where does user input enter, how is it validated, and where does state persist? |
21
+ | Error handling | How are failures represented, logged, surfaced, and tested? |
22
+ | Configuration | Where do defaults, environment config, generated files, and templates live? |
23
+ | Tests | Which test styles are trusted examples for new work? |
24
+
25
+ ## GitNexus Usage
26
+
27
+ Start broad, then inspect specific symbols:
28
+
29
+ ```text
30
+ gitnexus_query({query: "CLI command execution flow"})
31
+ gitnexus_query({query: "template generation and migration"})
32
+ gitnexus_context({name: "SymbolName"})
33
+ gitnexus_cypher({query: "MATCH (n)-[r]->(m) RETURN n.name, type(r), m.name LIMIT 30"})
34
+ ```
35
+
36
+ Use GitNexus results to find important files and flows. Do not quote graph output as the final authority until you have checked the relevant source files.
37
+
38
+ ## ABCoder Usage
39
+
40
+ Use ABCoder when the spec needs exact code shapes:
41
+
42
+ ```text
43
+ list_repos()
44
+ get_repo_structure({repo_name: "package-name"})
45
+ get_file_structure({repo_name: "package-name", file_path: "src/example.ts"})
46
+ get_ast_node({repo_name: "package-name", node_ids: [{mod_path: "...", pkg_path: "...", name: "SymbolName"}]})
47
+ ```
48
+
49
+ ABCoder is most valuable for documenting constructor patterns, function signatures, type contracts, and reference chains.
50
+
51
+ ## Analysis Notes
52
+
53
+ Keep short notes while analyzing. The notes should include:
54
+
55
+ - Package or layer name.
56
+ - Files that define the local pattern.
57
+ - Rules the spec should teach.
58
+ - Anti-patterns found in old code, comments, tests, or migration paths.
59
+ - Spec files that should be created, deleted, renamed, or merged.
@@ -0,0 +1,61 @@
1
+ # Spec Task Planning
2
+
3
+ Use a single agent as the default execution model. The agent may create Trellis tasks for traceability, but the skill should not require a specific platform, CLI, or parallel worker model.
4
+
5
+ ## Decomposition
6
+
7
+ Create spec work units around real ownership boundaries:
8
+
9
+ - One package when a package has its own conventions.
10
+ - One layer when the same package has distinct frontend, backend, CLI, worker, or shared-library rules.
11
+ - One cross-cutting guide when a pattern spans packages and is not owned by one layer.
12
+
13
+ Avoid artificial decomposition. A small library usually needs one focused spec pass, not several tasks.
14
+
15
+ ## Task Shape
16
+
17
+ When a Trellis task is useful, write a concise PRD with these sections:
18
+
19
+ ```markdown
20
+ # Fill <package-or-layer> Trellis Specs
21
+
22
+ ## Goal
23
+ Write project-specific `.trellis/spec/` guidance for <scope>.
24
+
25
+ ## Scope
26
+ - Spec directory:
27
+ - Source directories to inspect:
28
+ - Tests to inspect:
29
+ - Out of scope:
30
+
31
+ ## Architecture Context
32
+ Summarize the concrete findings from repository analysis.
33
+
34
+ ## Files To Create Or Update
35
+ - `.trellis/spec/.../index.md`
36
+ - `.trellis/spec/.../<topic>.md`
37
+
38
+ ## Rules
39
+ - Adapt the spec file set to the real codebase.
40
+ - Use real source examples with file paths.
41
+ - Remove template-only sections that do not apply.
42
+ - Do not modify product source code unless the task explicitly asks for it.
43
+
44
+ ## Acceptance Criteria
45
+ - [ ] Specs contain concrete examples and anti-patterns from the repository.
46
+ - [ ] No placeholder text remains.
47
+ - [ ] Index files match the final spec files.
48
+ - [ ] Claims are backed by source files, tests, or project docs.
49
+ ```
50
+
51
+ ## Optional Helper Agents
52
+
53
+ If the host supports subagents, helpers can inspect independent packages or run verification. They are optional. The main agent still owns integration and final quality.
54
+
55
+ Helper tasks must have clear ownership:
56
+
57
+ - Read-only research tasks may inspect any source needed for the assigned scope.
58
+ - Write tasks should own disjoint spec directories.
59
+ - Verification tasks should check placeholder removal, broken links, and consistency.
60
+
61
+ Do not encode helper-agent names, vendor-specific commands, or platform-specific routing in the skill. Put only the required work and acceptance criteria in the task.
@@ -0,0 +1,70 @@
1
+ # Spec Writing
2
+
3
+ Trellis specs are coding guidance for future agents. They should explain how to work in this repository, not how a generic project might be organized.
4
+
5
+ ## Write From Evidence
6
+
7
+ Each important rule should be backed by one of these:
8
+
9
+ - A source file that demonstrates the preferred pattern.
10
+ - A test file that shows expected behavior.
11
+ - A project document that defines the convention.
12
+ - A repeated pattern across multiple files.
13
+
14
+ Use short snippets only when they make the rule clearer. Prefer linking to the file path and naming the symbol or behavior.
15
+
16
+ ## File Structure
17
+
18
+ Keep the spec tree aligned with the project:
19
+
20
+ - Keep `index.md` as the navigation file for the spec directory.
21
+ - Split topics when developers would look for them independently.
22
+ - Merge topics when separate files would repeat the same rule.
23
+ - Delete template files that do not apply.
24
+ - Add new files for important local patterns the template missed.
25
+
26
+ ## Content Standards
27
+
28
+ Good spec sections include:
29
+
30
+ - When the rule applies.
31
+ - The local pattern to follow.
32
+ - The source or test files that prove the pattern.
33
+ - Common mistakes or anti-patterns.
34
+ - Verification commands or checks when they are specific and reliable.
35
+
36
+ Avoid:
37
+
38
+ - Placeholder prose.
39
+ - Generic framework advice.
40
+ - Tool instructions that only work in one agent host.
41
+ - Long copied code blocks.
42
+ - Rules based on a single accidental implementation detail.
43
+
44
+ ## Example Shape
45
+
46
+ ```markdown
47
+ ## Command Handlers
48
+
49
+ Command handlers should keep argument parsing, validation, and side effects separate. The local pattern is:
50
+
51
+ - Parse CLI flags at the command boundary.
52
+ - Convert raw inputs into typed task options before invoking core logic.
53
+ - Keep filesystem writes in the command or service layer, not in template helpers.
54
+
55
+ Reference files:
56
+ - `packages/cli/src/commands/example.ts`
57
+ - `packages/cli/test/commands/example.test.ts`
58
+
59
+ Avoid passing raw `process.argv` or unvalidated config objects into shared helpers.
60
+ ```
61
+
62
+ ## Final Pass
63
+
64
+ Before finishing:
65
+
66
+ ```bash
67
+ grep -R "To be filled\\|TODO: fill\\|placeholder" .trellis/spec
68
+ ```
69
+
70
+ Also check links, index files, and whether any spec still describes a template rather than this repository.
@@ -593,3 +593,41 @@ const { getMigrationsForVersion } = require('./dist/migrations/index.js');
593
593
  console.log('From 0.2.12:', getMigrationsForVersion('0.2.12', 'CURRENT').length);
594
594
  "
595
595
  ```
596
+
597
+ ## Release Checklist: Bundled Assets
598
+
599
+ When release notes or docs claim an asset is bundled, installed automatically, or
600
+ included with Trellis, verify the whole distribution path:
601
+
602
+ - [ ] Source file exists in the branch being tagged, not only in another branch,
603
+ docs submodule, or marketplace tree.
604
+ - [ ] `pnpm build` copies the asset into `dist/templates/**`.
605
+ - [ ] `npm pack --dry-run --json` includes the expected `dist/**` path.
606
+ - [ ] The built binary installs the asset in a fresh temp repository.
607
+ - [ ] `.trellis/.template-hashes.json` tracks the generated asset path.
608
+ - [ ] `trellis update --dry-run` reports `Already up to date!` in that temp
609
+ repository.
610
+
611
+ **Why this matters**: docs/changelog text can move independently from the code
612
+ branch that owns distributable templates. A feature can be documented as bundled
613
+ while the published npm tarball still lacks the files.
614
+
615
+ ```bash
616
+ pnpm --filter @mindfoldhq/trellis build
617
+
618
+ cd packages/cli
619
+ npm pack --dry-run --json | grep 'dist/templates/common/bundled-skills/<skill>/SKILL.md'
620
+ cd ../..
621
+
622
+ tmpdir=$(mktemp -d /tmp/trellis-built-bin-smoke-XXXXXX)
623
+ printf '{"name":"trellis-smoke","version":"0.0.0"}\n' > "$tmpdir/package.json"
624
+ git -C "$tmpdir" init -q
625
+ (
626
+ cd "$tmpdir"
627
+ node /path/to/Trellis/packages/cli/bin/trellis.js init -u smoke --yes --claude --codex
628
+ test -f .claude/skills/<skill>/SKILL.md
629
+ test -f .agents/skills/<skill>/SKILL.md
630
+ grep -q '<skill>' .trellis/.template-hashes.json
631
+ node /path/to/Trellis/packages/cli/bin/trellis.js update --dry-run
632
+ )
633
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindfoldhq/trellis",
3
- "version": "0.6.0-beta.19",
3
+ "version": "0.6.0-beta.20",
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",
@@ -34,7 +34,7 @@
34
34
  "inquirer": "^9.3.7",
35
35
  "undici": "^6.21.0",
36
36
  "zod": "^4.4.2",
37
- "@mindfoldhq/trellis-core": "0.6.0-beta.19"
37
+ "@mindfoldhq/trellis-core": "0.6.0-beta.20"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@eslint/js": "^9.18.0",