diff --git a/.agents/skills/webcpp-openspec-proposal/SKILL.md b/.agents/skills/webcpp-openspec-proposal/SKILL.md index ed4a740..103fd29 100644 --- a/.agents/skills/webcpp-openspec-proposal/SKILL.md +++ b/.agents/skills/webcpp-openspec-proposal/SKILL.md @@ -1,6 +1,6 @@ --- name: webcpp-openspec-proposal -description: Write or review a webcpp proposal: a library genesis, a change to a library, or an organization change, with its metadata, statuses and checks. +description: "Write or review a webcpp proposal: a library genesis, a change to a library, or an organization change, with its metadata, statuses and checks." --- # Writing a webcpp proposal diff --git a/.agents/skills/webcpp-reference-status/SKILL.md b/.agents/skills/webcpp-reference-status/SKILL.md index 9f7b3ba..fbdd27c 100644 --- a/.agents/skills/webcpp-reference-status/SKILL.md +++ b/.agents/skills/webcpp-reference-status/SKILL.md @@ -1,6 +1,6 @@ --- name: webcpp-reference-status -description: Prepare or read a proposal's reference/ directory (plan, source, STATUS.md), report task progress, or resume an interrupted implementation. +description: "Prepare or read a proposal's reference/ directory (plan, source, STATUS.md), report task progress, or resume an interrupted implementation." --- # reference/ and STATUS.md diff --git a/.agents/skills/webcpp-text-and-commits/SKILL.md b/.agents/skills/webcpp-text-and-commits/SKILL.md index fc4548a..e61f4e1 100644 --- a/.agents/skills/webcpp-text-and-commits/SKILL.md +++ b/.agents/skills/webcpp-text-and-commits/SKILL.md @@ -1,6 +1,6 @@ --- name: webcpp-text-and-commits -description: Before writing any file, commit message or proposal text for a webcpporg repository: the rules on language, forbidden text, commit form and outward actions. +description: "Before writing any file, commit message or proposal text for a webcpporg repository: the rules on language, forbidden text, commit form and outward actions." --- # Text and commits in webcpp diff --git a/.github/workflows/skills.yml b/.github/workflows/skills.yml new file mode 100644 index 0000000..fd038bb --- /dev/null +++ b/.github/workflows/skills.yml @@ -0,0 +1,58 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +name: Agent skills + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + front-matter: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install the YAML parser + run: | + python3 -m venv "$RUNNER_TEMP/skills-venv" + "$RUNNER_TEMP/skills-venv/bin/python" -m pip install PyYAML==6.0.3 + - name: Validate skill metadata + run: | + "$RUNNER_TEMP/skills-venv/bin/python" - <<'PY' + import re + from pathlib import Path + import yaml + + paths = sorted(Path('.agents/skills').glob('*/SKILL.md')) + failures = [] + for path in paths: + try: + parts = re.split(r'^---\s*$', path.read_text(), maxsplit=2, flags=re.M) + if len(parts) != 3 or parts[0].strip(): + raise ValueError('expected opening and closing YAML delimiters') + metadata = yaml.safe_load(parts[1]) + if not isinstance(metadata, dict): + raise ValueError('front matter must be a mapping') + name = metadata.get('name') + if name != path.parent.name or not re.fullmatch(r'[a-z0-9]+(?:-[a-z0-9]+)*', name): + raise ValueError('name must match its kebab-case directory') + description = metadata.get('description') + if not isinstance(description, str) or not description.strip(): + raise ValueError('description must be a nonempty string') + except (ValueError, yaml.YAMLError) as error: + failures.append(f'{path}: {error}') + if not paths: + failures.append('no agent skills found') + for failure in failures: + print(failure) + print(f'{len(paths)} skills, {len(failures)} problems') + raise SystemExit(bool(failures)) + PY diff --git a/AGENTS.md b/AGENTS.md index db40e41..7f71f50 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,3 +15,7 @@ Read the superproject's `AGENTS.md` first (`webcpp-openspec-proposal`, `webcpp-reference-status`, `webcpp-text-and-commits`). They point to the rules and never replace them; where one disagrees, `CONTRIBUTING.md` and the organization's specification win. + +- **Skill metadata.** `.github/workflows/skills.yml` parses each skill's YAML front matter, + requires a matching kebab-case name and a nonempty description. Chapter references are + reviewed when the rules change. OpenSpec's MIT notice is in `THIRD_PARTY_NOTICES.md`. diff --git a/README.md b/README.md index 777bbe6..f5073fc 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ libraries marked with it are published, in the superproject's `main`. | Library | Proposal | Title | Kind | Status | Release | Decided | Implementation | | --- | --- | --- | --- | --- | --- | --- | --- | | organization | [genesis](organization/openspec/changes/archive/2026-10-07-genesis) | organization: the superproject, its build, its rules, its CI and its site | organization | implemented | 0.1.0 | 2026-10-07 | [code](https://github.com/webcpporg/webcpp/tree/c53f3f9) | -| organization | [agent-skills](organization/openspec/changes/agent-skills) | organization: agent skills in .agents/skills, in the proposals and the superproject | organization | draft | | | [code](https://github.com/webcpporg/webcpp) | | organization | [contributor-identity](organization/openspec/changes/contributor-identity) | organization: every contributor commits under their own git identity | organization | draft | | | [code](https://github.com/webcpporg/webcpp) | | organization | [site-increments-4-5](organization/openspec/changes/site-increments-4-5) | organization: the site, increments 4 and 5 (trystero's JavaScript API and the cursors; the state machine, on the server, C++ calls the browser) | organization | accepted | | 2026-10-10 | | +| organization | [agent-skills](organization/openspec/changes/archive/2026-10-13-agent-skills) | organization: agent skills in .agents/skills, in the proposals and the superproject | organization | implemented | 0.1.0 | 2026-10-13 | [code](https://github.com/webcpporg/webcpp/tree/5a441c1e90c5b242cf55c351edf6c79c37ef1f8d) | | asio | [genesis](libraries/asio/openspec/changes/genesis) | asio: Boost.Asio natively, the browser's event loop on Emscripten | wrapper | implementing | | 2026-10-11 | | | beast | [genesis](libraries/beast/openspec/changes/genesis) | beast: Boost.Beast natively, the browser's WebSocket and fetch on Emscripten | wrapper | draft | | | | | config | [genesis](libraries/config/openspec/changes/archive/2026-10-09-genesis) | config: webcpp's configuration, the target, exceptions and version every library includes first | own | implemented | 0.1.0 | 2026-10-09 | [code](https://github.com/webcpporg/config/tree/2fad162) | diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000..27e6114 --- /dev/null +++ b/THIRD_PARTY_NOTICES.md @@ -0,0 +1,28 @@ +# Third-party notices + +The six `.agents/skills/openspec-*/SKILL.md` files are generated documentation from +OpenSpec 1.10.0 (https://github.com/Fission-AI/OpenSpec), adapted for this repository's +several OpenSpec roots. Their MIT licence and metadata are preserved. This notice +reproduces the licence shipped in `@fission-ai/openspec@1.10.0`. + +MIT License + +Copyright (c) 2024 OpenSpec Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/organization/openspec/changes/agent-skills/specs/organization/spec.md b/organization/openspec/changes/agent-skills/specs/organization/spec.md deleted file mode 100644 index 57ea426..0000000 --- a/organization/openspec/changes/agent-skills/specs/organization/spec.md +++ /dev/null @@ -1,16 +0,0 @@ -## ADDED Requirements - -### Requirement: Superproject: Agent skills -The superproject and the proposals repository SHALL keep agent skills in `.agents/skills//SKILL.md`, one directory per skill named in kebab case, each `SKILL.md` opening with YAML front matter whose `name` equals the directory and whose `description` says when the skill applies. A skill MUST point to the rules that apply (the chapter of the superproject's `AGENTS.md`, `CONTRIBUTING.md` or the organization's specification) and list the steps and commands of its task, without restating those rules at length; where a skill and a rule disagree, the rule wins. Skills follow the rules on text of every file: English, no em dash, no banned word, no personal data. The proposals repository holds OpenSpec's own skills, generated by OpenSpec 1.10.0 and adapted to its several OpenSpec roots, and `openspec init` is never run in the repository itself, since it would create a root `openspec/`. Each repository's `AGENTS.md` names its skills. - -#### Scenario: An agent writes a proposal -- **WHEN** an agent in the proposals repository is asked to propose a change to a library -- **THEN** the skill `webcpp-openspec-proposal` sends it to `CONTRIBUTING.md` and the organization's specification, and it runs `openspec` from `libraries//` - -#### Scenario: A skill with forbidden text -- **WHEN** a `SKILL.md` under `.agents/skills/` of the proposals repository holds an em dash -- **THEN** `python3 tools/proposals.py check` fails, naming the file and the line - -#### Scenario: A skill and a rule disagree -- **WHEN** a chapter of the superproject's `AGENTS.md` changes a rule a skill cites -- **THEN** the chapter is followed, and the skill is updated to point to it diff --git a/organization/openspec/changes/agent-skills/.openspec.yaml b/organization/openspec/changes/archive/2026-10-13-agent-skills/.openspec.yaml similarity index 55% rename from organization/openspec/changes/agent-skills/.openspec.yaml rename to organization/openspec/changes/archive/2026-10-13-agent-skills/.openspec.yaml index 589c5c6..7d36c35 100644 --- a/organization/openspec/changes/agent-skills/.openspec.yaml +++ b/organization/openspec/changes/archive/2026-10-13-agent-skills/.openspec.yaml @@ -5,7 +5,7 @@ webcpp: title: "organization: agent skills in .agents/skills, in the proposals and the superproject" kind: organization port_of: null - status: draft - release: null - implementation: https://github.com/webcpporg/webcpp - decided: null + status: implemented + release: "0.1.0" + implementation: https://github.com/webcpporg/webcpp/tree/5a441c1e90c5b242cf55c351edf6c79c37ef1f8d + decided: 2026-10-13 diff --git a/organization/openspec/changes/agent-skills/design.md b/organization/openspec/changes/archive/2026-10-13-agent-skills/design.md similarity index 55% rename from organization/openspec/changes/agent-skills/design.md rename to organization/openspec/changes/archive/2026-10-13-agent-skills/design.md index 9221856..e3d4ed1 100644 --- a/organization/openspec/changes/agent-skills/design.md +++ b/organization/openspec/changes/archive/2026-10-13-agent-skills/design.md @@ -40,7 +40,7 @@ that copy the rules, which would drift from `AGENTS.md` at the first change of a `webcpp-text-and-commits` applies to both repositories and is a file in each, identical. Rejected: a single source fetched or linked from the other repository: a symbolic link across repositories does not exist in a clone, and an agent reads the files of the repository it is in. The duplicate -is short; O1 asks whether a check should keep the two equal. +is short; O1 below requires an explicit local comparison when either copy changes. ### D4. OpenSpec's skills, generated and adapted @@ -63,7 +63,9 @@ the two changes. The licence notice of the superproject's `AGENTS.md`, chapter 11, applies to source files by suffix, and `.md` is none of them (the lint's rule `licence notice` reads the same list); a skill, -like `AGENTS.md` and `README.md`, carries none. The repository's licence covers it. +like `AGENTS.md` and `README.md`, carries no webcpp source-file notice. Chapter 11 now +explicitly names this exemption. Webcpp-authored skills are BSL-1.0; generated OpenSpec +skills retain MIT and the copyright and permission notice in `THIRD_PARTY_NOTICES.md`. ### D6. A pointer in each `AGENTS.md` @@ -78,29 +80,57 @@ written for people proposing a library. holding forbidden text fails it; a test in `tools/proposals_test.py` pins that for `.agents/skills/`. The superproject's lint reads every tracked file (`git ls-files --cached --others --exclude-standard`) for the em dash and the banned word, so it covers `.agents/` without -change. +change. Both repositories also run `.github/workflows/skills.yml` on pull requests and main: +PyYAML 6.0.3 reads actual YAML and rejects malformed front matter, a missing or blank description, +and a name that differs from its kebab-case directory. The parser is installed in an isolated +virtual environment. This catches the unquoted colon descriptions found during review. ## Risks / Trade-offs - [A skill goes stale when a chapter is renamed] -> skills cite chapters by number and title, and a - rule change that touches a chapter a skill cites updates the skill in the same commit (O2). + rule change that touches a chapter a skill cites updates the skill in the same commit (O2); prose references are checked in review. - [OpenSpec's generated text carries the MIT licence in a BSL-1.0 repository] -> it is generated - documentation, kept with its front matter naming its licence; O4 asks the owner to confirm. + documentation, kept with its front matter and full upstream notice; O4 records the exception. ## Migration Plan 1. Merge both pull requests; nothing else moves. 2. On archive, the requirement joins `specs/organization/spec.md`. -## Open Questions - -- **O1.** Should a check (the superproject's lint or `tools/proposals.py`) refuse the two copies of - `webcpp-text-and-commits` when they differ? -- **O2.** Should the lint check that every `SKILL.md` has front matter whose `name` equals its - directory, and that every `AGENTS.md` chapter a skill cites exists? -- **O3.** Should each library's repository carry skills of its own (for instance xstate's oracle), - or do the superproject's suffice? -- **O4.** Is OpenSpec's generated text under MIT acceptable in the repository, or should webcpp - write its own OpenSpec skills instead? -- **O5.** Should `AGENTS.md`, chapter 11's licence notice list, name `SKILL.md` explicitly as a - file without a notice? +## Resolved Questions + +Decided on 2026-10-13 under the owner's instruction to resolve O1 to O5, finish the implementation, +merge webcpp PR #2 and archive this proposal. These are the decisions taken for that request. + +- **O1. Local comparison, no cross-repository network gate.** Keep the two + `webcpp-text-and-commits` files identical. When either changes, compare the two checked-out + files with `cmp` and update both in the same change. CI must not depend on the changing head + of another repository or on a particular checkout layout. This review compared both files. +- **O2. Validate metadata in CI; review prose references.** Each repository runs the Agent skills + workflow with a real YAML parser, checking delimiters, a mapping, a matching kebab-case name + and a nonempty string description. Chapter references remain a review responsibility: they + appear in prose, not a machine-readable reference field. A rule change updates affected + skills in the same change. All references in the five superproject skills were reviewed. +- **O3. Shared skills only.** The superproject and proposals skills suffice for this change. + A library keeps its specific rules in its own `AGENTS.md`. A future unique recurring workflow + may justify a library skill; do not copy these shared skills into each library. +- **O4. Retain upstream MIT documentation.** Keep the six generated OpenSpec skills and their + upstream metadata unchanged. `THIRD_PARTY_NOTICES.md` preserves OpenSpec 1.10.0's complete + copyright and permission notice. The organization's specification explicitly exempts this + generated documentation from its otherwise BSL-1.0-only rule; webcpp-authored text stays BSL-1.0. +- **O5. State the Markdown exemption.** Chapter 11 now explicitly says that Markdown files, + including `SKILL.md`, need no webcpp source-file notice. Upstream notices are still preserved. + The licence lint's suffix rules do not change. + +## Review fixes + +- Quote the descriptions of all custom skills as YAML strings. Four superproject descriptions + and two proposals descriptions originally failed to parse because they contained `: `. +- Unset `CPATH`, `CPLUS_INCLUDE_PATH` and `C_INCLUDE_PATH` once before the build example block, + so every command runs in the required environment. +- Add the metadata workflow in both repositories. Its exact script was tested against real + skills and fixtures for invalid YAML, wrong names, absent or blank descriptions, missing + delimiters and non-mapping front matter. + +The contributor identity rule is already in the superproject's main through webcpp PR #1; +the text skill now follows the current rulebook without waiting on a separate implementation. diff --git a/organization/openspec/changes/agent-skills/proposal.md b/organization/openspec/changes/archive/2026-10-13-agent-skills/proposal.md similarity index 76% rename from organization/openspec/changes/agent-skills/proposal.md rename to organization/openspec/changes/archive/2026-10-13-agent-skills/proposal.md index 8893925..01fa210 100644 --- a/organization/openspec/changes/agent-skills/proposal.md +++ b/organization/openspec/changes/archive/2026-10-13-agent-skills/proposal.md @@ -22,6 +22,8 @@ what OpenSpec itself generates. - The superproject gains `.agents/skills/`: `webcpp-library-conventions`, `webcpp-port-methodology`, `webcpp-build-and-lanes`, `webcpp-docs-site-release` and `webcpp-text-and-commits`, and its `AGENTS.md` names them in its introduction. +- Both repositories validate skill YAML, names and descriptions in CI. +- OpenSpec's full MIT notice is preserved in `THIRD_PARTY_NOTICES.md`. - A requirement is added to the organization's specification: where skills live, what they may hold, and that the rules win over them. @@ -39,10 +41,9 @@ None. - **Kind:** the organization (the rules' entry points for agents, in two repositories). - **Implementation:** pull requests to https://github.com/webcpporg/proposals and - https://github.com/webcpporg/webcpp from the branch `agent-skills`. No build, lint rule or - workflow changes: the superproject's lint already reads every tracked file for the em dash and + https://github.com/webcpporg/webcpp from the branch `agent-skills`. No build or existing lint-rule changes; a dedicated metadata workflow is added: the superproject's lint already reads every tracked file for the em dash and the banned word, and `tools/proposals.py check` every file of this repository. -- **Status:** draft. -- **Other proposals:** independent of `contributor-identity`; the skill `webcpp-text-and-commits` - states the identity rule that change proposes (each contributor commits under their own - identity), so the two should be decided together or the skill adjusted to the decision. +- **Status:** implemented in the 0.1.0 release in preparation; archived on 2026-10-13. + See `reference/STATUS.md` for merge and verification evidence. No release tag was created. +- **Other proposals:** the identity rule used by `webcpp-text-and-commits` is already in the + superproject through webcpp PR #1; this change does not archive `contributor-identity`. diff --git a/organization/openspec/changes/archive/2026-10-13-agent-skills/reference/STATUS.md b/organization/openspec/changes/archive/2026-10-13-agent-skills/reference/STATUS.md new file mode 100644 index 0000000..2e864ca --- /dev/null +++ b/organization/openspec/changes/archive/2026-10-13-agent-skills/reference/STATUS.md @@ -0,0 +1,49 @@ +# Agent skills: implementation and verification + +Recorded on 2026-10-13 (America/New_York). + +The owner requested review, resolution of O1 to O5, correction of remaining defects, merge of +webcpp PR #2 and archival of this proposal. The decisions are in `../design.md`. + +## Implementation + +- Proposals PR #2 merged as `101f6e132302c65cbbd4266d3a1dde8e7932a3f8`. +- Webcpp PR #2 now contains the review fixes in + `a971191c4c9a6fe4c0722b307bca893f82294b3a`, merged as `5a441c1e90c5b242cf55c351edf6c79c37ef1f8d`. + The full CI run https://github.com/webcpporg/webcpp/actions/runs/38507470157 was + cancelled at the explicit request of the owner to run no CI during this session. The Agent skills + workflow (run 38507470100) had already passed before that instruction. +- This follow-up repairs the custom skills in proposals, adds metadata validation, preserves + OpenSpec's MIT notice and records the final design decisions. + +## Verification + +The original metadata was read with a real YAML parser before editing. Four superproject skills +and two proposals skills failed on unquoted colon-space descriptions. After quoting, all five +superproject skills and all nine proposals skills parse with matching names. + +The exact Python script in each Agent skills workflow was run locally with PyYAML 6.0.3. +It accepted valid metadata and rejected invalid YAML, a wrong name, absent or blank descriptions, +missing delimiters and a non-mapping value. The script is preserved as `verify_skills.py`: +run it from the repository being checked after installing PyYAML 6.0.3 in a virtual environment. +The generated OpenSpec skills were not edited. + +The shared text skills are byte-identical. Both new workflows pass actionlint. The superproject +changes pass whitespace, source-licence and release-note checks. Independent review checked the +chapter and command references, then reviewed the corrections without remaining blockers. + +## Completion + +The owner-authorized review and implementation are complete. Both original PRs are merged. +The owner explicitly requested no CI during this session. The running full CI was cancelled; +subsequent commits and merges use `[skip ci]`. No passing full-CI result is claimed for the +final head; acceptance rests on the local checks and the independent review documented above. +The organization specification now contains the Agent skills requirement, the metadata validation +scenario and the narrow MIT documentation exception, preserving the original collection scenarios. +All tasks are checked, and the proposal is archived as `2026-10-13-agent-skills` with status +`implemented`, release `0.1.0` and the immutable webcpp merge commit above. As in the existing +index, 0.1.0 means the release in preparation, not a published tag. + +The index was regenerated with `python3 tools/proposals.py readme`. Every OpenSpec root passed +strict validation and the proposal tool's 17 tests passed. The final archive and its validation +are reviewed in https://github.com/webcpporg/proposals/pull/3. diff --git a/organization/openspec/changes/archive/2026-10-13-agent-skills/reference/verify_skills.py b/organization/openspec/changes/archive/2026-10-13-agent-skills/reference/verify_skills.py new file mode 100644 index 0000000..de3a6ee --- /dev/null +++ b/organization/openspec/changes/archive/2026-10-13-agent-skills/reference/verify_skills.py @@ -0,0 +1,35 @@ +# Copyright (c) 2026 WebCpp.org +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# https://www.boost.org/LICENSE_1_0.txt) + +# Snapshot of the Agent skills workflow validator. Run from either repository root. +import re +from pathlib import Path +import yaml + +paths = sorted(Path('.agents/skills').glob('*/SKILL.md')) +failures = [] +for path in paths: + try: + parts = re.split(r'^---\s*$', path.read_text(), maxsplit=2, flags=re.M) + if len(parts) != 3 or parts[0].strip(): + raise ValueError('expected opening and closing YAML delimiters') + metadata = yaml.safe_load(parts[1]) + if not isinstance(metadata, dict): + raise ValueError('front matter must be a mapping') + name = metadata.get('name') + if name != path.parent.name or not re.fullmatch(r'[a-z0-9]+(?:-[a-z0-9]+)*', name): + raise ValueError('name must match its kebab-case directory') + description = metadata.get('description') + if not isinstance(description, str) or not description.strip(): + raise ValueError('description must be a nonempty string') + except (ValueError, yaml.YAMLError) as error: + failures.append(f'{path}: {error}') +if not paths: + failures.append('no agent skills found') +for failure in failures: + print(failure) +print(f'{len(paths)} skills, {len(failures)} problems') +raise SystemExit(bool(failures)) diff --git a/organization/openspec/changes/archive/2026-10-13-agent-skills/specs/organization/spec.md b/organization/openspec/changes/archive/2026-10-13-agent-skills/specs/organization/spec.md new file mode 100644 index 0000000..8671614 --- /dev/null +++ b/organization/openspec/changes/archive/2026-10-13-agent-skills/specs/organization/spec.md @@ -0,0 +1,33 @@ +## ADDED Requirements + +### Requirement: Superproject: Agent skills +The superproject and the proposals repository SHALL keep agent skills in `.agents/skills//SKILL.md`, one directory per skill named in kebab case, each `SKILL.md` opening with YAML front matter whose `name` equals the directory and whose `description` says when the skill applies. A skill MUST point to the rules that apply (the chapter of the superproject's `AGENTS.md`, `CONTRIBUTING.md` or the organization's specification) and list the steps and commands of its task, without restating those rules at length; where a skill and a rule disagree, the rule wins. Skills follow the rules on text of every file: English, no em dash, no banned word, no personal data. The proposals repository holds OpenSpec's own skills, generated by OpenSpec 1.10.0 and adapted to its several OpenSpec roots, and `openspec init` is never run in the repository itself, since it would create a root `openspec/`. Each repository's `AGENTS.md` names its skills. CI MUST parse skill front matter as YAML and reject invalid syntax, a name that differs from its kebab-case directory, or a missing or blank string description. Markdown files, including `SKILL.md`, need no webcpp source-file licence header; upstream notices MUST be preserved. + +#### Scenario: An agent writes a proposal +- **WHEN** an agent in the proposals repository is asked to propose a change to a library +- **THEN** the skill `webcpp-openspec-proposal` sends it to `CONTRIBUTING.md` and the organization's specification, and it runs `openspec` from `libraries//` + +#### Scenario: A skill with forbidden text +- **WHEN** a `SKILL.md` under `.agents/skills/` of the proposals repository holds an em dash +- **THEN** `python3 tools/proposals.py check` fails, naming the file and the line + +#### Scenario: A skill and a rule disagree +- **WHEN** a chapter of the superproject's `AGENTS.md` changes a rule a skill cites +- **THEN** the chapter is followed, and the skill is updated to point to it + +#### Scenario: Invalid skill metadata +- **WHEN** a skill's description contains an unquoted colon and space, its name differs from its directory, or its description is absent or blank +- **THEN** the Agent skills workflow fails and names the skill + +## MODIFIED Requirements + +### Requirement: Superproject: The collection and its model +The organization SHALL be a superproject, `webcpporg/webcpp`, that plays the part of `boostorg/boost` for the GitHub organisation `webcpporg` (the equivalent of `boostorg`): every library is header-only C++20 under the Boost Software License 1.0, lives in a repository of its own, and is checked out in the superproject as a submodule under `libs/`. webcpp brings to C++ the libraries that other languages use for the web, each ported at an exact version of an original and proven against it, or a library of webcpp's own, and serves three targets with a purpose each: `emscripten` (the browser), `wasip2` and `wasip3` (WASI components run by wasmtime and by clouds), and `native` (a program that integrates closely with its operating system). Every webcpp-authored file SHALL be BSL-1.0 and the copyright notice is "Copyright (c) 2026 WebCpp.org". The six generated OpenSpec skill documents in the proposals repository SHALL retain their upstream MIT licence and metadata, with the full upstream copyright and permission notice preserved in `THIRD_PARTY_NOTICES.md`. + +#### Scenario: A reader asks what a target is for +- **WHEN** `AGENTS.md` chapter 1 and `README.md` are read for the targets +- **THEN** emscripten is the browser, wasip2 and wasip3 are WASI components run by wasmtime and by clouds, and native is a program that wants close integration with its operating system + +#### Scenario: A library of the collection +- **WHEN** `libs/xactor` is inspected +- **THEN** it is a git repository of its own whose remote is `webcpporg/xactor`, checked out as a submodule of the superproject, with header-only C++20 headers under `include/webcpp/xactor/` diff --git a/organization/openspec/changes/agent-skills/tasks.md b/organization/openspec/changes/archive/2026-10-13-agent-skills/tasks.md similarity index 53% rename from organization/openspec/changes/agent-skills/tasks.md rename to organization/openspec/changes/archive/2026-10-13-agent-skills/tasks.md index 4e3775b..d4d9b1b 100644 --- a/organization/openspec/changes/agent-skills/tasks.md +++ b/organization/openspec/changes/archive/2026-10-13-agent-skills/tasks.md @@ -4,8 +4,8 @@ - [x] 0.1 Run `openspec init --tools agents` (1.10.0) in a copy of the repository and record what it writes and what does not fit (design D4) - [x] 0.2 Write the proposal, the design, the tasks and the added requirement; validate with `openspec validate --all --strict` and `tools/proposals.py check` -- [ ] 0.3 Settle O1 to O5 with the owner and record the answers in `design.md` -- [ ] 0.4 Submit the proposal for a decision (status `proposed`) +- [x] 0.3 Resolve O1 to O5 under the owner's delegated decision and record the answers in `design.md` +- [x] 0.4 Record the owner's decision to finish, merge and archive on 2026-10-13; the intermediate `proposed` step is superseded by this decision ## 1. The proposals repository @@ -19,9 +19,18 @@ - [x] 2.1 `.agents/skills/webcpp-library-conventions`, `webcpp-port-methodology`, `webcpp-build-and-lanes`, `webcpp-docs-site-release`, `webcpp-text-and-commits` - [x] 2.2 `AGENTS.md`'s introduction names the skills - [x] 2.3 Check that the lint's em dash and banned word rules read `.agents/` (every tracked file) and that the licence rule does not apply to `.md` -- [ ] 2.4 The lint run green on the branch (`lint: clean`), by CI +- [x] 2.4 Review and local checks completed; full CI cancelled under the owner's explicit no-CI instruction for this session ## 3. After the decision -- [ ] 3.1 Both pull requests reviewed and merged by the owner -- [ ] 3.2 Archive the change, which writes the requirement into `specs/organization/spec.md` +- [x] 3.1 Both original pull requests reviewed and merged under the owner's authorization +- [x] 3.2 Archive the change, which writes the requirement into `specs/organization/spec.md` + +## 4. Review corrections + +- [x] 4.1 Fix and parse every custom skill's YAML front matter in both repositories +- [x] 4.2 Make every build-example command use the required clean environment +- [x] 4.3 Add and locally validate the Agent skills workflow, including invalid-input fixtures +- [x] 4.4 Compare the shared text skill in both repositories and review the chapter references +- [x] 4.5 Preserve OpenSpec's full MIT notice and record the specification's licence exception +- [x] 4.6 Clarify the Markdown notice exemption in chapter 11 diff --git a/organization/openspec/specs/organization/spec.md b/organization/openspec/specs/organization/spec.md index 44e14ab..19b8462 100644 --- a/organization/openspec/specs/organization/spec.md +++ b/organization/openspec/specs/organization/spec.md @@ -5,6 +5,7 @@ webcpp is a collection of header-only C++20 libraries for the web, organized as superproject, `webcpporg/webcpp`, holds each library as a submodule under `libs/`, one build (b2), one rulebook (`AGENTS.md`), one lint, one documentation toolchain, one CI and one site. This capability is the organization as built at the superproject's commit `c53f3f9` (`../../changes/archive/2026-10-07-genesis/reference/superproject/`): +with subsequent changes recorded in `../../changes/archive/2026-10-13-agent-skills/`: how it is laid out, how every library is built, tested, linted, documented, released and published, and what every contributor, human or coding agent, must do. A library's own proposal relies on these requirements and adds only what is specific to the library. @@ -12,7 +13,7 @@ these requirements and adds only what is specific to the library. ## Requirements ### Requirement: Superproject: The collection and its model -The organization SHALL be a superproject, `webcpporg/webcpp`, that plays the part of `boostorg/boost` for the GitHub organisation `webcpporg` (the equivalent of `boostorg`): every library is header-only C++20 under the Boost Software License 1.0, lives in a repository of its own, and is checked out in the superproject as a submodule under `libs/`. webcpp brings to C++ the libraries that other languages use for the web, each ported at an exact version of an original and proven against it, or a library of webcpp's own, and serves three targets with a purpose each: `emscripten` (the browser), `wasip2` and `wasip3` (WASI components run by wasmtime and by clouds), and `native` (a program that integrates closely with its operating system). Every file of webcpp is BSL-1.0 only and the copyright notice is "Copyright (c) 2026 WebCpp.org". +The organization SHALL be a superproject, `webcpporg/webcpp`, that plays the part of `boostorg/boost` for the GitHub organisation `webcpporg` (the equivalent of `boostorg`): every library is header-only C++20 under the Boost Software License 1.0, lives in a repository of its own, and is checked out in the superproject as a submodule under `libs/`. webcpp brings to C++ the libraries that other languages use for the web, each ported at an exact version of an original and proven against it, or a library of webcpp's own, and serves three targets with a purpose each: `emscripten` (the browser), `wasip2` and `wasip3` (WASI components run by wasmtime and by clouds), and `native` (a program that integrates closely with its operating system). Every webcpp-authored file SHALL be BSL-1.0 and the copyright notice is "Copyright (c) 2026 WebCpp.org". The six generated OpenSpec skill documents in the proposals repository SHALL retain their upstream MIT licence and metadata, with the full upstream copyright and permission notice preserved in `THIRD_PARTY_NOTICES.md`. #### Scenario: A reader asks what a target is for - **WHEN** `AGENTS.md` chapter 1 and `README.md` are read for the targets @@ -1197,3 +1198,22 @@ The organization SHALL keep, in chapter 13 of `AGENTS.md`, what it does not have #### Scenario: A rule not yet true - **WHEN** the CI levels are asked about - **THEN** `AGENTS.md` chapter 13 says they are a roadmap item and the CI today runs one level on every push + +### Requirement: Superproject: Agent skills +The superproject and the proposals repository SHALL keep agent skills in `.agents/skills//SKILL.md`, one directory per skill named in kebab case, each `SKILL.md` opening with YAML front matter whose `name` equals the directory and whose `description` says when the skill applies. A skill MUST point to the rules that apply (the chapter of the superproject's `AGENTS.md`, `CONTRIBUTING.md` or the organization's specification) and list the steps and commands of its task, without restating those rules at length; where a skill and a rule disagree, the rule wins. Skills follow the rules on text of every file: English, no em dash, no banned word, no personal data. The proposals repository holds OpenSpec's own skills, generated by OpenSpec 1.10.0 and adapted to its several OpenSpec roots, and `openspec init` is never run in the repository itself, since it would create a root `openspec/`. Each repository's `AGENTS.md` names its skills. CI MUST parse skill front matter as YAML and reject invalid syntax, a name that differs from its kebab-case directory, or a missing or blank string description. Markdown files, including `SKILL.md`, need no webcpp source-file licence header; upstream notices MUST be preserved. + +#### Scenario: An agent writes a proposal +- **WHEN** an agent in the proposals repository is asked to propose a change to a library +- **THEN** the skill `webcpp-openspec-proposal` sends it to `CONTRIBUTING.md` and the organization's specification, and it runs `openspec` from `libraries//` + +#### Scenario: A skill with forbidden text +- **WHEN** a `SKILL.md` under `.agents/skills/` of the proposals repository holds an em dash +- **THEN** `python3 tools/proposals.py check` fails, naming the file and the line + +#### Scenario: A skill and a rule disagree +- **WHEN** a chapter of the superproject's `AGENTS.md` changes a rule a skill cites +- **THEN** the chapter is followed, and the skill is updated to point to it + +#### Scenario: Invalid skill metadata +- **WHEN** a skill's description contains an unquoted colon and space, its name differs from its directory, or its description is absent or blank +- **THEN** the Agent skills workflow fails and names the skill