specfact-cli 0.11.2__tar.gz → 0.11.4__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.2 → specfact_cli-0.11.4}/PKG-INFO +1 -1
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/pyproject.toml +4 -1
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/prompts/shared/cli-enforcement.md +7 -4
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/prompts/specfact.01-import.md +9 -11
- specfact_cli-0.11.4/resources/prompts/specfact.02-plan.md +117 -0
- specfact_cli-0.11.4/resources/prompts/specfact.03-review.md +112 -0
- specfact_cli-0.11.4/resources/prompts/specfact.04-sdd.md +105 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/prompts/specfact.05-enforce.md +15 -44
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/prompts/specfact.06-sync.md +7 -38
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/prompts/specfact.compare.md +7 -35
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/prompts/specfact.validate.md +3 -22
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/__init__.py +1 -1
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/__init__.py +1 -1
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/ambiguity_scanner.py +359 -5
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/code_analyzer.py +614 -58
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/relationship_mapper.py +41 -16
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/test_pattern_extractor.py +16 -24
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/analyze.py +3 -3
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/enforce.py +7 -16
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/generate.py +5 -5
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/import_cmd.py +148 -64
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/migrate.py +4 -5
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/plan.py +811 -374
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/repro.py +2 -1
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/run.py +136 -1
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/spec.py +9 -4
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/sync.py +14 -8
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/test_to_openapi.py +35 -10
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/plan.py +12 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/project.py +119 -63
- specfact_cli-0.11.4/src/specfact_cli/resources/semgrep/code-quality.yml +261 -0
- specfact_cli-0.11.4/src/specfact_cli/resources/semgrep/feature-detection.yml +775 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/__init__.py +8 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/incremental_check.py +23 -11
- specfact_cli-0.11.4/src/specfact_cli/utils/progress.py +126 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/prompts.py +9 -1
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/source_scanner.py +32 -5
- specfact_cli-0.11.2/resources/prompts/specfact.02-plan.md +0 -151
- specfact_cli-0.11.2/resources/prompts/specfact.03-review.md +0 -152
- specfact_cli-0.11.2/resources/prompts/specfact.04-sdd.md +0 -132
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/.gitignore +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/LICENSE.md +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/README.md +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/mappings/node-async.yaml +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/mappings/python-async.yaml +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/mappings/speckit-default.yaml +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/schemas/deviation.schema.json +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/schemas/plan.schema.json +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/schemas/protocol.schema.json +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/templates/github-action.yml.j2 +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/templates/plan.bundle.yaml.j2 +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/templates/pr-template.md.j2 +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/templates/protocol.yaml.j2 +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/resources/templates/telemetry.yaml.example +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/agents/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/agents/analyze_agent.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/agents/base.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/agents/plan_agent.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/agents/registry.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/agents/sync_agent.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/constitution_evidence_extractor.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/contract_extractor.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/control_flow_analyzer.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/graph_analyzer.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/analyzers/requirement_extractor.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/cli.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/bridge.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/drift.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/implement.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/init.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/commands/sdd.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/common/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/common/logger_setup.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/common/logging_utils.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/common/text_utils.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/common/utils.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/comparators/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/comparators/plan_comparator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/enrichers/constitution_enricher.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/enrichers/plan_enricher.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/contract_generator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/openapi_extractor.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/plan_generator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/protocol_generator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/report_generator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/task_generator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/generators/workflow_generator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/importers/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/importers/speckit_converter.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/importers/speckit_scanner.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/integrations/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/integrations/specmatic.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/migrations/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/migrations/plan_migrator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/bridge.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/deviation.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/enforcement.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/protocol.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/quality.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/sdd.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/source_tracking.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/models/task.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/modes/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/modes/detector.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/modes/router.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/resources/semgrep/async.yml +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/runtime.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/bridge_probe.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/bridge_sync.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/bridge_watch.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/change_detector.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/code_to_spec.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/drift_detector.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/repository_sync.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/spec_to_code.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/spec_to_tests.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/speckit_sync.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/sync/watcher.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/telemetry.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/templates/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/templates/bridge_templates.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/acceptance_criteria.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/bundle_loader.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/console.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/enrichment_context.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/enrichment_parser.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/feature_keys.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/git.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/github_annotations.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/ide_setup.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/optional_deps.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/sdd_discovery.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/structure.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/structured_io.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/utils/yaml_utils.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/validators/__init__.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/validators/contract_validator.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/validators/fsm.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/src/specfact_cli/validators/repro_checker.py +0 -0
- {specfact_cli-0.11.2 → specfact_cli-0.11.4}/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.4
|
|
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.4"
|
|
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"
|
|
@@ -344,6 +344,7 @@ packages = [
|
|
|
344
344
|
"resources/templates" = "specfact_cli/resources/templates"
|
|
345
345
|
"resources/schemas" = "specfact_cli/resources/schemas"
|
|
346
346
|
"resources/mappings" = "specfact_cli/resources/mappings"
|
|
347
|
+
# Note: resources/semgrep files are in src/specfact_cli/resources/semgrep/ and are automatically included
|
|
347
348
|
|
|
348
349
|
[tool.hatch.build.targets.sdist]
|
|
349
350
|
# Only include essential files in source distribution
|
|
@@ -520,6 +521,7 @@ testpaths = [
|
|
|
520
521
|
"tests",
|
|
521
522
|
# "../src" # pythonpath = ["src"] should cover imports from src for tests in /tests
|
|
522
523
|
]
|
|
524
|
+
# Note: TEST_MODE is set in tests/conftest.py to skip Semgrep in tests
|
|
523
525
|
python_files = ["test_*.py"]
|
|
524
526
|
python_classes = ["Test*"]
|
|
525
527
|
python_functions = ["test_*"]
|
|
@@ -534,6 +536,7 @@ markers = [
|
|
|
534
536
|
"state_transition_coverage: mark test for state transition coverage tracking",
|
|
535
537
|
]
|
|
536
538
|
filterwarnings = [ # From pytest.ini
|
|
539
|
+
"ignore::UserWarning:rich.live", # Filter Rich library warnings about ipywidgets (not needed for CLI tests)
|
|
537
540
|
"ignore::pytest.PytestAssertRewriteWarning",
|
|
538
541
|
"ignore::pytest.PytestDeprecationWarning",
|
|
539
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,112 @@
|
|
|
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
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
specfact plan review [<bundle-name>] [--max-questions <n>] [--category <category>] [--list-questions] [--list-findings] [--answers JSON]
|
|
57
|
+
# Uses active plan if bundle not specified
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 3: Present Results
|
|
61
|
+
|
|
62
|
+
- Display Q&A, sections touched, coverage summary (initial/updated)
|
|
63
|
+
- Note: Clarifications don't affect hash (stable across review sessions)
|
|
64
|
+
|
|
65
|
+
## CLI Enforcement
|
|
66
|
+
|
|
67
|
+
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
|
|
68
|
+
|
|
69
|
+
**Rules:** Execute CLI first, use `--no-interactive` in CI/CD, never modify `.specfact/` directly, use CLI output as grounding.
|
|
70
|
+
|
|
71
|
+
## Expected Output
|
|
72
|
+
|
|
73
|
+
### Success
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
✓ Review complete: 5 question(s) answered
|
|
77
|
+
|
|
78
|
+
Project Bundle: legacy-api
|
|
79
|
+
Questions Asked: 5
|
|
80
|
+
|
|
81
|
+
Sections Touched:
|
|
82
|
+
• idea.narrative
|
|
83
|
+
• features[FEATURE-001].acceptance
|
|
84
|
+
• features[FEATURE-002].outcomes
|
|
85
|
+
|
|
86
|
+
Coverage Summary:
|
|
87
|
+
✅ Functional Scope: clear
|
|
88
|
+
✅ Technical Constraints: clear
|
|
89
|
+
⚠️ Business Context: partial
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Error (Missing Bundle)
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
✗ Project bundle 'legacy-api' not found
|
|
96
|
+
Create one with: specfact plan init legacy-api
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Common Patterns
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
/specfact.03-review # Uses active plan
|
|
103
|
+
/specfact.03-review legacy-api # Specific bundle
|
|
104
|
+
/specfact.03-review --max-questions 3 # Limit questions
|
|
105
|
+
/specfact.03-review --category "Functional Scope" # Focus category
|
|
106
|
+
/specfact.03-review --list-questions # JSON output
|
|
107
|
+
/specfact.03-review --auto-enrich # Auto-enrichment
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Context
|
|
111
|
+
|
|
112
|
+
{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
|
|
@@ -14,20 +14,11 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
14
14
|
|
|
15
15
|
## Purpose
|
|
16
16
|
|
|
17
|
-
Synchronize artifacts from external tools (
|
|
17
|
+
Synchronize artifacts from external tools (Spec-Kit, Linear, Jira) with SpecFact project bundles using bridge mappings. Supports bidirectional sync.
|
|
18
18
|
|
|
19
|
-
**When to use:**
|
|
19
|
+
**When to use:** Syncing with Spec-Kit, integrating external tools, maintaining consistency.
|
|
20
20
|
|
|
21
|
-
-
|
|
22
|
-
- Integrating with external planning tools
|
|
23
|
-
- Maintaining consistency across tool ecosystems
|
|
24
|
-
|
|
25
|
-
**Quick Example:**
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
/specfact.06-sync --adapter speckit --repo . --bidirectional
|
|
29
|
-
/specfact.06-sync --adapter speckit --bundle legacy-api --watch
|
|
30
|
-
```
|
|
21
|
+
**Quick:** `/specfact.06-sync --adapter speckit --repo . --bidirectional` or `/specfact.06-sync --bundle legacy-api --watch`
|
|
31
22
|
|
|
32
23
|
## Parameters
|
|
33
24
|
|
|
@@ -59,14 +50,8 @@ Synchronize artifacts from external tools (e.g., Spec-Kit, Linear, Jira) with Sp
|
|
|
59
50
|
### Step 2: Execute CLI
|
|
60
51
|
|
|
61
52
|
```bash
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
# One-way sync (Spec-Kit → SpecFact)
|
|
66
|
-
specfact sync bridge --adapter speckit --repo <path> [--bundle <name>]
|
|
67
|
-
|
|
68
|
-
# Watch mode
|
|
69
|
-
specfact sync bridge --adapter speckit --repo <path> --watch --interval 5
|
|
53
|
+
specfact sync bridge --adapter <adapter> --repo <path> [--bidirectional] [--bundle <name>] [--overwrite] [--watch] [--interval <seconds>]
|
|
54
|
+
# --bundle defaults to active plan if not specified
|
|
70
55
|
```
|
|
71
56
|
|
|
72
57
|
### Step 3: Present Results
|
|
@@ -80,13 +65,7 @@ specfact sync bridge --adapter speckit --repo <path> --watch --interval 5
|
|
|
80
65
|
|
|
81
66
|
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
|
|
82
67
|
|
|
83
|
-
**Rules:**
|
|
84
|
-
|
|
85
|
-
1. **ALWAYS execute CLI first**: Run `specfact sync bridge` before any sync operation
|
|
86
|
-
2. **ALWAYS use non-interactive mode for CI/CD**: Use appropriate flags in Copilot environments
|
|
87
|
-
3. **NEVER modify .specfact or .specify folders directly**: All operations must go through CLI
|
|
88
|
-
4. **NEVER create YAML/JSON directly**: All sync operations must be CLI-generated
|
|
89
|
-
5. **Use CLI output as grounding**: Parse CLI output, don't regenerate it
|
|
68
|
+
**Rules:** Execute CLI first, use appropriate flags in CI/CD, never modify `.specfact/` or `.specify/` directly, use CLI output as grounding.
|
|
90
69
|
|
|
91
70
|
## Expected Output
|
|
92
71
|
|
|
@@ -115,20 +94,10 @@ Supported adapters: speckit, generic-markdown
|
|
|
115
94
|
## Common Patterns
|
|
116
95
|
|
|
117
96
|
```bash
|
|
118
|
-
# Bidirectional sync with Spec-Kit
|
|
119
97
|
/specfact.06-sync --adapter speckit --repo . --bidirectional
|
|
120
|
-
|
|
121
|
-
# One-way sync (Spec-Kit → SpecFact)
|
|
122
98
|
/specfact.06-sync --adapter speckit --repo . --bundle legacy-api
|
|
123
|
-
|
|
124
|
-
# Watch mode for continuous sync
|
|
125
99
|
/specfact.06-sync --adapter speckit --repo . --watch --interval 5
|
|
126
|
-
|
|
127
|
-
# Sync with overwrite
|
|
128
|
-
/specfact.06-sync --adapter speckit --repo . --bidirectional --overwrite
|
|
129
|
-
|
|
130
|
-
# Auto-detect adapter
|
|
131
|
-
/specfact.06-sync --repo . --bidirectional
|
|
100
|
+
/specfact.06-sync --repo . --bidirectional # Auto-detect adapter
|
|
132
101
|
```
|
|
133
102
|
|
|
134
103
|
## Context
|