Add examples/ invoice PDF generator skill and actor demonstrating gated script execution #187
Labels
No labels
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#160 Epic: Agent Skills — Full Resource Support and Safe Execution
cleveragents/cleveractors-core
#188 feat(examples): add invoice PDF generator skill and actor example
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Metadata
Commit Message:
feat(examples): add invoice PDF generator skill and actor exampleBranch: feature/m1-invoice-pdf-skill-example
Background and context
Epic #160 (Agent Skills — Full Resource Support and Safe Execution) delivered
the mechanics for bundling and gate-executing a skill's
scripts/resource(issues #161-#171), but
examples/has no runnable actor that actuallyexercises
execute: trueend-to-end and produces a real, useful artifact.The existing
examples/demonstration (issue #148, calculator app) uses askill only for its reference
instructions(theprogramming-patternsskill has no
scripts/resource at all) — it never drives the script-execution gate.
This issue adds a second, independent
examples/demonstration: an"invoice clerk" LLM agent that extracts plain text/numeric fields from a
user's request and runs a bundled skill script that builds a real PDF
invoice document, showing a genuine real-world use of
execute: truealongside the calculator app's
instructions-only skill usage.Current behavior
No example in
examples/packages/bundles or executes a skill script. Adeveloper looking for a worked, runnable reference for the ADR-2034 D-10
script-execution path (double-safety gate, ephemeral workspace,
argspassthrough) has only the unit/integration test suite to read, not a
runnable demonstration.
Expected behavior
A new, independently runnable actor in
examples/packages/whose agentloads a skill bundling exactly one script, dispatches it via the
skilltool's
execute: truepath with only plain text/numeric arguments, andwhose script writes a real PDF file to disk — illustrating the full
discovery → activation → execution progressive-disclosure flow (§4.4.8)
end-to-end with a tangible, inspectable result (a PDF a human can open),
not just a text response.
Acceptance criteria
examples/packages/invoice-pdf-generator.yamlis askill-type packagethat validates against
cleveractors.agents.skill_schema.SkillValidator,declares
safe_mode: false, and bundles exactly one resource,scripts/generate_invoice.py.scripts/generate_invoice.pyaccepts only plain text/numeric CLI flags(invoice number/date, seller/customer name+address, one or more
--item description:quantity:unit_priceentries, tax rate, currency,notes, an optional output filename), computes the subtotal/tax/total, and
writes a real, valid, single-page PDF — built from the Python standard
library only, no third-party PDF dependency. Malformed/missing/non-ASCII
input is rejected with a clear error and a non-zero exit code before any
file is written.
examples/packages/invoice-agent.yamlis atype: llmagent(
skills: ["local:invoice-pdf-generator.yaml"],safe_mode: false,allow_shell: true) whose system prompt never drafts PDF content itself —it only extracts plain text/numeric field values from the user's message
and dispatches the skill tool with
execute: true.examples/packages/invoice-actor.yamldeclarescontext.global.unsafe: true, resolves throughLocalPackageStore/PackageContentResolver, and builds a realcleveractors.runtime.Executorwithout error (mirroring the issue #148 precedent).
execute: truegate (host--unsafe+ skillsafe_mode: false+ agentallow_shell: trueallsatisfied) writes the generated PDF under an
invoices/folder resolvedfrom the
CLEVERACTORS_PROJECT_ROOTenvironment variable — whichexamples/test_app.pysets to its own launch directory — not inside thescript's own ephemeral execution workspace (deleted immediately after the
script exits per ADR-2034 D-10).
actor refuses with
UnsafeConfigurationErrorbefore any agent or scriptruns, per the actor's
context.global.unsafe: truedeclaration.examples/README.mddocuments the new example: what it does, itsprerequisites, and an example
test_app.pyinvocation.Supporting information
#164, #165, #170, #171).
examples/conventions issue #148established (local agent/skill packages,
LocalPackageStore-resolvedactor, README documentation, a
.gitignoreentry for generated output).docs/actor-registry-standard.md§16 (Skill Package Schema) anddocs/index.md§4.4.8 (Skill-loaded LLM agents, the double-safety gate)are the specification sections this example exercises.
Subtasks
invoice-pdf-generator.yamlskill package bundlingscripts/generate_invoice.py(stdlib-only PDF writer) with a fullSKILL.md-equivalentinstructionsfield documenting the CLI.invoice-agent.yamlLLM agent package that extracts plaintext/numeric fields and dispatches the skill tool.
invoice-actor.yamlactor package wiring the agent into asingle-node route with
context.global.unsafe: true.CLEVERACTORS_PROJECT_ROOTintoexamples/test_app.pyso thebundled script can resolve the project base path from inside its
ephemeral execution workspace.
examples/README.md; ignore its generatedinvoices/output in.gitignore.ruff/pyrightclean on the script; the skill YAML passesSkillValidator; the full actor/agent/skill chain builds a realExecutor; the skill'sexecute: truepath runs through the realToolAgent._skill_toolproduction code and produces a valid PDF; theactor correctly refuses without
--unsafe.Definition of Done
This issue is complete when:
in Metadata exactly.
exactly.
develop(this repository's actualintegration branch — see recent merged PRs), reviewed, and merged.