{
  "markdown": "# agrimap-agent-skills\n\nOfficial AgriMap engineering skill package by Billy. Each of the 16 `agm-*` skills owns one operation. The `agrimap-agent-skills` umbrella is a routing-only selector and never executes an operation or acts as a fallback workflow.\n\nแพ็กเกจรวม dedicated skills สำหรับ analysis, diagnosis, simulation, planning, design, architecture, review, FE/BE/SQL refactor, QA, unit tests, feature creation, prompt delegation, execution และ history โดยแยก trigger/workflow ต่อ operation.\n\n## Design\n\n```text\nskills/agrimap-agent-skills/       routing-only skill + shared resources/scripts\n              │\n              ├── compact runtime core + generated operation entrypoints\n              ├── Codex plugin skills ($agrimap-agent-skills, $agm-*)\n              ├── Claude plugin skills (/agrimap-agent-skills:agm-*)\n              └── Gemini extension commands (/agm-*) + routing skill\n\nproject/.agrimap-agent/            execution memory, daily logs, tracked tasks, raw history, Prompt Results, reports\nproject/.agrimap-agent/runtime/    ignored per-session identity + active tasks + hook refresh state\n```\n\n### Authored source and generated plugin mirror\n\n- Author and review the routing skill, shared references, assets, and scripts only under `skills/agrimap-agent-skills/`.\n- `plugins/agrimap-agent-skills/skills/agrimap-agent-skills/` is a generated byte-for-byte mirror of the routing skill and shared resources. Never edit that mirror directly.\n- `.rgignore` excludes that byte-for-byte mirror from default repo-wide `rg` searches, so authored content appears once. Use `rg --no-ignore` only when explicitly auditing generated copies; validation still compares every mirrored byte.\n- `config/operations.json` owns each dedicated skill's compact inputs, mode, instructions, and reference route. `npm run sync` generates `references/operation-index.md`, `references/operations/*.md`, Codex/Claude operation skills, and Gemini commands from it.\n- `plugins/agrimap-agent-skills/skills/agm-*` read exactly `lifecycle-core.md` plus their one generated operation contract. The glossary and technical references load only when that contract/depth requires them.\n- This repository is detected as `skill-package` from its manifest, operation registry, and lifecycle source. Package/meta work edits canonical package surfaces and never creates root FE/BE/SQL product artifacts unless the requester explicitly authorizes an exact fixture/example path.\n- Run `npm run sync` after every canonical or operation change. Normal package tests and validation reject mirror drift.\n\nThe package does not import legacy `.agm` governance and does not create an extra permission layer. Platform permissions remain authoritative. Preserved legacy code samples are compatibility evidence only and are hash-verified.\n\n## Requirements\n\n- Git\n- Node.js 20 or newer for hooks and workspace/index scripts\n- one supported host: Codex, Claude Code, or Gemini CLI\n\nRepository: [gasxhermvc/agrimap-agent-skills](https://github.com/gasxhermvc/agrimap-agent-skills)\n\nUsage guide: [docs/USAGE.md](docs/USAGE.md) — provider syntax, activation proof, all operation examples, large text, images, attachments, and pointed files/lines.\n\n## Install for Codex\n\n```powershell\ncodex plugin marketplace add gasxhermvc/agrimap-agent-skills\ncodex plugin add agrimap-agent-skills@agrimap-agent-skills\n```\n\nStart a new Codex session after installation. In Codex CLI, `/plugins` can also browse and install the plugin after the marketplace is added. Invoke `$agrimap-agent-skills` only to choose an operation; invoke a domain alias such as `$agm-be action=create` to execute it.\n\nLocal repository testing:\n\n```powershell\ncodex plugin marketplace add .\ncodex plugin add agrimap-agent-skills@agrimap-agent-skills\n```\n\n## Install for Claude Code\n\nFrom a terminal:\n\n```powershell\nclaude plugin marketplace add gasxhermvc/agrimap-agent-skills\nclaude plugin install agrimap-agent-skills@agrimap-agent-skills\n```\n\nOr run the equivalent `/plugin marketplace add` and `/plugin install` commands inside Claude Code. Installed skill names are namespaced, for example:\n\n```text\n/agrimap-agent-skills:agrimap-agent-skills\n/agrimap-agent-skills:agm-be action=create\n/agrimap-agent-skills:agm-prompt\n```\n\nLocal validation and installation:\n\n```powershell\nclaude plugin validate .\nclaude plugin marketplace add .\nclaude plugin install agrimap-agent-skills@agrimap-agent-skills\n```\n\n## Install for Gemini CLI\n\nRun from the terminal, not from Gemini's interactive prompt:\n\n```powershell\ngemini extensions install https://github.com/gasxhermvc/agrimap-agent-skills\n```\n\nRestart Gemini CLI after installation. Invoke `/agm-be action=create`, `/agm-plan`, or another generated command. For local development:\n\n```powershell\ngemini extensions link .\n```\n\n### How Gemini loads bundled references\n\nGemini sandboxes its file tools to the workspace root, so a globally installed extension cannot let the model read its own bundled contract and reference files. The extension therefore ships a read-only stdio MCP server (`skills/agrimap-agent-skills/scripts/mcp-server.mjs`) declared in `gemini-extension.json` under `mcpServers.agrimap`. Gemini launches it once at startup as a subprocess, resolving `${extensionPath}` to the install directory, and every generated `/agm-*` command loads its `lifecycle-core.md`, operation entrypoint, and conditional references by calling the `read_reference` tool (exposed as `mcp_agrimap_read_reference`). The model keeps reading your project files with its normal, workspace-scoped file tools. Requirements: `node` on `PATH` (the same dependency the hooks already use). The server is read-only, stateless, and runs as one isolated subprocess per Gemini instance — using stdio rather than a fixed port — so opening several projects at once never collides. Codex and Claude are unaffected: they resolve the same references through their own plugin host, not this server.\n\n## Provider hook isolation\n\nProvider identity is host-specific: Codex selects `plugins/agrimap-agent-skills/hooks/codex-hooks.json`, Claude selects `claude-hooks.json`, and Gemini alone uses the repository-root `hooks/hooks.json`. The shared Codex/Claude plugin root must not contain a default `hooks/hooks.json`, because both hosts can auto-discover it. Release `0.1.7` makes SQLFluff the cosmetic-layout owner and requires complete changed-file coverage; reinstall/sync it before retesting so hosts do not retain an older cached alias.\n\nThe plugin hooks are installed globally but non-candidates inspect only activation inputs (Git root/origin name, activation config, explicit prompt syntax, and the session active-task marker); they inject no context, read no identity or memory, and write no state. Generated skill bodies apply the same boundary before loading AgriMap lifecycle references, covering implicit model selection as well as hooks. Activation requires the Git root/remote name to match an AgriMap project, the current prompt to explicitly invoke a registered alias using provider-native syntax, the session to have an active tracked task, or `.agrimap-agent/config.json` to set `activation.auto` to `true`. Recognized one-repository/one-project names are `agmwa-<letters-and-hyphens>-ng`, `agmws-<letters-and-hyphens>-netcore`, `agmbo-<letters-and-hyphens>-netcore`, `agrimap-<letters-and-hyphens>`, and `AgriMap.<dot-separated-letters>`. Digits, underscores, arbitrary `agm-*` text, and `.agrimap-agent` directory existence alone do not activate the hook.\n\nFor an active candidate without an explicit alias or active task, narrow task-mode detection adds an operation gate only when Primary SQL product intent is present: an SQL action plus a strong SQL target such as a `.sql` path or stored procedure. It requires the dedicated `agm-sql` operation before inspection or writes but grants no write authority. Mentions of `agm-sql`, skills, hooks, plugins, packages, or routing are meta intent and do not trigger product SQL routing.\n\nGemini may show its native consent prompt when activating a skill or fingerprinting a hook. The package does not add a second approval gate.\n\n## Workflow depth and first tracked use\n\nEach operation declares default and allowed workflow depths in `config/operations.json`. Every started execution persists requester attribution plus concise current/recent memory and daily JSONL audit evidence. `light` creates **no `tasks/**` artifacts**. `standard|regulated` use `tasks/YYYY-MM/<ddHHmmss>/` and complete exactly `brief.md`, `analysis.md`, `checklists.md`, `qa.md`, and `result.md` by phase. The selector and lifecycle rules live in [`lifecycle-core.md`](skills/agrimap-agent-skills/references/lifecycle-core.md).\n\nOn the first `standard` or `regulated` interaction, the Leader resolves who is requesting the work. In a multi-person project there is no shared `owner.json`.\n\nRequester identity and decision authority are separate. Every `standard`/`regulated` task records requester authority (`owner|delegated|requester-only|unknown`), the decision owner, and authority evidence; a requester without owner/delegated authority cannot approve a material trade-off. Normative terms live in [`glossary.md`](skills/agrimap-agent-skills/references/glossary.md).\n\n- ignored live identity: `.agrimap-agent/runtime/sessions/<session-id>.json`, confirmed for a bounded window (24 hours by default)\n- ignored active task: `.agrimap-agent/runtime/active/<session-id>.json`\n- tracked attribution: who requested what in tracked briefs (when applicable) and versioned daily JSONL events with exact UTC timestamps\n- execution attribution: actual `model`, optional configurable `modelLabel`, `role`, `agent`, and `provider` are separate; `requestedBy` remains the human\n- change context: schema-v4 daily events use snake_case, separate `execution_id` from nullable light `task_id`, and record workflow depth, log type, canonical milestones, and Git snapshot fields\n\nThis is workflow attribution, not proof of the physical editor or commit author. Use `$agm-history` for requester/executor/task chronology and Git log/blame separately for actual commit authorship. `recordedFiles` contains only valid versioned non-terminal claims; any `legacyClaimedFiles` are diagnostic and are not promoted into that attribution. Check `auditStorage` before relying on the result across machines: ignored or untracked logs are local-only. JSONL is not cryptographically tamper-evident; use an external immutable audit system if that threat model applies.\n\nIf any activated operation lacks a confirmed human, the hook instructs the agent to resolve that identity before task start. The hook never copies the requester from the latest shared log.\n\nManual bootstrap or diagnostics:\n\n```powershell\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\agm-workspace.mjs init --cwd .\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\agm-workspace.mjs identify --cwd . --session <session-id> --requested-by \"Billy\" --model-label \"GPT-5.6-sol\" --model \"<host-reported-model>\" --role leader --agent primary --provider codex\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\agm-workspace.mjs start --cwd . --session <session-id> --depth light --operation prompt --title \"Prepare shared-table Prompt Result\" --requester-authority owner --decision-owner \"Billy\" --authority-evidence \"confirmed in this session\"\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\agm-workspace.mjs checkpoint --cwd . --session <session-id> --execution <ddHHmmss> --milestone acceptance-slice --summary \"Shared table slice completed\" --files \"src/a.ts,src/b.ts\" --verification \"typecheck passed\"\n```\n\nProject policy decides which durable `.agrimap-agent/` evidence is tracked. Raw requester submits without AI answers append to `prompts/YYYY-MM/<conversation>/history.md`; immutable Prompt Results use `prompts/YYYY-MM/<conversation>/<context>-vNNN.md`; execution-generated role instructions live in `instructions/`. Never commit `.agrimap-agent/runtime` or `.agrimap-agent/cache`.\n\n## Operations\n\n| Alias | Purpose |\n| --- | --- |\n| `agm-analyze` | cross-discipline evidence-led analysis |\n| `agm-design` | unified FE/BE/SQL/architecture design, product-read-only |\n| `agm-fe` | frontend analyze/design/create/edit/refactor/test actions |\n| `agm-be` | backend analyze/design/create/edit/refactor/test actions |\n| `agm-sql` | SQL analyze/design/create/edit/refactor/explain actions |\n| `agm-diagnose` | evidence-led root cause |\n| `agm-simulate` | scenarios, risks, transitions, observables |\n| `agm-plan` | reverse-engineered execution plan |\n| `agm-architect` | boundaries, contracts, migration |\n| `agm-review` | evidence-backed findings |\n| `agm-history` | read-only requester/task history by person, date, task, or event |\n| `agm-qa` | product-read-only QA; direct `light` by default, tracked only when regulated |\n| `agm-prompt` | light/artifactless immutable Prompt Result V1→VN with explicit Main/Subagent ownership |\n| `agm-exec` | execute one decision-owner-approved prompt under task/QA rails |\n\nRemoved aliases `agm-create-feature`, `agm-create-unit-test`, `agm-create-prompt`, `agm-refactor`, and `agm-refactor-fe|be|sql` are not distributed. Use `agm-prompt`, domain `action=refactor`, and the embedded unit-test decision capability. Historical log/task operation strings remain readable.\n\nPassive capabilities are embedded supporting skills that automatically contribute knowledge, disciplines, checks, and decision criteria to the active operation/action. They support both product-read-only and already-authorized product-write work; they do not replace the active context or independently create write intent. The mandatory Goal Rules—Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution—are one such capability. Routing is machine-readable in [`passive-skill-map.json`](skills/agrimap-agent-skills/assets/passive-skill-map.json). FE/BE work involving domain concatenation, redirects, or callbacks must select exact values from the authoritative [`application-url-matrix.md`](skills/agrimap-agent-skills/references/application-url-matrix.md), never generic fallback concatenation.\n\nAudit examples:\n\n```powershell\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\agm-workspace.mjs history --cwd . --from 2026-07-01 --to 2026-07-15\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\agm-workspace.mjs history --cwd . --requester Billy --days 5\n```\n\nLogs supply workflow chronology; each result distinguishes requester, executor, claimed files, Git context, and storage durability, and points to brief/result/QA/current/recent artifacts. Bare dates use UTC. Invalid versioned records are reported but excluded from evidence.\n\nFor backend creation/testing, use `target_kind=be-main` with required `backend_profile=agmws|agmbo`. These profiles are not target kinds; no generic or fallback profile exists. `be-library` does not use `backend_profile`.\n\n## Front-end Engineer discipline\n\nThe embedded supporting discipline is automatically composed with every FE analysis, design, architecture, feature, refactor, review, test, QA, and prompt task. It augments the selected action and has no separate command. Every FE task classifies `fe-main` or `fe-library` and one phase:\n\n- `foundation`: structure, tokens, config, development infrastructure, Core/CodeBase/SharedComponent;\n- `active-development`: reuse discovery, consistency, consumer impact, technical-debt containment for multi-developer delivery;\n- `stabilization`: flow completion, bugs, quality, bounded refactor, platform security checks, and deploy confidence.\n\nBefore creating a reusable function/component/service/directive/pipe/token/config, search code and `.agrimap-agent/knowledge/frontend-reuse.jsonl`. Prefer exact reuse, safe extension, or composition. Do not force reuse into an option-heavy abstraction.\n\n```powershell\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\frontend-reuse-index.mjs scan --cwd . --paths src,projects,libs --by \"Billy\"\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\frontend-reuse-index.mjs search --cwd . --query \"table pagination\"\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\frontend-reuse-index.mjs deprecate --cwd . --id \"component:src/path#Symbol\" --replacement \"component:src/new-path#Symbol\" --by \"Billy\"\nnode <installed-package>\\skills\\agrimap-agent-skills\\scripts\\frontend-reuse-index.mjs validate --cwd .\n```\n\nScanner results start as `discovered`. The Leader inspects suitability and promotes an entry to `verified` with `upsert`; no embedding/vector service is required in v1.\n\n## Back-end Engineer discipline\n\nThe embedded supporting discipline is automatically composed with every BE task, augments the selected action, and has no separate command. It requires:\n\n- `target_kind=be-main|be-library`;\n- `backend_profile=agmws|agmbo` only for `be-main`;\n- `phase=foundation|active-development|stabilization`.\n\nThere is no Type A/B/C and no required `change_kind`. `agmws` is the web host flow `Presentation -> Application/UseCase -> Domain -> Port -> Infrastructure -> response`. `agmbo` has no Presentation tier and starts from `Quartz/JobScheduler -> Application/UseCase -> Domain -> Port -> Infrastructure`; `Infrastructure/Jobs/JobScheduler.cs` contains scheduling concerns, never business logic.\n\nFor both `be-main` and `be-library`, request/header/cookie/query/form/body work conditionally loads the curated `013-1-extensions-request-value-normalize.md` contract. Analysis and diagnosis inventory inconsistent direct access; refactor preserves precedence, blank/null/trim, multi-value and body-buffering behavior; QA reruns representative sources. The extensions are static and add no DI registration.\n\nFoundation reuses `agrimap.platform` before creating Core infrastructure. Active development analyzes the existing Domain first and completes the smallest vertical slice. Stabilization emphasizes regression safety, production configuration, deployment, existing vulnerability checks, and bounded refactor.\n\n## SQL discipline\n\nFor new SQL artifacts, the normalized AgriMap golden contract outranks a project's inconsistent folder, naming, type, and comment conventions. Existing deployed schema and caller behavior remain compatibility facts and must not be broken silently.\n\n- `action=edit|refactor` requires an exact existing target; a missing target stops `SQL_EDIT_TARGET_NOT_FOUND` and never becomes create.\n- Every new artifact requires `output_owner=product|owner-reference|knowledge-draft`; unresolved ownership stops `SQL_OUTPUT_OWNER_REQUIRED`, and a missing directory is not create authority.\n- With `output_owner=product`, write one SQL object per file under `sql/<GROUP_OR_DOMAIN>/table/<TABLE>.sql` or `sql/<GROUP_OR_DOMAIN>/procedure/<PROCEDURE>.sql`.\n- Owner-provided or explicitly approved DDL references belong under `.agrimap-agent/knowledge/references/db-schema/`. Tentative AI-generated SQL belongs under `.agrimap-agent/knowledge/drafts/sql/` and is never schema `FACT` or deployable output without separate promotion approval.\n- Any target that reads or writes data through a stored procedure, view, table, or inline SQL loads [`db-schema-context.md`](skills/agrimap-agent-skills/references/db-schema-context.md) first. It resolves owner DDL by object name, requires the tables and `LUT_*` lookups one hop past each procedure, traces a failing call from mapped error code through `THROW` and its `Validate ...` gate down to the column the predicate assumes, and reports `db-schema: <loaded>/<expected>`. Missing schema is a named `UNKNOWN` for the owner, never an inferred table, column, type, key, or constraint, and never a reason to connect to a database.\n- Write guarded message inserts only to `sql/<GROUP_OR_DOMAIN>/messages.sql`, targeting `LUT_APP_MESSAGES (ID, DESCR)` with `IF NOT EXISTS`.\n- Lookup tables use an `INT` key and `NAME NVARCHAR(255)`; general tables use a `NUMERIC(38,0)` key.\n- Every created or edited stored procedure uses `CREATE OR ALTER PROCEDURE`; standalone `CREATE PROCEDURE`, `ALTER PROCEDURE`, `CREATE PROC`, and `ALTER PROC` fail validation. Raw-immutable golden evidence is not rewritten, so writers normalize its declaration when producing output.\n- Stored procedures use `_I`, `_U`, `_D`, `_Q`, or `_CHECK_Q` according to their operation.\n- Stored procedures mark validation gates, transaction boundaries, numbered business steps, and `PO_*` returns with canonical three-line section comments.\n\nPlugin installation does not install Python packages. SQL writers draft for semantics, not cosmetic indentation/alignment, then run direct `sqlfluff format --exclude-rules \"CP02, LT01, RF06\" --dialect tsql <FILE>.sql` (or the approved-folder form ending in `.`) without a version probe. Only command-not-found triggers `install-sqlfluff.mjs`. Handoff requires `formatted N/N` for every changed `.sql` path and validation of the identical set. Temporary probes use OS temp with guaranteed cleanup, never the workspace. QA never installs or runs SQLFluff.\n\n## Model labels and prompt generation\n\nThe default capability matrix preserves configurable model labels. Claude reasoning/review uses labels `fable` (displayed as Fable 5) or `opus4.8`; `fable` is also the hard-executor label, while standard/light execution uses `sonnet5`, `sonnet4.6`, or `haiku4.5`. Codex reasoning/review uses label `GPT-5.6-sol`; execution uses labels `gpt-5.6-sol`, `gpt-5.4`, or `gpt-5.4-mini`. Gemini uses `gemini-cli-default`. None of these labels proves that the current host exposes a model with that name.\n\nThese are decision-owner/project-editable routing labels, not actual-model claims. At dispatch, resolve the label against models available on the active host and record both `modelLabel` and the actual host-reported `model`; do not silently present a configured label as the running model. Override labels in `.agrimap-agent/model-capability-matrix.yaml` or the generated prompt without weakening the workflow contract.\n\nProvider/model capability changes assignment capacity only. Fable 5, Codex, Gemini, or any reasoning-heavy profile receives the same workflow depth, QA mode, tool allowlist, and acceptance rules; a stronger model never upgrades itself to full QA.\n\nA decision-owner-approved generated prompt is the execution SoT for exactly one task. It keeps the problem, end state, evidence, authorized decisions, file/contract ownership, ordered steps, verification, deviation policy, and Result Package together. Plain language is preferred; missing contracts are not.\n\n## QA separation and task closure\n\n`agm-qa` defaults to direct `depth=light qa_mode=light`. Tracked regulated work uses a separate verifier and `qa.md`; `standard` completion uses proportional writer verification and records QA as not applicable. Full QA is selected only by the exact triggers in [`qa-and-done.md`](skills/agrimap-agent-skills/references/qa-and-done.md), never merely by provider/model, target kind, data-related code, or diff size.\n\nBoth tracked depths remain schema-validated. `regulated` requires QA evidence/identity; `standard` writes `qa.md` as `not-applicable` with its proportional verification reason. Commit/publish/release boundaries require regulated depth and full QA.\n\nQA never connects to LocalDB/dbserver/SQL Server or runs product test utilities. Executable validation is limited to AgriMap skill scripts, a necessary `dotnet build` for an existing BE project, and—only at full FE QA when startup evidence is explicitly necessary—`npm run start:agrimap:development`.\n\nThe task-artifact contract below is generated from `skills/agrimap-agent-skills/assets/task-artifact-schema.json`; edit the schema and templates, then run `npm run sync` instead of editing this table.\n\n<!-- BEGIN GENERATED TASK ARTIFACT SCHEMA -->\n<!-- Generated by npm run sync from skills/agrimap-agent-skills/assets/task-artifact-schema.json. -->\n| Artifact | Write phase / owner | Required depths | Template | Purpose | Required fields | Required sections |\n| --- | --- | --- | --- | --- | --- | --- |\n| `brief.md` | `contract`<br>the leader starting a standard/regulated execution; agm-prompt is artifactless | `standard`<br>`regulated` | `task-brief.md` | Requester, authority, execution identity, objective, scope, ownership, and decisions. | `Task ID`<br>`Requested by`<br>`Identity source`<br>`Requester authority`<br>`Decision owner`<br>`Authority evidence`<br>`Model label`<br>`Actual model`<br>`Role`<br>`Agent`<br>`Provider`<br>`Operation`<br>`Workflow depth`<br>`Objective`<br>`Scope`<br>`Non-goals` | `File and logical-contract ownership`<br>`Inputs`<br>`Authorized decisions and trade-offs`<br>`Service ownership references`<br>`Concerns` |\n| `analysis.md` | `contract`<br>leader or executor after target inspection and before implementation completion | `standard`<br>`regulated` | `analysis.md` | Evidence-backed current state, findings, impact, and approved approach for tracked work. | — | `Current State`<br>`Findings`<br>`Proposed Approach` |\n| `checklists.md` | `contract`<br>the tracked execution leader initializes acceptance items; executor and leader update status | `standard`<br>`regulated` | `checklists.md` | Checked completion ledger derived from the task contract. | — | — |\n| `qa.md` | `verification`<br>agm-qa after implementation evidence exists | `standard`<br>`regulated` | `qa.md` | Tracked QA evidence under the canonical product-read-only verifier contract. | `Status`<br>`QA mode`<br>`QA mode reason`<br>`Coverage key`<br>`Light sequence`<br>`Patterns`<br>`Requested by`<br>`Decision owner`<br>`QA model label`<br>`QA actual model`<br>`QA role`<br>`QA agent`<br>`QA provider`<br>`Product artifacts modified`<br>`Workflow artifacts written`<br>`Implementation model label`<br>`Implementation actual model`<br>`Implementation role`<br>`Implementation agent`<br>`Implementation provider` | `Requirement evidence`<br>`Commands and observed results`<br>`Limitations` |\n| `result.md` | `closure`<br>leader after implementation, verification, and applicable QA | `standard`<br>`regulated` | `result.md` | Leader closure result, QA boundary, verification, memory, and outstanding work. | `Outcome`<br>`Requested by`<br>`Decision owner`<br>`Leader model label`<br>`Leader actual model`<br>`Leader role`<br>`Leader agent`<br>`Leader provider`<br>`Workflow depth`<br>`QA status`<br>`QA mode`<br>`Delivery boundary` | `Authorized decisions`<br>`Changes and verification`<br>`Checklist and memory`<br>`Concerns and commit boundary`<br>`Outstanding items` |\n\nCompletion cross-artifact gates:\n\n- Depths `light` create no task directory or task artifacts.\n- Tracked start scaffolds only `brief.md`<br>`checklists.md`; `analysis.md`, `qa.md`, and `result.md` are phase-owned completion artifacts.\n- Standard completion writes `qa.md` with status `not-applicable` and records result QA status/mode as `not-applicable`.\n- Regulated accepted QA statuses: `passed`<br>`not-applicable`.\n- At regulated depth, `Requested by` and `Decision owner` match across brief, QA, and result.\n- Regulated QA identity (`QA actual model`<br>`QA agent`<br>`QA provider`) must differ from implementation identity (`Implementation actual model`<br>`Implementation agent`<br>`Implementation provider`).\n- Delivery boundaries `commit`<br>`publish`<br>`release` require regulated depth and `QA mode: full`.\n- A regulated full run records `Light sequence: 0`; light runs may record only `1`<br>`2`.\n\nFull QA is mandatory when any schema trigger applies:\n\n1. commit, publish, or release boundary\n2. same-task full re-QA after a qa-finding\n3. third consecutive passed-light tracked closure for the same coverage key\n4. explicit requester request for qa_mode=full or highest verification\n<!-- END GENERATED TASK ARTIFACT SCHEMA -->\n\n## State and log location\n\nThe global installation is stateless. On real work, both logs and memory are written to the project currently being changed: `<target-project>/.agrimap-agent/`. The Skill/plugin installation directory is never a state destination.\n\nThis repository is the Skill's development source, so its entire `.agrimap-agent/` is local-only and ignored by Git. Repository-local `AGENTS.md` wording remains local, while the package's target-project hook independently enforces the same conversation-scoped raw-history format. Raw history, versioned Prompt Results, generated instructions, task results, reports, memory, and concise logs retain distinct ownership.\n\nAI Gateway storage is not part of v1.\n\n## Service ownership source of trust\n\nUse `.agrimap-agent/knowledge/service-ownership.yaml` as the only project service/data ownership map. Analyses, prompts, decisions, and memory point to its `service_id` entries instead of copying another map. Claims are `confirmed`, `tentative`, `unknown`, or `deprecated`; only confirmed, current evidence may drive a hard ownership decision.\n\nThe package initializes an empty canonical file and intentionally does not promote the Fable service inventory with many TBD values. Migrate each useful entry after evidence review.\n\n## Delegation and sandbox integration\n\nThe Leader must define `workspace_need` and verify whether executors share a workspace, use visible worktrees, or run in isolated sandboxes. A branch name alone is never accepted as proof that another agent's work can be integrated.\n\n- one file and one logical contract have one writer model per integration wave;\n- shared registration/export/route/DI/schema files belong to one executor or the Leader;\n- overlapping work is combined or executed sequentially;\n- isolated work returns a visible commit SHA, portable patch, or complete changed artifacts;\n- the Leader integrates, invokes the canonical QA contract, and synthesizes evidence, so neither requester nor decision owner is left to collect agent fragments.\n\nEvery delegation prompt states isolation need, requested mode, base ref/commit, provider instruction, visibility check, integration return, and fallback. Claude Code can use custom subagent `isolation: worktree` when the installed version supports it; Codex managed worktrees are surface-dependent. Unsupported or unknown modes use only the named shared/sequential fallback. Uncommitted parent changes are never assumed visible in an isolated worktree.\n\nCurrent Codex releases enable subagent workflows by default and surface activity in the app, CLI, and IDE. Before spawning, the Leader announces a descriptive label, bounded task, expected output, and inspection path for every agent. In the app, open the agent thread; in CLI use `/agent`; in the IDE expand the background-agent panel. The Leader must continue safe work or report `running|completed|blocked` status at least every 60 seconds—an unexplained 5–7 minute “Waiting for subagent…” loop is invalid. Native threads are primary; runtime progress JSONL is fallback-only and records start, meaningful phase/status transitions, and finish/block—not every step or tool call.\n\n## License status\n\nNo license is committed yet. MIT is the recommended license for the skill engine and newly authored documentation, but preserved golden examples must first be confirmed as publishable by their rights holder or sanitized/excluded. A public repository without a license is visible but does not grant general reuse rights.\n\n## Remaining pattern-example gaps\n\nThe package deliberately does not invent company conventions. Current collections are usable; only targeted gaps should be requested when they can change the active task:\n\nThe current FE-library architecture, naming, generated API, environment, Playground, and smoke-test baseline are already usable `current` guidance. Only the narrower gaps below retain `missing-owner-example` until decision-owner evidence is added.\n\n- FE library minor/major semver triggers and richer assertions beyond smoke coverage;\n- BE main repository/domain/response choices where neighboring code conflicts, plus representative tests;\n- `agmbo` scheduler/retry/concurrency examples and run commands;\n- BE library compatibility cases and representative tests beyond Playground/smoke paths;\n- project-specific SQL relationship, deployed-behavior, and test conventions that the normalized golden contract does not define.\n\nSee `skills/agrimap-agent-skills/references/patterns/owner-example-intake.md` for the exact files, symbols, naming, comments, and commands to provide. Raw examples stay immutable; annotation and status live separately.\n\n## Maintain and release\n\n```powershell\nnpm run sync\nnpm test\nnpm run validate\n```\n\nToken/read coverage can be audited independently from product-code tests:\n\n```powershell\n# Every generated operation baseline plus curated FE/BE/QA/golden scenarios\nnpm run audit:tokens\n\n# One scenario with every counted file\nnpm run audit:tokens -- --scenario qa-fe-main-golden-regulated --details\n\n# CI mode: exit 1 on a missing route/reference or exceeded budget\nnpm run audit:tokens -- --scenario router-only --json\nnpm run audit:tokens:strict\n\n# ทดสอบตัว audit โดยเฉพาะ\nnpm run test:token-coverage\n```\n\nThe audit reports direct alias preload, cumulative `Load now`, and the complete selected scenario as words, characters, and an estimated token range. Estimates use 3–4 characters per token because Codex, Claude, and Gemini tokenizers differ. Scenario definitions and budgets live in `skills/agrimap-agent-skills/assets/token-coverage-scenarios.json`; use `--json` for machine-readable evidence.\n\n`package.json` is the only package-version source of truth. `npm run sync` propagates that version to the Codex manifest, Claude manifest/marketplace, and Gemini manifest while rebuilding the operation index, compact operation entrypoints, routing-skill mirror, dedicated aliases, and provider adapters from the canonical runtime core plus `config/operations.json`. Never edit generated routing indexes, operation entrypoints, plugin mirrors, alias skills, Gemini command files, or generated manifest versions directly. Before a public release, resolve the golden-example rights/license decision, update `package.json`, add the release entry to `CHANGELOG.md`, then rerun sync, tests, and validation.\n\nOfficial format references: [Codex plugins](https://developers.openai.com/codex/build-plugins), [Codex subagents](https://learn.chatgpt.com/docs/agent-configuration/subagents), [Claude plugin marketplaces](https://code.claude.com/docs/en/plugin-marketplaces), and [Gemini extensions](https://geminicli.com/docs/extensions/reference/).\n",
  "bytes": 34548,
  "sha": "638e7328936461966c5ec285bd1100876708da0270e12f169611b4f7c6080761",
  "repo_slug": "orchex006/agrimap-agent-skills",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_orchex006_agrimap_agent_skills_9b399c0e/readme"
}