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:
+16
-16
@@ -10,10 +10,10 @@ import unittest
|
||||
from pathlib import Path
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from skiff import cli
|
||||
from skiff import yaml_io
|
||||
from skiff.catalog import catalog_repo_path, catalog_skill_path
|
||||
from skiff.selector import SkillChoice, filter_choices, fit_to_width, select_skills
|
||||
from pouch import cli
|
||||
from pouch import yaml_io
|
||||
from pouch.catalog import catalog_repo_path, catalog_skill_path
|
||||
from pouch.selector import SkillChoice, filter_choices, fit_to_width, select_skills
|
||||
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
@@ -210,8 +210,8 @@ class SelectorTests(unittest.TestCase):
|
||||
"path": "skills",
|
||||
}
|
||||
|
||||
with patch("skiff.catalog.catalog_checkout_path", return_value=checkout):
|
||||
from skiff.catalog import discover_catalog_skills
|
||||
with patch("pouch.catalog.catalog_checkout_path", return_value=checkout):
|
||||
from pouch.catalog import discover_catalog_skills
|
||||
|
||||
self.assertEqual(discover_catalog_skills("unsafe", entry), {})
|
||||
|
||||
@@ -257,13 +257,13 @@ class SelectCommandTests(unittest.TestCase):
|
||||
def test_non_tty_exits_with_add_guidance(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
home = Path(temp)
|
||||
(home / ".skills" / "skills").mkdir(parents=True)
|
||||
(home / ".pouch" / "skills").mkdir(parents=True)
|
||||
env = os.environ.copy()
|
||||
env["HOME"] = str(home)
|
||||
env["PYTHONPATH"] = str(REPO_ROOT)
|
||||
|
||||
result = subprocess.run(
|
||||
[sys.executable, "-m", "skiff", "select"],
|
||||
[sys.executable, "-m", "pouch", "select"],
|
||||
cwd=REPO_ROOT,
|
||||
env=env,
|
||||
text=True,
|
||||
@@ -272,7 +272,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
)
|
||||
|
||||
self.assertNotEqual(result.returncode, 0)
|
||||
self.assertIn("skiff add <name>", result.stderr)
|
||||
self.assertIn("pouch add <name>", result.stderr)
|
||||
|
||||
def test_project_selection_installs_new_and_records_all_selected(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
@@ -306,7 +306,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
with (
|
||||
patch.object(cli.sys, "stdin", stdin),
|
||||
patch.object(cli.sys, "stdout", stdout),
|
||||
patch.object(cli, "ensure_skills_home"),
|
||||
patch.object(cli, "ensure_pouch_home"),
|
||||
patch.object(cli, "list_builtin_skills", return_value=["builtin-one"]),
|
||||
patch.object(cli, "skill_description", return_value="builtin"),
|
||||
patch.object(
|
||||
@@ -346,7 +346,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
):
|
||||
cli.cmd_select(args)
|
||||
|
||||
manifest = (project / ".skills.yaml").read_text(encoding="utf-8")
|
||||
manifest = (project / ".pouch.yaml").read_text(encoding="utf-8")
|
||||
|
||||
self.assertEqual(installed, ["catalog-one"])
|
||||
self.assertIn("builtin-one", manifest)
|
||||
@@ -405,7 +405,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
with (
|
||||
patch.object(cli.sys, "stdin", stdin),
|
||||
patch.object(cli.sys, "stdout", stdout),
|
||||
patch.object(cli, "ensure_skills_home"),
|
||||
patch.object(cli, "ensure_pouch_home"),
|
||||
patch.object(cli, "list_builtin_skills", return_value=[]),
|
||||
patch.object(
|
||||
cli,
|
||||
@@ -440,7 +440,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
with (
|
||||
patch.object(cli.sys, "stdin", stdin),
|
||||
patch.object(cli.sys, "stdout", stdout),
|
||||
patch.object(cli, "ensure_skills_home"),
|
||||
patch.object(cli, "ensure_pouch_home"),
|
||||
patch.object(cli, "list_builtin_skills", return_value=[]),
|
||||
patch.object(
|
||||
cli,
|
||||
@@ -506,7 +506,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
with (
|
||||
patch.object(cli.sys, "stdin", stdin),
|
||||
patch.object(cli.sys, "stdout", stdout),
|
||||
patch.object(cli, "ensure_skills_home"),
|
||||
patch.object(cli, "ensure_pouch_home"),
|
||||
patch.object(cli, "list_builtin_skills", return_value=[]),
|
||||
patch.object(cli, "load_catalog", return_value={}),
|
||||
patch.object(
|
||||
@@ -567,7 +567,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
patch.object(cli.sys, "stdin", stdin),
|
||||
patch.object(cli.sys, "stdout", stdout),
|
||||
patch.object(cli, "SKILLS_DIR", skills_root),
|
||||
patch.object(cli, "ensure_skills_home"),
|
||||
patch.object(cli, "ensure_pouch_home"),
|
||||
patch.object(cli, "list_builtin_skills", return_value=["ack"]),
|
||||
patch.object(cli, "skill_description", return_value="builtin ack"),
|
||||
patch.object(
|
||||
@@ -575,7 +575,7 @@ class SelectCommandTests(unittest.TestCase):
|
||||
"load_catalog",
|
||||
return_value={
|
||||
"skills": {
|
||||
"repo": "~/.skills",
|
||||
"repo": "~/.pouch",
|
||||
"ref": "main",
|
||||
"path": "skills",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user