specfact-cli 0.11.3__tar.gz → 0.11.5__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.
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/PKG-INFO +1 -1
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/pyproject.toml +2 -1
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/prompts/shared/cli-enforcement.md +7 -4
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/prompts/specfact.01-import.md +9 -11
- specfact_cli-0.11.5/resources/prompts/specfact.02-plan.md +117 -0
- specfact_cli-0.11.5/resources/prompts/specfact.03-review.md +220 -0
- specfact_cli-0.11.5/resources/prompts/specfact.04-sdd.md +105 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/prompts/specfact.05-enforce.md +15 -44
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/prompts/specfact.06-sync.md +7 -38
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/prompts/specfact.compare.md +7 -35
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/prompts/specfact.validate.md +3 -22
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/__init__.py +1 -1
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/__init__.py +1 -1
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/analyze.py +3 -3
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/enforce.py +7 -16
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/generate.py +5 -5
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/import_cmd.py +8 -18
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/migrate.py +4 -5
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/plan.py +796 -375
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/repro.py +2 -1
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/run.py +136 -1
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/spec.py +9 -4
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/sync.py +14 -8
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/plan.py +12 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/project.py +6 -2
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/__init__.py +8 -0
- specfact_cli-0.11.5/src/specfact_cli/utils/progress.py +182 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/prompts.py +9 -1
- specfact_cli-0.11.3/resources/prompts/specfact.02-plan.md +0 -151
- specfact_cli-0.11.3/resources/prompts/specfact.03-review.md +0 -152
- specfact_cli-0.11.3/resources/prompts/specfact.04-sdd.md +0 -132
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/.gitignore +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/LICENSE.md +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/README.md +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/mappings/node-async.yaml +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/mappings/python-async.yaml +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/mappings/speckit-default.yaml +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/schemas/deviation.schema.json +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/schemas/plan.schema.json +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/schemas/protocol.schema.json +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/templates/github-action.yml.j2 +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/templates/plan.bundle.yaml.j2 +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/templates/pr-template.md.j2 +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/templates/protocol.yaml.j2 +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/resources/templates/telemetry.yaml.example +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/agents/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/agents/analyze_agent.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/agents/base.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/agents/plan_agent.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/agents/registry.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/agents/sync_agent.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/ambiguity_scanner.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/code_analyzer.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/constitution_evidence_extractor.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/contract_extractor.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/control_flow_analyzer.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/graph_analyzer.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/relationship_mapper.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/requirement_extractor.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/analyzers/test_pattern_extractor.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/cli.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/bridge.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/drift.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/implement.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/init.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/commands/sdd.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/common/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/common/logger_setup.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/common/logging_utils.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/common/text_utils.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/common/utils.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/comparators/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/comparators/plan_comparator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/enrichers/constitution_enricher.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/enrichers/plan_enricher.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/contract_generator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/openapi_extractor.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/plan_generator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/protocol_generator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/report_generator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/task_generator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/test_to_openapi.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/generators/workflow_generator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/importers/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/importers/speckit_converter.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/importers/speckit_scanner.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/integrations/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/integrations/specmatic.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/migrations/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/migrations/plan_migrator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/bridge.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/deviation.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/enforcement.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/protocol.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/quality.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/sdd.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/source_tracking.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/models/task.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/modes/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/modes/detector.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/modes/router.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/resources/semgrep/async.yml +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/resources/semgrep/code-quality.yml +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/resources/semgrep/feature-detection.yml +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/runtime.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/bridge_probe.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/bridge_sync.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/bridge_watch.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/change_detector.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/code_to_spec.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/drift_detector.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/repository_sync.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/spec_to_code.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/spec_to_tests.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/speckit_sync.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/sync/watcher.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/telemetry.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/templates/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/templates/bridge_templates.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/acceptance_criteria.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/bundle_loader.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/console.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/enrichment_context.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/enrichment_parser.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/feature_keys.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/git.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/github_annotations.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/ide_setup.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/incremental_check.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/optional_deps.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/sdd_discovery.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/source_scanner.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/structure.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/structured_io.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/utils/yaml_utils.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/validators/__init__.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/validators/contract_validator.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/validators/fsm.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/validators/repro_checker.py +0 -0
- {specfact_cli-0.11.3 → specfact_cli-0.11.5}/src/specfact_cli/validators/schema.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: specfact-cli
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.5
|
|
4
4
|
Summary: Brownfield-first CLI: Reverse engineer legacy Python → specs → enforced contracts. Automate legacy code documentation and prevent modernization regressions.
|
|
5
5
|
Project-URL: Homepage, https://github.com/nold-ai/specfact-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/nold-ai/specfact-cli.git
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "specfact-cli"
|
|
7
|
-
version = "0.11.
|
|
7
|
+
version = "0.11.5"
|
|
8
8
|
description = "Brownfield-first CLI: Reverse engineer legacy Python → specs → enforced contracts. Automate legacy code documentation and prevent modernization regressions."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -536,6 +536,7 @@ markers = [
|
|
|
536
536
|
"state_transition_coverage: mark test for state transition coverage tracking",
|
|
537
537
|
]
|
|
538
538
|
filterwarnings = [ # From pytest.ini
|
|
539
|
+
"ignore::UserWarning:rich.live", # Filter Rich library warnings about ipywidgets (not needed for CLI tests)
|
|
539
540
|
"ignore::pytest.PytestAssertRewriteWarning",
|
|
540
541
|
"ignore::pytest.PytestDeprecationWarning",
|
|
541
542
|
]
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
## Available CLI Commands
|
|
24
24
|
|
|
25
25
|
- `specfact plan init <bundle-name>` - Initialize project bundle
|
|
26
|
-
- `specfact
|
|
27
|
-
- `specfact
|
|
28
|
-
- `specfact plan
|
|
29
|
-
- `specfact
|
|
26
|
+
- `specfact plan select <bundle-name>` - Set active plan (used as default for other commands)
|
|
27
|
+
- `specfact import from-code [<bundle-name>] --repo <path>` - Import from codebase (uses active plan if bundle not specified)
|
|
28
|
+
- `specfact plan review [<bundle-name>]` - Review plan (uses active plan if bundle not specified)
|
|
29
|
+
- `specfact plan harden [<bundle-name>]` - Create SDD manifest (uses active plan if bundle not specified)
|
|
30
|
+
- `specfact enforce sdd [<bundle-name>]` - Validate SDD (uses active plan if bundle not specified)
|
|
30
31
|
- `specfact sync bridge --adapter <adapter> --repo <path>` - Sync with external tools
|
|
31
32
|
- See [Command Reference](../../docs/reference/commands.md) for full list
|
|
33
|
+
|
|
34
|
+
**Note**: Most commands now support active plan fallback. If `--bundle` is not specified, commands automatically use the active plan set via `plan select`. This improves workflow efficiency in AI IDE environments.
|
|
@@ -14,27 +14,25 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
14
14
|
|
|
15
15
|
## Purpose
|
|
16
16
|
|
|
17
|
-
Import codebase → plan bundle. CLI extracts
|
|
17
|
+
Import codebase → plan bundle. CLI extracts routes/schemas/relationships/contracts. LLM enriches context/"why"/completeness.
|
|
18
18
|
|
|
19
19
|
## Parameters
|
|
20
20
|
|
|
21
|
-
**Target/Input**: `--bundle NAME` (
|
|
21
|
+
**Target/Input**: `--bundle NAME` (optional, defaults to active plan), `--repo PATH`, `--entry-point PATH`, `--enrichment PATH`
|
|
22
22
|
**Output/Results**: `--report PATH`
|
|
23
23
|
**Behavior/Options**: `--shadow-only`, `--enrich-for-speckit`
|
|
24
24
|
**Advanced/Configuration**: `--confidence FLOAT` (0.0-1.0), `--key-format FORMAT` (classname|sequential)
|
|
25
25
|
|
|
26
26
|
## Workflow
|
|
27
27
|
|
|
28
|
-
1. **Execute CLI**: `specfact import from-code <bundle> --repo <path> [options]`
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
1. **Execute CLI**: `specfact import from-code [<bundle>] --repo <path> [options]`
|
|
29
|
+
- CLI extracts: routes (FastAPI/Flask/Django), schemas (Pydantic), relationships, contracts (OpenAPI scaffolds), source tracking
|
|
30
|
+
- Uses active plan if bundle not specified
|
|
31
31
|
|
|
32
32
|
2. **LLM Enrichment** (if `--enrichment` provided):
|
|
33
|
-
-
|
|
34
|
-
- Use CLI output + bundle metadata + enrichment context as context
|
|
33
|
+
- Read `.specfact/projects/<bundle>/enrichment_context.md`
|
|
35
34
|
- Enrich: business context, "why" reasoning, missing acceptance criteria
|
|
36
35
|
- Validate: contracts vs code, feature/story alignment
|
|
37
|
-
- Complete: constraints, test scenarios, edge cases
|
|
38
36
|
|
|
39
37
|
3. **Present**: Bundle location, report path, summary (features/stories/contracts/relationships)
|
|
40
38
|
|
|
@@ -50,10 +48,10 @@ Import codebase → plan bundle. CLI extracts (routes, schemas, relationships, c
|
|
|
50
48
|
## Common Patterns
|
|
51
49
|
|
|
52
50
|
```bash
|
|
51
|
+
/specfact.01-import --repo . # Uses active plan
|
|
53
52
|
/specfact.01-import --bundle legacy-api --repo .
|
|
54
|
-
/specfact.01-import --
|
|
55
|
-
/specfact.01-import --
|
|
56
|
-
/specfact.01-import --bundle legacy-api --repo . --enrich-for-speckit
|
|
53
|
+
/specfact.01-import --repo . --entry-point src/auth/
|
|
54
|
+
/specfact.01-import --repo . --enrichment report.md
|
|
57
55
|
```
|
|
58
56
|
|
|
59
57
|
## Context
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Manage project bundles - create, add features/stories, and update plan metadata.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# SpecFact Plan Management Command
|
|
6
|
+
|
|
7
|
+
## User Input
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
$ARGUMENTS
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Manage project bundles: initialize, add features/stories, update metadata (idea/features/stories).
|
|
18
|
+
|
|
19
|
+
**When to use:** Creating bundles, adding features/stories, updating metadata.
|
|
20
|
+
|
|
21
|
+
**Quick:** `/specfact.02-plan init legacy-api` or `/specfact.02-plan add-feature --key FEATURE-001 --title "User Auth"`
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
### Target/Input
|
|
26
|
+
|
|
27
|
+
- `--bundle NAME` - Project bundle name (optional, defaults to active plan set via `plan select`)
|
|
28
|
+
- `--key KEY` - Feature/story key (e.g., FEATURE-001, STORY-001)
|
|
29
|
+
- `--feature KEY` - Parent feature key (for story operations)
|
|
30
|
+
|
|
31
|
+
### Output/Results
|
|
32
|
+
|
|
33
|
+
- (No output-specific parameters for plan management)
|
|
34
|
+
|
|
35
|
+
### Behavior/Options
|
|
36
|
+
|
|
37
|
+
- `--interactive/--no-interactive` - Interactive mode. Default: True (interactive)
|
|
38
|
+
- `--scaffold/--no-scaffold` - Create directory structure. Default: True (scaffold enabled)
|
|
39
|
+
|
|
40
|
+
### Advanced/Configuration
|
|
41
|
+
|
|
42
|
+
- `--title TEXT` - Feature/story title
|
|
43
|
+
- `--outcomes TEXT` - Expected outcomes (comma-separated)
|
|
44
|
+
- `--acceptance TEXT` - Acceptance criteria (comma-separated)
|
|
45
|
+
- `--constraints TEXT` - Constraints (comma-separated)
|
|
46
|
+
- `--confidence FLOAT` - Confidence score (0.0-1.0)
|
|
47
|
+
- `--draft/--no-draft` - Mark as draft
|
|
48
|
+
|
|
49
|
+
## Workflow
|
|
50
|
+
|
|
51
|
+
### Step 1: Parse Arguments
|
|
52
|
+
|
|
53
|
+
- Determine operation: `init`, `add-feature`, `add-story`, `update-idea`, `update-feature`, `update-story`
|
|
54
|
+
- Extract parameters (bundle name defaults to active plan if not specified, keys, etc.)
|
|
55
|
+
|
|
56
|
+
### Step 2: Execute CLI
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
specfact plan init <bundle-name> [--interactive/--no-interactive] [--scaffold/--no-scaffold]
|
|
60
|
+
specfact plan add-feature [--bundle <name>] --key <key> --title <title> [--outcomes <outcomes>] [--acceptance <acceptance>]
|
|
61
|
+
specfact plan add-story [--bundle <name>] --feature <feature-key> --key <story-key> --title <title> [--acceptance <acceptance>]
|
|
62
|
+
specfact plan update-idea [--bundle <name>] [--title <title>] [--narrative <narrative>] [--target-users <users>] [--value-hypothesis <hypothesis>] [--constraints <constraints>]
|
|
63
|
+
specfact plan update-feature [--bundle <name>] --key <key> [--title <title>] [--outcomes <outcomes>] [--acceptance <acceptance>] [--constraints <constraints>] [--confidence <score>] [--draft/--no-draft]
|
|
64
|
+
specfact plan update-story [--bundle <name>] --feature <feature-key> --key <story-key> [--title <title>] [--acceptance <acceptance>] [--story-points <points>] [--value-points <points>] [--confidence <score>] [--draft/--no-draft]
|
|
65
|
+
# --bundle defaults to active plan if not specified
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 3: Present Results
|
|
69
|
+
|
|
70
|
+
- Display bundle location
|
|
71
|
+
- Show created/updated features/stories
|
|
72
|
+
- Present summary of changes
|
|
73
|
+
|
|
74
|
+
## CLI Enforcement
|
|
75
|
+
|
|
76
|
+
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
|
|
77
|
+
|
|
78
|
+
**Rules:** Execute CLI first, use `--no-interactive` in CI/CD, never modify `.specfact/` directly, use CLI output as grounding.
|
|
79
|
+
|
|
80
|
+
## Expected Output
|
|
81
|
+
|
|
82
|
+
## Success (Init)
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
✓ Project bundle created: .specfact/projects/legacy-api/
|
|
86
|
+
✓ Bundle initialized with scaffold structure
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Success (Add Feature)
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
✓ Feature 'FEATURE-001' added successfully
|
|
93
|
+
Feature: User Authentication
|
|
94
|
+
Outcomes: Secure login, Session management
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Error (Missing Bundle)
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
✗ Project bundle name is required (or set active plan with 'plan select')
|
|
101
|
+
Usage: specfact plan <operation> [--bundle <name>] [options]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Common Patterns
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
/specfact.02-plan init legacy-api
|
|
108
|
+
/specfact.02-plan add-feature --key FEATURE-001 --title "User Auth" --outcomes "Secure login" --acceptance "Users can log in"
|
|
109
|
+
/specfact.02-plan add-story --feature FEATURE-001 --key STORY-001 --title "Login API" --acceptance "API returns JWT"
|
|
110
|
+
/specfact.02-plan update-feature --key FEATURE-001 --title "Updated Title" --confidence 0.9
|
|
111
|
+
/specfact.02-plan update-idea --target-users "Developers, DevOps" --value-hypothesis "Reduce technical debt"
|
|
112
|
+
# --bundle defaults to active plan if not specified
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Context
|
|
116
|
+
|
|
117
|
+
{ARGS}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review project bundle to identify ambiguities, resolve gaps, and prepare for promotion.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# SpecFact Review Command
|
|
6
|
+
|
|
7
|
+
## User Input
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
$ARGUMENTS
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Review project bundle to identify/resolve ambiguities and missing information. Asks targeted questions for promotion readiness.
|
|
18
|
+
|
|
19
|
+
**When to use:** After import/creation, before promotion, when clarification needed.
|
|
20
|
+
|
|
21
|
+
**Quick:** `/specfact.03-review` (uses active plan) or `/specfact.03-review legacy-api`
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
### Target/Input
|
|
26
|
+
|
|
27
|
+
- `bundle NAME` (optional argument) - Project bundle name (e.g., legacy-api, auth-module). Default: active plan (set via `plan select`)
|
|
28
|
+
- `--category CATEGORY` - Focus on specific taxonomy category. Default: None (all categories)
|
|
29
|
+
|
|
30
|
+
### Output/Results
|
|
31
|
+
|
|
32
|
+
- `--list-questions` - Output questions in JSON format. Default: False
|
|
33
|
+
- `--list-findings` - Output all findings in structured format. Default: False
|
|
34
|
+
- `--findings-format FORMAT` - Output format: json, yaml, or table. Default: json for non-interactive, table for interactive
|
|
35
|
+
|
|
36
|
+
### Behavior/Options
|
|
37
|
+
|
|
38
|
+
- `--no-interactive` - Non-interactive mode (for CI/CD). Default: False (interactive mode)
|
|
39
|
+
- `--answers JSON` - JSON object with question_id -> answer mappings. Default: None
|
|
40
|
+
- `--auto-enrich` - Automatically enrich vague acceptance criteria. Default: False
|
|
41
|
+
|
|
42
|
+
### Advanced/Configuration
|
|
43
|
+
|
|
44
|
+
- `--max-questions INT` - Maximum questions per session. Default: 5 (range: 1-10)
|
|
45
|
+
|
|
46
|
+
## Workflow
|
|
47
|
+
|
|
48
|
+
### Step 1: Parse Arguments
|
|
49
|
+
|
|
50
|
+
- Extract bundle name (defaults to active plan if not specified)
|
|
51
|
+
- Extract optional parameters (max-questions, category, etc.)
|
|
52
|
+
|
|
53
|
+
### Step 2: Execute CLI to Get Findings
|
|
54
|
+
|
|
55
|
+
**First, get findings to understand what needs enrichment:**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
specfact plan review [<bundle-name>] --list-findings --findings-format json
|
|
59
|
+
# Uses active plan if bundle not specified
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This outputs all ambiguities and missing information in structured format.
|
|
63
|
+
|
|
64
|
+
### Step 3: Create Enrichment Report (if needed)
|
|
65
|
+
|
|
66
|
+
Based on the findings, create a Markdown enrichment report that addresses:
|
|
67
|
+
|
|
68
|
+
- **Business Context**: Priorities, constraints, unknowns
|
|
69
|
+
- **Confidence Adjustments**: Feature confidence score updates (if needed)
|
|
70
|
+
- **Missing Features**: New features to add (if any)
|
|
71
|
+
- **Manual Updates**: Guidance for updating `idea.yaml` fields like `target_users`, `value_hypothesis`, `narrative`
|
|
72
|
+
|
|
73
|
+
**Enrichment Report Format:**
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
## Business Context
|
|
77
|
+
|
|
78
|
+
### Priorities
|
|
79
|
+
- Priority 1
|
|
80
|
+
- Priority 2
|
|
81
|
+
|
|
82
|
+
### Constraints
|
|
83
|
+
- Constraint 1
|
|
84
|
+
- Constraint 2
|
|
85
|
+
|
|
86
|
+
### Unknowns
|
|
87
|
+
- Unknown 1
|
|
88
|
+
- Unknown 2
|
|
89
|
+
|
|
90
|
+
## Confidence Adjustments
|
|
91
|
+
|
|
92
|
+
FEATURE-KEY → 0.95
|
|
93
|
+
FEATURE-OTHER → 0.8
|
|
94
|
+
|
|
95
|
+
## Missing Features
|
|
96
|
+
|
|
97
|
+
(If any features are missing)
|
|
98
|
+
|
|
99
|
+
## Recommendations for Manual Updates
|
|
100
|
+
|
|
101
|
+
### idea.yaml Updates Required
|
|
102
|
+
|
|
103
|
+
**target_users:**
|
|
104
|
+
- Primary: [description]
|
|
105
|
+
- Secondary: [description]
|
|
106
|
+
|
|
107
|
+
**value_hypothesis:**
|
|
108
|
+
[Value proposition]
|
|
109
|
+
|
|
110
|
+
**narrative:**
|
|
111
|
+
[Improved narrative]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Step 4: Apply Enrichment
|
|
115
|
+
|
|
116
|
+
#### Option A: Use enrichment to answer review questions
|
|
117
|
+
|
|
118
|
+
Create answers JSON from enrichment report and use with review:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
specfact plan review [<bundle-name>] --answers '{"Q001": "answer1", "Q002": "answer2"}'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### Option B: Update idea fields directly via CLI
|
|
125
|
+
|
|
126
|
+
Use `plan update-idea` to update idea fields from enrichment recommendations:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
specfact plan update-idea --bundle [<bundle-name>] --value-hypothesis "..." --narrative "..." --target-users "..."
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
#### Option C: Apply enrichment via import (only if bundle needs regeneration)
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
specfact import from-code [<bundle-name>] --repo . --enrichment enrichment-report.md
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Note:**
|
|
139
|
+
|
|
140
|
+
- **Preferred**: Use Option A (answers) or Option B (update-idea) for most cases
|
|
141
|
+
- Only use Option C if you need to regenerate the bundle
|
|
142
|
+
- Never manually edit `.specfact/` files directly - always use CLI commands
|
|
143
|
+
|
|
144
|
+
### Step 5: Present Results
|
|
145
|
+
|
|
146
|
+
- Display Q&A, sections touched, coverage summary (initial/updated)
|
|
147
|
+
- Note: Clarifications don't affect hash (stable across review sessions)
|
|
148
|
+
- If enrichment report was created, summarize what was addressed
|
|
149
|
+
|
|
150
|
+
## CLI Enforcement
|
|
151
|
+
|
|
152
|
+
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
|
|
153
|
+
|
|
154
|
+
**Rules:** Execute CLI first, use `--no-interactive` in CI/CD, never modify `.specfact/` directly, use CLI output as grounding.
|
|
155
|
+
|
|
156
|
+
## Expected Output
|
|
157
|
+
|
|
158
|
+
### Success
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
✓ Review complete: 5 question(s) answered
|
|
162
|
+
|
|
163
|
+
Project Bundle: legacy-api
|
|
164
|
+
Questions Asked: 5
|
|
165
|
+
|
|
166
|
+
Sections Touched:
|
|
167
|
+
• idea.narrative
|
|
168
|
+
• features[FEATURE-001].acceptance
|
|
169
|
+
• features[FEATURE-002].outcomes
|
|
170
|
+
|
|
171
|
+
Coverage Summary:
|
|
172
|
+
✅ Functional Scope: clear
|
|
173
|
+
✅ Technical Constraints: clear
|
|
174
|
+
⚠️ Business Context: partial
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Error (Missing Bundle)
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
✗ Project bundle 'legacy-api' not found
|
|
181
|
+
Create one with: specfact plan init legacy-api
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Common Patterns
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Get findings first
|
|
188
|
+
/specfact.03-review --list-findings # List all findings
|
|
189
|
+
/specfact.03-review --list-findings --findings-format json # JSON format for enrichment
|
|
190
|
+
|
|
191
|
+
# Interactive review
|
|
192
|
+
/specfact.03-review # Uses active plan
|
|
193
|
+
/specfact.03-review legacy-api # Specific bundle
|
|
194
|
+
/specfact.03-review --max-questions 3 # Limit questions
|
|
195
|
+
/specfact.03-review --category "Functional Scope" # Focus category
|
|
196
|
+
|
|
197
|
+
# Non-interactive with answers
|
|
198
|
+
/specfact.03-review --answers '{"Q001": "answer"}' # Provide answers directly
|
|
199
|
+
/specfact.03-review --list-questions # Output questions as JSON
|
|
200
|
+
|
|
201
|
+
# Auto-enrichment
|
|
202
|
+
/specfact.03-review --auto-enrich # Auto-enrich vague criteria
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Enrichment Workflow
|
|
206
|
+
|
|
207
|
+
**Typical workflow when enrichment is needed:**
|
|
208
|
+
|
|
209
|
+
1. **Get findings**: `specfact plan review --list-findings --findings-format json`
|
|
210
|
+
2. **Analyze findings**: Review missing information (target_users, value_hypothesis, etc.)
|
|
211
|
+
3. **Create enrichment report**: Write Markdown file addressing findings
|
|
212
|
+
4. **Apply enrichment**:
|
|
213
|
+
- **Preferred**: Use enrichment to create `--answers` JSON and run `plan review --answers`
|
|
214
|
+
- **Alternative**: Use `plan update-idea` to update idea fields directly
|
|
215
|
+
- **Last resort**: If bundle needs regeneration, use `import from-code --enrichment`
|
|
216
|
+
5. **Verify**: Run `plan review` again to confirm improvements
|
|
217
|
+
|
|
218
|
+
## Context
|
|
219
|
+
|
|
220
|
+
{ARGS}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create or update SDD manifest (hard spec) from project bundle with WHY/WHAT/HOW extraction.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# SpecFact SDD Creation Command
|
|
6
|
+
|
|
7
|
+
## User Input
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
$ARGUMENTS
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Create/update SDD manifest from project bundle. Captures WHY (intent/constraints), WHAT (capabilities/acceptance), HOW (architecture/invariants/contracts).
|
|
18
|
+
|
|
19
|
+
**When to use:** After plan review, before promotion, when plan changes.
|
|
20
|
+
|
|
21
|
+
**Quick:** `/specfact.04-sdd` (uses active plan) or `/specfact.04-sdd legacy-api`
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
### Target/Input
|
|
26
|
+
|
|
27
|
+
- `bundle NAME` (optional argument) - Project bundle name (e.g., legacy-api, auth-module). Default: active plan (set via `plan select`)
|
|
28
|
+
- `--sdd PATH` - Output SDD manifest path. Default: .specfact/sdd/<bundle-name>.<format>
|
|
29
|
+
|
|
30
|
+
### Output/Results
|
|
31
|
+
|
|
32
|
+
- `--output-format FORMAT` - SDD manifest format (yaml or json). Default: global --output-format (yaml)
|
|
33
|
+
|
|
34
|
+
### Behavior/Options
|
|
35
|
+
|
|
36
|
+
- `--interactive/--no-interactive` - Interactive mode with prompts. Default: True (interactive, auto-detect)
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
### Step 1: Parse Arguments
|
|
41
|
+
|
|
42
|
+
- Extract bundle name (defaults to active plan if not specified)
|
|
43
|
+
- Extract optional parameters (sdd path, output format, etc.)
|
|
44
|
+
|
|
45
|
+
### Step 2: Execute CLI
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
specfact plan harden [<bundle-name>] [--sdd <path>] [--output-format <format>]
|
|
49
|
+
# Uses active plan if bundle not specified
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Step 3: Present Results
|
|
53
|
+
|
|
54
|
+
- Display SDD location, WHY/WHAT/HOW summary, coverage metrics
|
|
55
|
+
- Hash excludes clarifications (stable across review sessions)
|
|
56
|
+
|
|
57
|
+
## CLI Enforcement
|
|
58
|
+
|
|
59
|
+
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
|
|
60
|
+
|
|
61
|
+
**Rules:** Execute CLI first, use `--no-interactive` in CI/CD, never modify `.specfact/` directly, use CLI output as grounding.
|
|
62
|
+
|
|
63
|
+
## Expected Output
|
|
64
|
+
|
|
65
|
+
### Success
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
✓ SDD manifest created: .specfact/sdd/legacy-api.yaml
|
|
69
|
+
|
|
70
|
+
SDD Manifest Summary:
|
|
71
|
+
Project Bundle: .specfact/projects/legacy-api/
|
|
72
|
+
Bundle Hash: abc123def456...
|
|
73
|
+
SDD Path: .specfact/sdd/legacy-api.yaml
|
|
74
|
+
|
|
75
|
+
WHY (Intent):
|
|
76
|
+
Build secure authentication system
|
|
77
|
+
Constraints: 2
|
|
78
|
+
|
|
79
|
+
WHAT (Capabilities): 12
|
|
80
|
+
|
|
81
|
+
HOW (Architecture):
|
|
82
|
+
Microservices architecture with JWT tokens...
|
|
83
|
+
Invariants: 8
|
|
84
|
+
Contracts: 15
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Error (Missing Bundle)
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
✗ Project bundle 'legacy-api' not found
|
|
91
|
+
Create one with: specfact plan init legacy-api
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Common Patterns
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
/specfact.04-sdd # Uses active plan
|
|
98
|
+
/specfact.04-sdd legacy-api # Specific bundle
|
|
99
|
+
/specfact.04-sdd --output-format json # JSON format
|
|
100
|
+
/specfact.04-sdd --sdd .specfact/sdd/custom.yaml
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Context
|
|
104
|
+
|
|
105
|
+
{ARGS}
|
|
@@ -14,26 +14,17 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
14
14
|
|
|
15
15
|
## Purpose
|
|
16
16
|
|
|
17
|
-
Validate SDD manifest against project bundle and contracts. Checks hash matching, coverage thresholds,
|
|
17
|
+
Validate SDD manifest against project bundle and contracts. Checks hash matching, coverage thresholds, and contract density.
|
|
18
18
|
|
|
19
|
-
**When to use:**
|
|
19
|
+
**When to use:** After creating/updating SDD, before promotion, in CI/CD pipelines.
|
|
20
20
|
|
|
21
|
-
-
|
|
22
|
-
- Before promoting bundle to approved/released stages
|
|
23
|
-
- In CI/CD pipelines for quality gates
|
|
24
|
-
|
|
25
|
-
**Quick Example:**
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
/specfact.05-enforce legacy-api
|
|
29
|
-
/specfact.05-enforce legacy-api --output-format json --out validation-report.json
|
|
30
|
-
```
|
|
21
|
+
**Quick:** `/specfact.05-enforce` (uses active plan) or `/specfact.05-enforce legacy-api`
|
|
31
22
|
|
|
32
23
|
## Parameters
|
|
33
24
|
|
|
34
25
|
### Target/Input
|
|
35
26
|
|
|
36
|
-
- `bundle NAME` (
|
|
27
|
+
- `bundle NAME` (optional argument) - Project bundle name (e.g., legacy-api, auth-module). Default: active plan (set via `plan select`)
|
|
37
28
|
- `--sdd PATH` - Path to SDD manifest. Default: .specfact/sdd/<bundle-name>.<format>
|
|
38
29
|
|
|
39
30
|
### Output/Results
|
|
@@ -49,17 +40,14 @@ Validate SDD manifest against project bundle and contracts. Checks hash matching
|
|
|
49
40
|
|
|
50
41
|
### Step 1: Parse Arguments
|
|
51
42
|
|
|
52
|
-
- Extract bundle name (
|
|
43
|
+
- Extract bundle name (defaults to active plan if not specified)
|
|
53
44
|
- Extract optional parameters (sdd path, output format, etc.)
|
|
54
45
|
|
|
55
46
|
### Step 2: Execute CLI
|
|
56
47
|
|
|
57
48
|
```bash
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
# Non-interactive validation
|
|
62
|
-
specfact enforce sdd <bundle-name> --no-interactive --output-format json
|
|
49
|
+
specfact enforce sdd [<bundle-name>] [--sdd <path>] [--output-format <format>] [--out <path>]
|
|
50
|
+
# Uses active plan if bundle not specified
|
|
63
51
|
```
|
|
64
52
|
|
|
65
53
|
### Step 3: Present Results
|
|
@@ -74,13 +62,7 @@ specfact enforce sdd <bundle-name> --no-interactive --output-format json
|
|
|
74
62
|
|
|
75
63
|
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
|
|
76
64
|
|
|
77
|
-
**Rules:**
|
|
78
|
-
|
|
79
|
-
1. **ALWAYS execute CLI first**: Run `specfact enforce sdd` before any analysis
|
|
80
|
-
2. **ALWAYS use non-interactive mode for CI/CD**: Use `--no-interactive` flag in Copilot environments
|
|
81
|
-
3. **NEVER modify .specfact folder directly**: All operations must go through CLI
|
|
82
|
-
4. **NEVER create YAML/JSON directly**: All validation reports must be CLI-generated
|
|
83
|
-
5. **Use CLI output as grounding**: Parse CLI output, don't regenerate it
|
|
65
|
+
**Rules:** Execute CLI first, use `--no-interactive` in CI/CD, never modify `.specfact/` directly, use CLI output as grounding.
|
|
84
66
|
|
|
85
67
|
## Expected Output
|
|
86
68
|
|
|
@@ -110,29 +92,18 @@ Issues Found:
|
|
|
110
92
|
SDD hash: abc123def456...
|
|
111
93
|
Bundle hash: xyz789ghi012...
|
|
112
94
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
- Stories (add/remove/update)
|
|
117
|
-
- Product, idea, business, or clarifications
|
|
118
|
-
|
|
119
|
-
Fix: Run specfact plan harden legacy-api to update the SDD manifest
|
|
95
|
+
Hash changes when modifying features, stories, or product/idea/business sections.
|
|
96
|
+
Note: Clarifications don't affect hash (review metadata). Hash stable across review sessions.
|
|
97
|
+
Fix: Run `specfact plan harden <bundle-name>` to update SDD manifest.
|
|
120
98
|
```
|
|
121
99
|
|
|
122
100
|
## Common Patterns
|
|
123
101
|
|
|
124
102
|
```bash
|
|
125
|
-
#
|
|
126
|
-
/specfact.05-enforce legacy-api
|
|
127
|
-
|
|
128
|
-
#
|
|
129
|
-
/specfact.05-enforce legacy-api --output-format json
|
|
130
|
-
|
|
131
|
-
# Validate with custom report path
|
|
132
|
-
/specfact.05-enforce legacy-api --out custom-report.json
|
|
133
|
-
|
|
134
|
-
# Non-interactive validation
|
|
135
|
-
/specfact.05-enforce legacy-api --no-interactive
|
|
103
|
+
/specfact.05-enforce # Uses active plan
|
|
104
|
+
/specfact.05-enforce legacy-api # Specific bundle
|
|
105
|
+
/specfact.05-enforce --output-format json --out report.json
|
|
106
|
+
/specfact.05-enforce --no-interactive # CI/CD mode
|
|
136
107
|
```
|
|
137
108
|
|
|
138
109
|
## Context
|