flower-trellis 0.5.0-beta.3 → 0.5.0-beta.5

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.
@@ -13,6 +13,16 @@ For a new request, infer `discuss`, `inspect`, `direct_edit`, `task_plan`, or
13
13
  active-task state, and the latest explicit switch. High-confidence reversible
14
14
  steps proceed without a mechanical task-creation question.
15
15
 
16
+ Repair authorization and permission to skip task planning are separate. If the
17
+ repair scope is unknown, use `inspect` first and reclassify from evidence before
18
+ editing.
19
+
20
+ `direct_edit` requires known, bounded, local, low-risk, reversible scope and
21
+ simple validation. Permission/authentication/data-scope/security, shared
22
+ contracts, cross-package/layer or multi-entry behavior, database/migration/
23
+ configuration/release/external effects, historical regressions, systematic
24
+ validation, or unknown scope are `task_plan` signals.
25
+
16
26
  Clear complex implementation intent authorizes creating a planning task and
17
27
  entering `trellis-brainstorm`; it never authorizes `task.py start` or
18
28
  implementation. Ask one focused question only when ambiguity changes material
@@ -23,6 +33,10 @@ route silently; entering untracked `direct_edit`, creating/resuming a task, or
23
33
  switching intent gets one non-blocking status line. New unrelated requests
24
34
  return to automatic inference instead of inheriting a session-wide mode.
25
35
 
36
+ Selecting a repair (`fix item 1`, `change that`, `修一下`, `改一下`) is not a
37
+ no-task switch. Only an explicit current-request workflow instruction such as
38
+ `直接做` / `不要任务` may override automatic `task_plan`.
39
+
26
40
  If the latest switch leaves an auto-created planning task for untracked work,
27
41
  run `task_intent.py discard --task <current-task>` before changing route. Proceed
28
42
  only when it returns `status=discarded`; otherwise retain the task and report its
@@ -1,4 +1,5 @@
1
1
  - Infer `discuss`, `inspect`, `direct_edit`, `task_plan`, or `workflow_action` from the current request, its scope, risk, side effects, active-task state, and the latest explicit switch. Do not classify from one keyword alone.
2
+ - For repairs, inspect unknown scope before applying the hub's `direct_edit` / `task_plan` boundary.
2
3
  - High-confidence reversible steps proceed without a mechanical task-creation question. Explicit complex implementation intent authorizes creating a planning task and entering `trellis-brainstorm`; it does not authorize `task.py start` or implementation.
3
4
  - Ask one question only when ambiguity changes material side effects, or when destructive, production, database, credential, external-system, or permission boundaries require confirmation.
4
- - The latest explicit `走任务` / `不要任务` / `先讨论` / `直接做` / `先别做` style instruction wins for the current request. New unrelated requests return to automatic inference.
5
+ - The current explicit workflow switch wins; repair selection does not. Unrelated requests reset inference.
@@ -0,0 +1,28 @@
1
+ def clear_active_task(
2
+ repo_root: Path,
3
+ platform_input: dict[str, Any] | None = None,
4
+ platform: str | None = None,
5
+ ) -> ActiveTask:
6
+ """Clear the active task for the current or sole fallback session.
7
+
8
+ Args:
9
+ repo_root: Repository root.
10
+ platform_input: Platform hook input.
11
+ platform: Explicit platform name.
12
+
13
+ Returns:
14
+ The resolved task before cleanup, or an empty task when no session is safe to select.
15
+ """
16
+ context_key = resolve_context_key(platform_input, platform)
17
+ previous = resolve_active_task(repo_root, platform_input, platform)
18
+
19
+ # Fallback resolution is safe only when the runtime contains exactly one session file.
20
+ if previous.source_type == "session-fallback" and previous.context_key:
21
+ context_key = previous.context_key
22
+ if not context_key:
23
+ return ActiveTask(None, "none")
24
+
25
+ context_path = _context_path(repo_root, context_key)
26
+ if context_path.is_file():
27
+ _remove_file(context_path)
28
+ return previous
@@ -0,0 +1,15 @@
1
+ def clear_active_task(
2
+ repo_root: Path,
3
+ platform_input: dict[str, Any] | None = None,
4
+ platform: str | None = None,
5
+ ) -> ActiveTask:
6
+ """Clear the active task by deleting the current session context file."""
7
+ context_key = resolve_context_key(platform_input, platform)
8
+ if not context_key:
9
+ return ActiveTask(None, "none")
10
+
11
+ previous = resolve_active_task(repo_root, platform_input, platform)
12
+ context_path = _context_path(repo_root, context_key)
13
+ if context_path.is_file():
14
+ _remove_file(context_path)
15
+ return previous
@@ -2,13 +2,27 @@
2
2
  "schemaVersion": 2,
