Skip to content

infra: regen-js-client skill#48

Open
bzajzon-laserfiche wants to merge 4 commits into
mainfrom
claude-infra-and-docs
Open

infra: regen-js-client skill#48
bzajzon-laserfiche wants to merge 4 commits into
mainfrom
claude-infra-and-docs

Conversation

@bzajzon-laserfiche
Copy link
Copy Markdown
Contributor

Summary

First team-shared playbook for AI coding assistants in this repo. No code changes.

.claude/skills/regen-js-client/SKILL.md covers the NSwag regen flow for the V2 client (packages/lf-repository-api-client-v2) and the four traps that have silently broken the test suite in the past:

  1. --swagger-override-filepath is mandatory — without it, Entry.fromJS regenerates as throw-only and every importEntry/getEntry/listEntries call fails at deserialization.
  2. .env baseUrl must NOT have a trailing slash — NSwag prepends / to every path; trailing slash yields //v2/… and 404s.
  3. jsdom multipart-Blob test wrapper — every test that sends a Blob in multipart form must be wrapped with describe.skipIf(SKIP_UNDER_JSDOM) until #658052 closes. The current 12 wrapped files are listed in the skill.
  4. [OpenApiTag] client-split — NSwag's MultipleClientsFromFirstTagAndOperationId mode generates one client class per unique tag; an outlier tag on the server side silently disappears the method from entriesClient.

.claude/skills/README.md explains discovery (Claude Code auto-scans SKILL.md frontmatter; bodies are vendor-neutral) and authoring conventions.

Architecture rationale: site-api-repository/docs/design-ai-assistant-skills.md (in companion PR).

Companion PRs

  • site-api-repository: add-v2-endpoint skill + design doc
  • lf-repository-api-client-dotnet: regen-dotnet-client skill

First team-shared skill for AI coding assistants in this repo. Documents
the NSwag-generated V2 client regen against site-api-repository's
swagger, plus the four traps that have silently broken the JS test
suite in the past: swagger-override-filepath, baseUrl trailing-slash,
jsdom multipart-Blob skip (#658052), and OpenApiTag client-split.

README.md explains discovery (auto-scan of .claude/skills/*/SKILL.md
frontmatter; vendor-neutral bodies so other assistants can read them)
and authoring conventions.

No change to the repo-level README intentionally; the skills system is
scoped to its own directory in client libraries.
Replaces the reference to the (now-deleted) preview-NuGet user-story
memory with a direct link to the regen-dotnet-client skill, which is
the canonical home for the dotnet client publish workflow and the
in-flight #659276 Phase 2 details.
Other AI assistants (Copilot Chat, Codex CLI, etc.) don't auto-discover
`.claude/skills/` by frontmatter the way Claude Code does. Add the two
common conventions — `AGENTS.md` at repo root and
`.github/copilot-instructions.md` — each containing a short pointer to
`.claude/skills/README.md`. Skill bodies stay the single source of truth;
these files just bridge the auto-load gap for non-Claude tools.
@bzajzon-laserfiche
Copy link
Copy Markdown
Contributor Author

Cross-assistant portability follow-up (also asked on the server PR — https://v-dev-tfs.laserfiche.com/DefaultCollection/Cloud/_git/site-api-repository/pullrequest/170733).

By content: the regen-js-client SKILL.md body is vendor-neutral Markdown — no Claude-specific tool refs, frontmatter is only name + description. Works as a runbook for any AI assistant (Copilot, Cursor, Codex, …) or human reader.

By auto-load: only Claude Code scans .claude/skills/*/SKILL.md. Other tools use their own conventions:

Tool Auto-loaded file
Claude Code CLAUDE.md + .claude/skills/*/SKILL.md
GitHub Copilot Chat .github/copilot-instructions.md
Codex CLI / agentic tools AGENTS.md

Just added (490e07f) the two most common pointer files to bridge the gap:

  • AGENTS.md at repo root
  • .github/copilot-instructions.md

Each is ~6 lines and points at .claude/skills/README.md plus the primary workflow skill (regen-js-client). Skills stay the single source of truth — these files just bridge the auto-load convention. No symlinks (Windows-fragile), no content duplication.

Same addition on the two companion PRs:

  • site-api-repository PR 170733 (TFS): commit 3eb6803 (pointers to add-v2-endpoint)
  • lf-repository-api-client-dotnet PR #201: commit f305f81 (pointers to regen-dotnet-client)

…riptions

The previous version named the primary workflow and reproduced its
description inline. That sentence duplicated the same description
already present in the SKILL.md frontmatter and the
.claude/skills/README.md table — five places total once you include
the workspace-level index.

Make AGENTS.md and .github/copilot-instructions.md pure pointers to
.claude/skills/README.md (which is the canonical per-repo index). The
skills directory stays the single source of truth for skill content
and applicability.
@bzajzon-laserfiche
Copy link
Copy Markdown
Contributor Author

Follow-up: trimmed AGENTS.md and .github/copilot-instructions.md to pure pointers. Previously each named the primary workflow inline and described it — that sentence duplicated the SKILL.md frontmatter and the .claude/skills/README.md table row. The pointer files now just point at .claude/skills/README.md (canonical per-repo index) and README.md (build/run/test). Single source of truth for skill content stays the skill itself.

Commit: 47f038c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants