Refine dev.kit repo context and agent flow#21
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors dev.kit toward a tighter “env → repo context → agent guidance” loop by (1) making repo context generation more traceable/structured (refs/commands/gaps/deps/manifests) and (2) simplifying the public surface area and test fixtures to focus on core flows and real-repo trials.
Changes:
- Add
dev.kit env+ an env config file format for disabling tools/credentials, and update the defaultdev.kithome command to sync.rabbit/context.yaml+AGENTS.md. - Rework detection/config catalogs (archetypes, signals, patterns, context sections) and dependency/manifest tracing to be more evidence-driven.
- Reduce/remove “learn” and several fixture/config catalogs; replace broader fixture coverage with optional real-repo and worker-image smoke runners.
Reviewed changes
Copilot reviewed 66 out of 68 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/worker-smoke.sh | New docker-based smoke runner that installs dev.kit into the worker image and runs dev.kit* commands. |
| tests/suite.sh | Shrinks suite to a minimal “core” flow and updates assertions to match new outputs/artifacts. |
| tests/real-repos.sh | New opt-in local script to run dev.kit against real local repos without global install changes. |
| tests/local-udx.sh | Removed local UDX-only repo scanner in favor of more generic real-repo runner. |
| tests/fixtures/workflow-repo/README.md | Removed fixture content as part of fixture minimization. |
| tests/fixtures/workflow-repo/.github/workflows/reusable-check.yml | Removed workflow fixture as part of fixture minimization. |
| tests/fixtures/wordpress-repo/wp-content/mu-plugins/bootstrap.php | Removed WordPress fixture file. |
| tests/fixtures/wordpress-repo/wp-config.php | Removed WordPress fixture file. |
| tests/fixtures/wordpress-repo/README.md | Removed WordPress fixture doc. |
| tests/fixtures/wordpress-repo/package.json | Removed WordPress fixture manifest. |
| tests/fixtures/wordpress-repo/.rabbit/infra_configs/development/develop-alex/aws-cloudfront-distribution.yaml | Removed WordPress infra fixture. |
| tests/fixtures/wordpress-repo/.rabbit/infra_configs/development/aws-cloudfront-distribution.yaml | Removed WordPress infra fixture. |
| tests/fixtures/wordpress-repo/.github/workflows/deploy.yml | Removed WordPress workflow fixture. |
| tests/fixtures/php-repo/tests/ExampleTest.php | Removed PHP fixture. |
| tests/fixtures/php-repo/phpunit.xml | Removed PHP fixture. |
| tests/fixtures/php-repo/composer.json | Removed PHP fixture. |
| tests/fixtures/codex-home/sessions/2026/04/02/rollout-2026-04-02T20-54-19-019d4f54-eddc-7350-a757-3bb578d24f99.jsonl | Removed codex fixture session data. |
| src/templates/repo.json | Updates repo --json template (drops profile). |
| src/templates/learn.json | Removed learn JSON template. |
| src/templates/agent.json | Updates agent --json template (drops profile). |
| src/configs/repo-scaffold.yaml | Removed scaffold config catalog. |
| src/configs/learning-workflows.yaml | Removed learn workflow config catalog. |
| src/configs/knowledge-base.yaml | Removed knowledge-base config catalog. |
| src/configs/github-prs.yaml | Removed GitHub PR guidance catalog. |
| src/configs/github-issues.yaml | Removed GitHub issue guidance catalog. |
| src/configs/development-workflows.yaml | Removed development workflow catalog (moves toward repo-derived workflow steps). |
| src/configs/development-practices.yaml | Removed practices catalog (moves away from inlined practice rules). |
| src/configs/detection-signals.yaml | Refines factor/dependency/manifest detection signals and lists. |
| src/configs/detection-patterns.yaml | Refines regex patterns; adds YAML kind/apiVersion patterns. |
| src/configs/context-config.yaml | Introduces context section schemas + ref prioritization/glob support. |
| src/configs/audit-rules.yaml | Updates gap messages; adds descriptions/metadata. |
| src/configs/archetypes.yaml | Renames/reshapes archetype rules and matching facets. |
| src/configs/archetype-signals.yaml | Removed separate archetype signal file (merged into detection signals). |
| README.md | Rewrites README for upgrade-first guidance + new command roles + test entrypoints. |
| README_old.md | Adds previous README content as an “old” reference. |
| Makefile | Adds test-real target for optional real-repo checks. |
| lib/modules/utils.sh | Removes unused YAML scalar helper. |
| lib/modules/repo_workflows.sh | Adds entrypoint source helper; removes learn step from workflow steps. |
| lib/modules/repo_signals.sh | Improves glob handling, documented command extraction + source tracking, and adds Next/CLI signals. |
| lib/modules/repo_reports.sh | Updates agent contract text to be context-first. |
| lib/modules/repo_factors.sh | Refactors command detection to return command + source; adjusts config-factor evidence. |
| lib/modules/repo_archetypes.sh | Refactors facets/archetype inference (Next, YAML manifest detection, K8s detection tightening). |
| lib/modules/output.sh | Removes output hint helper. |
| lib/modules/local_env.sh | Adds env config read/ensure logic; implements disable-by-config behavior for tools/credentials. |
| lib/modules/dev_sync.sh | Inlines branch role/base branch defaults (removes dependency on removed workflow config). |
| lib/modules/config_catalog.sh | Removes learn/practices/workflow config cataloging; adds context section helpers and ref glob expansion. |
| lib/modules/bootstrap.sh | Removes learn from public commands and module path list. |
| lib/commands/repo.sh | Switches repo mode naming to “write” and adjusts next-step messaging. |
| lib/commands/learn.sh | Removes the learn command implementation. |
| lib/commands/env.sh | Adds new env command implementation. |
| lib/commands/agent.sh | Simplifies generated AGENTS.md content; removes learn/GitHub-history/practices integration. |
| docs/smart-dependency-detection.md | New doc describing deterministic dependency tracing behavior. |
| docs/integration.md | Removed integration doc (replaced by newer docs structure). |
| docs/installation.md | Adds upgrade-first guidance and positions dev.kit as the happy-path entrypoint. |
| docs/how-it-works.md | New doc describing command flow and regeneration model. |
| docs/experience-guidance.md | New doc describing what AGENTS.md should/shouldn’t do. |
| docs/environment-config.md | New doc describing env detection + env config controls. |
| docs/context.md | Removed old context doc (replaced by context-coverage/how-it-works). |
| docs/context-coverage.md | New doc describing what context.yaml should cover and how to repair gaps. |
| docs/agents.md | Removed old agents doc (replaced by experience-guidance/how-it-works). |
| config/env.yaml | Adds a repo-checked example env config file. |
| bin/dev-kit | Updates CLI usage, adds syncing behavior on dev.kit, and wires up env command help. |
| AGENTS.md | Updates generated artifact in-repo to new guidance shape. |
| .rabbit/context.yaml | Updates generated context example to new structured sections (commands/gaps/deps/manifests). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
udx-github
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
dev.kit envplus env config controls so repo and agent output reflect actual tool and credential availabilityorg/repo, and avoid false repo traces from nested content version fieldsdev.kit repo --jsonbackward-compatible by retainingprofile: nullwhile the new contract centers onarchetypedev.kit learnfrom the public command surface and trim related configs, templates, and docstests/real-repos.shrunner for broader repo trialsVerification
make testbash tests/real-repos.sh ...smoke checks