@pennixrv/trellis 0.7.2-beta.27 → 0.7.2-beta.29
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/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/workflow.d.ts +3 -0
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +13 -1
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/manifests/0.7.2-beta.28.json +8 -0
- package/dist/migrations/manifests/0.7.2-beta.29.json +8 -0
- package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +2 -0
- package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +4 -2
- package/dist/templates/common/skills/request-intake.md +3 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/config.py +15 -0
- package/dist/templates/trellis/scripts/common/markdown_format.py +107 -0
- package/dist/templates/trellis/scripts/common/task_workflow.py +64 -10
- package/dist/templates/trellis/scripts/markdown_format.py +40 -0
- package/dist/templates/trellis/workflow.md +10 -0
- package/package.json +2 -2
|
@@ -98,6 +98,21 @@ def _load_config(repo_root: Path | None = None) -> dict:
|
|
|
98
98
|
return parsed if isinstance(parsed, dict) else {}
|
|
99
99
|
|
|
100
100
|
|
|
101
|
+
def markdown_format_gate_enabled(repo_root: Path) -> bool:
|
|
102
|
+
"""Keep existing projects off by default; report unreadable settings to the gate."""
|
|
103
|
+
config_file = _get_config_path(repo_root)
|
|
104
|
+
try:
|
|
105
|
+
content = config_file.read_text(encoding="utf-8")
|
|
106
|
+
except FileNotFoundError:
|
|
107
|
+
return False
|
|
108
|
+
value = parse_simple_yaml(content, source=str(config_file)).get("markdown_format_gate")
|
|
109
|
+
if value is None:
|
|
110
|
+
return False
|
|
111
|
+
if str(value).strip().lower() not in (*TRUE_CONFIG_VALUES, *FALSE_CONFIG_VALUES):
|
|
112
|
+
raise ValueError("markdown_format_gate must be a boolean")
|
|
113
|
+
return coerce_config_bool(value, False, "markdown_format_gate")
|
|
114
|
+
|
|
115
|
+
|
|
101
116
|
def get_session_commit_message(repo_root: Path | None = None) -> str:
|
|
102
117
|
"""Get the commit message for auto-committing session records."""
|
|
103
118
|
config = _load_config(repo_root)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"""Narrow Markdown checks for known rendering failures."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
import re
|
|
7
|
+
import unicodedata
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
_FENCE = re.compile(r"^[ \t]*(?:(?:[-+*]|\d+[.)])[ \t]+)?(`{3,}|~{3,})(.*)$")
|
|
11
|
+
_LITERAL = re.compile(
|
|
12
|
+
r"<!--[\s\S]*?(?:-->|\Z)|(?<!`)(`+)(?!`)[\s\S]*?(?<!`)\1(?!`)"
|
|
13
|
+
r'|“[^”\n]*”|‘[^’\n]*’|「[^」\n]*」|『[^』\n]*』|"[^"\n]*"'
|
|
14
|
+
)
|
|
15
|
+
_STRONG = re.compile(r"(?<!\*)\*\*(?!\*)[^\s*][^*\r\n]*?(?<!\*)\*\*(?!\*)")
|
|
16
|
+
_STRONG_PUNCTUATION = "::;;,,。!?!?"
|
|
17
|
+
_WEB_REF = r"turn[0-9]+[a-z]+[0-9]+"
|
|
18
|
+
_WEB_MARKER = re.compile(rf"\uE200cite\uE202{_WEB_REF}(?:\uE202{_WEB_REF})*\uE201")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass(frozen=True)
|
|
22
|
+
class FormatIssue:
|
|
23
|
+
offset: int
|
|
24
|
+
length: int
|
|
25
|
+
message: str
|
|
26
|
+
replacement: str | None = None
|
|
27
|
+
|
|
28
|
+
def diagnostic(self, path: str, text: str) -> str:
|
|
29
|
+
line = text.count("\n", 0, self.offset) + 1
|
|
30
|
+
column = self.offset - text.rfind("\n", 0, self.offset)
|
|
31
|
+
return f"{path}:{line}:{column}: {self.message}"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _escaped(text: str, offset: int) -> bool:
|
|
35
|
+
start = offset
|
|
36
|
+
while start and text[start - 1] == "\\":
|
|
37
|
+
start -= 1
|
|
38
|
+
return (offset - start) % 2 != 0
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _mask(text: str) -> str:
|
|
42
|
+
return re.sub(r"[^\r\n]", " ", text)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _prose(text: str) -> str:
|
|
46
|
+
# Keep offsets stable, and do not pair inline delimiters across block boundaries.
|
|
47
|
+
output: list[str] = []
|
|
48
|
+
paragraph: list[str] = []
|
|
49
|
+
fence = ""
|
|
50
|
+
|
|
51
|
+
def flush() -> None:
|
|
52
|
+
if paragraph:
|
|
53
|
+
body = "".join(paragraph)
|
|
54
|
+
output.append(_LITERAL.sub(
|
|
55
|
+
lambda match: match[0] if _escaped(body, match.start()) else _mask(match[0]),
|
|
56
|
+
body,
|
|
57
|
+
))
|
|
58
|
+
paragraph.clear()
|
|
59
|
+
|
|
60
|
+
for line in text.splitlines(keepends=True):
|
|
61
|
+
raw = line.rstrip("\r\n")
|
|
62
|
+
match = _FENCE.match(raw)
|
|
63
|
+
if fence:
|
|
64
|
+
output.append(_mask(line))
|
|
65
|
+
if match and raw.lstrip(" \t").startswith(fence) and not match[2].strip():
|
|
66
|
+
fence = ""
|
|
67
|
+
elif match and (match[1][0] == "~" or "`" not in match[2]):
|
|
68
|
+
flush()
|
|
69
|
+
fence = match[1]
|
|
70
|
+
output.append(_mask(line))
|
|
71
|
+
elif not raw.strip() or raw.startswith((" ", "\t")) or raw.lstrip().startswith(">"):
|
|
72
|
+
flush()
|
|
73
|
+
output.append(_mask(line))
|
|
74
|
+
else:
|
|
75
|
+
paragraph.append(line)
|
|
76
|
+
flush()
|
|
77
|
+
return "".join(output)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def inspect_markdown(text: str) -> list[FormatIssue]:
|
|
81
|
+
prose = _prose(text)
|
|
82
|
+
issues = []
|
|
83
|
+
for match in _STRONG.finditer(prose):
|
|
84
|
+
start, end = match.span()
|
|
85
|
+
if (end == len(prose) or not prose[start + 2].isalnum()
|
|
86
|
+
or prose[end - 3] not in _STRONG_PUNCTUATION):
|
|
87
|
+
continue
|
|
88
|
+
if (not unicodedata.name(prose[end], "").startswith("CJK UNIFIED IDEOGRAPH-")
|
|
89
|
+
or _escaped(text, start) or _escaped(text, end - 2)
|
|
90
|
+
or prose[start:end] != text[start:end]):
|
|
91
|
+
continue
|
|
92
|
+
tail = end - 3
|
|
93
|
+
while unicodedata.category(prose[tail - 1]).startswith("P"):
|
|
94
|
+
tail -= 1
|
|
95
|
+
replacement = "**" + prose[tail:end - 2] if prose[tail - 1].isalnum() else None
|
|
96
|
+
issues.append(FormatIssue(tail, end - tail, "move punctuation outside closing '**'", replacement))
|
|
97
|
+
for match in _WEB_MARKER.finditer(prose):
|
|
98
|
+
if not _escaped(text, match.start()):
|
|
99
|
+
issues.append(FormatIssue(match.start(), len(match[0]), "unresolved web citation marker; supply a verified source link"))
|
|
100
|
+
return sorted(issues, key=lambda issue: issue.offset)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def preview_corrections(text: str, issues: list[FormatIssue]) -> str:
|
|
104
|
+
for issue in reversed(issues):
|
|
105
|
+
if issue.replacement is not None:
|
|
106
|
+
text = text[:issue.offset] + issue.replacement + text[issue.offset + issue.length:]
|
|
107
|
+
return text
|
|
@@ -15,8 +15,10 @@ import subprocess
|
|
|
15
15
|
import sys
|
|
16
16
|
from pathlib import Path
|
|
17
17
|
|
|
18
|
+
from .config import markdown_format_gate_enabled
|
|
18
19
|
from .git import run_git
|
|
19
20
|
from .io import read_json_checked, write_json
|
|
21
|
+
from .markdown_format import inspect_markdown
|
|
20
22
|
from .paths import FILE_TASK_JSON, get_repo_root
|
|
21
23
|
from .task_utils import is_within_tasks_dir, resolve_task_dir, run_task_hooks
|
|
22
24
|
|
|
@@ -331,7 +333,7 @@ def _invalidate_from(state: dict, first_phase: str, keep_first: bool = False) ->
|
|
|
331
333
|
state["closeout_disposition"] = None
|
|
332
334
|
|
|
333
335
|
|
|
334
|
-
def _artifact_digest(task_dir: Path, refs: list[str]) -> str:
|
|
336
|
+
def _artifact_digest(task_dir: Path, refs: list[str], *, format_errors: list[str] | None = None) -> str:
|
|
335
337
|
if not refs:
|
|
336
338
|
return EMPTY_ARTIFACT_REVISION
|
|
337
339
|
digest = hashlib.sha256()
|
|
@@ -348,6 +350,13 @@ def _artifact_digest(task_dir: Path, refs: list[str]) -> str:
|
|
|
348
350
|
content = resolved.read_bytes()
|
|
349
351
|
except (OSError, ValueError) as error:
|
|
350
352
|
raise TaskWorkflowError("TASK_PHASE_ARTIFACT_INVALID", f"cannot read task artifact {value}: {error}") from error
|
|
353
|
+
if format_errors is not None and candidate.suffix.lower() in {".md", ".markdown"}:
|
|
354
|
+
try:
|
|
355
|
+
text = content.decode("utf-8")
|
|
356
|
+
except UnicodeError as error:
|
|
357
|
+
format_errors.append(f"{value}: cannot decode Markdown as UTF-8: {error}")
|
|
358
|
+
else:
|
|
359
|
+
format_errors.extend(issue.diagnostic(value, text) for issue in inspect_markdown(text))
|
|
351
360
|
digest.update(value.encode("utf-8"))
|
|
352
361
|
digest.update(b"\0")
|
|
353
362
|
digest.update(content)
|
|
@@ -355,6 +364,20 @@ def _artifact_digest(task_dir: Path, refs: list[str]) -> str:
|
|
|
355
364
|
return digest.hexdigest()
|
|
356
365
|
|
|
357
366
|
|
|
367
|
+
def _check_candidate(task_dir: Path, refs: list[str], *expected_revisions: str | None) -> str:
|
|
368
|
+
try:
|
|
369
|
+
enabled = markdown_format_gate_enabled(get_repo_root(task_dir))
|
|
370
|
+
except (OSError, ValueError) as error:
|
|
371
|
+
raise TaskWorkflowError("TASK_PHASE_MARKDOWN_CONFIG", str(error)) from error
|
|
372
|
+
errors: list[str] = []
|
|
373
|
+
revision = _artifact_digest(task_dir, refs, format_errors=errors if enabled else None)
|
|
374
|
+
if any(expected is not None and expected != revision for expected in expected_revisions):
|
|
375
|
+
raise TaskWorkflowError("TASK_PHASE_STALE_ARTIFACT", "artifact revision changed; rebind the current phase candidate with phase artifact")
|
|
376
|
+
if errors:
|
|
377
|
+
raise TaskWorkflowError("TASK_PHASE_MARKDOWN_FORMAT", "\n".join(errors))
|
|
378
|
+
return revision
|
|
379
|
+
|
|
380
|
+
|
|
358
381
|
def _require_current_accepted_artifacts(task_dir: Path, state: dict) -> None:
|
|
359
382
|
for phase_id in state["phase_ids"]:
|
|
360
383
|
record = state["phases"][phase_id]
|
|
@@ -704,9 +727,7 @@ def _update(args: argparse.Namespace, task_dir: Path, data: dict, state: dict) -
|
|
|
704
727
|
if current != PHASE_IDS[0]:
|
|
705
728
|
_require_current_omissions(task_dir, state)
|
|
706
729
|
artifact_revision = _required_text(args.artifact_revision, "--artifact-revision")
|
|
707
|
-
|
|
708
|
-
if artifact_revision != record["artifact_revision"] or current_revision != record["artifact_revision"]:
|
|
709
|
-
raise TaskWorkflowError("TASK_PHASE_STALE_ARTIFACT", "artifact revision changed; refresh the phase artifact before acceptance")
|
|
730
|
+
_check_candidate(task_dir, record["artifact_refs"], record["artifact_revision"], artifact_revision)
|
|
710
731
|
evidence = _refs(args.evidence_ref, "--evidence-ref", required=True)
|
|
711
732
|
result_ref = _required_text(args.result_ref, "--result-ref")
|
|
712
733
|
outcome = _required_text(args.outcome_kind, "--outcome-kind")
|
|
@@ -973,11 +994,41 @@ def cmd_phase(args: argparse.Namespace) -> int:
|
|
|
973
994
|
def _preflight(args: argparse.Namespace, task_dir: Path, state: dict) -> int:
|
|
974
995
|
if args.expected_route_revision is not None:
|
|
975
996
|
_expected_route(state, args.expected_route_revision)
|
|
976
|
-
print(json.dumps(
|
|
997
|
+
print(json.dumps(phase_preflight(task_dir, state, args.outcome_kind,
|
|
977
998
|
args.result_ref or args.contract_ref, args.artifact_revision), ensure_ascii=False))
|
|
978
999
|
return 0
|
|
979
1000
|
|
|
980
1001
|
|
|
1002
|
+
def phase_preflight(task_dir: Path, state: dict, outcome: str | None, ref: str | None, revision: str | None) -> dict:
|
|
1003
|
+
"""Validate a candidate before asking; never accept or mutate phase state."""
|
|
1004
|
+
current = state.get("current_phase_id")
|
|
1005
|
+
if current == PHASE_IDS[2] or (current == PHASE_IDS[3] and
|
|
1006
|
+
(ref is None or _matches_contract(state, ref))):
|
|
1007
|
+
return design_preflight(task_dir, state, outcome, ref, revision)
|
|
1008
|
+
current, record = _phase(state)
|
|
1009
|
+
if current != PHASE_IDS[0]:
|
|
1010
|
+
_require_current_requirements_confirmation(task_dir, state)
|
|
1011
|
+
_require_current_accepted_artifacts(task_dir, state)
|
|
1012
|
+
_require_current_omissions(task_dir, state)
|
|
1013
|
+
outcome = outcome or "accepted"
|
|
1014
|
+
if current == PHASE_IDS[0] and outcome != "accepted":
|
|
1015
|
+
raise TaskWorkflowError("TASK_PHASE_INVALID_TRANSITION", "requirements preflight requires phase_result=accepted")
|
|
1016
|
+
ref = _required_text(ref or record.get("result_ref"), "--result-ref")
|
|
1017
|
+
if ref not in record["artifact_refs"]:
|
|
1018
|
+
raise TaskWorkflowError("TASK_PHASE_STALE_ARTIFACT", "bind the current phase candidate with phase artifact before preflight")
|
|
1019
|
+
candidate = _check_candidate(task_dir, record["artifact_refs"], record["artifact_revision"], revision)
|
|
1020
|
+
if current == PHASE_IDS[0]:
|
|
1021
|
+
if _coverage_enabled(state):
|
|
1022
|
+
_requirements_ids(task_dir, ref)
|
|
1023
|
+
elif current == PHASE_IDS[1]:
|
|
1024
|
+
_check_coverage(task_dir, state, current, outcome, ref)
|
|
1025
|
+
return {
|
|
1026
|
+
"status": "ready", "task": task_dir.name, "phase_id": current,
|
|
1027
|
+
"route_revision": state["task_route_revision"], "input_revision": state["input_revision"],
|
|
1028
|
+
"outcome_kind": outcome, "result_ref": ref, "artifact_revision": candidate,
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
|
|
981
1032
|
def design_preflight(task_dir: Path, state: dict, outcome: str | None, ref: str | None, revision: str | None) -> dict:
|
|
982
1033
|
current = state.get("current_phase_id")
|
|
983
1034
|
if current not in {PHASE_IDS[2], PHASE_IDS[3]}:
|
|
@@ -992,15 +1043,18 @@ def design_preflight(task_dir: Path, state: dict, outcome: str | None, ref: str
|
|
|
992
1043
|
raise TaskWorkflowError("TASK_PHASE_INVALID_ROUTE", "preflight result conflicts with the route")
|
|
993
1044
|
ref = _required_text(ref or design.get("result_ref"), "--result-ref or --contract-ref")
|
|
994
1045
|
if current == PHASE_IDS[2]:
|
|
995
|
-
|
|
996
|
-
if ref not in design["artifact_refs"] or candidate != design["artifact_revision"]:
|
|
1046
|
+
if ref not in design["artifact_refs"]:
|
|
997
1047
|
raise TaskWorkflowError("TASK_PHASE_STALE_ARTIFACT", "bind the current design candidate with phase artifact before preflight")
|
|
1048
|
+
candidate = _check_candidate(task_dir, design["artifact_refs"], design["artifact_revision"], revision)
|
|
998
1049
|
else:
|
|
999
1050
|
if not _matches_contract(state, ref):
|
|
1000
1051
|
raise TaskWorkflowError("TASK_PHASE_CONTRACT_NOT_ACCEPTED", "preflight requires the contract in the design omission record")
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1052
|
+
if design.get("status") == "accepted":
|
|
1053
|
+
candidate = _artifact_digest(task_dir, [ref])
|
|
1054
|
+
if revision is not None and revision != candidate:
|
|
1055
|
+
raise TaskWorkflowError("TASK_PHASE_STALE_ARTIFACT", "candidate changed since review")
|
|
1056
|
+
else:
|
|
1057
|
+
candidate = _check_candidate(task_dir, [ref], revision)
|
|
1004
1058
|
_check_coverage(task_dir, state, PHASE_IDS[2], outcome, ref)
|
|
1005
1059
|
return {
|
|
1006
1060
|
"status": "ready", "task": task_dir.name, "route_revision": state["task_route_revision"],
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Check explicit UTF-8 Markdown files and optionally print a read-only fix diff."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
from difflib import unified_diff
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
from common.markdown_format import inspect_markdown, preview_corrections
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def main() -> int:
|
|
15
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
16
|
+
parser.add_argument("--preview", action="store_true", help="show only deterministic fixes as a diff")
|
|
17
|
+
parser.add_argument("files", nargs="+", type=Path)
|
|
18
|
+
args = parser.parse_args()
|
|
19
|
+
status = 0
|
|
20
|
+
for path in args.files:
|
|
21
|
+
try:
|
|
22
|
+
text = path.read_bytes().decode("utf-8")
|
|
23
|
+
except (OSError, UnicodeError) as error:
|
|
24
|
+
print(f"{path}: cannot read Markdown: {error}", file=sys.stderr)
|
|
25
|
+
status = 2
|
|
26
|
+
continue
|
|
27
|
+
issues = inspect_markdown(text)
|
|
28
|
+
for issue in issues:
|
|
29
|
+
print(issue.diagnostic(str(path), text), file=sys.stderr)
|
|
30
|
+
if args.preview:
|
|
31
|
+
fixed = preview_corrections(text, issues)
|
|
32
|
+
for line in unified_diff(text.splitlines(), fixed.splitlines(), str(path), str(path) + " (preview)", lineterm=""):
|
|
33
|
+
print(line)
|
|
34
|
+
if issues:
|
|
35
|
+
status = max(status, 1)
|
|
36
|
+
return status
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
if __name__ == "__main__":
|
|
40
|
+
sys.exit(main())
|
|
@@ -54,6 +54,16 @@ python3 ./.trellis/scripts/task.py reopen <task> --reason "<reason>" --evidence-
|
|
|
54
54
|
|
|
55
55
|
任务阶段、当前请求及依赖动作的停点不同。可查事实和独立且已授权的动作继续;必要未决事项在就绪时直接用宿主允许的同步入口提问,只有依赖该答案的动作暂停。必须用普通文本时直接说明问题;有独立工作先完成。请求已核验、用户明确要求停止,或具体外部依赖阻断全部剩余已授权动作时才结束回合。宿主权限和业务决定分别取得,进度、空答、Hook 纠偏或交付审查接受都不是任务终态。Codex 原生回合证据用 `task.py turn record`,有界维护用 `bounded_reply --scope maintenance`,无可继续工作的外部阻断用 `external_block --no-independent-work --blocker <具体阻断>`;两者都须核对实际动作及证据,不授予额外权限。
|
|
56
56
|
|
|
57
|
+
### 补充、提问与相称流程
|
|
58
|
+
|
|
59
|
+
- 用户明确要求补充当前方案的停止点、既有规范或同目标验收细节,直接核对、落实到当前方案及验证并继续,不询问是否纳入或重新确认基线。未接受的候选直接完善;已接受的核心合同保持可追溯,支持证据和决定写当前自然落点,不无区别绑定为上游合同。补充不能只记入台账却遗漏交付。
|
|
60
|
+
- 真正改变目标、交付主体、权限、安全或重大成本时,只处理剩余实质选择及最早受影响阶段;不得以冻结文档或复制旧摘要冒用批准。格式、路径和回执解析问题由代理自行修正,不构成用户选择。
|
|
61
|
+
- 主控在宿主允许且原生阻塞式提问工具可用时直接调用;同步提问期间阶段保持 active,不先制造 `phase wait`。收到答案后记录真实语义与影响并继续;工具返回 complete 不等于用户接受方案。正文提问仅用于实际宿主例外或必要人工操作,团队成员/委派执行者仍向主控报告。
|
|
62
|
+
- taskless、短路线和复杂依赖采用现有相应能力,不因补充增加固定访谈轮次,也不把局部失败、后台等待或单项验证当成全局外阻。真实安全审批、明确停止和不可替代的人工作业保持。
|
|
63
|
+
- 首次确认前先 `phase artifact` 绑定实际产物及覆盖证据,再 `phase preflight --result-ref <产物>`;需求与决策预检复用接受校验,设计保留原接口。预检只读,不接受、不授权;`artifact` 回执字段位于顶层,不按 `phase show` 的完整结构解析。
|
|
64
|
+
- 新初始化项目默认启用 Markdown 格式门禁;已有项目可在 `.trellis/config.yaml` 添加 `markdown_format_gate: true`。启用后,`phase preflight` 和 `phase accept` 检查当前阶段绑定的 Markdown,不回查已接受文档。用 `python3 ./.trellis/scripts/markdown_format.py --preview <文件>` 查看位置和可确定的最小改法;网页引用标记须改成已核实的来源,不自动补链接。保存并读回文档,再重新绑定后接受。门禁和预览都不会写入文档。
|
|
65
|
+
- 恢复沿已知任务和工具断点继续,只补缺失、冲突或接口必要事实,不重新全量启动。输出保留影响行动的结果和限制;用户明确要求的报告约定仍须遵守,不编造风险或重复内部自证。
|
|
66
|
+
|
|
57
67
|
只有阶段路线已到达获准的实施入口时,`task.py start` 才会将任务从 `planning` 改为 `in_progress`。分析任务可在交付审查与现场收尾阶段后仍处于 `planning` 时完成。`complete` 将任务移入 `completed/YYYY-MM/<task>`,`cancel` 将任务移入 `cancelled/<task>`,并在同一事务中清除任务的运行时会话指针。
|
|
58
68
|
|
|
59
69
|
工作流阶段回流与原生任务生命周期恢复分别操作。`completed` 或 `cancelled` 任务需要在原线程继续时,先用 `reopen` 恢复到 `planning`,保留终态事实、取消原因和恢复证据,清除旧运行态、实施授权和依赖准入;工作流阶段保持原记录。随后用 `phase return` 回到最早受影响阶段。实现任务重新接受合同、取得新的实施授权并核验准入后,才由 `start` 进入 `in_progress`。`phase return` 不能直接修改终态任务。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pennixrv/trellis",
|
|
3
|
-
"version": "0.7.2-beta.
|
|
3
|
+
"version": "0.7.2-beta.29",
|
|
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",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"inquirer": "^9.3.7",
|
|
36
36
|
"undici": "^6.21.0",
|
|
37
37
|
"zod": "^4.4.2",
|
|
38
|
-
"@pennixrv/trellis-core": "0.7.2-beta.
|
|
38
|
+
"@pennixrv/trellis-core": "0.7.2-beta.29"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@eslint/js": "^9.18.0",
|