Skip to content

feat(aidd-context): add Kilo-native generation targets - #992

Open
waewoo wants to merge 45 commits into
ai-driven-dev:nextfrom
waewoo:feat/kilo-native-generation-914
Open

waewoo wants to merge 45 commits into
ai-driven-dev:nextfrom
waewoo:feat/kilo-native-generation-914

Conversation

@waewoo

@waewoo waewoo commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🎯 What & why

Adds native Kilo support to "aidd-context", enabling Kilo-only projects to onboard AIDD and generate discoverable project memory, rules, skills, agents, and workflows while preserving compatibility with other supported tools.

🛠️ How it works

  • Detection and memory: Recognizes canonical and legacy Kilo project signals without confusing them with OpenCode. Uses shared "AGENTS.md" project memory while preserving user-owned content.
  • Rules: Publishes ".kilo/rules/" artifacts and registers their exact paths in "kilo.json[c]" "instructions". The shared writer preserves existing JSONC content, handles ambiguous configurations explicitly, and uses preflight checks, staging, and best-effort rollback.
  • Skills: Supports native ".kilo/skills/" placement and explicit portable ".agents/skills/" placement.
  • Agents and workflows: Generates native Markdown artifacts under ".kilo/agents/" and ".kilo/commands/", using documented fields.
  • Hooks: Provides Kilo JavaScript/TypeScript plugin guidance without generating unsupported declarative hooks. Existing host contracts remain supported.
  • Cross-tool improvements: Hardens shared memory filesystem handling and rule publishing, strengthens hook compatibility checks, and extends "skill-eval" with Claude/Codex evaluation support, JSON file checks, project-tree snapshots, and explicit "PASS"/"FAIL"/"INCOMPLETE" reporting.

