ssot-cli 0.1.3__tar.gz → 0.1.6.dev1__tar.gz

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.
Files changed (39) hide show
  1. {ssot_cli-0.1.3/src/ssot_cli.egg-info → ssot_cli-0.1.6.dev1}/PKG-INFO +31 -11
  2. ssot_cli-0.1.3/PKG-INFO → ssot_cli-0.1.6.dev1/README.md +26 -36
  3. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/pyproject.toml +5 -5
  4. ssot_cli-0.1.6.dev1/src/ssot_cli/adr_cmd.py +166 -0
  5. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/boundary_cmd.py +36 -32
  6. ssot_cli-0.1.6.dev1/src/ssot_cli/claim_cmd.py +163 -0
  7. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/common.py +6 -2
  8. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/evidence_cmd.py +36 -32
  9. ssot_cli-0.1.6.dev1/src/ssot_cli/feature_cmd.py +215 -0
  10. ssot_cli-0.1.6.dev1/src/ssot_cli/graph_cmd.py +28 -0
  11. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/init_cmd.py +10 -6
  12. ssot_cli-0.1.6.dev1/src/ssot_cli/issue_cmd.py +188 -0
  13. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/main.py +16 -3
  14. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/profile_cmd.py +39 -35
  15. ssot_cli-0.1.6.dev1/src/ssot_cli/registry_cmd.py +28 -0
  16. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/release_cmd.py +43 -39
  17. ssot_cli-0.1.6.dev1/src/ssot_cli/risk_cmd.py +177 -0
  18. ssot_cli-0.1.6.dev1/src/ssot_cli/spec_cmd.py +192 -0
  19. ssot_cli-0.1.6.dev1/src/ssot_cli/test_cmd.py +129 -0
  20. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/upgrade_cmd.py +9 -5
  21. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/validate_cmd.py +7 -3
  22. ssot_cli-0.1.3/README.md → ssot_cli-0.1.6.dev1/src/ssot_cli.egg-info/PKG-INFO +56 -6
  23. ssot_cli-0.1.6.dev1/src/ssot_cli.egg-info/requires.txt +5 -0
  24. ssot_cli-0.1.3/src/ssot_cli/adr_cmd.py +0 -143
  25. ssot_cli-0.1.3/src/ssot_cli/claim_cmd.py +0 -159
  26. ssot_cli-0.1.3/src/ssot_cli/feature_cmd.py +0 -202
  27. ssot_cli-0.1.3/src/ssot_cli/graph_cmd.py +0 -20
  28. ssot_cli-0.1.3/src/ssot_cli/issue_cmd.py +0 -184
  29. ssot_cli-0.1.3/src/ssot_cli/registry_cmd.py +0 -20
  30. ssot_cli-0.1.3/src/ssot_cli/risk_cmd.py +0 -173
  31. ssot_cli-0.1.3/src/ssot_cli/spec_cmd.py +0 -146
  32. ssot_cli-0.1.3/src/ssot_cli/test_cmd.py +0 -125
  33. ssot_cli-0.1.3/src/ssot_cli.egg-info/requires.txt +0 -5
  34. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/setup.cfg +0 -0
  35. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli/__init__.py +0 -0
  36. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli.egg-info/SOURCES.txt +0 -0
  37. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli.egg-info/dependency_links.txt +0 -0
  38. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli.egg-info/entry_points.txt +0 -0
  39. {ssot_cli-0.1.3 → ssot_cli-0.1.6.dev1}/src/ssot_cli.egg-info/top_level.txt +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ssot-cli
3
- Version: 0.1.3
3
+ Version: 0.1.6.dev1
4
4
  Summary: Primary CLI distribution for ssot-registry.
5
5
  Author-email: Jacob Stewart <jacob@swarmauri.com>
6
6
  License-Expression: Apache-2.0
7
- Project-URL: Homepage, https://github.com/groupsum/ssot-registry
8
- Project-URL: Repository, https://github.com/groupsum/ssot-registry
7
+ Project-URL: Homepage, https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-cli
8
+ Project-URL: Repository, https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-cli
9
9
  Project-URL: Issues, https://github.com/groupsum/ssot-registry/issues
10
10
  Keywords: ssot,cli,registry,governance,release-management,validation,developer-tools
11
11
  Classifier: Development Status :: 3 - Alpha
