From 2efb4e86459cc791d8e7d698233a3a4c21890552 Mon Sep 17 00:00:00 2001 From: Tim Evans Date: Mon, 27 Jul 2026 13:40:13 +0100 Subject: [PATCH] Populate traits and email in agent passport templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `drone @spawn create --traits "..."` accepted the flag and silently discarded it: the TRAITS placeholder is built in placeholders.py but no template referenced it. Same for EMAIL — the registry recorded @ while the passport had no email key, so the identity hook rendered "Email: unknown" for every agent. Both placeholders were already wired; only the templates needed to use them. Applied to aipass_framework and project_agent alike. The identity hook reads traits as either list or string and skips the line when falsy, so an agent created without --traits is unchanged. Also regenerates aipass_framework's .template_registry.json, which drops seven stale .pytest_cache entries for files not present in the template. Co-Authored-By: Claude Opus 5 --- .../.spawn/.template_registry.json | 43 +------------------ .../aipass_framework/.trinity/passport.json | 2 + .../project_agent/.trinity/passport.json | 2 + 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/src/aipass/spawn/templates/aipass_framework/.spawn/.template_registry.json b/src/aipass/spawn/templates/aipass_framework/.spawn/.template_registry.json index d9227c3b..ba8da7a6 100644 --- a/src/aipass/spawn/templates/aipass_framework/.spawn/.template_registry.json +++ b/src/aipass/spawn/templates/aipass_framework/.spawn/.template_registry.json @@ -5,11 +5,6 @@ "name": ".ai_mail.local", "path": ".ai_mail.local" }, - "d002": { - "has_branch_placeholder": false, - "name": ".pytest_cache", - "path": ".pytest_cache" - }, "d003": { "has_branch_placeholder": false, "name": ".aipass", @@ -119,16 +114,6 @@ "has_branch_placeholder": false, "name": "integrations", "path": "apps/integrations" - }, - "d025": { - "has_branch_placeholder": false, - "name": "v", - "path": ".pytest_cache/v" - }, - "d026": { - "has_branch_placeholder": false, - "name": "cache", - "path": ".pytest_cache/v/cache" } }, "files": { @@ -211,7 +196,7 @@ "path": ".trinity/observations.json" }, "f014": { - "content_hash": "d523dee2ef39", + "content_hash": "98f1e33dace0", "has_branch_placeholder": false, "name": "passport.json", "path": ".trinity/passport.json" @@ -282,12 +267,6 @@ "name": "README.md", "path": "apps/plugins/README.md" }, - "f026": { - "content_hash": "3ed731b65d06", - "has_branch_placeholder": false, - "name": ".gitignore", - "path": ".pytest_cache/.gitignore" - }, "f027": { "content_hash": "024209a8c889", "has_branch_placeholder": true, @@ -402,24 +381,6 @@ "name": "requirements.project.txt", "path": "requirements.project.txt" }, - "f046": { - "content_hash": "37dc88ef9a0a", - "has_branch_placeholder": false, - "name": "CACHEDIR.TAG", - "path": ".pytest_cache/CACHEDIR.TAG" - }, - "f047": { - "content_hash": "73fd6fccdd80", - "has_branch_placeholder": false, - "name": "README.md", - "path": ".pytest_cache/README.md" - }, - "f048": { - "content_hash": "0575fdabafa9", - "has_branch_placeholder": false, - "name": "nodeids", - "path": ".pytest_cache/v/cache/nodeids" - }, "f049": { "content_hash": "5610e3ccaf8b", "has_branch_placeholder": false, @@ -429,7 +390,7 @@ }, "metadata": { "description": "Template file tracking registry for ID-based updates", - "last_updated": "2026-07-17", + "last_updated": "2026-07-27", "version": "1.0.0" } } diff --git a/src/aipass/spawn/templates/aipass_framework/.trinity/passport.json b/src/aipass/spawn/templates/aipass_framework/.trinity/passport.json index 3ad6f7d6..57297931 100644 --- a/src/aipass/spawn/templates/aipass_framework/.trinity/passport.json +++ b/src/aipass/spawn/templates/aipass_framework/.trinity/passport.json @@ -14,12 +14,14 @@ "alias": "", "path": "{{CWD}}", "module": "{{MODULE}}", + "email": "{{EMAIL}}", "created": "{{DATE}}", "git_branch": "work/{{branchname}}" }, "identity": { "citizen_class": "{{CITIZEN_CLASS}}", "role": "{{ROLE}}", + "traits": "{{TRAITS}}", "purpose": "{{PURPOSE_BRIEF}}", "what_i_do": [], "what_i_dont_do": [] diff --git a/src/aipass/spawn/templates/project_agent/.trinity/passport.json b/src/aipass/spawn/templates/project_agent/.trinity/passport.json index 2349b338..a56a4cee 100644 --- a/src/aipass/spawn/templates/project_agent/.trinity/passport.json +++ b/src/aipass/spawn/templates/project_agent/.trinity/passport.json @@ -14,12 +14,14 @@ "alias": "", "path": "{{CWD}}", "module": "{{MODULE}}", + "email": "{{EMAIL}}", "created": "{{DATE}}", "git_branch": "main" }, "identity": { "citizen_class": "manager", "role": "{{ROLE}}", + "traits": "{{TRAITS}}", "purpose": "{{PURPOSE_BRIEF}}", "what_i_do": [], "what_i_dont_do": []