3
3
  "id": "workflow-state-missing-task",
4
4
  "purpose": "workflow_state",
5
- "operations": [{
6
- "id": "workflow-state-missing-task",
7
- "operation": "insert",
8
- "position": "after",
9
- "targets": [{ "kind": "workflow", "path": ".trellis/workflow.md", "missing": "error" }],
10
- "selector": { "type": "literal", "source": "selector.md" },
11
- "content": { "source": "content.md" },
12
- "legacyMarkers": [{ "namespace": "patch", "id": "workflow-state-stale-task" }]
13
- }]
5
+ "operations": [
6
+ {
7
+ "id": "workflow-state-missing-task",
8
+ "operation": "insert",
9
+ "position": "after",
10
+ "targets": [{ "kind": "workflow", "path": ".trellis/workflow.md", "missing": "error" }],
11
+ "selector": { "type": "literal", "source": "selector.md" },
12
+ "content": { "source": "content.md" },
13
+ "legacyMarkers": [{ "namespace": "patch", "id": "workflow-state-stale-task" }]
14
+ },
15
+ {
16
+ "id": "active-task-clear-session-fallback",
17
+ "operation": "replace",
18
+ "targets": [{
19
+ "kind": "file",
20
+ "path": ".trellis/scripts/common/active_task.py",
21
+ "missing": "error",
22
+ "markerStyle": "hash"
23
+ }],
24
+ "selector": { "type": "literal", "source": "active-task-clear-fallback-selector.py" },
25
+ "content": { "source": "active-task-clear-fallback-content.py" }
26
+ }
27
+ ]
14
28
  }
@@ -1,3 +1,4 @@
1
1
  No active task. Infer the current request intent before acting.
2
+ Repair intent alone is not a no-task switch; inspect unknown scope and reclassify before edits.
2
3
  Handle `discuss` and `inspect` silently. For `workflow_action`, load the named Trellis capability directly. For non-destructive `direct_edit`, state once that task/progress will not be recorded and proceed.
3
4
  For high-confidence complex implementation, create an auto-routed planning task through `task_intent.py create`, show one non-blocking switch hint, and enter `trellis-brainstorm`. Ask only for material ambiguity or independent safety gates.
@@ -1,7 +1,7 @@
1
1
  {
2
- "syncedAt": "2026-07-19T18:42:57.187Z",
2
+ "syncedAt": "2026-07-22T02:46:12.275Z",
3
3
  "syncedFrom": "vendor/skill-garden",
4
- "sourceCommit": "ea9117c62f620fab7a78d94b5e8e7f1582de1488",
4
+ "sourceCommit": "39aa348603bed63ecb4eff5fbf938cf558167d24",
5
5
  "common": {
6
6
  "codexSkills": [
7
7
  "craft-rpa",
@@ -202,6 +202,8 @@
202
202
  "workflow/runtime-contract-reference/runtime-reference-selector.md",
203
203
  "workflow/runtime-contract-reference/state-contract-comment-content.md",
204
204
  "workflow/runtime-contract-reference/state-contract-comment-selector.md",
205
+ "workflow/state-missing-task/active-task-clear-fallback-content.py",
206
+ "workflow/state-missing-task/active-task-clear-fallback-selector.py",
205
207
  "workflow/state-missing-task/content.md",
206
208
  "workflow/state-missing-task/patch.json",
207
209
  "workflow/state-missing-task/selector.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flower-trellis",
3
- "version": "0.5.0-beta.3",
3
+ "version": "0.5.0-beta.5",
4
4
  "description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -61,9 +61,9 @@
61
61
  "commit-and-tag-version": "^12.7.3"
62
62
  },
63
63
  "flowerReleaseNotes": {
64
- "version": "0.5.0-beta.3",
64
+ "version": "0.5.0-beta.5",
65
65
  "source": "CHANGELOG.md",
66
- "body": "### 🐛 修复 Bug Fixes\n\n* **enhancements:** 同步 missing_task 意图恢复 ([e1fae6d](https://github.com/SilentFlower/flower-trellis/commit/e1fae6d1adab0440371062b7f35316602d147c5e))\n\n\n### 🧰 维护 Maintenance\n\n* **trellis:** 同步项目 Flower 版本状态到 0.5.0-beta.2 ([855fc39](https://github.com/SilentFlower/flower-trellis/commit/855fc392eaa82cc15146a897d010bdc3a8dfbb93))",
66
+ "body": "### 🐛 修复 Bug Fixes\n\n* **enhancements:** 修复复杂 BUG 意图路由 ([e7877a3](https://github.com/SilentFlower/flower-trellis/commit/e7877a383efc7b840faad6175d2f15a2b7882a81))",
67
67
  "truncated": false
68
68
  }
69
69
  }