Define the intake and assimilation practice (incoming/ drop zone -> frozen source snapshot -> Minimal Assimilation Profile -> disposition gate -> canon transformation -> versioned change notes) and run it on the first inputs. - infospace/assimilation/intake-and-assimilation-practice.md, incoming/README.md - assimilation/it-capability-canon: frozen source, comparison matrix, 26 mappings, 8 proposed changes, 7 open questions, decision record (adapt) - new model ITC-CAP with 41-capability machine-readable catalog, anchored to owning canon models; CILM rejected, Profile renamed, Provision made explicit - registered in canon.yaml / artifacts index / infospace.yaml; regenerated briefs, indexes, views; canon version 0.1.0-scaffold -> 0.2.0 + CHANGELOG - ITC-WP-0014 for promotion work; ITC-WP-0013 added to the workplan registry make validate: ok (65 artifacts, 0 errors/warnings). make test: 22 passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
63 lines
1.9 KiB
Python
63 lines
1.9 KiB
Python
import json
|
|
import shutil
|
|
|
|
from info_tech_canon.cli import main
|
|
from info_tech_canon.service import DEFAULT_INFOSPACE_ROOT
|
|
|
|
|
|
def test_cli_inspect_emits_json(capsys) -> None:
|
|
exit_code = main(["inspect"])
|
|
|
|
assert exit_code == 0
|
|
payload = json.loads(capsys.readouterr().out)
|
|
assert payload["ok"] is True
|
|
assert payload["infospace"]["artifact_count"] == 65
|
|
|
|
|
|
def test_cli_missing_profile_uses_structured_error(capsys) -> None:
|
|
exit_code = main(["profile", "inspect", "missing-profile"])
|
|
|
|
assert exit_code == 2
|
|
payload = json.loads(capsys.readouterr().out)
|
|
assert payload["ok"] is False
|
|
assert payload["error"]["code"] == "missing_profile"
|
|
|
|
|
|
def test_cli_small_saas_profile_validate(capsys) -> None:
|
|
exit_code = main(["profile", "validate", "small-saas"])
|
|
|
|
assert exit_code == 0
|
|
payload = json.loads(capsys.readouterr().out)
|
|
assert payload["ok"] is True
|
|
assert payload["details"]["kinds"]["service"] == 1
|
|
|
|
|
|
def test_cli_review_kit_emits_json(capsys) -> None:
|
|
exit_code = main(["review-kit"])
|
|
|
|
assert exit_code == 0
|
|
payload = json.loads(capsys.readouterr().out)
|
|
assert payload["ok"] is True
|
|
assert payload["review_kit"]["id"] == "review-kit/alignment"
|
|
assert "workflow" in payload["components"]
|
|
|
|
|
|
def test_cli_alignment_template_emits_json(capsys) -> None:
|
|
exit_code = main(["alignment-template"])
|
|
|
|
assert exit_code == 0
|
|
payload = json.loads(capsys.readouterr().out)
|
|
assert payload["ok"] is True
|
|
assert "## Current Fit" in payload["content"]
|
|
|
|
|
|
def test_cli_index_generates_views(capsys, tmp_path) -> None:
|
|
root = tmp_path / "infospace"
|
|
shutil.copytree(DEFAULT_INFOSPACE_ROOT, root)
|
|
|
|
exit_code = main(["--root", str(root), "index"])
|
|
|
|
assert exit_code == 0
|
|
payload = json.loads(capsys.readouterr().out)
|
|
assert payload["ok"] is True
|
|
assert (root / "views" / "kernel-overview.md").is_file()
|