Skip to content

[Hackathon] Add "testsprite test scaffold" to emit a schema-correct starter plan #101

Description

@Andy00L

Discord Username / User ID

interferon0

What does this improvement do?

To author a first test, a user or agent must hand-produce a JSON plan whose shape (projectId, type, name, planSteps[{type, description}]) is only documented as a copy-paste block in the onboarding skill and README, so a typo in a field name is caught only at create time. Add testsprite test scaffold that writes a ready-to-edit, schema-valid starter to stdout or --out : --type frontend (default) emits a CliPlanInput with one action + one assertion step and instructive placeholder descriptions; --type backend emits a minimal requests-based .py skeleton with a concrete status-code assertion. The emitted plan passes the validators immediately, so scaffold | lint is green out of the box. This turns "read the docs, hand-write JSON, hope the shape is right" into one command and addresses the empty-project drop-off at the top of the adoption funnel.

Details / implementation notes

Derive the emitted shape from the source of truth, not from memory: CliPlanInput (src/commands/test.ts:1738), PLAN_STEP_TYPES (test.ts:1726), and the priority enum (test.ts:511), each with a sourceRef comment. Pre-fill projectId from TESTSPRITE_PROJECT_ID when set (reuse requireProjectId, test.ts:8068), else a clearly-marked <run: testsprite project list> placeholder. Writing a file honors the existing --out-is-a-directory guard in openOutputFile and never overwrites without --force. Tests: the scaffolded FE plan and BE skeleton each pass the existing validators; --out into a directory is rejected exit 5. No new dependency. Pairs naturally with test lint. PR to follow once assigned.

Confirmations

  • I have searched existing issues and this is not a duplicate.
  • I have provided my Discord identity above for reward coordination.

Metadata

Metadata

Assignees

Labels

hackathonCLI hackathon submissionsin-progressAssigned and actively being worked on

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions