Skip to content

Commit e0eae37

Browse files
authored
Merge pull request #11 from udx/development
redesign dev.kit: context.yaml pipeline, AGENTS.md with rules + manifests, promptfoo eval
2 parents f4a4d62 + 2300495 commit e0eae37

84 files changed

Lines changed: 8582 additions & 1136 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.githooks/pre-push

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Bug report
2+
description: Something isn't working
3+
labels: ["type:bug"]
4+
body:
5+
- type: textarea
6+
id: summary
7+
attributes:
8+
label: Summary
9+
description: One sentence — what is broken and where.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: reproduce
15+
attributes:
16+
label: Steps to reproduce
17+
description: Minimal set of commands or actions that trigger the problem.
18+
placeholder: |
19+
1. Run `…`
20+
2. Observe `…`
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: expected
26+
attributes:
27+
label: Expected behavior
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: actual
33+
attributes:
34+
label: Actual behavior
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: context
40+
attributes:
41+
label: Context
42+
description: Relevant files, logs, environment details, related issue or PR URLs.

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Feature / task
2+
description: New capability, improvement, or work item
3+
labels: ["type:feature"]
4+
body:
5+
- type: textarea
6+
id: goal
7+
attributes:
8+
label: Goal
9+
description: What capability is being added and why it matters.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: acceptance
15+
attributes:
16+
label: Acceptance criteria
17+
description: Bullet list — each item must be verifiable and map to a testable condition.
18+
placeholder: |
19+
- [ ] …
20+
- [ ] …
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: context
26+
attributes:
27+
label: Context
28+
description: Relevant files, constraints, related issues or PRs, cross-repo links.

