evoloop-cli 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. evoloop_cli/__init__.py +3 -0
  2. evoloop_cli/__main__.py +10 -0
  3. evoloop_cli/_skills/evoloop-constitution/SKILL.md +59 -0
  4. evoloop_cli/_skills/evoloop-constitution/references/writing-guide.md +89 -0
  5. evoloop_cli/_skills/evoloop-constitution/templates/config.yaml +52 -0
  6. evoloop_cli/_skills/evoloop-constitution/templates/constitution.md +39 -0
  7. evoloop_cli/_skills/evoloop-evaluate/SKILL.md +85 -0
  8. evoloop_cli/_skills/evoloop-evaluate/schemas/parsed_report.schema.json +170 -0
  9. evoloop_cli/_skills/evoloop-evaluate/scripts/parse_junit_report.py +311 -0
  10. evoloop_cli/_skills/evoloop-evaluate/scripts/parse_pytest_report.py +276 -0
  11. evoloop_cli/_skills/evoloop-evaluate/scripts/parse_report.py +101 -0
  12. evoloop_cli/_skills/evoloop-evaluate/scripts/update_eval_index.py +111 -0
  13. evoloop_cli/_skills/evoloop-evaluate/scripts/validate_parsed_report.py +178 -0
  14. evoloop_cli/_skills/evoloop-evaluate/templates/analysis.md +51 -0
  15. evoloop_cli/_skills/evoloop-evaluate/templates/progress.md +42 -0
  16. evoloop_cli/_skills/evoloop-evaluate/templates/tasks.md +34 -0
  17. evoloop_cli/_skills/evoloop-evolve/SKILL.md +76 -0
  18. evoloop_cli/_skills/evoloop-evolve/scripts/evolve_state.py +333 -0
  19. evoloop_cli/_skills/evoloop-implement/SKILL.md +57 -0
  20. evoloop_cli/_skills/evoloop-implement/scripts/check_scope.py +154 -0
  21. evoloop_cli/_skills/evoloop-implement/scripts/commit_section.py +78 -0
  22. evoloop_cli/_skills/evoloop-init/SKILL.md +95 -0
  23. evoloop_cli/_skills/evoloop-init/scripts/scaffold_evals.py +546 -0
  24. evoloop_cli/_skills/evoloop-init/templates/common/evals/datasets/domain_flows.yaml +33 -0
  25. evoloop_cli/_skills/evoloop-init/templates/common/evaluations/README.md +9 -0
  26. evoloop_cli/_skills/evoloop-init/templates/java/src/test/java/__PACKAGE_PATH__/evals/AgentAdapter.java +13 -0
  27. evoloop_cli/_skills/evoloop-init/templates/java/src/test/java/__PACKAGE_PATH__/evals/AgenticFlowEvalTest.java +71 -0
  28. evoloop_cli/_skills/evoloop-init/templates/java/src/test/java/__PACKAGE_PATH__/evals/DeterministicEvaluators.java +174 -0
  29. evoloop_cli/_skills/evoloop-init/templates/java/src/test/java/__PACKAGE_PATH__/evals/EvalFrameworkTest.java +45 -0
  30. evoloop_cli/_skills/evoloop-init/templates/java/src/test/java/__PACKAGE_PATH__/evals/FlowRunResult.java +25 -0
  31. evoloop_cli/_skills/evoloop-init/templates/python/evals/__init__.py +1 -0
  32. evoloop_cli/_skills/evoloop-init/templates/python/evals/adapter.py +63 -0
  33. evoloop_cli/_skills/evoloop-init/templates/python/evals/deepagents_adapter.py +223 -0
  34. evoloop_cli/_skills/evoloop-init/templates/python/evals/evaluators/__init__.py +1 -0
  35. evoloop_cli/_skills/evoloop-init/templates/python/evals/evaluators/deterministic.py +234 -0
  36. evoloop_cli/_skills/evoloop-init/templates/python/evals/evaluators/llm_judge.py +189 -0
  37. evoloop_cli/_skills/evoloop-init/templates/python/evals/fakes.py +26 -0
  38. evoloop_cli/_skills/evoloop-init/templates/python/evals/harness.py +100 -0
  39. evoloop_cli/_skills/evoloop-init/templates/python/tests/conftest.py +38 -0
  40. evoloop_cli/_skills/evoloop-init/templates/python/tests/test_agentic_flows.py +36 -0
  41. evoloop_cli/_skills/evoloop-init/templates/python/tests/test_eval_framework.py +175 -0
  42. evoloop_cli/_skills/evoloop-new/SKILL.md +125 -0
  43. evoloop_cli/_skills/evoloop-new/scripts/scaffold_agent.py +911 -0
  44. evoloop_cli/_skills/evoloop-new/templates/common/.evoloop/constitution.md +34 -0
  45. evoloop_cli/_skills/evoloop-new/templates/common/.gitignore +22 -0
  46. evoloop_cli/_skills/evoloop-new/templates/common/AGENTS.md +17 -0
  47. evoloop_cli/_skills/evoloop-new/templates/common/README.md +83 -0
  48. evoloop_cli/_skills/evoloop-new/templates/common/skills/__DOMAIN__/SKILL.md +21 -0
  49. evoloop_cli/_skills/evoloop-new/templates/java/eval_wiring/src/test/java/__PACKAGE_PATH__/evals/AgenticFlowEvalTest.java +113 -0
  50. evoloop_cli/_skills/evoloop-new/templates/java/eval_wiring/src/test/java/__PACKAGE_PATH__/evals/EvalFrameworkTest.java +85 -0
  51. evoloop_cli/_skills/evoloop-new/templates/java/eval_wiring/src/test/java/__PACKAGE_PATH__/evals/Fake__DOMAIN_PASCAL__Client.java +37 -0
  52. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/custom/src/main/java/__PACKAGE_PATH__/Application.java +46 -0
  53. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/custom/src/main/java/__PACKAGE_PATH__/OpenAiCompatibleRunner.java +433 -0
  54. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/custom/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Agent.java +125 -0
  55. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/langchain4j/src/main/java/__PACKAGE_PATH__/Application.java +46 -0
  56. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/langchain4j/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Agent.java +163 -0
  57. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/langchain4j/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Tools.java +18 -0
  58. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/micronaut/src/main/java/__PACKAGE_PATH__/Application.java +15 -0
  59. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/micronaut/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Agent.java +167 -0
  60. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/micronaut/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Controller.java +41 -0
  61. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/micronaut/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Factory.java +32 -0
  62. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/micronaut/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Tools.java +20 -0
  63. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/micronaut/src/main/resources/application.yml +17 -0
  64. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/spring-ai/src/main/java/__PACKAGE_PATH__/Application.java +17 -0
  65. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/spring-ai/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Agent.java +159 -0
  66. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/spring-ai/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Config.java +32 -0
  67. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/spring-ai/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Controller.java +40 -0
  68. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/spring-ai/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Tools.java +25 -0
  69. evoloop_cli/_skills/evoloop-new/templates/java/frameworks/spring-ai/src/main/resources/application.yml +19 -0
  70. evoloop_cli/_skills/evoloop-new/templates/java/gradle/build_custom.gradle +33 -0
  71. evoloop_cli/_skills/evoloop-new/templates/java/gradle/build_langchain4j.gradle +40 -0
  72. evoloop_cli/_skills/evoloop-new/templates/java/gradle/build_micronaut.gradle +52 -0
  73. evoloop_cli/_skills/evoloop-new/templates/java/gradle/build_spring-ai.gradle +45 -0
  74. evoloop_cli/_skills/evoloop-new/templates/java/gradle/settings.gradle +1 -0
  75. evoloop_cli/_skills/evoloop-new/templates/java/maven/pom_custom.xml +57 -0
  76. evoloop_cli/_skills/evoloop-new/templates/java/maven/pom_langchain4j.xml +87 -0
  77. evoloop_cli/_skills/evoloop-new/templates/java/maven/pom_micronaut.xml +101 -0
  78. evoloop_cli/_skills/evoloop-new/templates/java/maven/pom_spring-ai.xml +61 -0
  79. evoloop_cli/_skills/evoloop-new/templates/java/src/main/java/__PACKAGE_PATH__/ConversationMemory.java +36 -0
  80. evoloop_cli/_skills/evoloop-new/templates/java/src/main/java/__PACKAGE_PATH__/Default__DOMAIN_PASCAL__Client.java +9 -0
  81. evoloop_cli/_skills/evoloop-new/templates/java/src/main/java/__PACKAGE_PATH__/DomainRecord.java +10 -0
  82. evoloop_cli/_skills/evoloop-new/templates/java/src/main/java/__PACKAGE_PATH__/TurnOutcome.java +15 -0
  83. evoloop_cli/_skills/evoloop-new/templates/java/src/main/java/__PACKAGE_PATH__/__DOMAIN_PASCAL__Client.java +8 -0
  84. evoloop_cli/_skills/evoloop-new/templates/python/eval_wiring/evals/fakes.py +22 -0
  85. evoloop_cli/_skills/evoloop-new/templates/python/eval_wiring/evals/harness_custom.py +186 -0
  86. evoloop_cli/_skills/evoloop-new/templates/python/eval_wiring/evals/harness_deepagents.py +100 -0
  87. evoloop_cli/_skills/evoloop-new/templates/python/eval_wiring/tests/test_eval_framework.py +196 -0
  88. evoloop_cli/_skills/evoloop-new/templates/python/pyproject.toml +18 -0
  89. evoloop_cli/_skills/evoloop-new/templates/python/src/__PACKAGE__/__init__.py +13 -0
  90. evoloop_cli/_skills/evoloop-new/templates/python/src/__PACKAGE__/__main__.py +6 -0
  91. evoloop_cli/_skills/evoloop-new/templates/python/src/__PACKAGE__/agent_custom.py +209 -0
  92. evoloop_cli/_skills/evoloop-new/templates/python/src/__PACKAGE__/agent_deepagents.py +61 -0
  93. evoloop_cli/_skills/evoloop-new/templates/python/src/__PACKAGE__/cli.py +71 -0
  94. evoloop_cli/_skills/evoloop-new/templates/python/src/__PACKAGE__/client.py +31 -0
  95. evoloop_cli/_skills/evoloop-scenarios/SKILL.md +49 -0
  96. evoloop_cli/_skills/evoloop-scenarios/scripts/validate_scenarios.py +261 -0
  97. evoloop_cli/_skills/evoloop-scenarios/templates/scenario_schema.md +49 -0
  98. evoloop_cli/cli.py +331 -0
  99. evoloop_cli-0.1.0.dist-info/METADATA +214 -0
  100. evoloop_cli-0.1.0.dist-info/RECORD +103 -0
  101. evoloop_cli-0.1.0.dist-info/WHEEL +4 -0
  102. evoloop_cli-0.1.0.dist-info/entry_points.txt +2 -0
  103. evoloop_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,3 @@
