feat(cli): add post-init config command - #113
Conversation
|
Posted on behalf of @kanfil by opencode (model: glm-5.2). Reviewed Medium —
|
…thub#4397) * fix(scripts): name setup-plan's feature directory key FEATURE_DIR setup-plan emitted a key called SPECS_DIR holding $FEATURE_DIR -- the per-feature subdirectory, not the specs root. The name is already taken elsewhere with the other meaning: create-new-feature.sh sets SPECS_DIR="$REPO_ROOT/specs" and derives FEATURE_DIR="$SPECS_DIR/$BRANCH_NAME". setup-plan was also the only script in the suite using it. setup-tasks and both check-prerequisites payloads already emit FEATURE_DIR for exactly this value, so this brings setup-plan in line rather than inventing a convention. Renamed in all three ports so the payloads stay identical, and in templates/commands/plan.md, which is the only consumer -- it parses the key by name, so it has to move in the same commit. Verified the bash, PowerShell, and Python variants all emit ['BRANCH','FEATURE_DIR','FEATURE_SPEC','IMPL_PLAN']. Fixes github#4017 * test(scripts): pin setup-plan's FEATURE_DIR output contract Addresses review feedback. The existing setup-plan tests compare the ports against each other, so all three could regress to SPECS_DIR together and still pass. This asserts the contract absolutely, in JSON and text mode and across bash/Python/PowerShell: the key is FEATURE_DIR, it carries the feature directory rather than the specs root, and SPECS_DIR is absent. The value is matched by suffix rather than full path because the ports legitimately differ in path flavour -- under MSYS bash reports /tmp/... where the Python and PowerShell ports report C:\... . The suffix still separates specs/001-my-feature from a bare specs, which is the regression being guarded; verified it rejects both /tmp/proj/specs and C:\proj\specs.
…ithub#4424) docs/reference/workflows.md introduces its YAML block as the workflow that ships with Spec Kit, so a reader is entitled to treat it as the real definition. It had drifted on four points: version 1.0.0 -> 1.0.1 speckit_version >=0.7.2 -> >=0.8.5 integrations.any copilot, claude, gemini -> also alquimia, opencode integration default "copilot" -> default "auto" The last is the most user-visible: the guide stated the default integration was copilot, when it is auto, resolved from the project's initialized integration. Someone reading the guide to learn what they get by default was being told the wrong thing. Adds a guard so this cannot drift again. It compares parsed YAML rather than text, so the guide stays free to format lists however reads best and only the content has to agree. Verified it fails against the pre-sync copy, reporting all four differences, and passes after. Follow-up to github#4384 / github#4398, at the maintainer's suggestion.
…4320) * fix(presets): reject falsy non-mapping catalog config shapes `PresetCatalog._load_catalog_config` had two "shape check runs after an emptiness check" bugs, both masking a corrupted preset-catalogs.yml as an empty/no-op config instead of raising: - Top level: `yaml.safe_load(...) or {}` coerced a FALSY non-mapping document (`[]`, `false`, `0`, `''`) to `{}` before the `isinstance(data, dict)` guard ran, so it was silently treated as "no config" — while a TRUTHY non-mapping (a bare string) already raised "expected a mapping at root". - One level down: `catalogs_data = data.get("catalogs", [])` followed by `if not catalogs_data: return None` ran the emptiness check *before* the `isinstance(catalogs_data, list)` check, so a FALSY non-list `catalogs:` value (`{}`, `''`, `0`, `false`) was silently swallowed as "no catalogs" — while a TRUTHY non-list (`catalogs: "not-a-list"`) already raised "must be a list". `WorkflowCatalog._load_catalog_config` and `StepCatalog._load_catalog_config` (workflows/catalog.py) already guard against both cases correctly, with the same explanatory comments reused here. This preset sibling was missed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FW9fAYsCBCAgdKWovtSyqt * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Fix indentation in test for catalog config loading Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Expose persisted settings and extension lifecycle under `specify config`, and publish fork-owned documentation through the guarded Pages workflow.
…-post-init-config-command
e1a94b5 to
8cbf12f
Compare
Code Review —
|
Retain MCP ownership only while its directives source is configured.
|
@therightstuff you should also suggest this to spec-kit and then we will delete the change here |
Description
Expose persisted settings and extension lifecycle under
specify config, publish fork-owned documentation through the guarded Pages workflow, and add a post-initialization lifecycle for team directives.Behavioral Safeguards
specify configpermits only settings it can change safely. Integration, script, and skills-layout changes remain owned byspecify integration; initialization metadata remains read-only.Enable Fork Documentation Publishing
Follow these steps after this pull request merges into
main. They requireadministrator or maintainer access to
tikalk/agentic-sdlc-spec-kit.1. Enable GitHub Pages for Actions
2. Run the Documentation Workflow
mainbranch.buildanddeployjobs to pass.3. Validate the Published Site
Open each URL and confirm it returns the fork's content rather than an error
page:
Also open the deployment environment and confirm the latest deployment is successful.
4. Validate Future Publishing
Merge a documentation-only change that modifies a file under
docs/, thenconfirm the workflow starts automatically and deploys successfully.
If the workflow does not start or deploy, review its job log before retrying;
the log is the source of the failure reason and recovery guidance.
Testing
tests/test_config_cli.pyandtests/test_init_fork.pypassed in the focused local run..venv/bin/pytest: 7,625 passed, 222 skipped, and 16 failed in 10m38s. The failures are in git-template, PowerShell-event, script-parity, bundler-reference, and workflow-documentation tests; the focused feature tests passed..venv; the full check reports unrelated baseline violations. Focused branch files were checked, and branch-local findings were cleaned without changing unrelated shared-file findings.See new section Verify Post-Initialization Configuration under docs/local-development.md
AI Disclosure
Code planned and implemented using superpowers and Codex, with some manual editing. Local development test steps performed without AI.