Skip to content

feat: add kebab-case id field to project schema#17

Merged
AmanAgarwal041 merged 7 commits into
mainfrom
feat/project-id-field
Apr 1, 2026
Merged

feat: add kebab-case id field to project schema#17
AmanAgarwal041 merged 7 commits into
mainfrom
feat/project-id-field

Conversation

@alessiomauro

Copy link
Copy Markdown
Contributor

The project schema now includes an id field that is automatically generated as the kebab-case version of the project name. This allows project names to be human-readable strings while the id serves as a stable, filesystem-safe identifier used for directory naming.

Summary

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Tests (adding or updating tests)

SDK Affected

  • Python SDK
  • TypeScript SDK
  • Both
  • Documentation only

Testing

  • Tests pass locally (npm test / pytest)
  • Added new tests for changes
  • Manually tested

Checklist

  • Code follows project style guidelines
  • Self-reviewed my code
  • Commented hard-to-understand areas
  • Updated documentation if needed
  • No new warnings introduced

Related Issues


Crafted by Transilience.ai

alessiomauro and others added 4 commits March 27, 2026 11:25
The project schema now includes an `id` field that is automatically
generated as the kebab-case version of the project name. This allows
project names to be human-readable strings while the id serves as a
stable, filesystem-safe identifier used for directory naming.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace all uses of project `name` as the primary identifier with `id`.
The `id` (kebab-case) is now used for directory paths, lookups, CLI
output, and project resolution. The `name` field remains as a
human-readable display name in the schema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alessiomauro

Copy link
Copy Markdown
Contributor Author

@AmanAgarwal041 i think this requires your validation. let me konw as this made a lot of changes on the way the ID is used, now it's basically only using the ID instead of the name

alessiomauro and others added 3 commits March 27, 2026 11:59
When loading a project.json that lacks an `id` field, the schema now
automatically derives it as the kebab-case of `name`. This ensures
existing projects created before the id field was introduced continue
to work without manual migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduce a stable, filesystem-safe project id for projects and use it consistently across commands and APIs. Add an id field to ProjectConfig with a post-validator that derives a kebab-case id from the name when missing; update create to write and use project_config.id for directory names and messages. Make resolver return id instead of name, have get/download use id for target directories, and update get_project_path to resolve by id or fallback to config name for backward compatibility. Update output printing to display id, update sync to load and report project ids, and adjust/add tests to cover id generation, lookup, and behavior changes.
@AmanAgarwal041 AmanAgarwal041 merged commit 9b1218d into main Apr 1, 2026
7 checks passed
@AmanAgarwal041 AmanAgarwal041 deleted the feat/project-id-field branch April 1, 2026 11:21
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