sdlcctl 1.0.0__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 (56) hide show
  1. sdlcctl-1.0.0/PKG-INFO +27 -0
  2. sdlcctl-1.0.0/README.md +0 -0
  3. sdlcctl-1.0.0/pyproject.toml +50 -0
  4. sdlcctl-1.0.0/sdlcctl/__init__.py +33 -0
  5. sdlcctl-1.0.0/sdlcctl/cli.py +221 -0
  6. sdlcctl-1.0.0/sdlcctl/commands/__init__.py +17 -0
  7. sdlcctl-1.0.0/sdlcctl/commands/fix.py +523 -0
  8. sdlcctl-1.0.0/sdlcctl/commands/generate.py +682 -0
  9. sdlcctl-1.0.0/sdlcctl/commands/init.py +440 -0
  10. sdlcctl-1.0.0/sdlcctl/commands/magic.py +461 -0
  11. sdlcctl-1.0.0/sdlcctl/commands/migrate.py +518 -0
  12. sdlcctl-1.0.0/sdlcctl/commands/report.py +402 -0
  13. sdlcctl-1.0.0/sdlcctl/commands/validate.py +216 -0
  14. sdlcctl-1.0.0/sdlcctl/hooks/__init__.py +5 -0
  15. sdlcctl-1.0.0/sdlcctl/hooks/pre_commit.py +145 -0
  16. sdlcctl-1.0.0/sdlcctl/lib/__init__.py +17 -0
  17. sdlcctl-1.0.0/sdlcctl/lib/domain_detector.py +531 -0
  18. sdlcctl-1.0.0/sdlcctl/lib/nlp_parser.py +675 -0
  19. sdlcctl-1.0.0/sdlcctl/lib/progress.py +357 -0
  20. sdlcctl-1.0.0/sdlcctl/lib/sse_client.py +336 -0
  21. sdlcctl-1.0.0/sdlcctl/prompts/__init__.py +20 -0
  22. sdlcctl-1.0.0/sdlcctl/prompts/vietnamese.py +588 -0
  23. sdlcctl-1.0.0/sdlcctl/tests/__init__.py +1 -0
  24. sdlcctl-1.0.0/sdlcctl/tests/conftest.py +145 -0
  25. sdlcctl-1.0.0/sdlcctl/tests/test_cli.py +536 -0
  26. sdlcctl-1.0.0/sdlcctl/tests/test_commands.py +1491 -0
  27. sdlcctl-1.0.0/sdlcctl/tests/test_engine.py +392 -0
  28. sdlcctl-1.0.0/sdlcctl/tests/test_generate.py +227 -0
  29. sdlcctl-1.0.0/sdlcctl/tests/test_hooks.py +330 -0
  30. sdlcctl-1.0.0/sdlcctl/tests/test_p0.py +317 -0
  31. sdlcctl-1.0.0/sdlcctl/tests/test_performance.py +263 -0
  32. sdlcctl-1.0.0/sdlcctl/tests/test_scanner.py +250 -0
  33. sdlcctl-1.0.0/sdlcctl/tests/test_sprint52.py +505 -0
  34. sdlcctl-1.0.0/sdlcctl/tests/test_tier.py +302 -0
  35. sdlcctl-1.0.0/sdlcctl/validation/__init__.py +52 -0
  36. sdlcctl-1.0.0/sdlcctl/validation/base_validator.py +273 -0
  37. sdlcctl-1.0.0/sdlcctl/validation/config.py +423 -0
  38. sdlcctl-1.0.0/sdlcctl/validation/engine.py +507 -0
  39. sdlcctl-1.0.0/sdlcctl/validation/p0.py +798 -0
  40. sdlcctl-1.0.0/sdlcctl/validation/scanner.py +339 -0
  41. sdlcctl-1.0.0/sdlcctl/validation/structure_scanner.py +457 -0
  42. sdlcctl-1.0.0/sdlcctl/validation/tier.py +252 -0
  43. sdlcctl-1.0.0/sdlcctl/validation/validators/__init__.py +31 -0
  44. sdlcctl-1.0.0/sdlcctl/validation/validators/cross_reference.py +376 -0
  45. sdlcctl-1.0.0/sdlcctl/validation/validators/header_metadata.py +352 -0
  46. sdlcctl-1.0.0/sdlcctl/validation/validators/naming_convention.py +343 -0
  47. sdlcctl-1.0.0/sdlcctl/validation/validators/sequential_numbering.py +306 -0
  48. sdlcctl-1.0.0/sdlcctl/validation/validators/stage_folder.py +348 -0
  49. sdlcctl-1.0.0/sdlcctl/validation/violation.py +201 -0
  50. sdlcctl-1.0.0/sdlcctl.egg-info/PKG-INFO +27 -0
  51. sdlcctl-1.0.0/sdlcctl.egg-info/SOURCES.txt +54 -0
  52. sdlcctl-1.0.0/sdlcctl.egg-info/dependency_links.txt +1 -0
  53. sdlcctl-1.0.0/sdlcctl.egg-info/entry_points.txt +2 -0
  54. sdlcctl-1.0.0/sdlcctl.egg-info/requires.txt +7 -0
  55. sdlcctl-1.0.0/sdlcctl.egg-info/top_level.txt +1 -0
  56. sdlcctl-1.0.0/setup.cfg +4 -0