1
+ """Minimalistic CLI package for bootstrapping Evoloop skills."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,10 @@
1
+ """Module entrypoint for `python -m evoloop_cli`."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from .cli import main
8
+
9
+ if __name__ == "__main__":
10
+ sys.exit(main())
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: evoloop-constitution
3
+ description: Establish project-wide agent invariants, prompt hygiene budgets, protected evaluation paths, and self-evolving approval boundaries in `.evoloop/constitution.md` and `.evoloop/config.yaml`. Use before initializing or running evaluation-driven agent optimization loops.
4
+ ---
5
+
6
+ # Evoloop Constitution
7
+
8
+ Establish or refine the binding governance rules for an agentic project across its entire lifecycle. This skill creates and maintains two durable, versioned artifacts:
9
+
10
+ - `.evoloop/constitution.md` — human- and agent-readable **Domain Invariants**, **Prompt & Memory Hygiene Rules**, and **Evaluation Integrity Rules**.
11
+ - `.evoloop/config.yaml` — machine-readable paths, test commands, prompt budgets, protected/evaluator path classifications, and circuit-breaker / approval settings consumed by all `evoloop-*` scripts.
12
+
13
+ > **Role in Every Journey:**
14
+ > - **Brownfield (existing repo):** Run `evoloop-constitution` **first**, before `evoloop-init`, to capture existing production invariants and exact repository paths.
15
+ > - **Greenfield (new repo):** `evoloop-new` seeds `.evoloop/constitution.md` and `.evoloop/config.yaml` automatically; run `evoloop-constitution` right after scaffolding (before expanding scenarios) to replace generic defaults with domain-specific invariants.
16
+ > - **Ongoing evolution:** Re-run `evoloop-constitution` whenever tools, policies, or edge cases change so prompts, scenarios, and evaluators evolve from a single source of truth.
17
+
18
+ ## Why Constitution Quality Matters Downstream
19
+
20
+ Every downstream skill reads `.evoloop/constitution.md` and `.evoloop/config.yaml` first. Concrete, falsifiable invariants directly elevate generated artifact quality:
21
+ - **`evoloop-scenarios`:** Translates each invariant into objective `grounded_any_of` tokens, anti-hallucination `forbidden_substrings`, `turn_assertions`, and deterministic `rubric_criteria` instead of brittle synonym lists.
22
+ - **`evoloop-evaluate`:** Grounds 4-bucket root-cause triage (`analysis.md`) in explicit invariants and requires every item in `tasks.md` to cite which invariant it upholds and confirm it violates none.
23
+ - **`evoloop-implement`:** Keeps `SYSTEM_PROMPT`, `AGENTS.md`, and `SKILL.md` concise via `budgets.max_system_prompt_words` and *refactor-over-append* discipline, while `check_scope.py` and `commit_section.py` enforce protected/evaluator path guards and `Eval:` git trailers.
24
+ - **`evoloop-evolve`:** Enforces `.evolve-lock` human-approval pauses and circuit breakers so unattended loops optimize genuine agent quality rather than weakening tests (*reward hacking*).
25
+
26
+ ## Writing Style Requirement
27
+
28
+ Before writing or editing any human-targeted document or code comment, read [`references/writing-guide.md`](./references/writing-guide.md). Apply its Simplified Technical English rules (active voice, simple tenses, imperative instructions, ≤ 20-word procedural and ≤ 25-word descriptive sentences, ≤ 3-word noun clusters, no Latin abbreviations, no slashes for `and`/`or`, no semicolons joining clauses, no parenthetical side thoughts, and properly placed `CAUTION` notices) to:
29
+ - `.evoloop/constitution.md`
30
+ - Comments in `.evoloop/config.yaml`
31
+ - Any other generated or edited project documentation and code comments
32
+
33
+ ## Workflow
34
+
35
+ ### Step 1: Inspect the Target Project
36
+ Read existing project documentation and code to avoid asking redundant questions:
37
+ - `AGENTS.md`, `README.md`, `pyproject.toml`, `skills/**/SKILL.md`
38
+ - Existing agent entry point(s) (e.g., `src/**/agent*.py`) and tool definitions
39
+ - Existing `evals/`, `tests/`, or `evaluations/` directories (if any)
40
+
41
+ ### Step 2: Gather Missing Governance Decisions
42
+ If any of the following cannot be inferred from the repo, ask the user concisely:
43
+ 1. **Domain Invariants:** What must the agent *always* or *never* do? (e.g., never hallucinate tool outputs, never manually convert units, always ask for clarification on vague inputs, strict scope boundaries).
44
+ 2. **Eager vs. Progressive Context:** Which invariants must stay in `system_prompt` (high-attention eager context) vs. `AGENTS.md` / `SKILL.md`?
45
+ 3. **Prompt Budget:** Target word ceiling for `system_prompt` (default: `120` words) to prevent `NEVER`-clause bloat.
46
+ 4. **Approval Boundary in Evolve Mode:** Default is pausing for human approval on **both** `Scenario Fixes` (`evals/datasets/**`) and `Evaluator/Judge` changes (`evals/evaluators/**`). Confirm whether to keep this default.
47
+ 5. **Judge Model:** Recommend configuring a separate, stronger `EVAL_JUDGE_MODEL` (via env var) when using a small local model for the agent under test.
48
+
49
+ ### Step 3: Write `.evoloop/constitution.md` and `.evoloop/config.yaml`
50
+ Use the templates in `templates/constitution.md` and `templates/config.yaml` as the structural baseline:
51
+ - Replace all `<placeholder>` tokens with concrete project values.
52
+ - Write **falsifiable, deterministic invariants** — avoid vague platitudes (*"be helpful"*) or ambiguous *"either X or Y"* branches; specify exact tool, refusal, or clarification behaviors so downstream scenario generation and triage stay sharp.
53
+ - Ensure every path in `.evoloop/config.yaml` (`dataset`, `system_prompt_file`, `mutable_paths`, `protected_paths`, `evaluator_paths`) matches the repository layout.
54
+ - Preserve the **Non-Negotiable Evaluation Integrity Rules** (immutable scenarios during evolve mode, no reward hacking, mandatory offline unit-test gate, refactor-over-append prompt discipline).
55
+
56
+ ### Step 4: Verify
57
+ - Confirm `.evoloop/constitution.md` has no unresolved placeholders, follows `references/writing-guide.md`, and every invariant is concrete and testable.
58
+ - Confirm `.evoloop/config.yaml` parses cleanly as valid YAML and its comments follow `references/writing-guide.md`.
59
+ - Summarize the key invariants, budgets, and protected paths for the user, and point to the appropriate next step (`evoloop-init` for brownfield repos without an eval harness, or `evoloop-scenarios` when the harness is already initialized).
@@ -0,0 +1,89 @@
1
+ # Technical Writing Style Guide (Simplified Technical English Principles)
2
+
3
+ > **Attribution & Trademark Notice**
4
+ > This guide is an independent, non-verbatim summary of general technical writing principles inspired by **ASD-STE100 Simplified Technical English (Issue 9)**, published by the Aerospace, Security and Defence Industries Association of Europe (ASD).
5
+ >
6
+ > * **No Affiliation or Endorsement:** This project is not affiliated with, endorsed by, sponsored by, or certified by ASD. *ASD-STE100* and *Simplified Technical English* are registered trademarks of ASD.
7
+ > * **Official Specification:** This guide does not include the proprietary ASD-STE100 Controlled Dictionary or verbatim specification text. For the complete, authoritative specification and dictionary, obtain the official document directly from [asd-ste100.org](https://www.asd-ste100.org/).
8
+
9
+ Use this reference guide to draft and review clear, unambiguous technical documentation. The methodology relies on strict **Writing Rules** paired with a **Controlled Vocabulary** where each approved word has a single part of speech and a single defined meaning.
10
+
11
+ ---
12
+
13
+ ## 1. Words & Vocabulary
14
+
15
+ | DO | DON'T |
16
+ | :--- | :--- |
17
+ | **Use only approved words** from your project's controlled dictionary (plus approved Technical Names and Technical Verbs) in their exact specified parts of speech and meanings. | **Use unapproved synonyms** or use an approved word as a different part of speech (e.g., do not use *test* as a verb if only the noun is approved; use *do a test*). |
18
+ | **Keep one word, one meaning.** Stick strictly to the single definition assigned to an approved word in your dictionary. | **Use words with multiple meanings** or figurative/idiomatic expressions (e.g., use *follow* only for physical sequence, not "understand"). |
19
+ | **Use Technical Names and Technical Verbs** strictly within defined categories (e.g., parts, tools, materials, software UI elements, standard manufacturing processes). | **Invent non-standard jargon, slang, or abbreviations** that are not defined in your project's terminology list. |
20
+ | **Use the same word consistently** for the same concept, object, or action throughout the entire document. | **Vary vocabulary** for stylistic variety (e.g., switching between *screen*, *display*, and *monitor* for the same component). |
21
+ | **Define unfamiliar acronyms and abbreviations** at first use, and restrict them to standard technical terms. | **Use Latin abbreviations** such as *e.g.*, *i.e.*, *etc.*, or *vs.* (use *for example*, *that is*, *and so on*, or *against* instead). |
22
+
23
+ ---
24
+
25
+ ## 2. Noun Clusters
26
+
27
+ | DO | DON'T |
28
+ | :--- | :--- |
29
+ | **Limit noun clusters to a maximum of three words** (e.g., *fuel tank cap*). | **Create long noun strings** of four or more nouns stacked together (e.g., *emergency hydraulic pump pressure switch assembly*). |
30
+ | **Break up long noun clusters** using prepositions or hyphens to make relationships explicit (e.g., *pressure switch assembly for the emergency hydraulic pump*). | **Force the reader to guess** how stacked nouns modify each other. |
31
+ | **Keep recognized Technical Names intact** even if they exceed three words, provided they are official system/part names. | **Expand approved Technical Names** by adding extra unapproved modifiers in front of them. |
32
+
33
+ ---
34
+
35
+ ## 3. Verbs & Tenses
36
+
37
+ | DO | DON'T |
38
+ | :--- | :--- |
39
+ | **Use the active voice** as the standard across all procedural and descriptive text (e.g., *The technician removes the cover*). | **Use the passive voice** in procedures, and avoid it in descriptive text unless the agent is genuinely unknown or irrelevant. |
40
+ | **Use the imperative mood** for all direct instructions and procedural steps (e.g., *Install the bolt*). | **Use modal verbs or descriptive phrasing** for instructions (e.g., *You should install the bolt* or *The bolt must be installed*). |
41
+ | **Use simple verb tenses**: simple present, simple past, and simple future (with *will*). | **Use complex or continuous tenses** such as present continuous (*is installing*), past continuous, or perfect tenses (*has installed*, *had removed*). |
42
+ | **Use the infinitive form** (*to* + verb) to express purpose or intention (e.g., *Turn the valve to release the pressure*). | **Use gerunds (-ing forms) as nouns or verb substitutes** unless the specific *-ing* word is explicitly approved in your dictionary as a noun or adjective. |
43
+ | **Replace weak verb + noun combinations** with a single strong approved verb where possible (e.g., use *measure* instead of *take a measurement of*). | **Split simple actions** into unnecessary auxiliary verbs plus abstract nouns. |
44
+
45
+ ---
46
+
47
+ ## 4. Sentences & Structure
48
+
49
+ | DO | DON'T |
50
+ | :--- | :--- |
51
+ | **Keep procedural sentences to 20 words or fewer.** | **Write long, multi-clause procedural sentences** that exceed 20 words. |
52
+ | **Keep descriptive sentences to 25 words or fewer.** | **Write descriptive sentences longer than 25 words.** |
53
+ | **Limit each procedural sentence to one instruction** (or a maximum of two tightly coupled actions occurring simultaneously). | **Combine multiple sequential actions** into a single sentence using *and*, *then*, or semicolons. |
54
+ | **Put the condition or location first** in a sentence before stating the action (e.g., *If the pressure is too low, stop the pump*). | **Bury conditions at the end** of an instruction where a reader might act before reading the constraint. |
55
+ | **Use vertical bulleted or numbered lists** for complex conditions, multiple items, or sequential steps. | **Hide lists inside dense paragraphs** separated by commas and semicolons. |
56
+ | **Omit unnecessary filler words** and conversational transitions (e.g., *Note that*, *In order to*, *Please ensure that*). | **Pad sentences with polite phrasing or redundant prepositions** (use *to* instead of *in order to*). |
57
+
58
+ ---
59
+
60
+ ## 5. Safety Instructions (Warnings & Cautions)
61
+
62
+ | DO | DON'T |
63
+ | :--- | :--- |
64
+ | **Start warnings and cautions with a clear, direct command** or condition explaining how to prevent the hazard. | **Write vague or passive safety notices** that fail to tell the user what action to take or avoid. |
65
+ | **State the exact consequence** of failing to follow the instruction (e.g., *WARNING: Do not touch the terminals. High voltage can kill you.*). | **Omit the reason** behind a warning or caution, or soften the severity of the risk. |
66
+ | **Place warnings and cautions immediately before** the step or procedure to which they apply. | **Place safety notices after** the hazardous step or group them all at the beginning of a long document far from the task. |
67
+ | **Use `WARNING` for risk of personal injury or death**, and **`CAUTION` for risk of damage** to equipment, software, or data. | **Mix up `WARNING` and `CAUTION`**, or use `NOTE` for anything involving safety or equipment damage. |
68
+
69
+ ---
70
+
71
+ ## 6. Punctuation & Mechanics
72
+
73
+ | DO | DON'T |
74
+ | :--- | :--- |
75
+ | **Use articles (*a*, *an*, *the*) and demonstrative adjectives (*this*, *these*)** consistently before nouns where grammatically required. | **Drop articles ("telegraphic style")** to save space (e.g., do not write *Remove cover*; write *Remove the cover*). |
76
+ | **Use parentheses `()` only for specific approved purposes**, such as acronyms, alternative values, or brief cross-references. | **Use parentheses to insert side thoughts, secondary clauses, or extra explanations** inside a sentence. |
77
+ | **Use hyphens to clarify compound modifiers** and prevent ambiguity (e.g., *high-pressure line*). | **Use slashes (`/`) to mean "and" or "or"** (write *and*, *or*, or *and/or* spelled out as *X or Y, or both*). |
78
+ | **Use standard punctuation** (periods, commas, colons) to separate ideas cleanly. | **Use semicolons (`;`)** to join independent clauses—split them into separate sentences instead. |
79
+
80
+ ---
81
+
82
+ ## Quick Pre-Publication Checklist
83
+
84
+ 1. **Dictionary Check:** Is every non-technical word in your approved controlled dictionary, used as the approved part of speech, with its approved meaning?
85
+ 2. **Word Count Check:** Are all procedural sentences $\le 20$ words and descriptive sentences $\le 25$ words?
86
+ 3. **Action Check:** Does every procedural step use the imperative mood and contain only one instruction?
87
+ 4. **Voice & Tense Check:** Is the text written in active voice using only simple present, simple past, or simple future tenses?
88
+ 5. **Cluster Check:** Are all noun clusters 3 words or fewer?
89
+ 6. **Safety Check:** Do all `WARNING` and `CAUTION` blocks appear *before* the relevant step, start with a clear command/condition, and state the consequence?
@@ -0,0 +1,52 @@
1
+ # Evoloop project configuration
2
+ version: 1
3
+
4
+ project:
5
+ name: "<PROJECT_NAME>"
6
+ stack: "python" # Built-in: python | java
7
+ build_tool: "uv" # python: uv | java: maven, gradle
8
+ framework: "deepagents" # For example: deepagents, custom, spring-ai, langchain4j, micronaut
9
+ domain: "<DOMAIN_NAME>" # For example: support, billing, search
10
+ report_format: "pytest" # Built-in: pytest | junit-xml | json
11
+
12
+ paths:
13
+ dataset: "evals/datasets/<DOMAIN_NAME>_flows.yaml"
14
+ evaluations_dir: "evaluations"
15
+ harness: "evals/harness.py"
16
+ fakes: "evals/fakes.py"
17
+ offline_tests: "tests/test_eval_framework.py"
18
+ live_tests: "tests/test_agentic_flows.py"
19
+ system_prompt_file: "src/<PACKAGE_NAME>/agent.py"
20
+
21
+ commands:
22
+ offline_test: "uv run pytest"
23
+ live_eval: "uv run pytest tests/test_agentic_flows.py --run-live-agent"
24
+ live_eval_with_judge: "uv run pytest tests/test_agentic_flows.py --run-live-agent --run-judge"
25
+
26
+ budgets:
27
+ max_system_prompt_words: 120
28
+ default_max_tool_calls: 4
29
+
30
+ governance:
31
+ mutable_paths:
32
+ - "src/**"
33
+ - "skills/**"
34
+ - "AGENTS.md"
35
+ - "evals/harness.py"
36
+ - "evals/fakes.py"
37
+ - "tests/test_eval_framework.py"
38
+ protected_paths:
39
+ - "evals/datasets/**"
40
+ - "tests/test_agentic_flows.py"
41
+ evaluator_paths:
42
+ - "evals/evaluators/**"
43
+
44
+ evolve:
45
+ execution_mode: "subagent" # subagent (default) | inline
46
+ max_iterations: 4
47
+ run_judge: true
48
+ require_approval_for_scenarios: true
49
+ require_approval_for_evaluators: true
50
+ stop_on_unrecovered_regression: true
51
+ max_file_edits_same_failure: 3
52
+ targeted_rerun_before_full: true # Re-run failing case(s) with -k before full suite
@@ -0,0 +1,39 @@
1
+ # Evoloop Project Constitution: <PROJECT_NAME>
2
+
3
+ > Binding governance for evaluation-driven development and self-evolving loops.
4
+ > Every task in `evaluations/<timestamp>/tasks.md` must cite each invariant that it upholds and confirm zero violations.
5
+
6
+ ---
7
+
8
+ ## 1. Domain Invariants
9
+
10
+ <!-- Replace with concrete, testable rules specific to your agent -->
11
+ 1. **Tool-Grounded Facts Only:** Never invent, guess, or recall data that must come from a domain tool. If the agent did not call a tool for a value, do not state that value.
12
+ 2. **Input Validation Before Tool Calls:** Do not call domain tools on missing, vague, or ambiguous inputs. Ask one clear clarifying question instead.
13
+ 3. **Explicit Error Recovery:** If a tool returns an error or times out, reply with a brief, honest explanation. Never return an empty reply or retry in a loop.
14
+ 4. **Scope Adherence:** Stay strictly within the documented capabilities of the agent. Decline out-of-scope requests politely without invented results or unsupported follow-ups.
15
+ 5. **Deterministic Edge-Case Actions:** Define **one concrete behavior** for every edge case. Never write open-ended instructions that ask the model to choose between two actions.
16
+
17
+ ---
18
+
19
+ ## 2. Prompt and Memory Hygiene Rules
20
+
21
+ 1. **Word Budget for the System Prompt:** Keep `system_prompt` compact (`<= <MAX_SYSTEM_PROMPT_WORDS>` words, target 80 to 100 words). Reserve `system_prompt` for high-attention invariants. Put full specifications in `AGENTS.md` and `SKILL.md`.
22
+ 2. **Consolidate Instead of Append:** When you fix a failure, consolidate existing rules. Do not append duplicate `NEVER` or `DO NOT` patches.
23
+ 3. **Progressive Disclosure Verification:** Never assume the model read `SKILL.md`. Check the `skill_loaded` diagnostic before you rely on skill-only edits.
24
+ 4. **Pair Inclusion Rules with Anti-Hallucination:** Pair every *"always include X"* rule with *"never invent X without a tool call"*.
25
+ 5. **Documentation and Code Comment Style:** Follow `.agents/skills/evoloop-constitution/references/writing-guide.md` for all human-targeted documents, YAML comments, docstrings, Javadocs, and code comments.
26
+
27
+ ---
28
+
29
+ ## 3. Evaluation Integrity and Anti-Reward-Hacking Rules
30
+
31
+ 1. **Scenarios Stay Immutable During Automated Evolution:** Never edit files in `protected_paths` (for example, `evals/datasets/**`) without explicit human approval. Present raw `report` evidence and the exact proposed YAML diff first.
32
+ 2. **Evaluator Changes Require Proof and Approval:** Modify `evaluator_paths` (for example, `evals/evaluators/**`) only to fix a proven defect. Never weaken assertions. Add a regression unit test in `tests/test_eval_framework.py` and obtain human approval when `require_approval_for_evaluators: true`.
33
+ 3. **Deterministic and Semantic Evaluation Split:**
34
+ - Deterministic evaluators check objective facts, tool policy, efficiency budgets, and forbidden tokens (`grounded_any_of` and `forbidden_substrings`). Never use fragile synonym lists for open-ended prose.
35
+ - Large Language Model (LLM) judges grade tone, clarity, and open-ended phrasing with full multi-turn context.
36
+ 4. **Mandatory Offline Test Gate:** Run `uv run pytest` and confirm 100% pass before any commit or live evaluation run.
37
+ 5. **Traceable Atomic Commits:** Commit each task section (`Code Fixes`, `Skill and Agent Memory Updates`, and `Scenario Updates`) separately with the Git trailer:
38
+ `Eval: evaluations/<timestamp>/analysis.md`
39
+ 6. **Judge Model Independence (Recommended):** When you evaluate a small or local model, set a stronger `EVAL_JUDGE_MODEL` to reduce judge noise.
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: evoloop-evaluate
3
+ description: Run native live agentic flow evaluations (Python/pytest, Java/JUnit, or custom JSON), capture raw output to `evaluations/<timestamp>/report`, format & validate `parsed.json` against `schemas/parsed_report.schema.json`, and generate `analysis.md`, `progress.md`, `tasks.md`, and an updated `evaluations/README.md` row.
4
+ ---
5
+
6
+ # Evoloop Evaluate
7
+
8
+ Execute the configured native evaluation suite, preserve unmodified raw output, produce a **schema-validated `evaluations/<ts>/parsed.json`** conforming to [`schemas/parsed_report.schema.json`](./schemas/parsed_report.schema.json) (v1.0), and generate structured triage artifacts under `evaluations/<YYYY-MM-DD_HH-MM-SS>/`.
9
+
10
+ ## The `parsed.json` Contract (v1.0)
11
+
12
+ All downstream tools (`update_eval_index.py`, `evolve_state.py`, and report templates) consume `evaluations/<ts>/parsed.json` validated against `schemas/parsed_report.schema.json`. Never invent ad-hoc JSON keys or hand-count metrics — always generate and validate `parsed.json` via `scripts/parse_report.py`.
13
+
14
+ ## Writing Style Requirement
15
+
16
+ Before generating evaluation reports or editing formatter code, read [`../evoloop-constitution/references/writing-guide.md`](../evoloop-constitution/references/writing-guide.md) (`.agents/skills/evoloop-constitution/references/writing-guide.md`). Apply its Simplified Technical English rules to every generated report (`evaluations/<ts>/analysis.md`, `evaluations/<ts>/progress.md`, `evaluations/<ts>/tasks.md`, `evaluations/README.md`) and to any code comments or docstrings in custom report formatters.
17
+
18
+ ## Workflow
19
+
20
+ ### Step 1: Run the Native Evaluation Suite & Capture Raw Output
21
+ 1. Read `.evoloop/config.yaml` (`project.stack`, `project.report_format`, `commands.*`, `paths.*`) and `.evoloop/constitution.md`.
22
+ 2. Create a timestamped directory `evaluations/<YYYY-MM-DD_HH-MM-SS>/`.
23
+ 3. Run the configured live evaluation command and save raw output:
24
+ - **Python (`report_format: pytest`):**
25
+ ```bash
26
+ TS=$(date +%Y-%m-%d_%H-%M-%S)
27
+ mkdir -p "evaluations/$TS"
28
+ uv run pytest tests/test_agentic_flows.py --run-live-agent --run-judge 2>&1 | tee "evaluations/$TS/report"
29
+ ```
30
+ - **Java (`report_format: junit-xml`):**
31
+ ```bash
32
+ TS=$(date +%Y-%m-%d_%H-%M-%S)
33
+ mkdir -p "evaluations/$TS"
34
+ mvn test -Dtest=AgenticFlowEvalTest -DrunLiveAgent=true 2>&1 | tee "evaluations/$TS/report"
35
+ # (or ./gradlew test --tests '*AgenticFlowEvalTest' -DrunLiveAgent=true)
36
+ ```
37
+ Copy the generated JUnit XML report(s) from `paths.junit_reports_dir` (e.g., `target/surefire-reports/TEST-*AgenticFlowEvalTest.xml` or `build/test-results/test/TEST-*.xml`) into `evaluations/$TS/junit.xml`.
38
+ 4. Record current `git rev-parse --short HEAD` and `git log -1 --pretty=%s`.
39
+
40
+ ### Step 2: Format & Schema-Validate `parsed.json`
41
+ Run the stack-aware dispatcher `parse_report.py`, which reads `project.stack` and `project.report_format` from `.evoloop/config.yaml`, invokes the matching formatter (`parse_pytest_report.py`, `parse_junit_report.py`, or native `json`), and **validates the output against `schemas/parsed_report.schema.json`**:
42
+
43
+ ```bash
44
+ # Python (pytest):
45
+ uv run .agents/skills/evoloop-evaluate/scripts/parse_report.py \
46
+ "evaluations/$TS/report" \
47
+ --config .evoloop/config.yaml \
48
+ --dataset <dataset_path_from_config> \
49
+ --with-judge \
50
+ --out "evaluations/$TS/parsed.json"
51
+
52
+ # Java (junit-xml):
53
+ uv run .agents/skills/evoloop-evaluate/scripts/parse_report.py \
54
+ "evaluations/$TS/junit.xml" \
55
+ --config .evoloop/config.yaml \
56
+ --dataset <dataset_path_from_config> \
57
+ --out "evaluations/$TS/parsed.json"
58
+ ```
59
+
60
+ If `parse_report.py` exits non-zero with `SCHEMA ERROR`, fix the formatter or native output before continuing.
61
+
62
+ ### Step 3: Write `evaluations/<ts>/analysis.md`
63
+ Follow `templates/analysis.md`:
64
+ 1. Populate all metrics and tables directly from `evaluations/<ts>/parsed.json`.
65
+ 2. Triage **every** failure into exactly one of the **4 root-cause buckets**:
66
+ - **Code / Harness / Agent Runtime Bug**
67
+ - **Evaluator / Judge Bug** *(audit this first whenever `judge_only_failures` is non-empty)*
68
+ - **Skill / Agent Memory Gap** *(check `skill_loaded` before relying on `SKILL.md`-only edits)*
69
+ - **Scenario Definition Issue**
70
+
71
+ ### Step 4: Write `evaluations/<ts>/progress.md` (if a previous run exists)
72
+ Follow `templates/progress.md`: diff metrics and scenario outcomes against the prior run and grade each commit since the previous `HEAD`.
73
+
74
+ ### Step 5: Write `evaluations/<ts>/tasks.md`
75
+ Follow `templates/tasks.md` with the 3 strict sections (**Code Fixes**, **Skill & Agent Memory Updates**, **Scenario Updates**), citing constitutional invariants and tagging any evaluator edits `[REQUIRES APPROVAL: EVALUATOR]`.
76
+
77
+ ### Step 6: Update `evaluations/README.md`
78
+ ```bash
79
+ uv run .agents/skills/evoloop-evaluate/scripts/update_eval_index.py \
80
+ --index evaluations/README.md \
81
+ --timestamp "$TS" \
82
+ --head "$(git rev-parse --short HEAD)" \
83
+ --command "<exact command run>" \
84
+ --report-json "evaluations/$TS/parsed.json"
85
+ ```
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://evoloop.dev/schemas/parsed-report.schema.json",
4
+ "title": "Evoloop Parsed Evaluation Report",
5
+ "description": "Stack-agnostic evaluation metrics and per-case failure details consumed by evoloop-evaluate, update_eval_index.py, and evoloop-evolve.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema_version",
9
+ "stack",
10
+ "report_format",
11
+ "scenarios_passed",
12
+ "scenarios_total",
13
+ "scenario_pass_rate_pct",
14
+ "checks_passed",
15
+ "checks_total",
16
+ "check_pass_rate_pct",
17
+ "deterministic_checks_passed",
18
+ "deterministic_checks_total",
19
+ "judge_active",
20
+ "duration_seconds",
21
+ "duration_human",
22
+ "evaluators",
23
+ "judge_only_failures",
24
+ "cases"
25
+ ],
26
+ "additionalProperties": false,
27
+ "properties": {
28
+ "schema_version": {
29
+ "type": "string",
30
+ "const": "1.0",
31
+ "description": "Contract version for parsed.json."
32
+ },
33
+ "stack": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "description": "Target project language/runtime stack (e.g., python, java, typescript, go)."
37
+ },
38
+ "report_format": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "description": "Source test report format parsed into this document (e.g., pytest, junit-xml, json)."
42
+ },
43
+ "scenarios_passed": {
44
+ "type": "integer",
45
+ "minimum": 0
46
+ },
47
+ "scenarios_total": {
48
+ "type": "integer",
49
+ "minimum": 0
50
+ },
51
+ "scenario_pass_rate_pct": {
52
+ "type": "number",
53
+ "minimum": 0,
54
+ "maximum": 100
55
+ },
56
+ "checks_passed": {
57
+ "type": "integer",
58
+ "minimum": 0
59
+ },
60
+ "checks_total": {
61
+ "type": "integer",
62
+ "minimum": 0
63
+ },
64
+ "check_pass_rate_pct": {
65
+ "type": "number",
66
+ "minimum": 0,
67
+ "maximum": 100
68
+ },
69
+ "deterministic_checks_passed": {
70
+ "type": "integer",
71
+ "minimum": 0
72
+ },
73
+ "deterministic_checks_total": {
74
+ "type": "integer",
75
+ "minimum": 0
76
+ },
77
+ "judge_active": {
78
+ "type": "boolean"
79
+ },
80
+ "duration_seconds": {
81
+ "type": ["number", "null"],
82
+ "minimum": 0
83
+ },
84
+ "duration_human": {
85
+ "type": "string",
86
+ "minLength": 1
87
+ },
88
+ "evaluators": {
89
+ "type": "object",
90
+ "additionalProperties": {
91
+ "type": "object",
92
+ "required": ["type", "passed", "total", "pass_rate_pct", "failed_cases"],
93
+ "additionalProperties": false,
94
+ "properties": {
95
+ "type": {
96
+ "type": "string",
97
+ "enum": ["deterministic", "llm_judge"]
98
+ },
99
+ "passed": {
100
+ "type": "integer",
101
+ "minimum": 0
102
+ },
103
+ "total": {
104
+ "type": "integer",
105
+ "minimum": 0
106
+ },
107
+ "pass_rate_pct": {
108
+ "type": "number",
109
+ "minimum": 0,
110
+ "maximum": 100
111
+ },
112
+ "failed_cases": {
113
+ "type": "array",
114
+ "items": { "type": "string" }
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "judge_only_failures": {
120
+ "type": "array",
121
+ "items": { "type": "string" },
122
+ "description": "Case IDs where all deterministic checks passed and only LLM-judge checks failed."
123
+ },
124
+ "cases": {
125
+ "type": "array",
126
+ "items": {
127
+ "type": "object",
128
+ "required": [
129
+ "id",
130
+ "category",
131
+ "status",
132
+ "checks_passed",
133
+ "checks_total",
134
+ "failed_evaluators",
135
+ "failures",
136
+ "final_response",
137
+ "domain_tool_calls",
138
+ "skill_loaded"
139
+ ],
140
+ "additionalProperties": false,
141
+ "properties": {
142
+ "id": { "type": "string", "minLength": 1 },
143
+ "category": { "type": "string" },
144
+ "status": { "type": "string", "enum": ["PASS", "FAIL"] },
145
+ "checks_passed": { "type": "integer", "minimum": 0 },
146
+ "checks_total": { "type": "integer", "minimum": 0 },
147
+ "failed_evaluators": {
148
+ "type": "array",
149
+ "items": { "type": "string" }
150
+ },
151
+ "failures": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "object",
155
+ "required": ["evaluator", "reason"],
156
+ "additionalProperties": false,
157
+ "properties": {
158
+ "evaluator": { "type": "string", "minLength": 1 },
159
+ "reason": { "type": "string" }
160
+ }
161
+ }
162
+ },
163
+ "final_response": { "type": ["string", "null"] },
164
+ "domain_tool_calls": { "type": ["string", "null"] },
165
+ "skill_loaded": { "type": ["boolean", "null"] }
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }