diff --git a/pkg/cmd/skills/skills/coding-versori-sdk/SKILL.md b/pkg/cmd/skills/skills/coding-versori-sdk/SKILL.md index 519a69a..c5949a8 100644 --- a/pkg/cmd/skills/skills/coding-versori-sdk/SKILL.md +++ b/pkg/cmd/skills/skills/coding-versori-sdk/SKILL.md @@ -148,6 +148,8 @@ See `references/cli-usage.md` for all commands, options, deployment safety guide **Always dry-run before syncing** — `sync` deletes local files not present in the platform. Show the user the diff and confirm before running for real. +**Always ensure a `.gitignore` exists** — After syncing a project or setting up a new project directory, check if a `.gitignore` file exists. If it doesn't, create one with the recommended content from `references/cli-usage.md` before installing dependencies or deploying. This prevents `node_modules/`, `dist/`, and other local artifacts from being pushed to the platform. + **Always verify code locally before deploying** — Before running a deploy command, you MUST ensure the code is valid by running `deno install` followed by `deno check src/index.ts` (or `deno lint`). Fix any type errors or linting issues before attempting to deploy. If `deno` is not available skill local validation. **Write tests for pure functions** — Whenever you extract logic into pure functions (e.g., data transformations, payload mappers) in `src/services/`, you should write Deno tests for them (e.g., `src/services/mapper.test.ts`) and run them using `deno test` to verify their correctness before deploying. diff --git a/pkg/cmd/skills/skills/coding-versori-sdk/references/cli-usage.md b/pkg/cmd/skills/skills/coding-versori-sdk/references/cli-usage.md index 541daf9..dde2f2e 100644 --- a/pkg/cmd/skills/skills/coding-versori-sdk/references/cli-usage.md +++ b/pkg/cmd/skills/skills/coding-versori-sdk/references/cli-usage.md @@ -203,17 +203,21 @@ versori projects assets upload --file versori-research/research.md --project 01K versori connections create --project 01KH6HD9QNAT57MGEPYG4CY9J5 --environment production --name shopify --template-id abc123 --api-key '$SHOPIFY_API_KEY' versori connections create --project 01KH6HD9QNAT57MGEPYG4CY9J5 --environment production --name postgres --template-id def456 --username '$POSTGRES_USERNAME' --password '$POSTGRES_PASSWORD' -# 7. List existing versions to determine the next version number +# 7. Ensure .gitignore exists (create with recommended content if missing) +# This prevents node_modules/, dist/, .env from being deployed +# See "Recommended .gitignore" section above for content + +# 8. List existing versions to determine the next version number versori projects versions list --project 01KH6HD9QNAT57MGEPYG4CY9J5 # → (no versions yet — use version 1) -# 8. Verify code validity locally +# 9. Verify code validity locally deno install deno check src/index.ts # Run tests if applicable deno test -# 9. After writing code, verifying it, and confirming with user, deploy +# 10. After writing code, verifying it, and confirming with user, deploy versori project deploy -d . --project=01KH6HD9QNAT57MGEPYG4CY9J5 --environment production --version 1 ``` @@ -230,6 +234,10 @@ versori project sync --directory shopify-sync/01KH6HD9QNAT57MGEPYG4CY9J5 --proje # 3. On confirmation, sync for real file and the projects assets if there are any versori project sync --directory shopify-sync/01KH6HD9QNAT57MGEPYG4CY9J5 --project 01KH6HD9QNAT57MGEPYG4CY9J5 --assets +# 3.5. Ensure .gitignore exists (create with recommended content if missing) +# This prevents node_modules/, dist/, .env from being deployed +# See "Recommended .gitignore" section above for content + # 4. Download existing research/context assets versori projects assets download --asset research.md --project 01KH6HD9QNAT57MGEPYG4CY9J5 diff --git a/skills/coding-versori-sdk/SKILL.md b/skills/coding-versori-sdk/SKILL.md index 519a69a..c5949a8 100644 --- a/skills/coding-versori-sdk/SKILL.md +++ b/skills/coding-versori-sdk/SKILL.md @@ -148,6 +148,8 @@ See `references/cli-usage.md` for all commands, options, deployment safety guide **Always dry-run before syncing** — `sync` deletes local files not present in the platform. Show the user the diff and confirm before running for real. +**Always ensure a `.gitignore` exists** — After syncing a project or setting up a new project directory, check if a `.gitignore` file exists. If it doesn't, create one with the recommended content from `references/cli-usage.md` before installing dependencies or deploying. This prevents `node_modules/`, `dist/`, and other local artifacts from being pushed to the platform. + **Always verify code locally before deploying** — Before running a deploy command, you MUST ensure the code is valid by running `deno install` followed by `deno check src/index.ts` (or `deno lint`). Fix any type errors or linting issues before attempting to deploy. If `deno` is not available skill local validation. **Write tests for pure functions** — Whenever you extract logic into pure functions (e.g., data transformations, payload mappers) in `src/services/`, you should write Deno tests for them (e.g., `src/services/mapper.test.ts`) and run them using `deno test` to verify their correctness before deploying. diff --git a/skills/coding-versori-sdk/references/cli-usage.md b/skills/coding-versori-sdk/references/cli-usage.md index 541daf9..dde2f2e 100644 --- a/skills/coding-versori-sdk/references/cli-usage.md +++ b/skills/coding-versori-sdk/references/cli-usage.md @@ -203,17 +203,21 @@ versori projects assets upload --file versori-research/research.md --project 01K versori connections create --project 01KH6HD9QNAT57MGEPYG4CY9J5 --environment production --name shopify --template-id abc123 --api-key '$SHOPIFY_API_KEY' versori connections create --project 01KH6HD9QNAT57MGEPYG4CY9J5 --environment production --name postgres --template-id def456 --username '$POSTGRES_USERNAME' --password '$POSTGRES_PASSWORD' -# 7. List existing versions to determine the next version number +# 7. Ensure .gitignore exists (create with recommended content if missing) +# This prevents node_modules/, dist/, .env from being deployed +# See "Recommended .gitignore" section above for content + +# 8. List existing versions to determine the next version number versori projects versions list --project 01KH6HD9QNAT57MGEPYG4CY9J5 # → (no versions yet — use version 1) -# 8. Verify code validity locally +# 9. Verify code validity locally deno install deno check src/index.ts # Run tests if applicable deno test -# 9. After writing code, verifying it, and confirming with user, deploy +# 10. After writing code, verifying it, and confirming with user, deploy versori project deploy -d . --project=01KH6HD9QNAT57MGEPYG4CY9J5 --environment production --version 1 ``` @@ -230,6 +234,10 @@ versori project sync --directory shopify-sync/01KH6HD9QNAT57MGEPYG4CY9J5 --proje # 3. On confirmation, sync for real file and the projects assets if there are any versori project sync --directory shopify-sync/01KH6HD9QNAT57MGEPYG4CY9J5 --project 01KH6HD9QNAT57MGEPYG4CY9J5 --assets +# 3.5. Ensure .gitignore exists (create with recommended content if missing) +# This prevents node_modules/, dist/, .env from being deployed +# See "Recommended .gitignore" section above for content + # 4. Download existing research/context assets versori projects assets download --asset research.md --project 01KH6HD9QNAT57MGEPYG4CY9J5