sdlcctl-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: sdlcctl
3
+ Version: 1.0.0
4
+ Summary: SDLC 5.1.2 Structure Validator CLI
5
+ Author-email: SDLC Orchestrator Team <dangtt1971@gmail.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Minh-Tam-Solution/SDLC-Orchestrator
8
+ Project-URL: Documentation, https://github.com/Minh-Tam-Solution/SDLC-Orchestrator/blob/main/docs
9
+ Project-URL: Repository, https://github.com/Minh-Tam-Solution/SDLC-Orchestrator
10
+ Keywords: sdlc,cli,validation,code-generation
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Quality Assurance
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: typer[all]>=0.9.0
23
+ Requires-Dist: rich>=13.0.0
24
+ Requires-Dist: pyyaml>=6.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
27
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
File without changes
@@ -0,0 +1,50 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "sdlcctl"
7
+ version = "1.0.0"
8
+ description = "SDLC 5.1.2 Structure Validator CLI"
9
+ readme = "README.md"
10
+ license = {text = "Apache-2.0"}
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ {name = "SDLC Orchestrator Team", email = "dangtt1971@gmail.com"}
14
+ ]
15
+ keywords = ["sdlc", "cli", "validation", "code-generation"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: Apache Software License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Software Development :: Quality Assurance",
26
+ ]
27
+
28
+ dependencies = [
29
+ "typer[all]>=0.9.0",
30
+ "rich>=13.0.0",
31
+ "pyyaml>=6.0",
32
+ ]
33
+
34
+ [project.optional-dependencies]
35
+ dev = [
36
+ "pytest>=7.0.0",
37
+ "pytest-asyncio>=0.21.0",
38
+ ]
39
+
40
+ [project.scripts]
41
+ sdlcctl = "sdlcctl.cli:app"
42
+
43
+ [project.urls]
44
+ Homepage = "https://github.com/Minh-Tam-Solution/SDLC-Orchestrator"
45
+ Documentation = "https://github.com/Minh-Tam-Solution/SDLC-Orchestrator/blob/main/docs"
46
+ Repository = "https://github.com/Minh-Tam-Solution/SDLC-Orchestrator"
47
+
48
+ [tool.setuptools.packages.find]
49
+ where = ["."]
50
+ include = ["sdlcctl*"]
@@ -0,0 +1,33 @@
1
+ """
2
+ SDLC 5.0.0 Structure Validator CLI (sdlcctl)
3
+
4
+ A CLI tool for validating SDLC 5.0.0 folder structure compliance.
5
+ Supports 4-Tier Classification: LITE, STANDARD, PROFESSIONAL, ENTERPRISE.
6
+
7
+ Usage:
8
+ sdlcctl validate [--path PATH] [--tier TIER] [--format FORMAT]
9
+ sdlcctl fix [--dry-run] [--interactive]
10
+ sdlcctl init [--tier TIER] [--scaffold]
11
+ sdlcctl report [--format FORMAT] [--output PATH]
12
+
13
+ Version: 1.0.0
14
+ Framework: SDLC 5.0.0
15
+ """
16
+
17
+ __version__ = "1.0.0"
18
+ __author__ = "SDLC Orchestrator Team"
19
+ __framework__ = "SDLC 5.0.0"
20
+
21
+ from .validation.engine import SDLCValidator, ValidationResult
22
+ from .validation.tier import Tier, TierDetector
23
+ from .validation.scanner import FolderScanner
24
+ from .validation.p0 import P0ArtifactChecker
25
+
26
+ __all__ = [
27
+ "SDLCValidator",
28
+ "ValidationResult",
29
+ "Tier",
30
+ "TierDetector",
31
+ "FolderScanner",
32
+ "P0ArtifactChecker",
33
+ ]
@@ -0,0 +1,221 @@
1
+ """
2
+ =========================================================================
3
+ SDLC 5.0.0 Structure Validator CLI.
4
+ SDLC Orchestrator - Sprint 52
5
+
6
+ Version: 2.0.0
7
+ Date: December 26, 2025
8
+ Status: ACTIVE - Sprint 52 Magic Mode
9
+ Authority: Backend Team + CTO Approved
10
+
11
+ Purpose:
12
+ - Main entry point for the sdlcctl command-line tool
13
+ - Structure validation, fixing, and initialization
14
+ - Code generation from AppBlueprint (Sprint 46)
15
+ - Magic Mode - Natural language to code (Sprint 52)
16
+
17
+ Usage:
18
+ sdlcctl validate ./my-project
19
+ sdlcctl generate blueprint.json -o ./output
20
+ sdlcctl magic "Nhà hàng Phở 24" -o ./pho24
21
+ =========================================================================
22
+ """
23
+
24
+ import typer
25
+ from rich.console import Console
26
+
27
+ from . import __version__, __framework__
28
+ from .commands.validate import validate_command
29
+ from .commands.fix import fix_command
30
+ from .commands.init import init_command
31
+ from .commands.report import report_command
32
+ from .commands.migrate import migrate_command
33
+ from .commands.generate import generate_command
34
+ from .commands.magic import magic_command
35
+
36
+ console = Console()
37
+
38
+ # Create main Typer app
39
+ app = typer.Typer(
40
+ name="sdlcctl",
41
+ help="SDLC 5.0.0 Structure Validator CLI",
42
+ add_completion=True,
43
+ no_args_is_help=True,
44
+ )
45
+
46
+
47
+ def version_callback(value: bool) -> None:
48
+ """Print version information."""
49
+ if value:
50
+ console.print(f"[bold blue]sdlcctl[/bold blue] v{__version__}")
51
+ console.print(f"[dim]Framework: {__framework__}[/dim]")
52
+ raise typer.Exit()
53
+
54
+
55
+ @app.callback()
56
+ def main(
57
+ version: bool = typer.Option(
58
+ False,
59
+ "--version",
60
+ "-V",
61
+ callback=version_callback,
62
+ is_eager=True,
63
+ help="Show version and exit",
64
+ ),
65
+ ) -> None:
66
+ """
67
+ SDLC 5.0.0 Structure Validator CLI.
68
+
69
+ Validate, fix, and initialize SDLC 5.0.0 compliant project structures.
70
+
71
+ Supports 4-Tier Classification:
72
+ - LITE: 1-2 people, 4 stages
73
+ - STANDARD: 3-10 people, 6 stages
74
+ - PROFESSIONAL: 10-50 people, 10 stages (P0 required)
75
+ - ENTERPRISE: 50+ people, 11 stages (full compliance)
76
+ """
77
+ pass
78
+
79
+
80
+ # Register commands
81
+ app.command(name="validate", help="Validate SDLC 5.0.0 folder structure")(
82
+ validate_command
83
+ )
84
+ app.command(name="fix", help="Automatically fix SDLC structure issues")(
85
+ fix_command
86
+ )
87
+ app.command(name="init", help="Initialize SDLC 5.0.0 project structure")(
88
+ init_command
89
+ )
90
+ app.command(name="report", help="Generate SDLC compliance report")(
91
+ report_command
92
+ )
93
+ app.command(name="migrate", help="Migrate from SDLC 4.9.x to 5.0.0")(
94
+ migrate_command
95
+ )
96
+ app.command(name="generate", help="Generate backend scaffold from AppBlueprint")(
97
+ generate_command
98
+ )
99
+ app.command(name="magic", help="Generate app from natural language (Vietnamese/English)")(
100
+ magic_command
101
+ )
102
+
103
+
104
+ @app.command(name="tiers")
105
+ def show_tiers() -> None:
106
+ """Show tier classification details."""
107
+ from rich.table import Table
108
+
109
+ from .validation.tier import TIER_REQUIREMENTS, Tier
110
+
111
+ table = Table(title="SDLC 5.0.0 Tier Classification", show_header=True)
112
+ table.add_column("Tier", style="cyan", width=15)
113
+ table.add_column("Team Size", justify="right", width=12)
114
+ table.add_column("Stages", justify="right", width=10)
115
+ table.add_column("P0 Required", justify="center", width=12)
116
+ table.add_column("Compliance", width=20)
117
+
118
+ tier_sizes = {
119
+ Tier.LITE: "1-2",
120
+ Tier.STANDARD: "3-10",
121
+ Tier.PROFESSIONAL: "10-50",
122
+ Tier.ENTERPRISE: "50+",
123
+ }
124
+
125
+ for tier, req in TIER_REQUIREMENTS.items():
126
+ compliance = ", ".join(req.compliance_required) if req.compliance_required else "-"
127
+ table.add_row(
128
+ tier.value.upper(),
129
+ tier_sizes[tier],
130
+ str(req.min_stages),
131
+ "✅" if req.p0_required else "❌",
132
+ compliance,
133
+ )
134
+
135
+ console.print()
136
+ console.print(table)
137
+ console.print()
138
+
139
+
140
+ @app.command(name="stages")
141
+ def show_stages() -> None:
142
+ """Show SDLC 5.0.0 stage definitions (Contract-First Order)."""
143
+ from rich.table import Table
144
+
145
+ from .validation.tier import STAGE_NAMES
146
+
147
+ table = Table(title="SDLC 5.0.0 Stages (Contract-First Order)", show_header=True)
148
+ table.add_column("ID", style="cyan", width=5)
149
+ table.add_column("Stage Name", width=20)
150
+ table.add_column("Purpose", width=50)
151
+ table.add_column("Type", width=12)
152
+
153
+ # SDLC 5.1.1 Stage Definitions (10 Stages: 00-09 + Archive folder)
154
+ # Reference: SDLC-Enterprise-Framework/README.md (v5.1.1)
155
+ questions = {
156
+ "00": ("FOUNDATION - Strategic Discovery & Validation (WHY?)", "LINEAR"),
157
+ "01": ("PLANNING - Requirements & User Stories (WHAT?)", "LINEAR"),
158
+ "02": ("DESIGN - Architecture & Technical Design (HOW?)", "LINEAR"),
159
+ "03": ("INTEGRATE - API Contracts & Third-party Setup", "LINEAR"),
160
+ "04": ("BUILD - Development & Implementation", "LINEAR"),
161
+ "05": ("TEST - Quality Assurance & Validation", "LINEAR"),
162
+ "06": ("DEPLOY - Release & Deployment", "LINEAR"),
163
+ "07": ("OPERATE - Production Operations & Monitoring", "LINEAR"),
164
+ "08": ("COLLABORATE - Team Coordination & Knowledge", "CONTINUOUS"),
165
+ "09": ("GOVERN - Compliance & Strategic Oversight", "CONTINUOUS"),
166
+ "10": ("ARCHIVE - Project Archive (Legacy Docs)", "OPTIONAL"),
167
+ }
168
+
169
+ for stage_id, stage_name in sorted(STAGE_NAMES.items()):
170
+ purpose, stage_type = questions.get(stage_id, ("", ""))
171
+ table.add_row(stage_id, stage_name, purpose, stage_type)
172
+
173
+ console.print()
174
+ console.print(table)
175
+ console.print()
176
+ console.print("[dim]Contract-First: API Design (Stage 03) must happen BEFORE coding (Stage 04)[/dim]")
177
+ console.print()
178
+
179
+
180
+ @app.command(name="p0")
181
+ def show_p0() -> None:
182
+ """Show P0 artifact requirements."""
183
+ from rich.table import Table
184
+
185
+ from .validation.p0 import P0_ARTIFACTS
186
+ from .validation.tier import Tier
187
+
188
+ table = Table(title="SDLC 5.0.0 P0 Artifacts", show_header=True)
189
+ table.add_column("Artifact", style="cyan", width=25)
190
+ table.add_column("Stage", width=8)
191
+ table.add_column("Path", width=45)
192
+ table.add_column("LITE", justify="center", width=6)
193
+ table.add_column("STD", justify="center", width=6)
194
+ table.add_column("PRO", justify="center", width=6)
195
+ table.add_column("ENT", justify="center", width=6)
196
+
197
+ for artifact in P0_ARTIFACTS:
198
+ table.add_row(
199
+ artifact.name,
200
+ artifact.stage_id,
201
+ artifact.relative_path[:42] + "..." if len(artifact.relative_path) > 45 else artifact.relative_path,
202
+ "✅" if Tier.LITE in artifact.required_tiers else "❌",
203
+ "✅" if Tier.STANDARD in artifact.required_tiers else "❌",
204
+ "✅" if Tier.PROFESSIONAL in artifact.required_tiers else "❌",
205
+ "✅" if Tier.ENTERPRISE in artifact.required_tiers else "❌",
206
+ )
207
+
208
+ console.print()
209
+ console.print(table)
210
+ console.print()
211
+ console.print(f"[dim]Total P0 Artifacts: {len(P0_ARTIFACTS)}[/dim]")
212
+ console.print()
213
+
214
+
215
+ def run() -> None:
216
+ """Run the CLI application."""
217
+ app()
218
+
219
+
220
+ if __name__ == "__main__":
221
+ run()
@@ -0,0 +1,17 @@
1
+ """SDLC 5.0.0 CLI Commands."""
2
+
3
+ from .validate import validate_command
4
+ from .fix import fix_command
5
+ from .init import init_command
6
+ from .report import report_command
7
+ from .migrate import migrate_command
8
+ from .generate import generate_command
9
+
10
+ __all__ = [
11
+ "validate_command",
12
+ "fix_command",
13
+ "init_command",
14
+ "report_command",
15
+ "migrate_command",
16
+ "generate_command",
17
+ ]