Skip to content

Ticket

A Ticket is the atomic unit of work in the SpecForge format. Each ticket describes a single implementation task with enough context for an AI agent (or a human developer) to execute it independently, given that its dependencies are satisfied.

Fields

Core Fields

FieldTypeRequiredDescription
idstringYesUnique identifier. Convention: ticket_ prefix.
ticketNumberstringYesHuman-readable ticket number (e.g., AUTH-001).
titlestringYesShort, descriptive title.
typestringYesThe type of work. See type enum.
statusstringYesCurrent status. See status enum.
prioritystringYesPriority level. See priority enum.
complexitystringYesEstimated complexity. See complexity enum.
descriptionstringNoDetailed description of the work to be done.
acceptanceCriteriastring[]NoList of criteria that must be met for the ticket to be considered done.

Implementation Details

FieldTypeRequiredDescription
implementationobjectNoDetailed implementation guidance for the agent.
implementation.stepsstring[]NoOrdered list of implementation steps.
implementation.notesstringNoAdditional context or caveats.
codeReferencesobject[]NoReferences to existing code the agent should read or modify.
codeReferences[].pathstringNoFile path relative to the project root.
codeReferences[].descriptionstringNoWhy this file is relevant.
typeReferencesobject[]NoType definitions the implementation should conform to.
typeReferences[].namestringNoName of the type or interface.
typeReferences[].definitionstringNoThe type definition content.

Testing

FieldTypeRequiredDescription
testSpecificationobjectNoTesting requirements for this ticket.
testSpecification.unitTestsstring[]NoUnit test descriptions.
testSpecification.integrationTestsstring[]NoIntegration test descriptions.
testSpecification.e2eTestsstring[]NoEnd-to-end test descriptions.

Relationships

FieldTypeRequiredDescription
dependenciesDependency[]NoArray of dependency objects. See Dependencies.

Status Enum

ValueDescription
openThe ticket is defined but work has not started.
in_progressThe ticket is being actively worked on.
in_reviewImplementation is complete and awaiting review.
doneThe ticket is complete and all acceptance criteria are met.
blockedThe ticket cannot proceed due to unresolved dependencies.

Type Enum

ValueDescription
featureNew functionality to be implemented.
bugA defect to be fixed.
choreMaintenance, refactoring, or tooling work.
spikeResearch or investigation task.

Priority Enum

ValueDescription
criticalMust be addressed immediately. Blocks other work.
highImportant. Should be completed in the current iteration.
mediumStandard priority. Scheduled normally.
lowNice to have. Can be deferred.

Complexity Enum

ValueDescription
lowStraightforward change. Minimal risk.
mediumModerate effort. May touch multiple files or systems.
highSignificant effort. Architectural decisions involved.
criticalVery high effort. Cross-cutting concerns, high risk.

Full Example

{
"id": "ticket_auth_middleware",
"ticketNumber": "AUTH-003",
"title": "Implement JWT authentication middleware",
"type": "feature",
"status": "open",
"priority": "high",
"complexity": "medium",
"description": "Create an Express middleware that validates JWT tokens on protected routes, extracts the user payload, and attaches it to the request object.",
"acceptanceCriteria": [
"Middleware rejects requests without a valid Authorization header",
"Middleware decodes and validates JWT tokens using the shared secret",
"Decoded user payload is attached to req.user",
"Expired tokens return 401 with a descriptive error message",
"Middleware can be applied to individual routes or route groups"
],
"implementation": {
"steps": [
"Create src/middleware/auth.ts",
"Import jsonwebtoken and the JWT_SECRET from config",
"Extract the Bearer token from the Authorization header",
"Verify the token and attach the decoded payload to req.user",
"Export the middleware as a named export"
],
"notes": "Use the existing error handling pattern from src/middleware/errorHandler.ts."
},
"codeReferences": [
{
"path": "src/middleware/errorHandler.ts",
"description": "Follow the same middleware pattern and error response structure."
},
{
"path": "src/config/index.ts",
"description": "JWT_SECRET is exported from here."
}
],
"typeReferences": [
{
"name": "AuthenticatedRequest",
"definition": "interface AuthenticatedRequest extends Request { user: { id: string; email: string; role: string; }; }"
}
],
"testSpecification": {
"unitTests": [
"Should return 401 when no Authorization header is present",
"Should return 401 when token is expired",
"Should return 401 when token signature is invalid",
"Should attach decoded user to req.user on valid token",
"Should call next() on successful validation"
],
"integrationTests": [
"Protected route returns 401 without token",
"Protected route returns 200 with valid token"
]
},
"dependencies": [
{
"dependsOnId": "ticket_auth_endpoint",
"type": "requires"
}
]
}