Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
otp-version: ${{ matrix.otp }}
- run: mix check
- run: python3 scripts/check_library.py
- name: Replay the three concept counterexamples without a model
run: |
elixir evals/fixtures/concept-review/architecture/verify.exs
python3 evals/fixtures/concept-review/functional/replay.py
elixir evals/fixtures/concept-review/clarity/check.exs
- run: python3 -m pip install --user pyflakes==4.1.0
- run: python3 -m pyflakes scripts/
- run: python3 scripts/smoke_install.py
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Unreleased

- Architecture reviews now check whether a policy knows an adapter’s fields
or units even when the call graph is acyclic. Functional refactoring now
distinguishes functions from the data they transform and preserves when a
deferred read happens. No workflow IDs or installer behavior changed.

## 1.2.1 — 2026-11-14

- Patch release: English, Portuguese and agent installation guides distinguish
Expand Down
7 changes: 7 additions & 0 deletions docs/provenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,10 @@ reference in the same way: no passage was consulted for wording or reproduced.
The [catalog field round](https://github.com/sallaumen/elixir-agent-kit/blob/c2ff7e5be2a08fdfab757d101e95036069634396/evals/results/2026-11-13-catalog-field-round.md) records original, application-derived experiments behind the 2026-11-13 workflow corrections. The application snapshots and the evaluator's answers are not installed as client instructions.

The [class handover holdout](https://github.com/sallaumen/elixir-agent-kit/blob/c2ff7e5be2a08fdfab757d101e95036069634396/evals/results/2026-11-13-ui-identity-handover.md) supports the additional UI identity decision points. The installed text is the general candidate tested across screens; no application rule or fixture is shipped.

The subsequent concept review compared executable Elixir counterexamples with
the actions/calculations/data distinction in [Eric Normand’s overview](https://ericnormand.me/grokking-simplicity),
the discussion of boundary data in [Robert C. Martin’s architecture essay](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html),
and Elixir’s [guard semantics](https://hexdocs.pm/elixir/1.15.5/patterns-and-guards.html#errors-in-guards).
The two guide corrections are original applications of those ideas. No new
framework, mandatory layer or workflow was introduced.
4 changes: 2 additions & 2 deletions docs/source-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ are not packaged. “Original workflow” means the historical authored material
| Area | Public workflow | Original ID | Additional review lens | Most important quality boundary |
|---|---|---|---|---|
| Delivery | [`delivery-coordination`](../priv/library/skills/delivery-coordination/SKILL.md) | `coordenar-entregas` | original workflow; shared contract | Each work item has an owner, objective, affected paths, integration condition and handoff evidence. |
| Code | [`architecture-review`](../priv/library/skills/architecture-review/SKILL.md) | `revisar-arquitetura` | elixir-antipatterns | Each finding names the owner of the behavior, the dependency crossing it and the consequence for a real use case. |
| Code | [`architecture-review`](../priv/library/skills/architecture-review/SKILL.md) | `revisar-arquitetura` | elixir-antipatterns | Trace who calls whom and who owns the fields, units and results crossing the boundary; name the consequence for a real use case. |
| Code | [`abstraction-layers`](../priv/library/skills/abstraction-layers/SKILL.md) | `stratified-design` | elixir-antipatterns | A reader can follow the business intent without chasing a chain of one-line wrappers or decoding transport mechanics. |
| Code | [`module-design`](../priv/library/skills/module-design/SKILL.md) | `organizar-modulos` | elixir-antipatterns | Each public module name predicts its responsibility, and exported operations form a coherent promise to consumers. |
| Code | [`code-consolidation`](../priv/library/skills/code-consolidation/SKILL.md) | `consolidar-codigo` | elixir-antipatterns | The resulting API names the common concept and leaves meaningful differences visible at call sites. |
Expand All @@ -31,7 +31,7 @@ are not packaged. “Original workflow” means the historical authored material
| Code | [`performance`](../priv/library/skills/performance/SKILL.md) | `performance` | original workflow; shared contract | Before/after measurements use comparable inputs, warmup, configuration and statistical summary. |
| Code | [`process-lifecycle`](../priv/library/skills/process-lifecycle/SKILL.md) | none (new in 0.5) | shared contract; Elixir context | Every process has a stated reason, an owner of its state and a rebuild path after restart; duplicates and bursts are bounded. |
| Code | [`house-patterns`](../priv/library/skills/house-patterns/SKILL.md) | none (new in 0.7) | shared contract; Elixir context; a consuming application's conventions, generalized | Every conformed site has a public-seam test that passed before and after its own step, and every remaining deviation has a written reason. |
| Code | [`functional-refactoring`](../priv/library/skills/functional-refactoring/SKILL.md) | none (new in 0.8) | shared contract; Elixir context; *Grokking Simplicity* concepts (Eric Normand), concept only | Every extracted decision is tested with plain values and no stub, and the effect inventory is identical before and after. |
| Code | [`functional-refactoring`](../priv/library/skills/functional-refactoring/SKILL.md) | none (new in 0.8) | shared contract; Elixir context; *Grokking Simplicity* concepts (Eric Normand), concept only | Every extracted decision is tested with plain values and no stub, and callers observe effects at the original time and in the original process. |
| Code | [`readable-code`](../priv/library/skills/readable-code/SKILL.md) | none (new in 0.8) | shared contract; Elixir context; *Clean Code* concepts (Robert C. Martin), concept only | Tests, effects and public names are unchanged and no new lint finding appears, while every obstacle in the reading notes is resolved or handed off. |
| Code | [`async-state`](../priv/library/skills/async-state/SKILL.md) | `estados-assincronos` | original workflow; shared contract | The UI and API can reconcile after reconnect or reload using persisted identifiers and a current-state read; commands tied to a rendered result retain their gesture and confirmation requirements. |
| Domains | [`ai-orchestration`](../priv/library/skills/ai-orchestration/SKILL.md) | `orquestracao-ias` | original workflow; shared contract | Acquisition, release, timeout, cancellation and crash recovery keep capacity counters consistent. |
Expand Down
6 changes: 5 additions & 1 deletion evals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ cell. A live round fills that matrix with observed runs:
the `.tsv` with a short Markdown summary beside it.

`scripts/check_library.py` validates every committed `.tsv`, so a malformed row
fails CI. Runs are manual and paid; nothing here calls a model.
fails CI. Within one client, model and kit revision, a run ID identifies one
execution across input files. Give an independent repeat a new run ID; copying a
transcript into another file must not increase the reported sample size. Runs are manual and paid; nothing here calls a model.

## Case notes

The [concept review](results/2026-11-14-concepts.md) separates live routing and guided comparisons from offline counterexamples for architecture, functional refactoring and readable code.

The [catalog field round](results/2026-11-13-catalog-field-round.md) maps all
38 workflows to their paired evidence and records the release decision.

Expand Down
13 changes: 13 additions & 0 deletions evals/fixtures/concept-review/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Three counterexamples for workflow reviews

Run from the repository root with Elixir on PATH. These original examples use
fictional data and the standard library. They are evaluator material, excluded
from the package. They replay application behavior, not the model sessions.

| Command | What failure would distinguish the alternatives? |
|---|---|
| `python3 evals/fixtures/concept-review/functional/replay.py` | Compares per-element preference reads with a snapshot. Construction, partial consumption, repeated consumption and moving to another process distinguish the two contracts. Each original passes its own four checks and fails the opposite contract. |
| `elixir evals/fixtures/concept-review/architecture/verify.exs` | With the same public commands and dependency directions, the mixed-unit implementation wrongly labels 5,399 seconds long; the control preserves the 5,400-second cutoff. The verifier checks the exact mismatch list. |
| `elixir evals/fixtures/concept-review/clarity/check.exs` | A tuple operation in the body can raise where the same operation in a guard falls through. Matching ordinary inputs is insufficient: malformed data and overlapping clauses distinguish the contracts. |

For the live comparison, rubric and interpretation see the [concept review](../../results/2026-11-14-concepts.md).
12 changes: 12 additions & 0 deletions evals/fixtures/concept-review/architecture/control.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
defmodule Studio.Legacy do
def preview(%{"minutes" => n}), do: Studio.Schedule.classify(n * 60)
end

defmodule Studio.Mixer do
def preview(%{"time" => n}), do: Studio.Schedule.classify(n)
end

defmodule Studio.Schedule do
def classify(seconds) when is_integer(seconds) and seconds >= 5400, do: :long
def classify(seconds) when is_integer(seconds), do: :standard
end
18 changes: 18 additions & 0 deletions evals/fixtures/concept-review/architecture/control.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Review this proposed rehearsal-scheduling change as a maintainer. Would you ship it as written? Give the smallest correction if any, who owns it, and what evidence would settle the decision. Keep the existing commands and their outputs compatible. Use only the supplied material; do not edit files or call tools. Up to 320 words.
Studio has one Mix app, no library dependencies. Both batch preview commands must classify a rehearsal of at least 90 minutes as :long, otherwise :standard. Both formats are in use concurrently. Inputs to these commands have already passed integer and range validation. Public command examples from the partner fixtures:
Studio.Legacy.preview(%{"minutes" => 90}) # :long
Studio.Mixer.preview(%{"time" => 5400}) # :long
Studio.Mixer.preview(%{"time" => 5399}) # :standard
CI ran a smoke check for legacy 90 and mixer 5400, and a file dependency cycle check. All three passed. Here is the entire code for the two entry paths, one module per file.
defmodule Studio.Legacy do
def preview(%{"minutes" => n}), do: Studio.Schedule.classify(n * 60)
end

defmodule Studio.Mixer do
def preview(%{"time" => n}), do: Studio.Schedule.classify(n)
end

defmodule Studio.Schedule do
def classify(seconds) when is_integer(seconds) and seconds >= 5400, do: :long
def classify(seconds) when is_integer(seconds), do: :standard
end
4 changes: 4 additions & 0 deletions evals/fixtures/concept-review/architecture/oracle.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fixed before any model calls. Score answers separately by case. Award each binary criterion from explicit evidence, never by similar vocabulary alone.
Positive P1 Reject as written and identify incorrect classification for an actual subthreshold seconds value due to rounding (a valid witness is 5399). P2 Identify an ownership problem distinct from arithmetic: Schedule's decision understands the two import-specific shape conventions even though both command modules call Schedule; absence of cycles does not resolve this. Explicit pair of shape/meaning ownership and one-way calls or absence of cycle needed. P3 Place wire shape/unit handling at each input edge (convert legacy minutes to exact elapsed seconds and forward mixer seconds unchanged) while retaining one shared 5400-second threshold, compatible command results. P4 Propose regression evidence exercising both public paths at/around the cutoff, including near-below for Mixer, and a direct check of the single rule with its own seconds value independent of raw fields. P5 Do not require a new callback/behaviour, intermediate struct, process, umbrella or other infrastructure.
Control N1 Explicitly accept current implementation with no structural code change needed. N2 Correctly describe two input translations and shared policy with one canonical unit. N3 Identify smoke coverage gap with a concrete 5399-second mixer regression and a legacy comparison (89/90 acceptable). N4 No new abstractions, processes, umbrella or structural migration suggested as necessary.
Primary test of architecture specificity: both candidate replicates must achieve P2 + P3 AND N1 + N4; candidate must add at least one P2 success over baseline to warrant shipping this guide; no additional control regression. All criteria are binary; split technical probe from live helper/adherence claims. Judge material and anonymised replies only. Two replies per case per arm, model gpt-6.1-sol medium. Synthetic, assisted workflow (routing/discovery excluded); no inference about other projects or clients. No post-hoc edits.
14 changes: 14 additions & 0 deletions evals/fixtures/concept-review/architecture/positive.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
defmodule Studio.Legacy do
def preview(row), do: Studio.Schedule.classify(row)
end

defmodule Studio.Mixer do
def preview(row), do: Studio.Schedule.classify(row)
end

defmodule Studio.Schedule do
def classify(%{"minutes" => n}), do: classify_length(n * 60)
def classify(%{"time" => n}), do: classify_length(round(n / 60) * 60)
defp classify_length(seconds) when seconds >= 5400, do: :long
defp classify_length(_seconds), do: :standard
end
20 changes: 20 additions & 0 deletions evals/fixtures/concept-review/architecture/positive.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Review this proposed rehearsal-scheduling change as a maintainer. Would you ship it as written? Give the smallest correction if any, who owns it, and what evidence would settle the decision. Keep the existing commands and their outputs compatible. Use only the supplied material; do not edit files or call tools. Up to 320 words.
Studio has one Mix app, no library dependencies. Both batch preview commands must classify a rehearsal of at least 90 minutes as :long, otherwise :standard. Both formats are in use concurrently. Inputs to these commands have already passed integer and range validation. Public command examples from the partner fixtures:
Studio.Legacy.preview(%{"minutes" => 90}) # :long
Studio.Mixer.preview(%{"time" => 5400}) # :long
Studio.Mixer.preview(%{"time" => 5399}) # :standard
CI ran a smoke check for legacy 90 and mixer 5400, and a file dependency cycle check. All three passed. Here is the entire code for the two entry paths, one module per file.
defmodule Studio.Legacy do
def preview(row), do: Studio.Schedule.classify(row)
end

defmodule Studio.Mixer do
def preview(row), do: Studio.Schedule.classify(row)
end

defmodule Studio.Schedule do
def classify(%{"minutes" => n}), do: classify_length(n * 60)
def classify(%{"time" => n}), do: classify_length(round(n / 60) * 60)
defp classify_length(seconds) when seconds >= 5400, do: :long
defp classify_length(_seconds), do: :standard
end
Loading
Loading