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 5e7f713465ecc7ce6b7568902c8828c08da86306
Author: Jinal Sarvaiya <[email protected]>
AuthorDate: Tue Nov 24 12:30:12 2026 +0000

    fix #114: deliverables must be written to project directory
---
 CLAUDE.md                                          |  2 +-
 docs/modules/ROOT/pages/camel-execute.adoc         | 11 ++++---
 docs/modules/ROOT/pages/pipeline.adoc              |  6 +++-
 .../camel-execute/guides/implementer-context.md    |  1 +
 .../src/main/resources/skills/shared/iron-laws.md  | 36 ++++++++++++++++++++++
 .../main/resources/templates/shared/agents-md.md   |  1 +
 6 files changed, 51 insertions(+), 6 deletions(-)

diff --git a/CLAUDE.md b/CLAUDE.md
index 95d681a5..b2965784 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -57,7 +57,7 @@ Rules:
 
 Governance:
 - `docs/constitution.md` — 8 non-negotiable rules for every generated route.
-- `skills/shared/iron-laws.md` — 6 iron laws. Skill changes must not 
contradict them.
+- `skills/shared/iron-laws.md` — 7 iron laws. Skill changes must not 
contradict them.
 - Record every architectural decision, including rejected alternatives. Never 
reference
   internal architecture decision documents in public PRs/issues.
 
diff --git a/docs/modules/ROOT/pages/camel-execute.adoc 
b/docs/modules/ROOT/pages/camel-execute.adoc
index cdc66dff..e6272420 100644
--- a/docs/modules/ROOT/pages/camel-execute.adoc
+++ b/docs/modules/ROOT/pages/camel-execute.adoc
@@ -35,10 +35,13 @@ verification commands from the shipped guides and the 
detected project state, ne
 Environment probe::
 Before any implementer runs, the executor generates a throwaway skeleton for 
the selected runtime and checks it:
 Maven dependency resolution for Spring Boot and Quarkus (reported as skipped 
for Camel Main), the runtime startup
-command, and Docker services only when the design needs external services and 
Docker is available. Mechanical
-failures are fixed and re-probed. An architectural failure, for example a 
component that does not exist for the
-target runtime, triggers the bounded re-plan loop: it modifies only the 
affected flow sections of the design, at
-most three rounds, then re-probes; a persistent failure is escalated.
+command, and Docker services only when the design needs external services and 
Docker is available. The probe
+skeleton is generated in a temporary directory (`mktemp -d 
/tmp/camel-kit-probe-XXXXXX`) and cleaned up after the
+check completes. This is the only exception to Iron Law 7: all actual 
deliverables (routes, configuration, tests)
+are written directly into the project directory from the first edit. 
Mechanical failures are fixed and re-probed.
+An architectural failure, for example a component that does not exist for the 
target runtime, triggers the bounded
+re-plan loop: it modifies only the affected flow sections of the design, at 
most three rounds, then re-probes; a
+persistent failure is escalated.
 
 Catalog research::
 Before each wave the executor deduplicates the components, EIPs, data formats 
and languages referenced by its tasks
diff --git a/docs/modules/ROOT/pages/pipeline.adoc 
b/docs/modules/ROOT/pages/pipeline.adoc
index abe9be65..ecf8aaf3 100644
--- a/docs/modules/ROOT/pages/pipeline.adoc
+++ b/docs/modules/ROOT/pages/pipeline.adoc
@@ -104,7 +104,7 @@ with that exact revision. See xref:commands.adoc[] for 
`nextId`, `doc check` and
 [[iron-laws]]
 == Iron Laws
 
-Six rules apply at every stage; every skill and every reviewer persona refers 
to them.
+Seven rules apply at every stage; every skill and every reviewer persona 
refers to them.
 
 . *Catalog verification.* Every component, EIP, data format and language is 
verified through the catalog MCP server,
   for the project's runtime and platform BOM, before it is written into a 
design or a route. The tool call and its
@@ -125,6 +125,10 @@ Six rules apply at every stage; every skill and every 
reviewer persona refers to
   runs them in fresh contexts where the agent supports subagents, or 
sequentially in the same session otherwise,
   recording the missing isolation. Verified findings go back to the 
implementer, for at most three cycles.
 . *Surgical changes.* A task touches only what it requires: no adjacent 
refactoring, cleanup or unrelated TODO work.
+. *Deliverables in project directory.* All implementation artifacts (routes, 
configuration, POMs, Java files, tests,
+  Docker Compose for the application) are written directly into the project 
directory from the first edit and
+  iterated on in place. Temporary directories are only for throwaway 
verification artifacts like the environment
+  probe skeleton, which uses `mktemp -d /tmp/camel-kit-probe-XXXXXX` and is 
cleaned up after the probe completes.
 
 [[internal-skills]]
 == Internal skills