Detailed host contracts are documented in "aidd-context" (https://github.com/ai-driven-dev/framework/blob/ccd32e3bd9075cce43be6bea4a7bb1c60a14e6dd/plugins/aidd-context/README.md) and its generator references.

🧪 How to verify

CI passes on the current PR HEAD, including Windows CLI checks, mutation tests, CodeQL, and Kilo runtime E2E tests.

For focused Kilo validation:

cd cli
pnpm test:e2e:kilo
pnpm test:e2e:kilo:native

The CI runtime tests use Kilo CLI 7.7.5 with a deterministic local provider on Linux.

Additionally, phase 6 records a successful authenticated Codex CLI 0.162.1 execution using AIDD skills to generate a native Kilo skill, its action, and a synthetic payload. The generated artifacts passed the scoped case assertions.

A subsequent Kilo 7.8.8 Linux runtime test verified discovery, skill loading, action reading, and payload consumption using a deterministic local provider.

These are scoped behavioral and runtime validations, not evidence that the entire "skill-eval --host=codex" suite was executed successfully.

⚠️ Heads-up

  • Claude validation: An authenticated Claude Code session has not been performed. "CONTRIBUTING.md" requests testing with Claude and another tool; maintainer guidance is requested on accepting the available Codex/Kilo evidence or arranging a Claude validation.
  • Platform coverage: Kilo runtime behavior has been validated on Linux. Windows CI covers the general CLI, not authenticated or native Kilo runtime execution on Windows. Kilo runtime validation on Windows/macOS remains outstanding.
  • Filesystem safety: Shared project-memory writes and rule publication have been hardened, but they do not guarantee atomic multi-file updates or recovery from every filesystem failure.
  • Manual memory synchronization: The manual workflow provides fewer filesystem protections than the executable hook. Generic installed-plugin resource resolution is tracked separately in "#994" (feat(framework): resolve resources shipped with installed plugins #994).
  • Partial writes: "#1018" (fix(aidd-context): preserve project-memory files on write failure #1018) tracks a project-memory corruption bug reproduced on "next" when an I/O failure occurs during writing. This PR does not claim to resolve that issue.
  • Skill evaluation: Results marked "INCOMPLETE" do not establish a successful LLM-judged evaluation, even when the process exits with code "0".
  • Detection coverage (AC1–4): Explicit detection guidance is incomplete for rule and hook generators; no incorrect detection was reproduced.
  • Generation guarantees (AC13–14): Idempotence and safe-write behavior are covered by targeted tests, but complete guarantees for every LLM-guided generation path remain partially verified.
  • Official Kilo references (AC16): Official Kilo paths, formats, and sources are documented centrally in "official-sources.md" (https://github.com/ai-driven-dev/framework/blob/ccd32e3bd9075cce43be6bea4a7bb1c60a14e6dd/aidd_docs/tasks/2026_10/2026_10_10_kilo-native-generation-914/official-sources.md). Issue feat(aidd-context): add Kilo-native generation targets #914 records a verification date of September 25, 2026; the documentation was independently rechecked on October 13, 2026. Maintainer confirmation is requested on whether this centralized approach satisfies the per-claim traceability requirement.

🔗 Linked issue

Refs #914

Follow-up issues

Three issues are tracked separately:

None of these issues is claimed as resolved here.

✅ I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

Cover six canonical and legacy signals without false Kilo detection from shared AGENTS or OpenCode config. Keep OpenCode detection unchanged.

TASK 1 of ai-driven-dev#914 phase 1. Detection contracts: 24/24 pass; removing the nested JSONC signal causes a targeted failure.
Reuse the shared AGENTS destination and preflight all selected files before Upsert and Fill. Preserve user bytes and keep automatic hooks best-effort. Reject known unsafe destinations before any selected write.

TASK 2 of ai-driven-dev#914 phase 1. 40 memory tests and 24 detection tests pass. Final make check: 604 pass, 2 existing skips, 0 fail. Real Kilo reads linked memory and applies its instruction at reported cost zero.
Record TASK 3 runtime proof, review, assertions, task statuses and resumption decisions for ai-driven-dev#914 phase 1. Preserve the approved plan and its previous snapshot; later phases remain pending and require separate authorization.

Native Codex generated shared memory. Real Kilo read the linked file and applied its instruction at reported cost zero. Final checks: 64 targeted pass; 604 full-script pass, 2 existing skips; review approve. Claude authenticated runtime and standalone Codex CLI limitations remain explicit.
Require an explicit portable choice and resolve shared target conflicts before
publication. Preserve host field contracts and user resources with a full
preflight, and record actual caller generation and Kilo runtime evidence.

Scope is limited to validated phase 3. The overall plan remains in progress;
Claude authentication, other Kilo platforms and subsequent phases remain open.

Refs ai-driven-dev#914
Implement phase 4 of ai-driven-dev#914 with Kilo contracts, regression coverage, and Linux runtime proof.
docs: archive phase 5 validation reruns

Record targeted Persona and pinned Kilo runtime evidence for ai-driven-dev#914.

test(aidd-context): prove hook contract assertions

Exercise seven targeted source-contract mutations for ai-driven-dev#914 and tighten the two assertions that survived initial probes. Archive final phase-5 validation and update the coverage matrix and review.
Comment thread scripts/__tests__/context-kilo-detection.test.js Fixed
Comment thread scripts/__tests__/context-kilo-detection.test.js Fixed
Comment thread scripts/__tests__/context-skill-artifacts.test.js Fixed
Comment thread scripts/__tests__/update-memory.test.js Fixed
Comment thread scripts/__tests__/update-memory.test.js Fixed
Comment thread scripts/__tests__/update-memory.test.js Fixed
Comment thread scripts/__tests__/update-memory.test.js Fixed
Verify project-file descriptors while preserving user content and metadata, and refuse detected substitutions and hard-linked targets.

Use private test fixtures and descriptor-backed witnesses. Make line-ending, permission, mode, and parent-identity expectations explicit across platforms.

Refs ai-driven-dev#914
@waewoo
waewoo force-pushed the feat/kilo-native-generation-914 branch from d5f1309 to bbd194a Compare October 10, 2026 20:47
@waewoo

waewoo commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Quick progress update on #992:

  • Phases 1, 3, 4, and 5 are complete, with CI passing.
  • Phase 2 remains partially implemented, pending coordination with fix(aidd-context): generate rules through a standalone skill script #979 to reuse the shared rule writer.
  • Phase 6 is still pending. Authenticated Claude runtime validation is currently unavailable in my environment, so I’m not claiming that coverage.
  • The memory-sync workflow now uses a constrained manual process, without claiming the executable hook's hardlink and file-identity protections.

I've opened #994 to track the underlying plugin resource-resolution limitation separately, without expanding the scope of this PR.

I'll keep #992 in Draft until the remaining work is addressed.

waewoo added 16 commits October 12, 2026 07:00
Cover six canonical and legacy signals without false Kilo detection from shared AGENTS or OpenCode config. Keep OpenCode detection unchanged.

TASK 1 of ai-driven-dev#914 phase 1. Detection contracts: 24/24 pass; removing the nested JSONC signal causes a targeted failure.
Reuse the shared AGENTS destination and preflight all selected files before Upsert and Fill. Preserve user bytes and keep automatic hooks best-effort. Reject known unsafe destinations before any selected write.

TASK 2 of ai-driven-dev#914 phase 1. 40 memory tests and 24 detection tests pass. Final make check: 604 pass, 2 existing skips, 0 fail. Real Kilo reads linked memory and applies its instruction at reported cost zero.
Record TASK 3 runtime proof, review, assertions, task statuses and resumption decisions for ai-driven-dev#914 phase 1. Preserve the approved plan and its previous snapshot; later phases remain pending and require separate authorization.

Native Codex generated shared memory. Real Kilo read the linked file and applied its instruction at reported cost zero. Final checks: 64 targeted pass; 604 full-script pass, 2 existing skips; review approve. Claude authenticated runtime and standalone Codex CLI limitations remain explicit.
Require an explicit portable choice and resolve shared target conflicts before
publication. Preserve host field contracts and user resources with a full
preflight, and record actual caller generation and Kilo runtime evidence.

Scope is limited to validated phase 3. The overall plan remains in progress;
Claude authentication, other Kilo platforms and subsequent phases remain open.

Refs ai-driven-dev#914
Implement phase 4 of ai-driven-dev#914 with Kilo contracts, regression coverage, and Linux runtime proof.
docs: archive phase 5 validation reruns

Record targeted Persona and pinned Kilo runtime evidence for ai-driven-dev#914.

test(aidd-context): prove hook contract assertions

Exercise seven targeted source-contract mutations for ai-driven-dev#914 and tighten the two assertions that survived initial probes. Archive final phase-5 validation and update the coverage matrix and review.
Verify project-file descriptors while preserving user content and metadata, and refuse detected substitutions and hard-linked targets.

Use private test fixtures and descriptor-backed witnesses. Make line-ending, permission, mode, and parent-identity expectations explicit across platforms.

Refs ai-driven-dev#914
Extend the canonical rule publication flow for Kilo while preserving project configuration and existing host behavior.

Refs ai-driven-dev#914
Comment thread scripts/skill-eval.mjs Fixed
Comment thread scripts/__tests__/kilo-rule-publication.test.js Fixed
Comment thread scripts/__tests__/kilo-rule-publication.test.js Fixed
Comment thread scripts/skill-eval-snapshot.mjs Fixed
Document standalone detection and official Kilo sources. Add rerun and collision checks to support ai-driven-dev#914 acceptance review.
@waewoo

waewoo commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

The implementation is ready for maintainer review. The shared rule publisher is now integrated (#979 is no longer blocking), and CI is green, including Kilo 7.7.5 Linux E2E, Windows CLI, mutation tests, and CodeQL.

I'd appreciate your feedback on three points:

  1. Cross-tool scope

Beyond Kilo-native generation, this PR includes:

  • Shared rule publishing with preflight, configuration preservation, and best-effort rollback.
  • Project-memory filesystem hardening and hook compatibility checks.
  • "skill-eval" extensions: Claude/Codex host support, JSON checks, snapshots, and "PASS"/"FAIL"/"INCOMPLETE" reporting.

The first changes support Kilo integration and existing host compatibility. The "skill-eval" extensions are less directly related.

Would you prefer to keep everything together or extract the independent changes into a follow-up PR?

  1. AC16 — Kilo documentation provenance

AC16 requires an official source and the September 25, 2026 verification date for every Kilo path claim.

I centralized the references in "official-sources.md" (https://github.com/ai-driven-dev/framework/blob/ccd32e3bd9075cce43be6bea4a7bb1c60a14e6dd/aidd_docs/tasks/2026_10/2026_10_10_kilo-native-generation-914/official-sources.md), recording the actual October 13 re-verification rather than claiming independent evidence for September 25.

Does this centralized approach satisfy AC16's intent?

  1. Claude validation

"CONTRIBUTING.md" requires testing with Claude and another tool. I don't have a Claude subscription or budget for paid API usage.

However, an authenticated Codex CLI 0.162.1 run successfully generated a native Kilo skill using AIDD, and a subsequent Kilo 7.8.8 Linux runtime test verified discovery, loading, and payload consumption. This is a scoped validation, not a full "skill-eval" suite pass.

Would you accept this Codex/Kilo evidence as an exception to the Claude requirement, or could a maintainer perform the Claude validation?

Follow-up issues

Three follow-up issues are tracked separately:

None of these issues is claimed as resolved here.

Other validation limitations are documented in the PR description.

Thanks for your guidance before merging!

@waewoo
waewoo marked this pull request as ready for review October 14, 2026 05:46
@waewoo
waewoo requested a review from a team as a code owner October 14, 2026 05:46
…neration-914

# Conflicts:
#	cli/tests/e2e/sandbox-reaches-no-tool-binary.e2e.test.ts
#	plugins/aidd-context/skills/05-rule-generate/actions/01-capture-rule.md
#	plugins/aidd-context/skills/05-rule-generate/actions/02-write-rule.md
#	plugins/aidd-context/skills/05-rule-generate/actions/03-validate.md
#	plugins/aidd-context/skills/05-rule-generate/references/tool-paths.md
#	plugins/aidd-context/skills/05-rule-generate/scripts/write-rule.cjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants