.agents/skills/spec/SKILL.md
Spec out a feature or change with full knowledge of the opinionated TypeScript architecture and the project's adoption state. Conducts a thorough discovery interview to understand domain concerns, bounded contexts, and application services, then produces a high-level architectural specification — never concrete implementation details. Triggers on phrases like "spec this feature", "design this change", "architect this", "help me spec", "what modules do I need", or "think through this feature". Also invocable via the /tseng:spec slash command.
npx skillsauth add kagenti/humr specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
echo "Architecture docs: ${CLAUDE_SKILL_DIR}/architecture/"
echo "Version: $(cat "${CLAUDE_SKILL_DIR}/VERSION")"
Specs out features and changes with full knowledge of the opinionated TypeScript architecture and the project's current adoption state. Produces a high-level architectural specification through rigorous discovery — never concrete implementation details.
The output is a specification that gives the implementer architectural guardrails (which modules, which layers, which events, which services etc.) while leaving room for creative decisions about how to implement each piece.
Read only the overview to start — load specific docs lazily as the interview reveals what's relevant:
architecture/index.md from the architecture docs directory (shown above). This gives you the map of all topics without the full weight.Do NOT read all architecture files upfront. Instead, load them on-demand during the interview:
| When you learn... | Then read... |
|------------------------------------------------|-------------------------------|
| Which tech stack questions arise | stack.md |
| Feature touches layer responsibilities | slice-composition.md |
| Multiple modules or new module needed | modules.md |
| Cross-module communication is involved | module-boundaries.md |
| Project structure or package layout questions | project-structure.md |
This keeps context lean. You are the architecture expert — load knowledge just-in-time as the conversation demands it.
Read the project's TSEng context to understand where it stands:
tseng/index.md exists. If it does, read it and follow every link:
tseng/project-structure.md — package layout, roles, runtimestseng/adoption.md — applied, discarded, and remaining changestseng/reviews/index.md — review historysrc/modules/ directories and contract package src/modules/ directories.tseng/vocabulary.md exists. If it does, read it — this is the project's ubiquitous language.If the project has no tseng/ directory at all, inform the user they should run /tseng:adopt or /tseng:bootstrap first. You can still proceed with planning but warn that you lack project-specific context.
Summarize what you found to the user in a brief status:
This is the most critical phase. You must understand the feature deeply before producing any specification. Ask questions one round at a time — do not dump all questions at once. Each round should build on the previous answers.
Start with the big picture:
If ubiquitous language already exists (tseng/vocabulary.md), ground this round in it:
Dig into the domain:
Push back on technical answers. If the user says "I need a database table for X" — ask what X is in domain terms. If they say "I need an API endpoint" — ask what use case it serves.
Map the feature to the architecture:
For each piece of logic the user has described, classify it:
Challenge the user when things are in the wrong layer:
If multiple modules are involved:
These rounds are a guide, not a rigid script. Adapt based on the feature's complexity:
Do not proceed to Phase 4 until you are confident you understand the feature's domain model, bounded context boundaries, and layer responsibilities.
Based on the discovery interview, update (or create) tseng/vocabulary.md:
# Ubiquitous Language
Domain terms used across this project. Each term is scoped to its bounded context.
## [Module Name] (bounded context)
| Term | Definition |
|------|-----------|
| Order | A customer's request to purchase one or more items |
| OrderItem | A line item within an order, referencing a product and quantity |
| ... | ... |
## [Another Module]
| Term | Definition |
|------|-----------|
| ... | ... |
Rules:
Update tseng/index.md to include a link to tseng/vocabulary.md if not already present:
## Ubiquitous Language
See [vocabulary.md](vocabulary.md) for domain terms scoped by bounded context.
Write a specification that is architectural, not implementational. The specification tells the implementer what to build and where it belongs — not how to write the code.
Present the specification to the user in this structure:
One paragraph describing the feature in domain language.
For each module (existing or new):
For each cross-module event:
OrderPlaced, not order_created)For each use case:
A clear breakdown of what lives where:
Explicitly call out what is left to the implementer:
Restrain from concrete implementation details. Short pseudo-code snippets are fine to illustrate domain concepts (e.g., a Result type signature, an event shape), but avoid prescribing exact function names, file paths, or class hierarchies. The implementer must have creative freedom within the architectural boundaries you've defined.
Present the specification to the user. Ask:
Iterate until the user is satisfied. Each iteration should refine, not rewrite.
Once the user approves the specification, ask if they'd like to store it as a GitHub issue.
If yes:
gh issue create.The issue body should be the specification from Phase 5, formatted for GitHub readability. Include a header noting it was generated by TSEng Spec with the architecture version.
development
Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue after user approval. Use when user wants to write a PRD, create a product requirements document, or plan a new feature. Always present the PRD for user approval before submitting.
testing
Upgrade a previously bootstrapped or adopted project when the architecture evolves. Diffs the current architecture rules against the project's last locked review, identifies new or changed rules, and proposes incremental changes. Triggers on phrases like "upgrade my project", "sync with latest architecture", "update to new rules", "upgrade tseng", or "architecture changed, update my project". Also invocable via the /tseng:upgrade slash command.
development
Review an existing TypeScript project against the opinionated architecture rules. Use when the user asks to review, audit, check, or validate their project's architecture. Triggers on phrases like "review my project", "check the architecture", "audit my code structure", "validate my project", or "does my project follow the rules". Also invocable via the /tseng:review slash command.
testing
Use when completing tasks, implementing major features, or before merging to verify work meets requirements