-
Notifications
You must be signed in to change notification settings - Fork 10
chore(ci): update skills #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,7 +138,7 @@ There are suppressions left that do not occur anymore. Consider re-running the c | |
|
|
||
| This is success, not failure. It means your fix worked and the stale entry is still on disk. Resolve it by pruning. Do **not** revert your fix, do not re-run `--suppress-rule` to make the message go away, and do not add `--pass-on-unpruned-suppressions`, which only hides the condition and leaves the ratchet slipping backwards. | ||
|
|
||
| **Done when**: the rule's suppression count strictly decreases, no stale suppressions remain, the file's public API is byte-identical, `pnpm run lint` passes with no new inline disables, and `pnpm run test` and `pnpm run test:types` pass. | ||
| **Done when**: the rule's suppression count strictly decreases, no stale suppressions remain, the file's public API is byte-identical, and every applicable project verification script passes with no new inline disables. | ||
|
|
||
| <!-- vale Vale.Spelling = YES --> | ||
|
|
||
|
|
@@ -159,35 +159,45 @@ Do not invent bugs. If the script finds no quarantined test, it moves to another | |
| ### Procedure | ||
|
|
||
| 1. **Confirm the failure first.** Un-skip the test and run it. It must fail. | ||
| 2. If it passes immediately, the bug is already fixed. That is still a valid pull request: remove the `.skip` and say so. Stop there. | ||
| 2. If it passes immediately, the bug is already fixed. That is still a valid pull request: remove the `.skip`, say so, and stop editing. Because this changes only test maintenance, use a `chore` commit and do not trigger an empty package release. | ||
| 3. If you cannot make it fail, the quarantine is not reproducible. Re-apply the skip, stop, and report what you tried. | ||
| 4. Otherwise make the smallest change that turns the test green. | ||
| 5. Do not refactor surrounding code, do not fix adjacent issues, do not tidy imports. | ||
| 6. Do not weaken the test to make it pass. If you change an assertion to match broken behavior, stop. | ||
|
|
||
| The script ranks quarantined **visual** tests last because you cannot update visual baselines. If the script selects one and the fix needs a new baseline, stop, and report it for a human. | ||
|
|
||
| **Done when**: the test fails before the fix and passes after, you do not change its assertions, you change no other test, and the full project CI passes. | ||
| **Done when**: the test either fails before the production fix and passes after, or passes immediately and needs only removal of `.skip`. In both cases, do not change its assertions or any other test, and require the full project CI to pass. | ||
|
|
||
| ## Verification | ||
|
|
||
| After the final change, run lint first. For Mode A, run it from every selector-provided `packages[].workingDirectory`; for other tasks, run it from the target project directory: | ||
| After the final change, inspect the target project's `package.json` and run lint first when the script exists. For Mode A, run it from every selector-provided `packages[].workingDirectory`; for other tasks, run it from the target project directory: | ||
|
|
||
| ```shell | ||
| mise exec -- pnpm run lint | ||
| mise exec -- pnpm run --if-present lint | ||
| ``` | ||
|
|
||
| Then run tests and type checks from the project containing the hand-fixed source file for Mode A, or from the target project directory for other tasks: | ||
| Then run every command below. For Mode A, run the complete command set from every selector-provided `packages[].workingDirectory`; for other tasks, run it from the target project directory. `--if-present` skips only scripts that the project does not define: | ||
|
Comment on lines
+174
to
+180
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win Consult the target project's Line 174 directs the agent to inspect Based on learnings, each project has a 🧰 Tools🪛 SkillSpector (2.5.1)[warning] 59: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills. Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation. (Agent Snooping (AS3)) [warning] 120: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills. Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation. (Agent Snooping (AS3)) [warning] 193: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills. Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation. (Agent Snooping (AS3)) [warning] 271: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills. Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation. (Agent Snooping (AS3)) [warning] 272: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills. Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation. (Agent Snooping (AS3)) [warning] 273: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills. Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation. (Agent Snooping (AS3)) [warning] 274: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills. Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation. (Agent Snooping (AS3)) [error] 68: [P2] Hidden Instructions: Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended. Remediation: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content. (Prompt Injection (P2)) 🤖 Prompt for AI AgentsSource: Learnings |
||
|
|
||
| ```shell | ||
| mise exec -- pnpm run test | ||
| mise exec -- pnpm run test:types | ||
| mise exec -- pnpm run --if-present test | ||
| mise exec -- pnpm run --if-present test:types | ||
| mise exec -- pnpm run --if-present test:axe | ||
| mise exec -- pnpm run --if-present test:ssr | ||
| mise exec -- pnpm run --if-present test:lighthouse | ||
| mise exec -- pnpm run --if-present test:visual | ||
| ``` | ||
|
|
||
| For component changes also run `mise exec -- pnpm run test:axe` and `mise exec -- pnpm run test:ssr`. Do not update visual baselines. If a visual test fails, your change changed behavior: stop. | ||
| Record absent scripts as not available rather than as failures. Do not update visual baselines. If a visual test fails, your change changed behavior: stop. | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| Then self-review with the [audit-code skill](/.agents/skills/audit-code/SKILL.md) and fix anything it flags. | ||
|
|
||
| Finally, run complete CI against the final working tree from the repository root: | ||
|
|
||
| ```shell | ||
| mise exec -- pnpm run ci | ||
| ``` | ||
|
|
||
| ## Statelessness | ||
|
|
||
| This skill keeps no memory between runs. It writes no journal, no ledger, and no record of what it has already done. Every selection is a pure function of the working tree plus the remote's branches. | ||
|
|
@@ -217,7 +227,7 @@ Always use the `upkeep/` prefix. The next run lists unmerged `upkeep/*` branches | |
|
|
||
| Commit messages must follow `commitlint.config.js`: | ||
|
|
||
| - type is `fix` for the bug task, `chore` for everything else | ||
| - type is `fix` when the bug task changes production behavior; use `chore` for every other task, including an already-fixed bug where the only change removes `.skip` | ||
| - include a scope. Use the project directory name under `projects/`, except use `internals` for anything under `projects/internals/` and `docs` for `projects/site`. `commitlint.config.js` holds the authoritative list; if your target does not map to one of its values, use `internals`. | ||
| - subject is lower case, no trailing period, 100 characters max | ||
| - include a `Signed-off-by:` trailer | ||
|
|
@@ -233,13 +243,15 @@ raising line coverage from 84% to 96%. No behavior change. | |
| Signed-off-by: Elements Upkeep Agent <upkeep@example.com> | ||
| ``` | ||
|
|
||
| Open the pull request as a **draft**, labeled `upkeep`, with a body that states: | ||
| Open the pull request as a **draft**, labeled `upkeep`, with a concise body that states: | ||
|
|
||
| 1. the selected task and why, quoting the script's `rationale` | ||
| 2. the before and after measurement, with numbers | ||
| 3. an explicit statement that no public API changed | ||
| 4. anything you deliberately left alone | ||
|
|
||
| Keep the body to those facts unless a reviewer needs more context. Before finishing, verify the draft state, label, and body against the pull request's current state. Remove transient setup failures and other statements that later became false. | ||
|
|
||
| ## Stop Conditions | ||
|
|
||
| Report and open nothing when any of these hold: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| name: authoring-projects | ||
| description: Author a new standalone NVIDIA Elements workspace project containing a Lit component, including package files, the five test types, Wireit tasks, workspace and CI registration, metadata generation, documentation-site integration, dependency-lint configuration, and generated lock/notice files. Use when creating or scaffolding a new `projects/<name>` package based on the standalone component-library pattern. Do not use for adding a component to an existing project; use the authoring-components skill instead. | ||
| --- | ||
|
|
||
| # Authoring Projects | ||
|
|
||
| Create a private-by-default project from a current in-repository reference, then wire every consumer before customizing the component. | ||
|
|
||
| ## Required context | ||
|
|
||
| 1. Read the repository `AGENTS.md`. | ||
| 2. Read [references/integration-checklist.md](references/integration-checklist.md). | ||
| 3. Use the `authoring-components` skill for the component class, API, examples, and five test files. | ||
| 4. Use the `guidance-build-system` skill for Wireit changes and the `authoring-testing` skill when modifying tests. | ||
| 5. Read `projects/internals/RELEASE.md` only when the user wants the package published. | ||
|
|
||
| ## Workflow | ||
|
|
||
| 1. Confirm the kebab-case project/component name, purpose, package description, and whether the project is private or publish-ready. Default the component name to the project name and keep a new scaffold private. | ||
| 2. Inspect `git status`, confirm `projects/<name>` does not exist, and preserve unrelated work. | ||
| 3. Preview the deterministic scaffold from the repository root: | ||
|
|
||
| ```shell | ||
| node .agents/skills/authoring-projects/scripts/scaffold-project.mjs \ | ||
| --name <component-name> \ | ||
| --description "<package and component description>" \ | ||
| --dry-run | ||
|
coryrylan marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| 4. Review the planned paths, then rerun without `--dry-run`. Pass `--reference <project-name>` when another standalone project is a better structural match. | ||
| 5. Customize the placeholder component through the `authoring-components` workflow. Keep `index.ts` side-effect free, isolate registration in `define.ts`, use `@since 0.0.0`, and make the `@documentation` URL match the generated site route. | ||
| 6. Refresh generated workspace state: | ||
|
|
||
| ```shell | ||
| mise exec -- pnpm install | ||
| mise exec -- pnpm run format:fix | ||
| mise exec -- pnpm run notice | ||
| ``` | ||
|
|
||
| 7. Run the project checks listed in its `DEVELOPMENT.md`, then verify the repository integrations: | ||
|
|
||
| ```shell | ||
| mise exec -- pnpm -C projects/<component-name> run ci | ||
| mise exec -- pnpm -C projects/<component-name> run test:lighthouse | ||
| mise exec -- pnpm -C projects/internals/metadata run generate:api | ||
| mise exec -- pnpm -C projects/internals/metadata run build | ||
| mise exec -- pnpm -C projects/site run build | ||
| mise exec -- pnpm run lint:knip | ||
| ``` | ||
|
coryrylan marked this conversation as resolved.
|
||
|
|
||
| 8. Use targeted project checks for isolated changes. Because scaffolding affects cross-project interfaces, generated artifacts, and more than one package, run broader CI from the repository root after the targeted checks: | ||
|
|
||
| ```shell | ||
| mise exec -- pnpm run ci | ||
| ``` | ||
|
|
||
| Inspect the final diff for generated artifacts, missing build edges, copied visual baselines, and unrelated lockfile churn. | ||
|
|
||
| ## Guardrails | ||
|
|
||
| - Never overwrite an existing project or reuse another component's visual baselines. | ||
| - Declare every generated metadata/site input with its matching Wireit build dependency. | ||
| - Keep site-only workspace packages in `projects/site` dev dependencies and its workspace-scoped dependency-lint ignore because Eleventy creates their imports dynamically. | ||
| - Include CSS linting and use the repository-root stylelint path (`../../stylelint.config.mjs`) from a top-level project. | ||
| - Do not create tags, publish packages, edit release wiring, or make a private project public without explicit user authorization. | ||
| - Treat commit `c88b885b` as historical evidence, not a byte-for-byte template; the checklist records the defects that the scaffold must avoid. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Standalone component project checklist | ||
|
|
||
| Use this checklist after scaffolding and before final verification. Commit `c88b885b` (`chore(ci): setup scene and plot`) established the reference integration surface, but this checklist corrects its omissions. | ||
|
|
||
| ## Project package | ||
|
|
||
| - Create `projects/<name>/` with package metadata, exports, `sideEffects`, Wireit tasks, TypeScript/Vite/Vitest configs, README, CHANGELOG, DEVELOPMENT, NOTICE, and `.gitignore`. | ||
| - Create a side-effect-free package `src/index.ts` exporting `VERSION = '0.0.0'` and its unit/Lighthouse coverage. | ||
| - Create the component's class, CSS, example, `define.ts`, `index.ts`, and unit, axe, visual, SSR, and Lighthouse tests. | ||
|
Comment on lines
+7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Fix the reported Vale violations. Use different imperative verbs in Lines 7-9. Refer to the platform as “GitHub” in the prose on Line 44, while retaining the literal Also applies to: 44-44 🧰 Tools🪛 LanguageTool[style] ~9-~9: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE) 🤖 Prompt for AI AgentsSources: Coding guidelines, Linters/SAST tools |
||
| - Keep the package private until release is explicitly requested. | ||
| - List every supported command in `DEVELOPMENT.md`, including visual and SSR tests. | ||
| - Make `lint` depend on both `lint:eslint` and `lint:style`; use `../../stylelint.config.mjs` from `projects/<name>`. | ||
| - Set component metadata and JSDoc to version `0.0.0`. Route documentation to `/elements/docs/<name>/` when the page is `projects/site/src/docs/<name>/index.md`. | ||
|
|
||
| ## Repository wiring | ||
|
|
||
| | Consumer | Required change | | ||
| | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | ||
| | `pnpm-workspace.yaml` | Add `projects/<name>`. | | ||
| | Root `package.json` | Add `<name>:ci`, `<name>:test:lighthouse`, and `<name>:lint:fix` dependencies. | | ||
| | `knip.config.js` | Add the project workspace entry. Add the package to the site's scoped `ignoreDependencies` when Eleventy generates site imports. | | ||
| | Metadata `api.utils.ts` | Add the project to the API project list. | | ||
| | Metadata `package.json` | Add package/custom-elements inputs and a matching `<name>:build` dependency. | | ||
| | Site `package.json` | Add dist inputs, a matching build dependency, and the workspace dev dependency. | | ||
| | Site docs | Add `projects/site/src/docs/<name>/index.md` with a matching `nve-<name>` tag. | | ||
| | Generated files | Run pnpm install and the notice generator to update `pnpm-lock.yaml`, root NOTICE, and project NOTICE files. | | ||
|
|
||
| ## Historical traps to avoid | ||
|
|
||
| - The reference commit added both metadata inputs but only the `scene` build edge. Add one build edge per project input. | ||
| - Eleventy generates package imports into HTML. The site needs an actual workspace dependency even though dependency lint cannot observe a source import; use a site-scoped ignore. | ||
| - The reference package inherited a dormant `../../../stylelint.config.mjs` path and omitted `lint:style` from `lint`. Use the two-level root path and run CSS linting. | ||
| - The starter component used `@since 0.10.0` and a documentation URL that did not match its site route. New scaffolds start at `0.0.0` and keep route/file placement aligned. | ||
| - Do not copy `.visual/*.png`; generate baselines from the new component after it renders meaningful output. | ||
| - A private scaffold is not release-ready. Do not infer authorization to publish it. | ||
|
|
||
| ## Publish-ready additions | ||
|
|
||
| Only when requested, follow `projects/internals/RELEASE.md` and current repository examples to: | ||
|
|
||
| - remove or change `private` intentionally; | ||
| - add the root semantic-release task and dependency ordering; | ||
| - add the commitlint scope; | ||
| - add build artifacts and JUnit reports to `.github/workflows/ci.yml`; | ||
| - verify the release configuration and package files; | ||
| - tell the user that the initial remote tag still requires explicit external action. | ||
|
|
||
| ## Verification | ||
|
|
||
| Run commands through mise. At minimum, verify install, format, notice generation, project CI, project Lighthouse, metadata build, site build, dependency lint, and `git diff --check`. Browser-backed checks may require permission outside a sandbox. Do not raise bundle limits until measured output justifies a change. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Split the completion criterion by lint mode.
Line 141 applies to both Mode A and Mode B. In Mode A, the rule starts as
'off', so no suppressions for that rule exist before the task. Step 3 then creates suppressions for remaining violations. The count cannot become strictly lower than the pre-task count of zero. The documented Mode A procedure cannot satisfy this condition.Define separate Mode A and Mode B completion criteria. Require a decreasing count only for Mode B, and require rule adoption, committed generated suppressions, the selected hand fix, and no stale suppressions for Mode A.
Proposed mode-specific criteria
📝 Committable suggestion
🧰 Tools
🪛 SkillSpector (2.5.1)
[warning] 59: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 120: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 193: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 271: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 272: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 273: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 274: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[error] 68: [P2] Hidden Instructions: Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
Remediation: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
(Prompt Injection (P2))
🤖 Prompt for AI Agents