feat: rename skills/skiff to pouch and move ACK state under .pouch
Use ~/.pouch, the pouch CLI, and .pouch.yaml as the SSOT container. Keep the inner skills/ packages, and store ACK project state in .pouch/ack instead of docs/ack.
This commit is contained in:
@@ -189,10 +189,10 @@ def _timestamp(value: Any) -> datetime | None:
|
||||
|
||||
|
||||
def infer_project_root(document_path: Path) -> Path | None:
|
||||
"""从标准 docs/ack 布局或 Git marker 推断项目根,不解析文档 symlink。"""
|
||||
"""从标准 .pouch/ack 布局或 Git marker 推断项目根,不解析文档 symlink。"""
|
||||
lexical = document_path.expanduser().absolute()
|
||||
parent = lexical.parent
|
||||
if parent.name == "ack" and parent.parent.name == "docs":
|
||||
if parent.name == "ack" and parent.parent.name in {".pouch", "docs"}:
|
||||
return parent.parent.parent.resolve()
|
||||
for candidate in (parent, *parent.parents):
|
||||
if (candidate / ".git").exists():
|
||||
@@ -245,7 +245,7 @@ def _tasks_project_root(
|
||||
return inferred
|
||||
|
||||
# Legacy task boards may still declare repoPath. It is only a fallback for
|
||||
# non-standard layouts; docs/ack location is authoritative when available.
|
||||
# non-standard layouts; .pouch/ack location is authoritative when available.
|
||||
project = tasks_data.get("project")
|
||||
repo_path = project.get("repoPath") if isinstance(project, dict) else None
|
||||
if _nonempty(repo_path):
|
||||
@@ -779,10 +779,10 @@ def _validate_knowledge_file_binding(
|
||||
knowledge_file = project.get("knowledgeFile")
|
||||
if not _nonempty(knowledge_file):
|
||||
return ["[tasks] project.knowledgeFile 必填"]
|
||||
if knowledge_file != "docs/ack/knowledge.yaml":
|
||||
if knowledge_file != ".pouch/ack/knowledge.yaml":
|
||||
errors.append(
|
||||
"[tasks] project.knowledgeFile 必须固定为 "
|
||||
"'docs/ack/knowledge.yaml'"
|
||||
"'.pouch/ack/knowledge.yaml'"
|
||||
)
|
||||
relative = Path(knowledge_file)
|
||||
segments = knowledge_file.replace("\\", "/").split("/")
|
||||
@@ -812,7 +812,7 @@ def _validate_knowledge_file_binding(
|
||||
binding_root = project_root or declared_root
|
||||
if binding_root is None or not binding_root.is_dir():
|
||||
errors.append(
|
||||
"[tasks] 无法从 docs/ack 布局确定现有项目根目录;"
|
||||
"[tasks] 无法从 .pouch/ack 布局确定现有项目根目录;"
|
||||
"请传入 --project-root"
|
||||
)
|
||||
return errors
|
||||
@@ -1071,7 +1071,7 @@ def main(argv: list[str] | None = None) -> int:
|
||||
parser.add_argument("--tasks", help="可选 tasks.yaml,用于跨文件引用校验")
|
||||
parser.add_argument(
|
||||
"--project-root",
|
||||
help="可选项目根目录;默认从 tasks.yaml 的 docs/ack 布局推断",
|
||||
help="可选项目根目录;默认从 tasks.yaml 的 .pouch/ack 布局推断",
|
||||
)
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user