diff --git 
a/kit/camel-kit-core/src/main/resources/skills/camel-execute/guides/implementer-context.md
 
b/kit/camel-kit-core/src/main/resources/skills/camel-execute/guides/implementer-context.md
index 00be07e0..af17446d 100644
--- 
a/kit/camel-kit-core/src/main/resources/skills/camel-execute/guides/implementer-context.md
+++ 
b/kit/camel-kit-core/src/main/resources/skills/camel-execute/guides/implementer-context.md
@@ -168,6 +168,7 @@ If no pre-verification was run (e.g., single-task wave with 
few components), inc
 2. EVERY route MUST pass all 8 constitution rules
 3. Generate ONLY what the task specifies — no extras
 4. Do NOT implement anything listed in the design spec's Not Doing section
+5. WRITE all deliverables directly into the project directory — NEVER use temp 
directories (exception: environment probe)
 
 Read `shared/iron-laws.md` for full details and rationalization defense.
 ```
diff --git a/kit/camel-kit-core/src/main/resources/skills/shared/iron-laws.md 
b/kit/camel-kit-core/src/main/resources/skills/shared/iron-laws.md
index ad13785f..a2669022 100644
--- a/kit/camel-kit-core/src/main/resources/skills/shared/iron-laws.md
+++ b/kit/camel-kit-core/src/main/resources/skills/shared/iron-laws.md
@@ -149,6 +149,42 @@ hidden regressions and wastes review time.
 
 ---
 
+## Iron Law 7: Deliverables in Project Directory
+
+```
+WRITE ALL DELIVERABLES INTO THE PROJECT DIRECTORY FROM THE FIRST EDIT.
+ITERATE IN PLACE. NEVER USE TEMPORARY OR SCRATCH DIRECTORIES FOR ROUTES,
+CONFIGURATION, OR APPLICATION CODE.
+```
+
+Implementation artifacts (routes, `application.properties`, POMs, Java files, 
test files, Docker Compose for the application) MUST be written directly into 
the designated project directories from the very first edit. Work on them in 
place through every iteration.
+
+**Exception:** Environment probe skeletons (per 
`camel-execute/guides/environment-probe.md`) are throwaway verification 
artifacts. They MUST use temporary directories created with `mktemp -d 
/tmp/camel-kit-probe-XXXXXX` and cleaned up after the probe completes.
+
+**Rationale:** When a session ends prematurely due to timeout, token limits, 
crashes, or user interruption, work in temporary directories is lost. Writing 
deliverables into the project from the start preserves all progress. The user 
can always resume from the last committed state.
+
+**What counts as a deliverable:**
+- Route YAML files (`*.camel.yaml`)
+- Configuration files (`application.properties`, `application.yml`)
+- Maven POMs
+- Java source files (beans, processors, custom components)
+- Test files
+- Docker Compose files for the application's own services
+- Run scripts
+- DataWeave transformations
+
+**What counts as throwaway:**
+- Environment probe skeleton (explicitly covered in 
`camel-execute/guides/environment-probe.md`)
+- One-off verification scripts that are not part of the deliverable
+
+**Gate function:**
+1. IDENTIFY whether the artifact is a deliverable or throwaway
+2. For deliverables → write to the project directory structure
+3. For environment probe → use temp directory per the probe guide
+4. ITERATE on deliverables in place — never copy from scratch to project at 
the end
+
+---
+
 ## Enforcement
 
 These laws are referenced by every pipeline skill and every agent persona. 
They are non-negotiable requirements. The cost of following the process is 
minutes. The cost of skipping it is hours of rework and lost trust.
diff --git 
a/kit/camel-kit-core/src/main/resources/templates/shared/agents-md.md 
b/kit/camel-kit-core/src/main/resources/templates/shared/agents-md.md
index 52393f49..a1296116 100644
--- a/kit/camel-kit-core/src/main/resources/templates/shared/agents-md.md
+++ b/kit/camel-kit-core/src/main/resources/templates/shared/agents-md.md
@@ -21,6 +21,7 @@ skill. Legacy command stubs remain installed for 
compatibility.
 3. No implementation without user-approved spec (exception: `camel-migrate` 
direct mode implements under Iron Laws 1 and 2 with inline validation)
 4. Camel version: ONLY from `.camel-kit/config.properties`
 5. Run app after implementation; use `/camel-execute` for the structured 
verification loop and report
+6. Write deliverables into the project from the start and iterate in place — 
NEVER use temporary directories for routes, config, or application code 
(exception: environment probe uses temp per 
`{SKILLS_DIR}/camel-execute/guides/environment-probe.md`)
 
 ## Camel 4.22 rules
 

Reply via email to