@@ -24,8 +24,8 @@ Classifier: Topic :: Software Development :: Quality Assurance
24
24
  Classifier: Topic :: Utilities
25
25
  Requires-Python: <3.14,>=3.10
26
26
  Description-Content-Type: text/markdown
27
- Requires-Dist: ssot-contracts<0.3.0,>=0.2.7
28
- Requires-Dist: ssot-core<0.3.0,>=0.2.7
27
+ Requires-Dist: ssot-contracts<0.3.0,>=0.2.11.dev1
28
+ Requires-Dist: ssot-core<0.3.0,>=0.2.11.dev1
29
29
  Requires-Dist: tomli>=2.0.1; python_version < "3.11"
30
30
 
31
31
  <div align="center">
@@ -42,7 +42,7 @@ Requires-Dist: tomli>=2.0.1; python_version < "3.11"
42
42
 
43
43
  `ssot-cli` is the primary command-line distribution for SSOT.
44
44
 
45
- It installs `ssot`, `ssot-cli`, and `ssot-registry` as equivalent executables over the same parser and runtime. The command surface is implemented here, while domain logic lives in `ssot-core` and shared contract metadata comes from `ssot-contracts`.
45
+ It installs `ssot`, `ssot-cli`, and `ssot-registry` as equivalent executables over the same parser and runtime. The command surface is implemented here, while domain logic lives in [ssot-core](https://pypi.org/project/ssot-core/) and shared contract metadata comes from [ssot-contracts](https://pypi.org/project/ssot-contracts/).
46
46
 
47
47
  - GitHub: https://github.com/groupsum/ssot-registry
48
48
 
@@ -64,7 +64,7 @@ For local development:
64
64
  python -m pip install -e pkgs/ssot-cli
65
65
  ```
66
66
 
67
- This package depends on `ssot-core` and `ssot-contracts`, so installing it gives you the full CLI runtime stack.
67
+ This package depends on [ssot-core](https://pypi.org/project/ssot-core/) and [ssot-contracts](https://pypi.org/project/ssot-contracts/), so installing it gives you the full CLI runtime stack.
68
68
 
69
69
  ## Executable names
70
70
 
@@ -84,6 +84,26 @@ Boundaries and releases are intentionally different:
84
84
  - Freezing a boundary locks that resolved scope and emits a boundary snapshot.
85
85
  - A release points at a frozen boundary and then bundles claims and evidence for certify, promote, publish, and revoke workflows.
86
86
 
87
+ ## Entity intent
88
+
89
+ Operators should read the top-level entity commands this way:
90
+
91
+ - `adr`: architectural decision records that capture why the system is designed the way it is.
92
+ - `spec`: specification documents that define normative, operational, governance, or local-policy contract.
93
+ - `feature`: implementation units that connect planning, delivery status, tests, claims, and SPEC coverage.
94
+ - `profile`: reusable capability or deployment bundles composed from features and nested profiles.
95
+ - `test`: verification rows that point at executable or procedural checks.
96
+ - `claim`: tiered statements about system behavior that must be supported by tests and evidence.
97
+ - `evidence`: concrete artifacts, reports, bundles, or logs that substantiate tests and claims.
98
+ - `issue`: plannable defects or work items that may block a release.
99
+ - `risk`: tracked exposure that must be mitigated, accepted, or retired.
100
+ - `boundary`: scoped delivery definition used to decide what a release is evaluated against.
101
+ - `release`: publication unit tied to a frozen boundary plus the claims and evidence needed for certification.
102
+ - `graph`: relationship export view of the registry.
103
+ - `registry`: full-document export view of the registry.
104
+
105
+ Each command's `--help` now describes not just what it does mechanically, but why an operator would use it and what each flag is meant to control.
106
+
87
107
  ## CLI quick reference
88
108
 
89
109
  ```bash
@@ -102,11 +122,11 @@ ssot registry --help
102
122
 
103
123
  Regenerate these assets with `python scripts/generate_cli_screenshots.py`.
104
124
 
105
- ![ssot top-level help](assets/ssot-cli-help.png)
125
+ ![ssot top-level help](https://raw.githubusercontent.com/groupsum/ssot-registry/main/pkgs/ssot-cli/assets/ssot-cli-help.png)
106
126
 
107
127
  Boundary command help:
108
128
 
109
- ![ssot boundary help](assets/ssot-cli-boundary-help.png)
129
+ ![ssot boundary help](https://raw.githubusercontent.com/groupsum/ssot-registry/main/pkgs/ssot-cli/assets/ssot-cli-boundary-help.png)
110
130
 
111
131
  ## CLI conventions
112
132
 
@@ -823,7 +843,7 @@ ssot release certify . --release-id rel:0.1.0 --write-report
823
843
  ## Package relationships
824
844
 
825
845
  - Package type: CLI distribution
826
- - Depends on: `ssot-registry`, `ssot-contracts`
827
- - Related packages: `ssot-tui`, `ssot-views`, `ssot-codegen`
846
+ - Depends on: [ssot-core](https://pypi.org/project/ssot-core/), [ssot-contracts](https://pypi.org/project/ssot-contracts/)
847
+ - Related packages: [ssot-registry](https://pypi.org/project/ssot-registry/), [ssot-tui](https://pypi.org/project/ssot-tui/), [ssot-views](https://pypi.org/project/ssot-views/), [ssot-codegen](https://pypi.org/project/ssot-codegen/)
828
848
 
829
849
  If you need the command-line interface, this is the package to install.
@@ -1,33 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: ssot-cli
3
- Version: 0.1.3
4
- Summary: Primary CLI distribution for ssot-registry.
5
- Author-email: Jacob Stewart <jacob@swarmauri.com>
6
- License-Expression: Apache-2.0
7
- Project-URL: Homepage, https://github.com/groupsum/ssot-registry
8
- Project-URL: Repository, https://github.com/groupsum/ssot-registry
9
- Project-URL: Issues, https://github.com/groupsum/ssot-registry/issues
10
- Keywords: ssot,cli,registry,governance,release-management,validation,developer-tools
11
- Classifier: Development Status :: 3 - Alpha
12
- Classifier: Environment :: Console
13
- Classifier: Intended Audience :: Developers
14
- Classifier: Intended Audience :: Information Technology
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3 :: Only
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Programming Language :: Python :: 3.13
22
- Classifier: Topic :: Software Development :: Documentation
23
- Classifier: Topic :: Software Development :: Quality Assurance
24
- Classifier: Topic :: Utilities
25
- Requires-Python: <3.14,>=3.10
26
- Description-Content-Type: text/markdown
27
- Requires-Dist: ssot-contracts<0.3.0,>=0.2.7
28
- Requires-Dist: ssot-core<0.3.0,>=0.2.7
29
- Requires-Dist: tomli>=2.0.1; python_version < "3.11"
30
-
31
1
  <div align="center">
32
2
  <h1>🔷 ssot-cli</h1>
33
3
  <p><strong>Primary command-line distribution for SSOT workflows.</strong></p>
@@ -42,7 +12,7 @@ Requires-Dist: tomli>=2.0.1; python_version < "3.11"
42
12
 
43
13
  `ssot-cli` is the primary command-line distribution for SSOT.
44
14
 
45
- It installs `ssot`, `ssot-cli`, and `ssot-registry` as equivalent executables over the same parser and runtime. The command surface is implemented here, while domain logic lives in `ssot-core` and shared contract metadata comes from `ssot-contracts`.
15
+ It installs `ssot`, `ssot-cli`, and `ssot-registry` as equivalent executables over the same parser and runtime. The command surface is implemented here, while domain logic lives in [ssot-core](https://pypi.org/project/ssot-core/) and shared contract metadata comes from [ssot-contracts](https://pypi.org/project/ssot-contracts/).
46
16
 
47
17
  - GitHub: https://github.com/groupsum/ssot-registry
48
18
 
@@ -64,7 +34,7 @@ For local development:
64
34
  python -m pip install -e pkgs/ssot-cli
65
35
  ```
66
36
 
67
- This package depends on `ssot-core` and `ssot-contracts`, so installing it gives you the full CLI runtime stack.
37
+ This package depends on [ssot-core](https://pypi.org/project/ssot-core/) and [ssot-contracts](https://pypi.org/project/ssot-contracts/), so installing it gives you the full CLI runtime stack.
68
38
 
69
39
  ## Executable names
70
40
 
@@ -84,6 +54,26 @@ Boundaries and releases are intentionally different:
84
54
  - Freezing a boundary locks that resolved scope and emits a boundary snapshot.
85
55
  - A release points at a frozen boundary and then bundles claims and evidence for certify, promote, publish, and revoke workflows.
86
56
 
57
+ ## Entity intent
58
+
59
+ Operators should read the top-level entity commands this way:
60
+
61
+ - `adr`: architectural decision records that capture why the system is designed the way it is.
62
+ - `spec`: specification documents that define normative, operational, governance, or local-policy contract.
63
+ - `feature`: implementation units that connect planning, delivery status, tests, claims, and SPEC coverage.
64
+ - `profile`: reusable capability or deployment bundles composed from features and nested profiles.
65
+ - `test`: verification rows that point at executable or procedural checks.
66
+ - `claim`: tiered statements about system behavior that must be supported by tests and evidence.
67
+ - `evidence`: concrete artifacts, reports, bundles, or logs that substantiate tests and claims.
68
+ - `issue`: plannable defects or work items that may block a release.
69
+ - `risk`: tracked exposure that must be mitigated, accepted, or retired.
70
+ - `boundary`: scoped delivery definition used to decide what a release is evaluated against.
71
+ - `release`: publication unit tied to a frozen boundary plus the claims and evidence needed for certification.
72
+ - `graph`: relationship export view of the registry.
73
+ - `registry`: full-document export view of the registry.
74
+
75
+ Each command's `--help` now describes not just what it does mechanically, but why an operator would use it and what each flag is meant to control.
76
+
87
77
  ## CLI quick reference
88
78
 
89
79
  ```bash
@@ -102,11 +92,11 @@ ssot registry --help
102
92
 
103
93
  Regenerate these assets with `python scripts/generate_cli_screenshots.py`.
104
94
 
105
- ![ssot top-level help](assets/ssot-cli-help.png)
95
+ ![ssot top-level help](https://raw.githubusercontent.com/groupsum/ssot-registry/main/pkgs/ssot-cli/assets/ssot-cli-help.png)
106
96
 
107
97
  Boundary command help:
108
98
 
109
- ![ssot boundary help](assets/ssot-cli-boundary-help.png)
99
+ ![ssot boundary help](https://raw.githubusercontent.com/groupsum/ssot-registry/main/pkgs/ssot-cli/assets/ssot-cli-boundary-help.png)
110
100
 
111
101
  ## CLI conventions
112
102
 
@@ -823,7 +813,7 @@ ssot release certify . --release-id rel:0.1.0 --write-report
823
813
  ## Package relationships
824
814
 
825
815
  - Package type: CLI distribution
826
- - Depends on: `ssot-registry`, `ssot-contracts`
827
- - Related packages: `ssot-tui`, `ssot-views`, `ssot-codegen`
816
+ - Depends on: [ssot-core](https://pypi.org/project/ssot-core/), [ssot-contracts](https://pypi.org/project/ssot-contracts/)
817
+ - Related packages: [ssot-registry](https://pypi.org/project/ssot-registry/), [ssot-tui](https://pypi.org/project/ssot-tui/), [ssot-views](https://pypi.org/project/ssot-views/), [ssot-codegen](https://pypi.org/project/ssot-codegen/)
828
818
 
829
819
  If you need the command-line interface, this is the package to install.
@@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ssot-cli"
7
- version = "0.1.3"
7
+ version = "0.1.6.dev1"
8
8
  description = "Primary CLI distribution for ssot-registry."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10,<3.14"
11
11
  license = "Apache-2.0"
12
12
  authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
13
13
  dependencies = [
14
- "ssot-contracts>=0.2.7,<0.3.0",
15
- "ssot-core>=0.2.7,<0.3.0",
14
+ "ssot-contracts>=0.2.11.dev1,<0.3.0",
15
+ "ssot-core>=0.2.11.dev1,<0.3.0",
16
16
  "tomli>=2.0.1; python_version < '3.11'",
17
17
  ]
18
18
  keywords = ["ssot", "cli", "registry", "governance", "release-management", "validation", "developer-tools"]
@@ -34,8 +34,8 @@ classifiers = [
34
34
  ]
35
35
 
36
36
  [project.urls]
37
- Homepage = "https://github.com/groupsum/ssot-registry"
38
- Repository = "https://github.com/groupsum/ssot-registry"
37
+ Homepage = "https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-cli"
38
+ Repository = "https://github.com/groupsum/ssot-registry/tree/main/pkgs/ssot-cli"
39
39
  Issues = "https://github.com/groupsum/ssot-registry/issues"
40
40
 
41
41
  [project.scripts]
@@ -0,0 +1,166 @@
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+
5
+ from ssot_registry.api import (
6
+ create_document,
7
+ create_document_reservation,
8
+ delete_document,
9
+ get_document,
10
+ list_document_reservations,
11
+ list_documents,
12
+ set_document_status,
13
+ sync_documents,
14
+ supersede_documents,
15
+ update_document,
16
+ )
17
+ from ssot_cli.common import add_path_argument, compact_dict
18
+
19
+
20
+ def register_adr(subparsers: argparse._SubParsersAction) -> None:
21
+ adr = subparsers.add_parser(
22
+ "adr",
23
+ help="ADR operations.",
24
+ description="Architectural decision records capture why the system is designed the way it is and preserve decision history.",
25
+ )
26
+ adr_sub = adr.add_subparsers(dest="adr_command", required=True)
27
+
28
+ create = adr_sub.add_parser(
29
+ "create",
30
+ help="Author a new architectural decision record.",
31
+ description="Create an ADR that captures a design decision, its rationale, and its document source.",
32
+ )
33
+ add_path_argument(create)
34
+ create.add_argument("--title", required=True, help="Human-readable ADR title shown to operators and reviewers.")
35
+ create.add_argument("--slug", required=True, help="Stable slug used to derive the ADR document id and filename.")
36
+ create.add_argument("--body", default=None, help="Inline ADR body text to persist without a separate authored payload file.")
37
+ create.add_argument("--body-file", default=None, help="Path to the ADR YAML or JSON body payload to import into the registry.")
38
+ create.add_argument("--number", type=int, default=None, help="Explicit ADR number to assign instead of auto-allocation.")
39
+ create.add_argument("--status", choices=["draft", "in_review", "accepted", "rejected", "withdrawn", "superseded", "retired"], default="draft", help="Current decision lifecycle state for the ADR.")
40
+ create.add_argument("--note", default=None, help="Lifecycle note that explains review, acceptance, or retirement context.")
41
+ create.add_argument("--origin", choices=["repo-local", "ssot-origin", "ssot-core"], default="repo-local", help="Source authority for the ADR document.")
42
+ create.add_argument("--reserve-range", default=None, help="Named reservation range to allocate the ADR number from.")
43
+ create.set_defaults(func=run_create)
44
+
45
+ get = adr_sub.add_parser("get", help="Show one ADR.", description="Fetch a single ADR by id for review or automation.")
46
+ add_path_argument(get)
47
+ get.add_argument("--id", required=True, help="ADR id to retrieve.")
48
+ get.set_defaults(func=run_get)
49
+
50
+ list_cmd = adr_sub.add_parser("list", help="List ADRs.", description="List ADR documents currently known to the registry.")
51
+ add_path_argument(list_cmd)
52
+ list_cmd.set_defaults(func=run_list)
53
+
54
+ update = adr_sub.add_parser(
55
+ "update",
56
+ help="Edit a repo-local ADR.",
57
+ description="Update mutable ADR fields such as title, body source, status, or lifecycle note.",
58
+ )
59
+ add_path_argument(update)
60
+ update.add_argument("--id", required=True, help="ADR id to update.")
61
+ update.add_argument("--title", default=None, help="Replacement ADR title.")
62
+ update.add_argument("--body", default=None, help="Replacement inline ADR body text.")
63
+ update.add_argument("--body-file", default=None, help="Replacement ADR body file to ingest.")
64
+ update.add_argument("--status", choices=["draft", "in_review", "accepted", "rejected", "withdrawn", "superseded", "retired"], default=None, help="New lifecycle state for the ADR.")
65
+ update.add_argument("--note", default=None, help="Updated lifecycle note or rationale.")
66
+ update.set_defaults(func=run_update)
67
+
68
+ set_status = adr_sub.add_parser(
69
+ "set-status",
70
+ help="Advance or revise ADR status.",
71
+ description="Change the lifecycle state of an ADR without editing other document fields.",
72
+ )
73
+ add_path_argument(set_status)
74
+ set_status.add_argument("--id", required=True, help="ADR id whose status should change.")
75
+ set_status.add_argument("--status", required=True, choices=["draft", "in_review", "accepted", "rejected", "withdrawn", "superseded", "retired"], help="Target lifecycle state to set.")
76
+ set_status.add_argument("--note", default=None, help="Reason or context for the status transition.")
77
+ set_status.set_defaults(func=run_set_status)
78
+
79
+ supersede = adr_sub.add_parser(
80
+ "supersede",
81
+ help="Mark older ADRs as replaced.",
82
+ description="Record that one ADR supersedes one or more earlier ADRs.",
83
+ )
84
+ add_path_argument(supersede)
85
+ supersede.add_argument("--id", required=True, help="Newer ADR that supersedes prior decisions.")
86
+ supersede.add_argument("--supersedes", nargs="+", required=True, help="ADR ids that are being replaced by `--id`.")
87
+ supersede.add_argument("--note", default=None, help="Transition note explaining why the older ADRs were superseded.")
88
+ supersede.set_defaults(func=run_supersede)
89
+
90
+ delete = adr_sub.add_parser("delete", help="Delete a repo-local ADR.", description="Remove a repo-local ADR entry and its associated document metadata.")
91
+ add_path_argument(delete)
92
+ delete.add_argument("--id", required=True, help="ADR id to delete.")
93
+ delete.set_defaults(func=run_delete)
94
+
95
+ sync = adr_sub.add_parser("sync", help="Refresh packaged ADRs.", description="Sync packaged ADR documents from installed sources into the repository.")
96
+ add_path_argument(sync)
97
+ sync.set_defaults(func=run_sync)
98
+
99
+ reserve = adr_sub.add_parser("reserve", help="Manage ADR number ranges.", description="Reserve ADR number ranges for a team, owner, or local namespace.")
100
+ reserve_sub = reserve.add_subparsers(dest="adr_reserve_command", required=True)
101
+ reserve_create = reserve_sub.add_parser("create", help="Reserve ADR numbers.", description="Create a repo-local reservation range for ADR numbering.")
102
+ add_path_argument(reserve_create)
103
+ reserve_create.add_argument("--name", required=True, help="Reservation owner or label.")
104
+ reserve_create.add_argument("--start", type=int, required=True, help="First ADR number included in the reservation.")
105
+ reserve_create.add_argument("--end", type=int, required=True, help="Last ADR number included in the reservation.")
106
+ reserve_create.set_defaults(func=run_reserve_create)
107
+
108
+ reserve_list = reserve_sub.add_parser("list", help="List ADR reservations.", description="Show ADR numbering reservations currently defined in the repository.")
109
+ add_path_argument(reserve_list)
110
+ reserve_list.set_defaults(func=run_reserve_list)
111
+
112
+
113
+ def run_create(args: argparse.Namespace) -> dict[str, object]:
114
+ return create_document(
115
+ args.path,
116
+ "adr",
117
+ title=args.title,
118
+ slug=args.slug,
119
+ body=args.body,
120
+ body_file=args.body_file,
121
+ number=args.number,
122
+ origin=args.origin,
123
+ reserve_range=args.reserve_range,
124
+ status=args.status,
125
+ note=args.note,
126
+ )
127
+
128
+
129
+ def run_get(args: argparse.Namespace) -> dict[str, object]:
130
+ return get_document(args.path, "adr", args.id)
131
+
132
+
133
+ def run_list(args: argparse.Namespace) -> dict[str, object]:
134
+ return list_documents(args.path, "adr")
135
+
136
+
137
+ def run_update(args: argparse.Namespace) -> dict[str, object]:
138
+ changes = compact_dict({"title": args.title, "body": args.body, "body_file": args.body_file, "status": args.status, "note": args.note})
139
+ if not changes:
140
+ raise ValueError("At least one update field is required")
141
+ return update_document(args.path, "adr", args.id, **changes)
142
+
143
+
144
+ def run_set_status(args: argparse.Namespace) -> dict[str, object]:
145
+ return set_document_status(args.path, "adr", args.id, status=args.status, note=args.note)
146
+
147
+
148
+ def run_supersede(args: argparse.Namespace) -> dict[str, object]:
149
+ return supersede_documents(args.path, "adr", args.id, supersedes=args.supersedes, note=args.note)
150
+
151
+
152
+ def run_delete(args: argparse.Namespace) -> dict[str, object]:
153
+ return delete_document(args.path, "adr", args.id)
154
+
155
+
156
+ def run_sync(args: argparse.Namespace) -> dict[str, object]:
157
+ return sync_documents(args.path, "adr")
158
+
159
+
160
+ def run_reserve_create(args: argparse.Namespace) -> dict[str, object]:
161
+ return create_document_reservation(args.path, "adr", name=args.name, start=args.start, end=args.end)
162
+
163
+
164
+ def run_reserve_list(args: argparse.Namespace) -> dict[str, object]:
165
+ return list_document_reservations(args.path, "adr")
166
+
@@ -18,68 +18,72 @@ from ssot_cli.common import add_optional_bool_argument, add_path_argument, compa
18
18
 
19
19
 
20
20
  def register_boundary(subparsers: argparse._SubParsersAction) -> None:
21
- boundary = subparsers.add_parser("boundary", help="Boundary operations.")
21
+ boundary = subparsers.add_parser(
22
+ "boundary",
23
+ help="Boundary operations.",
24
+ description="Boundaries define the scoped set of direct features and reusable profiles that a release is evaluated against.",
25
+ )
22
26
  boundary_sub = boundary.add_subparsers(dest="boundary_command", required=True)
23
27
 
24
- create = boundary_sub.add_parser("create", help="Create a boundary.")
28
+ create = boundary_sub.add_parser("create", help="Define a release boundary.", description="Create a scoped delivery boundary that selects the features and profiles a release is evaluated against.")
25
29
  add_path_argument(create)
26
- create.add_argument("--id", required=True)
27
- create.add_argument("--title", required=True)
28
- create.add_argument("--status", choices=["draft", "active", "frozen", "retired"], default="draft")
29
- add_optional_bool_argument(create, "--frozen", default=False, help_text="Whether the boundary is frozen.")
30
- create.add_argument("--feature-ids", nargs="*", default=[])
31
- create.add_argument("--profile-ids", nargs="*", default=[])
30
+ create.add_argument("--id", required=True, help="Normalized boundary id to create.")
31
+ create.add_argument("--title", required=True, help="Human-readable boundary title.")
32
+ create.add_argument("--status", choices=["draft", "active", "frozen", "retired"], default="draft", help="Current lifecycle state of the boundary.")
33
+ add_optional_bool_argument(create, "--frozen", default=False, help_text="Record whether the boundary contents are locked against further scope edits.")
34
+ create.add_argument("--feature-ids", nargs="*", default=[], help="Direct feature ids included in the scoped delivery unit.")
35
+ create.add_argument("--profile-ids", nargs="*", default=[], help="Profile ids included in the scoped delivery unit.")
32
36
  create.set_defaults(func=run_create)
33
37
 
34
- get = boundary_sub.add_parser("get", help="Get one boundary.")
38
+ get = boundary_sub.add_parser("get", help="Show one boundary.", description="Fetch a single boundary by id.")
35
39
  add_path_argument(get)
36
- get.add_argument("--id", required=True)
40
+ get.add_argument("--id", required=True, help="Boundary id to retrieve.")
37
41
  get.set_defaults(func=run_get)
38
42
 
39
- list_cmd = boundary_sub.add_parser("list", help="List boundaries.")
43
+ list_cmd = boundary_sub.add_parser("list", help="List boundaries.", description="List boundary records currently known to the registry.")
40
44
  add_path_argument(list_cmd)
41
45
  list_cmd.set_defaults(func=run_list)
42
46
 
43
- update = boundary_sub.add_parser("update", help="Update boundary fields.")
47
+ update = boundary_sub.add_parser("update", help="Edit boundary metadata.", description="Update mutable boundary fields without changing the feature or profile membership lists.")
44
48
  add_path_argument(update)
45
- update.add_argument("--id", required=True)
46
- update.add_argument("--title", default=None)
47
- update.add_argument("--status", choices=["draft", "active", "frozen", "retired"], default=None)
48
- add_optional_bool_argument(update, "--frozen", default=None, help_text="Set frozen state.")
49
+ update.add_argument("--id", required=True, help="Boundary id to update.")
50
+ update.add_argument("--title", default=None, help="Replacement boundary title.")
51
+ update.add_argument("--status", choices=["draft", "active", "frozen", "retired"], default=None, help="Updated lifecycle state.")
52
+ add_optional_bool_argument(update, "--frozen", default=None, help_text="Change whether the boundary is locked against scope edits.")
49
53
  update.set_defaults(func=run_update)
50
54
 
51
- delete = boundary_sub.add_parser("delete", help="Delete a boundary.")
55
+ delete = boundary_sub.add_parser("delete", help="Delete a boundary.", description="Remove a boundary record from the registry.")
52
56
  add_path_argument(delete)
53
- delete.add_argument("--id", required=True)
57
+ delete.add_argument("--id", required=True, help="Boundary id to delete.")
54
58
  delete.set_defaults(func=run_delete)
55
59
 
56
- add_feature = boundary_sub.add_parser("add-feature", help="Add feature ids to a boundary.")
60
+ add_feature = boundary_sub.add_parser("add-feature", help="Add features to a boundary.", description="Include one or more direct features in the scoped delivery boundary.")
57
61
  add_path_argument(add_feature)
58
- add_feature.add_argument("--id", required=True)
59
- add_feature.add_argument("--feature-ids", nargs="+", required=True)
62
+ add_feature.add_argument("--id", required=True, help="Boundary id that should receive the features.")
63
+ add_feature.add_argument("--feature-ids", nargs="+", required=True, help="Feature ids to include in the boundary.")
60
64
  add_feature.set_defaults(func=run_add_feature)
61
65
 
62
- remove_feature = boundary_sub.add_parser("remove-feature", help="Remove feature ids from a boundary.")
66
+ remove_feature = boundary_sub.add_parser("remove-feature", help="Remove features from a boundary.", description="Remove one or more direct features from the scoped delivery boundary.")
63
67
  add_path_argument(remove_feature)
64
- remove_feature.add_argument("--id", required=True)
65
- remove_feature.add_argument("--feature-ids", nargs="+", required=True)
68
+ remove_feature.add_argument("--id", required=True, help="Boundary id whose features should be removed.")
69
+ remove_feature.add_argument("--feature-ids", nargs="+", required=True, help="Feature ids to remove from the boundary.")
66
70
  remove_feature.set_defaults(func=run_remove_feature)
67
71
 
68
- add_profile = boundary_sub.add_parser("add-profile", help="Add profile ids to a boundary.")
72
+ add_profile = boundary_sub.add_parser("add-profile", help="Add profiles to a boundary.", description="Include one or more profiles in the scoped delivery boundary.")
69
73
  add_path_argument(add_profile)
70
- add_profile.add_argument("--id", required=True)
71
- add_profile.add_argument("--profile-ids", nargs="+", required=True)
74
+ add_profile.add_argument("--id", required=True, help="Boundary id that should receive the profiles.")
75
+ add_profile.add_argument("--profile-ids", nargs="+", required=True, help="Profile ids to include in the boundary.")
72
76
  add_profile.set_defaults(func=run_add_profile)
73
77
 
74
- remove_profile = boundary_sub.add_parser("remove-profile", help="Remove profile ids from a boundary.")
78
+ remove_profile = boundary_sub.add_parser("remove-profile", help="Remove profiles from a boundary.", description="Remove one or more profiles from the scoped delivery boundary.")
75
79
  add_path_argument(remove_profile)
76
- remove_profile.add_argument("--id", required=True)
77
- remove_profile.add_argument("--profile-ids", nargs="+", required=True)
80
+ remove_profile.add_argument("--id", required=True, help="Boundary id whose profiles should be removed.")
81
+ remove_profile.add_argument("--profile-ids", nargs="+", required=True, help="Profile ids to remove from the boundary.")
78
82
  remove_profile.set_defaults(func=run_remove_profile)
79
83
 
80
- freeze = boundary_sub.add_parser("freeze", help="Freeze a boundary and emit a snapshot.")
84
+ freeze = boundary_sub.add_parser("freeze", help="Freeze boundary scope.", description="Lock a boundary's resolved scope and emit a snapshot suitable for release workflows.")
81
85
  add_path_argument(freeze)
82
- freeze.add_argument("--boundary-id", default=None, help="Boundary id. Defaults to the active boundary.")
86
+ freeze.add_argument("--boundary-id", default=None, help="Boundary id to freeze. Omit to freeze the active boundary.")
83
87
  freeze.set_defaults(func=run_freeze)
84
88
 
85
89