This is an automated email from the ASF dual-hosted git repository. luigidemasi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kit.git
commit 5f9c70b9732ac4527eba0fb46de807b4505c07b1 Author: Jinal Sarvaiya <[email protected]> AuthorDate: Tue Nov 24 18:53:48 2026 +0000 fix #114: Add regression test and remove stale law count --- docs/architecture.md | 4 ++-- docs/user-guide.md | 2 +- .../src/main/resources/skills/camel-execute/SKILL.md | 2 +- .../camel/kit/generator/ShippedAssetStructureTest.java | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index 6f170991..eee6172f 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -103,7 +103,7 @@ Shared guides live at `kit/camel-kit-core/src/main/resources/skills/shared/` and | Guide | Purpose | |-------|---------| -| `iron-laws.md` | Six non-negotiable pipeline process enforcement rules | +| `iron-laws.md` | Seven non-negotiable pipeline process enforcement rules | | `camel-security-checklist.md` | Canonical Camel security rules and configuration snippets shared by design, validation, and review | | `datamapper-canonicalize.md` | Engine selection and field mapping enrichment for DataMapper | | `flow-test-data.md` | Test data generation patterns for flow design | @@ -870,7 +870,7 @@ All supported targets use the shared markdown skills, with agent-specific differ The **Constitution** defines 8 route quality rules (what makes a good route): route structure, single responsibility, separation of concerns, naming conventions, observability, external configuration, component support verification, infrastructure via Forage. -The **Iron Laws** define six pipeline process rules (how the pipeline operates): MCP verification, constitution compliance, no code without an approved design and task plan, spec compliance before quality, adversarial review before staged review, and surgical changes. +The **Iron Laws** define seven pipeline process rules (how the pipeline operates): MCP verification, constitution compliance, no code without an approved design and task plan, spec compliance before quality, adversarial review before staged review, surgical changes, and deliverables in project directory. Iron Law 2 explicitly incorporates and enforces the 8 constitution rules. They are complementary, not overlapping -- the constitution says what to check, the iron laws say when and how to enforce it. diff --git a/docs/user-guide.md b/docs/user-guide.md index 1d56d31f..107961c8 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -30,7 +30,7 @@ Camel-Kit is an AI-powered toolkit that guides you through designing, planning, | **Design Spec** | The pipeline design contract. Describes each flow's source, processing steps, sink, error handling, data transformation, configuration, dependencies, and test criteria. | | **MCP** (Model Context Protocol) | Real-time catalog queries. The AI assistant queries the Camel MCP server to verify components, EIPs, data formats, and expression languages exist in your exact Camel version -- never relying on training data. | | **Constitution** | Eight route quality rules enforced on every generated route: route structure, single responsibility, separation of concerns, naming conventions, observability, external configuration, component support verification, and infrastructure via Forage. | -| **Iron Laws** | Six non-negotiable pipeline rules: MCP catalog verification, constitution compliance, no code without an approved design and task plan, spec compliance before quality, adversarial review before staged review, and surgical changes. | +| **Iron Laws** | Seven non-negotiable pipeline rules: MCP catalog verification, constitution compliance, no code without an approved design and task plan, spec compliance before quality, adversarial review before staged review, surgical changes, and deliverables in project directory. | --- diff --git a/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md b/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md index 3e8b1216..737f96f6 100644 --- a/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md +++ b/kit/camel-kit-core/src/main/resources/skills/camel-execute/SKILL.md @@ -349,7 +349,7 @@ After task loop completes, before final cross-cutting review: ## Iron Laws (enforced in this phase) -Read `shared/iron-laws.md` for the full Iron Laws. This phase enforces ALL six: +Read `shared/iron-laws.md` for the full Iron Laws. This phase enforces the following Iron Laws: - **Iron Law 1: MCP Catalog Verification** — every component must be verified before YAML generation. A `catalog-researcher` pre-verification summary satisfies this rule for the wave; otherwise implementer subagents must diff --git a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java index 8b827856..658aff1e 100644 --- a/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java +++ b/kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ShippedAssetStructureTest.java @@ -283,6 +283,24 @@ class ShippedAssetStructureTest { } } + @Test + void generatedAgentsIncludeDeliverablesInProjectInstruction() throws Exception { + for (String agentName : sortedAgentNames()) { + InitContext ctx = createContext(agentName, tempDir.resolve("law7-" + agentName)); + AgentGeneratorFactory.create(agentName).generate(ctx); + + Path agentsMd = ctx.projectDir().resolve("AGENTS.md"); + assertTrue(Files.exists(agentsMd), + agentName + " must generate root AGENTS.md"); + + String content = Files.readString(agentsMd); + assertTrue(content.contains("Write deliverables into the project from the start and iterate in place"), + agentName + " root AGENTS.md must include Iron Law 7 instruction to write deliverables in project"); + assertTrue(content.contains("NEVER use temporary directories for routes, config, or application code"), + agentName + " root AGENTS.md must prohibit temporary directories for deliverables"); + } + } + private static void assertGeneratedMigrationOperationsGuides(String agentName, InitContext ctx) throws Exception { Path analysisGuide = ctx.skillsDir().resolve("camel-migrate/guides/migration-analysis.md"); Path retirementGuide = ctx.skillsDir().resolve("camel-migrate/guides/source-retirement-audit.md");
