Rename lean-spec to leanspec and publish skills repo#165
Merged
Conversation
Recover deleted leanspec-sdd skill from git history, rename to leanspec, and prepare staging directory (skills-repo/) for the codervisor/skills GitHub repo. Update all references across CLI source, templates, docs, and README to use `npx skills add codervisor/skills@leanspec`. Phase 1 of spec 379 (skills content + CI ready, repo creation pending). https://claude.ai/code/session_018gK1o9NCRbj4paKqGw4Ftd
…pec 379 phase 2) - Rename Rust binary: [[bin]] name = "leanspec" in Cargo.toml - Rename npm package: "lean-spec" → "leanspec" in package.json - Add new leanspec.js / leanspec-rust.js entry points - Keep lean-spec.js as deprecated alias with warning message - Update all build scripts, CI workflows, and platform manifests - Update repository URLs to codervisor/leanspec - Binary wrapper supports both old and new binary names for transition https://claude.ai/code/session_018gK1o9NCRbj4paKqGw4Ftd
There was a problem hiding this comment.
Pull request overview
Renames the primary CLI command/package from lean-spec to leanspec across the monorepo, and adds a distributable “skills repo” layout for publishing the LeanSpec SDD methodology via Agent Skills.
Changes:
- Rename CLI package/binary and update wrappers + CI/scripts/docs to reference
leanspec(with a deprecatedlean-specalias). - Add
skills-repo/directory containing the public skills repository structure and validation workflow. - Update publish/verification scripts and Rust templates/commands to point at
codervisor/skills@leanspec.
Reviewed changes
Copilot reviewed 33 out of 38 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| specs/379-leanspec-rename-and-skills-distribution/README.md | Marks spec status in-progress and checks off completed phase items. |
| skills-repo/README.md | Documents the new public skills catalog and installation command. |
| skills-repo/LICENSE | Adds MIT license text for the skills repository. |
| skills-repo/.github/workflows/validate.yml | Adds CI workflow to validate skill folder structure/frontmatter. |
| skills-repo/.agents/skills/leanspec/SKILL.md | Adds the main SDD methodology skill content for agents. |
| skills-repo/.agents/skills/leanspec/references/workflow.md | Adds detailed workflow reference. |
| skills-repo/.agents/skills/leanspec/references/examples.md | Adds examples for relationships and AGENTS usage. |
| skills-repo/.agents/skills/leanspec/references/commands.md | Adds CLI command reference for the skill. |
| skills-repo/.agents/skills/leanspec/references/best-practices.md | Adds best practices and verification guidance for agents. |
| scripts/verify-npm-publish.ts | Updates publish verification to check leanspec main package. |
| scripts/verify-npm-packages.mjs | Updates verification config to treat leanspec as the main CLI package. |
| scripts/validate-platform-binaries.ts | Updates binary validation to expect leanspec binary names. |
| scripts/sync-rust-versions.ts | Updates repository URL and binary name for CLI family. |
| scripts/publish-main-packages.ts | Updates publish script messaging to leanspec. |
| scripts/prepare-publish.ts | Updates workspace package mapping from lean-spec → leanspec. |
| scripts/generate-platform-manifests.ts | Updates platform manifest generation to leanspec binary name and repo URL. |
| scripts/copy-rust-binaries.mjs | Updates copied binary list to include leanspec. |
| scripts/copy-platform-binaries.sh | Updates artifact copy/find patterns to leanspec*. |
| rust/leanspec-cli/templates/AGENTS-with-skill.md | Updates template to reference leanspec skill + new install command. |
| rust/leanspec-cli/src/commands/skill.rs | Updates leanspec skill install to install codervisor/skills@leanspec. |
| rust/leanspec-cli/src/commands/init.rs | Updates retry instructions to the new npx skills add codervisor/skills@leanspec syntax. |
| rust/leanspec-cli/Cargo.toml | Renames Rust CLI binary from lean-spec to leanspec. |
| rust/Cargo.toml | Updates Rust workspace repository URL to codervisor/leanspec. |
| README.md | Updates skill installation instructions and points to new skills repo. |
| packages/cli/package.json | Renames npm package to leanspec and adds leanspec bin entry (keeps lean-spec alias). |
| packages/cli/bin/leanspec.js | Adds new JS entry point delegating to the Rust wrapper. |
| packages/cli/bin/leanspec-rust.js | Adds platform-resolving Rust binary wrapper with header validation + fallbacks. |
| packages/cli/bin/lean-spec.js | Converts old entry point into a deprecated alias delegating to new wrapper. |
| package.json | Updates repo-level cli script to call bin/leanspec.js. |
| docs-site/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guide/usage/advanced-features/agent-configuration.mdx | Updates Chinese docs to new skills install command. |
| docs-site/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guide/migration.mdx | Updates Chinese migration docs to new skills install command. |
| docs-site/docs/guide/usage/advanced-features/agent-configuration.mdx | Updates English docs to new skills install command. |
| docs-site/docs/guide/migration.mdx | Updates English migration docs to new skills install command. |
| bin/leanspec.js | Adds root-level CLI shim used by CI to run leanspec wrapper. |
| bin/lean-spec.js | Updates root-level legacy shim to print deprecation warning and delegate. |
| .github/workflows/publish.yml | Updates binary copy paths and validation command to leanspec. |
| .github/workflows/copilot-setup-steps.yml | Updates workflow step labels and verification command to leanspec. |
| .github/workflows/ci.yml | Updates spec validation step to run node bin/leanspec.js .... |
Comments suppressed due to low confidence (1)
scripts/verify-npm-publish.ts:152
checkOptionalDependencies()is looking for optional dependency names likeleanspec-<platform>, but the platform packages are scoped (@leanspec/cli-<platform>), consistent withverifyPlatformPackages()above. This will incorrectly report missing platform deps for theleanspecpackage; update the expected prefixes to match the actual scoped package names.
// Check if all platforms are included
const expectedPrefixes = packageName === 'leanspec' ?
PLATFORMS.map(p => `leanspec-${p}`) :
PLATFORMS.map(p => `@leanspec/mcp-${p}`);
const missing = expectedPrefixes.filter(prefix =>
!Object.keys(optDeps).some(dep => dep.includes(prefix))
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cargo_bin_cmd!("lean-spec") and Command::cargo_bin("lean-spec") fail
because the Cargo binary was renamed to "leanspec" in the Cargo.toml.
https://claude.ai/code/session_018gK1o9NCRbj4paKqGw4Ftd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR completes the rename of the CLI from
lean-spectoleanspecand establishes a public skills repository for distributing the LeanSpec SDD methodology to AI agents via the Agent Skills framework.Key Changes
CLI Rename (lean-spec → leanspec)
lean-spectoleanspecpackages/cli/package.jsonto useleanspecas the main binary namelean-spectoleanspecinrust/leanspec-cli/Cargo.tomlpackages/cli/bin/leanspec.jsentry pointpackages/cli/bin/leanspec-rust.jsas the Rust binary wrapper with platform detection and fallback logiclean-speccommand with a warning message that delegates toleanspecleanspecPublic Skills Repository
codervisor/skillspublic repository structure with:.agents/skills/leanspec/SKILL.md— Comprehensive SDD methodology guide covering:leanspecCLI commandsreferences/workflow.md— Detailed workflow steps with decision pointsreferences/best-practices.md— Do's, don'ts, and status verification patternsreferences/commands.md— Complete CLI command referencereferences/examples.md— Practical examples and templatesREADME.md— Skill catalog and installation instructionsLICENSE— MIT license.github/workflows/validate.yml— CI validation for skill structureBinary Wrapper Implementation
leanspec-rust.jsprovides robust platform detection:LEANSPEC_DEBUG=1) for troubleshootingDocumentation & Configuration Updates
README.mdwith new skill installation commandrust/leanspec-cli/src/commands/skill.rsto reference new skills reporust/leanspec-cli/templates/AGENTS-with-skill.mdwith new skill namein-progressand marked Phase 1 tasks completeNotable Implementation Details
lean-speccommand shows a yellow warning but continues to work, providing a smooth migration pathleanspecconsistentlyhttps://claude.ai/code/session_018gK1o9NCRbj4paKqGw4Ftd