.github/ISSUE_TEMPLATE/infra.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Infrastructure / ops
2+
description: Infrastructure, deployment, or operational change
3+
labels: ["type:infra"]
4+
body:
5+
- type: textarea
6+
id: goal
7+
attributes:
8+
label: Goal
9+
description: What is being changed and what outcome is expected.
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: scope
15+
attributes:
16+
label: Scope
17+
description: Which services, environments, clusters, or repos are affected.
18+
19+
- type: textarea
20+
id: acceptance
21+
attributes:
22+
label: Acceptance criteria
23+
description: Observable evidence that the change is live and stable.
24+
placeholder: |
25+
- [ ] …
26+
- [ ] …
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: context
32+
attributes:
33+
label: Context
34+
description: Deploy config, workflow files, infra docs, runbook links.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!-- Pick the section set that matches your PR type and remove the others. -->
2+
<!-- feature | deployment (branch promotion) | ops (config/infra) | hotfix -->
3+
4+
Closes #<!-- issue number -->
5+
6+
## Changes
7+
<!--
8+
Bullet list of what changed and why — not a git log.
9+
-
10+
-
11+
-->
12+
13+
## Pre-merge gates
14+
<!--
15+
List any cross-repo or cross-service dependencies that must land before this merges.
16+
Leave blank or remove this section if none.
17+
-->
18+
19+
## Review notes
20+
<!--
21+
Anything reviewers need to know: risk areas, affected environments, test coverage gaps,
22+
flags that need human judgment.
23+
-->
24+
25+
## Backlog from this investigation
26+
<!--
27+
New issues or gaps discovered while doing this work.
28+
Reference existing issues (#N) or note ones that still need to be created.
29+
Leave blank or remove if none.
30+
-->

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
11
.DS_Store
2+
.tmp/
3+
context-env.txt
4+
5+
# dev.kit repo manifest (local artifact, not for VCS)
6+
.dev-kit/
7+
8+
# agent session data (local, not for VCS)
9+
.claude/
10+
.codex/
11+
.copilot/
12+
.devin/
13+
tests/fixtures/tmp-bin/
14+
15+
# Generated context (regenerated by test suite at runtime)
16+
tests/fixtures/*/.rabbit/context.yaml

.rabbit/context.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Generated by dev.kit repo — do not edit manually.
2+
# Run `dev.kit repo` to refresh.
3+
kind: repoContext
4+
version: udx.io/dev.kit/v1
5+
generated: 2026-04-14
6+
7+
repo:
8+
name: dev.kit
9+
archetype: library-cli
10+
profile: shell
11+
12+
refs:
13+
- ./README.md
14+
- ./docs/architecture.md
15+
- ./docs
16+
- ./.rabbit
17+
- ./.github/workflows
18+
- ./Makefile
19+
- ./deploy.yml
20+
- ./lib
21+
- ./src
22+
- ./tests
23+
24+
commands:
25+
verify: make test
26+
build: make build
27+
run: make run
28+
29+
# Gaps — run `dev.kit repo --scaffold` to apply fixes
30+
gaps:
31+
- architecture (partial)
32+
- config (partial)
33+
- runtime (partial)
34+
35+
# Engineering practices
36+
practices:
37+
- Keep the repository as the primary source of truth so context-driven engineering comes from repo contracts, docs, tests, config, and repo-native notes instead of agent memory.
38+
- Prefer repo-centric mechanisms that discover workflows, tools, formats, and refs dynamically instead of hardcoding per-agent assumptions.
39+
- Keep markdown, yaml, diagrams, tests, and command contracts self-contained in the repo so local and remote UDX workflows stay aligned.
40+
- Keep deterministic workflow logic in repo config and scripts, and reserve AI agents for reading that contract, generating grounded summaries, and handling non-deterministic judgment without inventing hidden rules.
41+
- Do not require custom repo files for dev.kit to work. Prefer standard engineering signals such as README, docs, tests, manifests, workflows, and deployment config, with dev.kit-owned continuity treated as optional acceleration only.
42+
- Make sure to develop and test incrementally, so it is easier to detect problems early and build on verified behavior.
43+
- Make sure to protect development executions with scoped and limited tasks, so failures are easier to isolate and blast radius stays low.
44+
45+
# Canonical agent workflow
46+
workflow:
47+
- Refresh repo context: If .rabbit/context.yaml is stale or absent, run `dev.kit repo` then `dev.kit agent` before starting work. A current context.yaml is the source of truth for refs, commands, gaps, and lessons. Do not rely on ad hoc prompt memory when the repo contract can be read from disk.
48+
- Read linked GitHub issue and confirm scope: If a GitHub issue URL is available, read the full body and comments, confirm the repo matches the issue scope, and map acceptance criteria before writing any code. Use the issue URL as the cross-repo context root.
49+
- Inspect git status
50+
- Analyze local changes
51+
- Analyze branch state
52+
- Group logical commits
53+
- Bump version and changelog if supported
54+
- Create or validate feature branch
55+
- Push branch to remote
56+
- Generate pull request description: Pick the PR template type from src/configs/github-prs.yaml (feature, deployment, ops, hotfix). Fill every required section. Include "Closes #N" for linked issues. Add a "Backlog from this investigation" section for any new gaps found. Use .github/PULL_REQUEST_TEMPLATE.md as the base form.
57+
- Create pull request
58+
- Read and respond to automated reviews: After PR creation, wait for Copilot, Devin, and CodeQL reviews. Read each review from github-prs.yaml bot guidance. Address actionable findings — reply to each bot comment. Do not request human review while bot findings are unaddressed.
59+
- Verify required status checks: All required checks must pass before requesting human review. For infra PRs, open check details and review the Terraform plan output. For CodeQL, review findings in the Security tab.
60+
- Post close-out comment on linked issue: After PR is created, post a brief comment on the linked issue with the PR URL, what changed, and any follow-up items. GitHub auto-closes the issue on merge when "Closes #N" is in the PR body — do not close manually.
61+
- Post-merge close-out and backlog: After merge: verify issue auto-closed, post close-out comment, open issues for any backlog items from the PR, verify monitoring changes are live. See post_merge steps in github-prs.yaml.
62+
63+
# Config manifests — traceable workflow and tooling dependencies
64+
# Read these to understand what controls repo behavior before reading shell code.
65+
manifests:
66+
- src/configs/archetype-rules.yaml — archetype definitions and matching rules
67+
- src/configs/archetype-signals.yaml — file/dir signals for framework and platform detection
68+
- src/configs/audit-rules.yaml — factor gap messages and improvement guidance
69+
- src/configs/context-config.yaml — repo root markers and priority paths
70+
- src/configs/detection-patterns.yaml — regex patterns for build/verify/run command detection
71+
- src/configs/detection-signals.yaml — file/dir/glob patterns for factor analysis
72+
- src/configs/development-practices.yaml — engineering principles inlined into repo context
73+
- src/configs/development-workflows.yaml — git workflow steps, PR process, and operational notes
74+
- src/configs/github-issues.yaml — issue templates, labels, and agent issue workflow
75+
- src/configs/github-prs.yaml — PR templates, bot reviewers, and post-merge checklist
76+
- src/configs/knowledge-base.yaml — org hierarchy and preferred knowledge sources
77+
- src/configs/learning-workflows.yaml — agent session discovery and lesson extraction rules
78+
- src/configs/repo-scaffold.yaml — baseline dirs/files per archetype and factor
79+
- .github/workflows/context7-ops.yml
80+
- deploy.yml
81+
82+
# Lessons from agent sessions
83+
lessons:
84+
- .rabbit/dev.kit/lessons-dev.kit-2026-04-14.md
85+

.rabbit/dev.kit/learn-last-run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1776175365
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Lessons — dev.kit — 2026-04-14
2+
3+
Sources: claude (1 session(s)), codex (0 session(s))
4+
5+
## Workflow rules
6+
7+
- Verify the build or runtime locally before running deploy-oriented workflow assets or reporting the change as complete.
8+
- Use repo workflow assets like deploy.yml, workflow files, and repo docs as the execution contract instead of inventing an ad hoc deploy path.
9+
- Keep the delivery chain explicit: create or sync the branch, prepare the PR, and connect the related GitHub issue before close-out.
10+
- Report outcomes with exact URLs, versions, findings deltas, and next steps so the follow-up can be reused by humans and agents without drift.
11+
- Use README, docs, and tests as the first alignment surface before broad refactors so the implementation stays anchored to an explicit workflow.
12+
- Keep local verification targeted and lightweight during iteration, then move broader or slower validation into GitHub Actions or other CI gates.
13+
- Treat cleanup of legacy modules, configs, and leftovers as part of the feature work so the repo keeps converging on the new operating model.
14+
- Prefer reusable YAML/manifests plus small shell wrappers over embedding policy directly into imperative scripts.
15+
- Package agent context from repo artifacts and manifests so the workflow stays repo-centric and does not depend on ad hoc prompt memory.
16+
17+
## Operational references
18+
19+
- https://github.com/icamiami/icamiami.org/issues/1897
20+
- https://github.com/test/repo/issues/42
21+
- https://github.com/org/repo/issues/42
22+
- https://github.com/udx/next.reddoorcompany.com/issues/1292
23+
- https://github.com/udx/next.reddoorcompany.com/issues/1250
24+
- https://github.com/icamiami/icamiami.org/issues/1895
25+
- https://github.com/udx/next.reddoorcompany.com/issues/1299
26+
- https://github.com/udx/worker-tooling/pull/57
27+
- https://github.com/udx/dev.kit/pull/10
28+
- https://github.com/udx/dev.kit/pull/11
29+
- https://github.com/org/repo/pull/15
30+
- https://github.com/test/repo/pull/5
31+
- https://github.com/udx/next.reddoorcompany.com/pull/1298
32+
- https://github.com/icamiami/gala-2024.icamiami.org/pull/6
33+
- https://github.com/udx/rabbit-automation-action/pull/231
34+
- https://github.com/udx/next.reddoorcompany.com/pull/1301
35+
- https://github.com/udx/api.encerp.com/pull/197
36+
- https://github.com/test/repo/pull/9
37+
- https://github.com/udx/worker-engine/pull/83
38+
- https://github.com/udx/reusable-workflows/pull/32
39+
- https://github.com/udx/azure-apim-backup/issues/81
40+
41+
## Ready templates
42+
43+
- `Issue-to-scope`: start from the linked issue, confirm repo/workspace match, and restate the exact scope before changing code.
44+
- `Workflow tracing`: locate the actual workflow file or deploy source first, then trace the commands and supporting docs that really drive execution.
45+
- `Verify-before-sync`: run the relevant local build/test check before syncing, reporting completion, or preparing the PR.
46+
- `Delivery chain`: sync the branch, prepare the PR in repo style, and connect the related issue before close-out.
47+
- `Post-merge follow-up`: gather release/workflow evidence and post a concise update with links, findings delta, and next steps.
48+
- `Docs-first cleanup loop`: review README/docs/tests, restate the target workflow, then simplify code and remove mismatched legacy paths in the same pass.
49+
- `Verification scope`: run the smallest local check that proves the current change, defer heavyweight smoke coverage to CI, and call that tradeoff out explicitly.
50+
- `Legacy reduction`: when a new direction is accepted, archive or delete conflicting old modules/configs instead of carrying both models forward.
51+
- `Config-over-code`: express repo rules in YAML/manifests first, then keep shell glue thin and composable.
52+
- `Agent handoff`: refresh repo context, manifest, and AGENTS instructions before deeper agent work so the repo contract is the source of truth.
53+
54+
## Evidence highlights
55+
56+
- [claude] I'm planning refactoring/re-thinking my dev.kit tool, please explore it, get familiar and validate againts my new plan [Pasted text #1 +69 lines]
57+
- [claude] ok, let's start phase 1, break into smaller iterations if make sense, I would probably start by readme/docs, tests and basic scripts end goal is to have smart and flexible development workflow that helps improve local env, repo(s), and provide context for claud agent so no engineering drift happening and development...
58+
- [claude] before running test we need to ensure perfomance and make sure it's not running too long, also, I see you haven't updated Readme fully, let's loop once again readme/docs, tests feel free to cleanup/consolidate/whatever, it's a first version so nobody using it so no back-compability needed
59+
- [claude] when I said about perfomance I particularly meant tests
60+
- [claude] so, do we understand "happy path" for refactor to new concept? [Pasted text #1 +69 lines]
61+
- [claude] [Pasted text #1 +131 lines]
62+
- [claude] make sure to explore lessons and overall flow, I want - dev.kit - dev.kit repo (generate repo context + experienced knowledge and dev workflow(s)) - dev.kit agent (generate correct flexible agent instructions based on context) - dev.kit learn (generate analyzed agents sessions) use learned lessons to improve dev.kit...
63+
- [claude] before make changes would be useful to sync uncommited to git
64+

0 commit comments

Comments
 (0)