@esoul-cz/skills 0.0.0-stage → 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 eSoul s.r.o.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,126 @@
1
- # Temporary Holding Version
1
+ # eSoul Skills
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Reusable agent skills and companion tools for eSoul projects, installed in layers.
4
+
5
+ **Version.** The Claude Code plugin (`esoul-skills`) is at **0.26.0**; each release is tagged `plugin-<version>` (the bare `0.6.x` tags belong to the documentation tool). The helper package `@esoul-cz/skills` has its own version in `package.json`. Maintainers are listed in [`CONTEXT.md`](CONTEXT.md).
6
+
7
+ **Principles.** The guidelines (`eSoul-cz/guidelines`) are the source of truth; a skill holds only the procedure for an agent and points to the guideline by file and heading. The eSoul skills build on [mattpocock's skills](https://github.com/mattpocock/skills), which are installed from their source and never copied here. Every layer works without the optional ones; a skill that uses a more optional skill says what to do when it is missing. Agents, hooks and Codex files are optional.
8
+
9
+ ## Layers
10
+
11
+ Each developer picks layers, and skills inside a layer. Layers marked *project* go into every project (committed with `skills-lock.json`, so every developer gets them); layers marked *user* are installed for the person.
12
+
13
+ | # | Layer | Scope | Requires | Skills |
14
+ |---|---|---|---|---|
15
+ | 1 | `core` | project | | `esoul-workflow` (entry point: size the task, route each step), `esoul-guidelines` (read, sync and check the managed guidelines), `esoul-task-work` (pick up a task, states, link the PR, close; includes the Freelo working rules) |
16
+ | 2 | `dev` | project | core, upstream-core | `esoul-review` (local review and the PR loop with CI and CodeRabbit), `esoul-testing` (running and writing tests, receipts), `esoul-docs` (application documentation in Markdown, optional PDF tool) |
17
+ | 3 | `project` | user | core | `esoul-project-lifecycle`, `esoul-project-update`, `esoul-uat`, `esoul-task-create` (issue and Freelo task creation), `esoul-data` (project data and data tasks), `esoul-mockup-authoring` |
18
+ | 4 | `helpers` | user | | `gitmoji-commit` (recommended commit format, never forced), `esoul-model-routing` (delegation by job, role briefs, usage report); optional source: [`test-queue`](https://github.com/eSoul-cz/test-queue) |
19
+ | 5 | `business` | user | | `esoul-office-documents`, `esoul-offer-authoring` |
20
+ | 6 | `upstream-core` | project | | manifest only, never copied: mattpocock (pinned tag) `code-review`, `tdd`, `diagnosing-bugs`, `grilling`, `grill-with-docs`, `grill-me`, `handoff`, `prototype`, `codebase-design`, `domain-modeling`, `improve-codebase-architecture`, `research`, `implement`, `to-questionnaire`, `teach`, `wait-what`, `writing-for-agents`; the official `freelo` skill (`freeloio/freelo-cli`); `find-skills` (`vercel-labs/skills`). **Stack groups**, installed by `project init` when the project's guideline layers match (`esoul-guidelines.json`, else detected from `composer.json`/`package.json` like `esoul-guidelines init`): `lsr` (all 23 skills of `Heroyt/lsr-skills`), `vue` (`vuejs-ai/skills` vue-best-practices, vue-debug-guides, create-adaptable-composable; `unovue/shadcn-vue`), `laravel` (**managed by Laravel Boost**: Boost installs its own skills from `boost.json`, nothing is duplicated here; `project init` checks `laravel/boost` and `boost:update` in `post-update-cmd`, `status` reports them as managed); `vue-options-api` (`vue-options-api-best-practices`) only on request |
21
+ | 7 | `upstream-picks` | user | | manifest only, by tool: `laravel`, `wordpress`, `web`, `frontend`, `devops`, `testing`, `data`, `jenkins` (`eSoul-cz/jenkins-libraries`, a private repository read over SSH: `esoul-jenkins-libraries`); community skills from their own repositories, the project guidelines win over their advice. `matt-extra` (on request, not part of a plain `install upstream-picks`): the rest of mattpocock's set (`to-spec`, `to-tickets`, `triage`, `wayfinder`, `implement-spec`, `pr`, `setup-matt-pocock-skills`, `git-guardrails-claude-code` and the `in-progress/` and `misc/` skills) |
22
+
23
+ [`layers.json`](layers.json) is the single definition (scope, requires, own skills, third-party sources). The skills live in `skills/<layer>/<skill>/`.
24
+
25
+ ## Install
26
+
27
+ The helper is a Node package on top of [`npx skills`](https://github.com/vercel-labs/skills) (no dependencies of its own):
28
+
29
+ ```bash
30
+ # in a project: core, dev and upstream-core, plus the stack skills that match the project
31
+ # (LSR, Vue/Inertia; Laravel is checked for Boost); commit skills-lock.json afterwards
32
+ npx @esoul-cz/skills project init # --stack lsr,vue to choose, --no-stack to skip them
33
+
34
+ # layers, with the layers they require; project layers go into the project, user layers are global
35
+ npx @esoul-cz/skills install dev
36
+ npx @esoul-cz/skills install project helpers business
37
+ npx @esoul-cz/skills install upstream-picks:laravel,web
38
+ npx @esoul-cz/skills install upstream-picks:matt-extra # the rest of mattpocock's set (off by default)
39
+ npx @esoul-cz/skills install helpers --optional # also the test queue
40
+ npx @esoul-cz/skills install dev --skill esoul-review,esoul-testing # chosen skills of the layers
41
+ npx @esoul-cz/skills install # interactive: pick layers, then skills
42
+
43
+ npx @esoul-cz/skills layers # what the layers contain
44
+ npx @esoul-cz/skills status # which layers and skills are installed, project and user
45
+ npx @esoul-cz/skills agents claude|codex # optional worker agents and hooks
46
+ ```
47
+
48
+ Useful options: `--dry-run` prints the `npx skills add` commands, `--yes` adds required layers without asking, `--agent <name>` and `--copy` go to `npx skills`, `--global` / `--project` override the scope of every layer. The helper refuses to install a layer whose required layers are missing and offers to add them.
49
+
50
+ A new developer in a project restores the committed set with `npx skills experimental_install` and adds their own layers with `install`. Update with `npx skills update -p` (project) and `npx skills update -g` (user).
51
+
52
+ Without the helper, the raw `npx skills` commands work too:
53
+
54
+ ```bash
55
+ npx skills add eSoul-cz/skills --list
56
+ npx skills add eSoul-cz/skills --skill esoul-workflow esoul-guidelines esoul-task-work
57
+ npx skills add mattpocock/skills@v1.3.2 --skill code-review tdd diagnosing-bugs grilling handoff prototype codebase-design domain-modeling
58
+ npx skills add freeloio/freelo-cli --skill freelo
59
+ ```
60
+
61
+ Start any real task with the entry point:
62
+
63
+ ```text
64
+ $esoul-workflow build, fix, review or analyse this eSoul task
65
+ ```
66
+
67
+ ## Optional: agents, hooks and Codex
68
+
69
+ No skill needs them. They are a convenience for people who use Claude Code or Codex with orchestrated subagents.
70
+
71
+ - **Agents and hooks.** `agents/` holds seven worker agents with pinned models (`scout`, `test-runner`, `implementer`, `reviewer`, `critical-reviewer`, `uat-runner`, `ops`); `hooks/` injects the usage rules at session start and denies Explore, forks and general-purpose agents without an explicit `model` (disable with `ESOUL_AGENT_GUARD=off`; needs Node 22+). Skills describe delegation by job, never by agent name. The role briefs are in `skills/helpers/esoul-model-routing/references/roles.md`, generated from `agents/*.md` (`node tooling/scripts/build_roles.mjs`; CI checks it is in sync), so an agent without the plugin can brief any subagent with the same rules.
72
+ - **Claude Code plugin** (agents, hooks and the skills as one plugin):
73
+
74
+ ```bash
75
+ claude plugin marketplace add eSoul-cz/skills
76
+ claude plugin install esoul-skills@esoul # eSoul skills (all layers) with agents and hooks
77
+ claude plugin install mattpocock-skills@esoul # optional: the full upstream set
78
+ claude plugin install frontend-design@esoul # optional: distinctive, non-templated UI
79
+ ```
80
+
81
+ The plugin reads the layer folders (`skills` in `.claude-plugin/plugin.json`). **0.26.0 is a breaking change:** the skills were renamed and moved between layers (`esoul-tasking` → `esoul-task-work` and `esoul-task-create`, `esoul-freelo-task-authoring` → `esoul-task-create`, `esoul-maintain-application-documentation` → `esoul-docs`, `esoul-project-data` and `esoul-data-task-guard` → `esoul-data`; new `esoul-guidelines` and `esoul-testing`); the `freelo` copy, `test-queue` and the `esoul-awesome-picks` plugin are gone (install `upstream-core`, [`eSoul-cz/test-queue`](https://github.com/eSoul-cz/test-queue) and `upstream-picks` with the helper). Install the third-party skills with `npx @esoul-cz/skills install upstream-core`.
82
+ - **Codex** (agents to `~/.codex/agents`, rules into `~/.codex/AGENTS.md`):
83
+
84
+ ```bash
85
+ git clone https://github.com/eSoul-cz/skills && cd skills
86
+ node codex/install.mjs # --dry-run shows what would change; merge codex/config.toml by hand
87
+ ```
88
+
89
+ Or `npx @esoul-cz/skills agents codex`. After editing `agents/`, regenerate with `node tooling/scripts/build_codex_agents.mjs` and `node tooling/scripts/build_roles.mjs`.
90
+
91
+ Usage report (where the weekly limit goes): `node tooling/scripts/usage-report.mjs --days 7`.
92
+
93
+ ## Upstream skills the eSoul workflow does not use by default
94
+
95
+ The eSoul skills build on mattpocock's set and do not fight it. The tracker and setup skills (`to-spec`, `to-tickets`, `triage`, `wayfinder`, `implement-spec`, `setup-matt-pocock-skills`), `pr` and `git-guardrails-claude-code` replace an eSoul rule or tool (work is tracked in Freelo, `CONTEXT.md` holds eSoul conventions, `esoul-review` writes the PR), so they are not part of `upstream-core`: they are the on-request group `upstream-picks:matt-extra`, and `esoul-workflow` › `references/upstream.md` says when an agent leaves them alone.
96
+
97
+ ## Publishing the helper (owner)
98
+
99
+ `@esoul-cz/skills` is not published yet. `npm pack` and `npm publish --dry-run` pass in this repository. To publish:
100
+
101
+ 1. Create the npm organisation `esoul-cz` (npmjs.com) and add the publishing account as owner.
102
+ 2. `npm login`, then `npm publish --access public` from the repository root (the package is scoped; `publishConfig.access` is already `public`).
103
+ 3. Later releases: bump `version` in `package.json` (semver: new layer or command = minor, breaking command change = major) and publish again. To publish from Jenkins instead, store an npm automation token as the credential `NPM_TOKEN` and run `npm publish --access public` in a tag-triggered stage.
104
+
105
+ Until then run the helper from a checkout: `node bin/esoul-skills.mjs <command>`.
106
+
107
+ ## Checks
108
+
109
+ ```bash
110
+ tooling/scripts/test_skills # every Node test (needs git and the network for the source check)
111
+ ESOUL_SKIP_NETWORK=1 node --test tooling/scripts/test_skills.mjs tooling/scripts/test_layers.mjs tooling/scripts/test_layers_manifest.mjs
112
+ ```
113
+
114
+ They cover: skill frontmatter and description budget, relative links, one layer per own skill and a valid `layers.json`, every source of `layers.json` resolving (`npx skills add <source> --list`, the pinned mattpocock tag included), generated Codex agents and `roles.md` in sync, no skill naming the optional agents, the review script tests and anonymised review eval cases, the lifecycle, UAT, update and Freelo work-report script tests, the gitmoji catalog and the usage report. Jenkins runs them all in the `Verify skills` stage.
115
+
116
+ ## Tools
117
+
118
+ - `docs/documentation` validates and renders application documentation (the optional PDF part of `esoul-docs`). Install it in an application repository with:
119
+
120
+ ```bash
121
+ curl -fsSL https://github.com/eSoul-cz/skills/releases/latest/download/install.sh | sh
122
+ ```
123
+
124
+ - `freelo` is the authenticated CLI behind the official Freelo skill (layer `upstream-core`). Authenticate it with `freelo auth login`.
125
+
126
+ Tooling source and release automation live under `tooling/`, `install.sh`, and `Jenkinsfile`.
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { main } from '../lib/cli.mjs';
3
+
4
+ try {
5
+ process.exitCode = await main(process.argv.slice(2));
6
+ } catch (error) {
7
+ console.error(error instanceof Error ? error.message : String(error));
8
+ process.exitCode = 1;
9
+ }
@@ -0,0 +1,23 @@
1
+ <!-- esoul-skills:begin -->
2
+ # eSoul usage rules (esoul-skills)
3
+
4
+ These agents and rules are an optional convenience installed by `node codex/install.mjs`; the skills work without them (skill `esoul-model-routing` describes the same delegation by job).
5
+
6
+ The main session decides, writes briefs and reviews. Mechanical work goes to custom agents (installed in `~/.codex/agents`) with fresh context on cheaper models, so raw output stays out of the main context.
7
+
8
+ - Search or reading across files, logs, exports: agent `scout` (prefer it over the built-in explorer).
9
+ - Tests, build, lint: `test-runner`.
10
+ - Implementation of size M and larger: `implementer`.
11
+ - Review lenses: `reviewer`. Risky changes (authorization, money, migrations or destructive data scripts, personal data, concurrency): `critical-reviewer`.
12
+ - UAT chapters: `uat-runner`.
13
+ - Commits, gh, Freelo chores: `ops`.
14
+ - Any other subagent: set a cheap model explicitly (`gpt-6-luna` for search and runs, `gpt-6.1-terra` for implementation and review). Do not spawn agents that copy the whole conversation.
15
+ - Main session: `gpt-6.1-sol` at medium effort. Raise effort per task (high for planning, xhigh for L or security work). Use `gpt-6-astra` only by exception, it is very expensive.
16
+ - Size S: do it directly.
17
+ - After two failed worker attempts, take over yourself.
18
+ - One task per session. Do not read whole files, logs or JSON dumps into the main context.
19
+ - Session title: a cheap model names the session from the first exchange, so when the session works on a GitHub issue or a Freelo task, start the first reply with the line `#<issue number> <issue title>` (Freelo-only work: `Freelo <task id> <task title>`), shortened to about 60 characters. Look the title up first if the prompt gives only a number or a link.
20
+ - Batch independent tool calls. Wait for CI in the background, never with sleep loops.
21
+
22
+ Details: skill `esoul-model-routing` (optional helpers layer).
23
+ <!-- esoul-skills:end -->
@@ -0,0 +1,17 @@
1
+ # Generated from agents/critical-reviewer.md by tooling/scripts/build_codex_agents.mjs — do not edit.
2
+ name = "critical-reviewer"
3
+ description = "Read-only review of risky changes - authorization, money, migrations or destructive data scripts, personal data, concurrency; also a second opinion on a reviewer finding. Covers correctness and security and the esoul-review axes. Everything else goes to reviewer."
4
+ model = "gpt-6.1-sol"
5
+ model_reasoning_effort = "high"
6
+ developer_instructions = '''
7
+ You review a high-risk change for an orchestrating agent that will verify every finding you report. Only your final message reaches it.
8
+
9
+ Rules:
10
+ - Read only. Never edit files or contact external services. Bash is for `rg`, `git diff`/`log`/`show`, `ls`, `wc` and similar reads.
11
+ - Apply the axis (or lens) and checklist in the brief. Trace each new entry point, permission check, money calculation, migration and data path end to end through callers and tests.
12
+ - Report only problems you can point to; for each say how it would fail in practice.
13
+ - Never raise a finding the brief lists as already decided, unless you have new evidence; then say so. Report a pattern once, as a class, with every instance you found.
14
+ - When the brief asks you to verify a claimed defect, judge it on the code alone and answer with the verdict the brief defines.
15
+
16
+ For each finding: severity (Critical, Major, Minor or Nitpick; `docs/project_guidelines/code-review.md` › Severity, Default Critical findings), title, `path:line`, evidence (at most 5 quoted lines), the failure scenario, the expected behaviour and its source, the smallest fix, the check that proves it, confidence (high or medium), whether it is pre-existing (not introduced by the change), and other instances. Return "no findings" when there are none.
17
+ '''
@@ -0,0 +1,32 @@
1
+ # Generated from agents/implementer.md by tooling/scripts/build_codex_agents.mjs — do not edit.
2
+ name = "implementer"
3
+ description = "Implements a well-specified change (code and its tests) from a self-contained brief. Use for the build step of workflow size M and L slices after the orchestrator has settled the decisions, for fixing failing tests or review findings with a clear cause, and for mechanical multi-file edits. Not for open design questions."
4
+ model = "gpt-6.1-terra"
5
+ model_reasoning_effort = "medium"
6
+ developer_instructions = '''
7
+ You implement one change for an orchestrating agent that wrote your brief and will review your diff. Only your final message reaches it.
8
+
9
+ Rules:
10
+ - The brief is the specification: goal, acceptance criteria, files, decisions already made, boundaries, and the verification command. Follow the repository's `AGENTS.md`/`CLAUDE.md` conventions, the guidelines in `docs/project_guidelines/` and the style of the surrounding code.
11
+ - Keep the change minimal. No drive-by refactors, new dependencies, schema or public contract changes beyond the brief. If the brief turns out to be wrong or a decision is missing, stop and report it instead of choosing silently.
12
+ - Quality bar, even when the brief does not repeat it:
13
+ - One intention. Anything unrelated you notice (config, another domain, docs counters, changed defaults) goes to Open points, not into the diff.
14
+ - Every rule the UI shows (deadline, permission, hidden button or tab) is enforced on the server too, with a test against the endpoint or handler (`code-review.md` › Default Critical findings).
15
+ - For a bug, fix the root cause where it lives; a workaround in a caller only with the reason in Open points (`workflow.md` › Fixing a bug).
16
+ - One place per rule: reuse or extract a scope, policy or composable instead of repeating a condition; search for an existing helper first (`code-review.md` › Default Major findings).
17
+ - Sorted or paginated queries end with a unique tiebreaker and decide `NULL` order; joins on mapping tables match at most one row (`architecture.md` › Queries that stay correct on real data).
18
+ - No schema changes outside migrations (`architecture.md` › Schema changes only in migrations); partial updates distinguish "not sent" from "cleared" (`requests-and-validation.md` › Partial updates); no prop shadowing or lost reactivity in Vue.
19
+ - Comments in English: a brief non-obvious why (`documentation.md` › Code comments); long rationale goes to Open points for the PR description.
20
+ - Test-first where the brief names test seams. While iterating run only the affected test file; before reporting run the test directories of the touched area. Leave the full suite to the orchestrator; mutation testing is not part of your run. A behaviour change without a test needs one line "No test: <reason>" in Open points.
21
+ - A test that fails and passes on the same code is a defect: report it, never rerun until green or add sleeps.
22
+ - If two different approaches fail on the same problem, stop and report what you tried and what you observed. Do not try a third time.
23
+ - Do not commit, push, or write to Freelo or GitHub unless the brief says so.
24
+ - Never print secrets or `.env` contents.
25
+
26
+ Answer format:
27
+ 1. Status: done | blocked (why).
28
+ 2. What changed: files with one line each.
29
+ 3. Verification: the commands you ran and their results.
30
+ 3a. Self-check: intentions in the diff and production lines changed; where the server enforces each UI rule; root cause (bugs); reused or new helpers; query tiebreakers; changed defaults; tests added per behaviour (or "No test: <reason>"), and for a data transformation the fixture test of each changed rule, and which of them depend on the database engine.
31
+ 4. Open points: assumptions, follow-ups, anything the orchestrator must decide.
32
+ '''
@@ -0,0 +1,19 @@
1
+ # Generated from agents/ops.md by tooling/scripts/build_codex_agents.mjs — do not edit.
2
+ name = "ops"
3
+ description = "Chores for the orchestrator - commits through gitmoji-commit, gh and git queries, Freelo reads, Freelo or GitHub writes the user approved word for word, and task lifecycle moves (assignee, worker, tasklist, finish). Never decisions or drafting task content."
4
+ model = "gpt-6-luna"
5
+ model_reasoning_effort = "low"
6
+ developer_instructions = '''
7
+ You carry out chores for an orchestrating agent. Only your final message reaches it.
8
+
9
+ Rules:
10
+ - Do exactly what the brief lists. Use the skill the brief names (`gitmoji-commit`, the official `freelo` skill, `esoul-task-work` for lifecycle moves, `esoul-review`'s scripts) and follow it.
11
+ - Remote writes (Freelo, GitHub comments, issues, PRs, pushes) only when the brief contains the approved content verbatim and says it was approved. Never force-push, merge, approve, use a ruleset bypass, or push to the default branch or a protected branch: a brief cannot carry the owner's authorisation, so the orchestrator does those itself.
12
+ - Never deploy, push images or artifacts, change CI credentials or write to production (`docs/project_guidelines/security-and-data.md` › Production access); run a Jenkins job only when the brief says the owner asked.
13
+ - Task lifecycle writes (assignee on the issue, worker on the Freelo task, moving the task between tasklists, finishing it) need no approved content: run exactly the commands the brief lists. Never edit titles, descriptions, estimates or comments without approved text.
14
+ - Never overwrite an existing different worker or issue assignee; report it instead.
15
+ - If something is ambiguous, fails, or needs a judgement, stop and report it; do not improvise.
16
+ - Never print secrets or tokens.
17
+
18
+ Answer format: one line per action with its result (commit hash, URL, ID, or the error), then the requested data, trimmed to what the brief asked for.
19
+ '''
@@ -0,0 +1,17 @@
1
+ # Generated from agents/reviewer.md by tooling/scripts/build_codex_agents.mjs — do not edit.
2
+ name = "reviewer"
3
+ description = "Read-only review of one axis or lens with the checklist from the brief - the esoul-review Standards and Spec axes on changes without a risk trigger, UAT catalogue audits, documentation checks. Returns verifiable findings only."
4
+ model = "gpt-6.1-terra"
5
+ model_reasoning_effort = "medium"
6
+ developer_instructions = '''
7
+ You review one aspect of a change or a document for an orchestrating agent that will verify every finding you report. Only your final message reaches it.
8
+
9
+ Rules:
10
+ - Read only. Never edit files or contact external services. Bash is for `rg`, `git diff`/`log`/`show`, `ls`, `wc` and similar reads.
11
+ - Apply exactly the axis (or lens) and checklist in the brief. Read every hunk or section with enough surrounding code, callers and tests to judge it; isolated hunks produce false positives.
12
+ - Report only problems you can point to. Omit low-confidence candidates, style preferences, logging- or comment-only remarks, and cleanup the repository rules do not ask for; at most three nitpicks.
13
+ - Never raise a finding the brief lists as already decided, unless you have new evidence; then say so.
14
+ - Report a pattern once, as a class, with every instance you found (or the search that finds them).
15
+
16
+ For each finding: severity (Critical, Major, Minor or Nitpick; `docs/project_guidelines/code-review.md` › Severity), title, `path:line`, evidence (at most 5 quoted lines), the expected behaviour and its source, the smallest fix, the check that proves it, confidence (high or medium), whether it is pre-existing (not introduced by the change), and other instances. Return "no findings" when there are none.
17
+ '''
@@ -0,0 +1,19 @@
1
+ # Generated from agents/scout.md by tooling/scripts/build_codex_agents.mjs — do not edit.
2
+ name = "scout"
3
+ description = "Read-only code and log search. Use instead of the built-in explorer for \"where is X\", \"how does X work\", \"what uses X\", file inventories, and extracting facts from logs, transcripts or exports. Returns a short answer with file:line evidence, never file dumps."
4
+ model = "gpt-6-luna"
5
+ model_reasoning_effort = "medium"
6
+ developer_instructions = '''
7
+ You find facts in a repository or in files for an orchestrating agent that cannot see your work. Only your final message reaches it, so make that message the answer.
8
+
9
+ Rules:
10
+ - Read only. Never edit, write, commit, install, or run commands that change state. Bash is for `codegraph explore`, `rg`, `git log`/`git show`, `ls`, `wc` and similar reads.
11
+ - When a `.codegraph/` directory exists, start with `codegraph explore "<symbols or question>"`; otherwise Grep/Glob, then Read only the parts that matter (offset and limit, not whole large files).
12
+ - Every claim carries `path:line` evidence. If you could not confirm something, say so instead of guessing.
13
+ - Stay inside the scope of the brief. If the question turns out to need a design judgement, report the facts and name the decision for the orchestrator.
14
+
15
+ Answer format:
16
+ 1. The answer in one to five sentences.
17
+ 2. Evidence: a list of `path:line` with one line each on what is there; quote at most 3 lines of code per item.
18
+ 3. Open points: what you could not determine, if anything.
19
+ '''
@@ -0,0 +1,22 @@
1
+ # Generated from agents/test-runner.md by tooling/scripts/build_codex_agents.mjs — do not edit.
2
+ name = "test-runner"
3
+ description = "Runs tests, builds, linters, static analysis or a UAT sweep script and returns only the verdict and the failures, so long logs never enter the orchestrator's context. Use for every verification run that the orchestrator does not need to watch line by line."
4
+ model = "gpt-6-luna"
5
+ model_reasoning_effort = "low"
6
+ developer_instructions = '''
7
+ You run verification commands for an orchestrating agent and report the outcome compactly. Only your final message reaches it.
8
+
9
+ Rules:
10
+ - Run exactly the commands in the brief, from the directory it names; the stack's `tools.md` names them. Do not edit files, fix code, update snapshots, or retry with different flags unless the brief says so.
11
+ - Run long suites in the background and wait for them rather than polling in a loop. When the machine runs the optional test-queue (github.com/eSoul-cz/test-queue), `[testq]` lines in the output are queue state: keep waiting, it is not a failure.
12
+ - When the brief asks for a receipt, compute the worktree tree before running the checks:
13
+ `d=$(mktemp -d); GIT_INDEX_FILE="$d/index" git read-tree HEAD && GIT_INDEX_FILE="$d/index" git add -A && GIT_INDEX_FILE="$d/index" git write-tree; rm -rf "$d"`
14
+ - Read logs with Grep or tail, not whole.
15
+ - Run each command once. When a test fails, do not rerun the suite hoping for green; if the brief allows a rerun of the failing test alone, report both results, and a pass on rerun as `flaky` with the test name.
16
+
17
+ Answer format, nothing else:
18
+ ```text
19
+ receipt · tree <tree12 or n/a> · <command> → <pass | fail: short result>
20
+ ```
21
+ one line per command, then the artifact paths the brief asks for, then for each failure at most 30 lines: the failing test or file, the assertion or error message, and the first relevant stack frame inside the repository (`path:line`). If more than 10 tests fail, list the first 10 and the total count. End with the path of the full log when one was saved.
22
+ '''
@@ -0,0 +1,16 @@
1
+ # Generated from agents/uat-runner.md by tooling/scripts/build_codex_agents.mjs — do not edit.
2
+ name = "uat-runner"
3
+ description = "Executes one esoul-uat chapter (or another scripted browser scenario set) in the UAT Chrome and records results with evidence. Use for the run step of esoul-uat so screenshots and page snapshots stay out of the orchestrator's context; failure analysis and bug triage stay with the orchestrator."
4
+ model = "gpt-6.1-terra"
5
+ model_reasoning_effort = "medium"
6
+ developer_instructions = '''
7
+ You run user acceptance scenarios as an end user for an orchestrating agent. Only your final message reaches it; the detailed results go into the run directory.
8
+
9
+ Rules:
10
+ - Follow the `esoul-uat` skill's execution rules and the chapter file in the brief: the dedicated UAT Chrome profile, the role accounts by role code, and the run directory. Never ask for or print passwords; never change data beyond what a scenario requires; stop and report before any irreversible step the scenario does not describe.
11
+ - Record each scenario with `uat.mjs` as the skill describes: `pass` only when every expected result was observed, otherwise the non-pass status the skill defines with the step, the actual result and the screenshot path.
12
+ - The statuses and the optional Google Doc bridge are as in `esoul-uat` `references/execution.md` and `references/gdoc.md`; write step results to the bridge with `gdoc.mjs result … --if-configured`. A failed Doc write does not stop the run; report it in the final message.
13
+ - Do not diagnose code or write bugs; describe what you observed precisely enough that the orchestrator can.
14
+
15
+ Answer format, unless the brief specifies another format: totals per status, then one line per non-pass scenario (`ID · status · step · actual result · screenshot`), then anything that blocked the run.
16
+ '''
@@ -0,0 +1,11 @@
1
+ # Snippet for ~/.codex/config.toml. Merge by hand; codex/install.mjs never touches that file.
2
+ # If a key or the [agents] table already exists there, edit it instead of duplicating it.
3
+
4
+ model = "gpt-6.1-sol"
5
+ model_reasoning_effort = "medium" # raise per task: high, xhigh
6
+ model_auto_compact_token_limit = 250000
7
+
8
+ [agents]
9
+ max_concurrent_threads_per_session = 4
10
+ default_subagent_model = "gpt-6.1-terra"
11
+ default_subagent_reasoning_effort = "medium"
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env node
2
+ // Installs the eSoul Codex agents and rules into ${CODEX_HOME:-~/.codex}.
3
+ // Usage: node codex/install.mjs [--dry-run]
4
+ // Copies codex/agents/*.toml (overwrite), removes installed generated agents that no longer
5
+ // exist in codex/agents, and inserts or replaces the marked block of codex/AGENTS.md in
6
+ // AGENTS.md. Text outside the markers and config.toml are never touched.
7
+ import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
8
+ import { homedir } from 'node:os';
9
+ import { join } from 'node:path';
10
+ import { fileURLToPath } from 'node:url';
11
+
12
+ const here = fileURLToPath(new URL('.', import.meta.url));
13
+ const dryRun = process.argv.includes('--dry-run');
14
+ const home = process.env.CODEX_HOME || join(homedir(), '.codex');
15
+ const BEGIN = '<!-- esoul-skills:begin -->';
16
+ const END = '<!-- esoul-skills:end -->';
17
+
18
+ const block = readFileSync(join(here, 'AGENTS.md'), 'utf8').trim();
19
+ const target = join(home, 'AGENTS.md');
20
+ const current = existsSync(target) ? readFileSync(target, 'utf8') : '';
21
+ const count = (marker) => current.split(marker).length - 1;
22
+ const start = current.indexOf(BEGIN);
23
+ const end = current.indexOf(END);
24
+ // Validate before changing anything, so a failed install leaves no half-installed state.
25
+ if (count(BEGIN) > 1 || count(END) > 1 || (count(BEGIN) !== count(END)) || (start !== -1 && end < start)) {
26
+ console.error(`${target} has unpaired or duplicated esoul-skills markers; fix it by hand and run again.`);
27
+ process.exit(1);
28
+ }
29
+ const next = start !== -1
30
+ ? current.slice(0, start) + block + current.slice(end + END.length)
31
+ : current.trim() ? `${current.replace(/\s*$/, '')}\n\n${block}\n` : `${block}\n`;
32
+
33
+ const agentsOut = join(home, 'agents');
34
+ if (!dryRun) {
35
+ mkdirSync(agentsOut, { recursive: true });
36
+ }
37
+ const agents = readdirSync(join(here, 'agents')).filter((f) => f.endsWith('.toml') && !f.startsWith('.')).sort();
38
+ for (const file of agents) {
39
+ if (!dryRun) {
40
+ copyFileSync(join(here, 'agents', file), join(agentsOut, file));
41
+ }
42
+ console.log(`${dryRun ? 'would copy' : 'copied'} ${file} -> ${agentsOut}`);
43
+ }
44
+
45
+ // Remove agents installed earlier from this generator whose source disappeared.
46
+ const GENERATED = '# Generated from agents/';
47
+ for (const file of existsSync(agentsOut) ? readdirSync(agentsOut).filter((f) => f.endsWith('.toml') && !agents.includes(f)) : []) {
48
+ if (readFileSync(join(agentsOut, file), 'utf8').startsWith(GENERATED)) {
49
+ if (!dryRun) {
50
+ unlinkSync(join(agentsOut, file));
51
+ }
52
+ console.log(`${dryRun ? 'would remove' : 'removed'} stale ${file} from ${agentsOut}`);
53
+ }
54
+ }
55
+
56
+ if (next === current) {
57
+ console.log(`${target} already up to date`);
58
+ } else {
59
+ if (!dryRun) {
60
+ mkdirSync(home, { recursive: true });
61
+ // Write next to the target and rename, so an interrupted write never truncates it.
62
+ const temp = `${target}.${process.pid}.tmp`;
63
+ writeFileSync(temp, next);
64
+ renameSync(temp, target);
65
+ }
66
+ console.log(`${dryRun ? 'would update' : 'updated'} ${target}`);
67
+ }
68
+ console.log(`\nMerge the settings by hand into ${join(home, 'config.toml')}: ${join(here, 'config.toml')}`);