Skip to content

Commit 36be19a

Browse files
committed
docs(architect): Add user prompt/context examples to documentation
- Update README.md with context usage examples for all architect actions - Add 'Pro Tip' section explaining benefit of providing context - Update architect.md template with example prompts and usage guidance - Enhance setup-architecture.sh help text with concrete examples - Enhance setup-architecture.ps1 help text with PowerShell examples - Update Phase 0 instructions to conditionally use provided context Users can now clearly see they can provide system descriptions directly: /architect init "B2B SaaS for supply chain management" /architect map "Django monolith with PostgreSQL and React" This improves discoverability of existing capability and reduces need for interactive question-answering when context is known upfront.
1 parent 5950f61 commit 36be19a

4 files changed

Lines changed: 52 additions & 2 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,27 @@ The toolkit includes comprehensive architecture documentation support that works
312312
# Initialize architecture documentation (greenfield projects)
313313
/speckit.architect init
314314

315+
# Or provide context directly for better results
316+
/speckit.architect init "B2B SaaS platform for real-time supply chain management"
317+
315318
# Map existing codebase architecture (brownfield projects)
316319
/speckit.architect map
317320

321+
# Add system description to guide the mapping
322+
/speckit.architect map "Django monolith with PostgreSQL, React frontend, deployed on AWS ECS"
323+
318324
# Review architecture against constitution
319325
/speckit.architect review
320326

327+
# Specify review focus areas
328+
/speckit.architect review "Validate security compliance and data privacy requirements"
329+
321330
# Update architecture as system evolves
322331
/speckit.architect update
323332

333+
# Describe what changed for targeted analysis
334+
/speckit.architect update "Migrated to microservices, added event sourcing and message queue"
335+
324336
# Then proceed with normal workflow
325337
/speckit.specify "Feature within this architecture"
326338
```
@@ -334,6 +346,13 @@ The toolkit includes comprehensive architecture documentation support that works
334346
| `update` | Update architecture based on codebase/spec changes with impact analysis |
335347
| `review` | Validate architecture against constitution and perspectives |
336348

349+
**Pro Tip**: Add context/prompts directly after the action for better results. For example:
350+
351+
- `init "Enterprise healthcare SaaS for compliance tracking"` - AI understands system scope from the start
352+
- `map "Node.js microservices on Kubernetes"` - Combines codebase scan with your description
353+
- `update "Added authentication service and event sourcing"` - Focuses analysis on specific changes
354+
- `review "Focus on security and performance"` - Prioritizes specific architectural concerns
355+
337356
#### Rozanski & Woods Viewpoints
338357

339358
The `/speckit.architect` command generates documentation covering:

scripts/bash/setup-architecture.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ for arg in "$@"; do
1616
ACTION="$arg"
1717
;;
1818
--help|-h)
19-
echo "Usage: $0 [action] [--json]"
19+
echo "Usage: $0 [action] [context] [--json]"
2020
echo ""
2121
echo "Actions:"
2222
echo " init Initialize new memory/architecture.md from template"
@@ -27,6 +27,15 @@ for arg in "$@"; do
2727
echo "Options:"
2828
echo " --json Output results in JSON format"
2929
echo " --help Show this help message"
30+
echo ""
31+
echo "Examples:"
32+
echo " $0 init \"B2B SaaS for supply chain management\""
33+
echo " $0 map \"Django monolith with PostgreSQL and React\""
34+
echo " $0 update \"Added microservices and event sourcing\""
35+
echo " $0 review \"Focus on security and performance\""
36+
echo ""
37+
echo "Pro Tip: Add context/description after the action for better results."
38+
echo "The AI will use your input to understand system scope and constraints."
3039
exit 0
3140
;;
3241
*)

scripts/powershell/setup-architecture.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ param(
1111
$ErrorActionPreference = 'Stop'
1212

1313
if ($Help) {
14-
Write-Output "Usage: ./setup-architecture.ps1 [action] [-Json] [-Help]"
14+
Write-Output "Usage: ./setup-architecture.ps1 [action] [context] [-Json] [-Help]"
1515
Write-Output ""
1616
Write-Output "Actions:"
1717
Write-Output " init Initialize new memory/architecture.md from template"
@@ -22,6 +22,15 @@ if ($Help) {
2222
Write-Output "Options:"
2323
Write-Output " -Json Output results in JSON format"
2424
Write-Output " -Help Show this help message"
25+
Write-Output ""
26+
Write-Output "Examples:"
27+
Write-Output " ./setup-architecture.ps1 init `"B2B SaaS for supply chain management`""
28+
Write-Output " ./setup-architecture.ps1 map `"Django monolith with PostgreSQL and React`""
29+
Write-Output " ./setup-architecture.ps1 update `"Added microservices and event sourcing`""
30+
Write-Output " ./setup-architecture.ps1 review `"Focus on security and performance`""
31+
Write-Output ""
32+
Write-Output "Pro Tip: Add context/description after the action for better results."
33+
Write-Output "The AI will use your input to understand system scope and constraints."
2534
exit 0
2635
}
2736

templates/commands/architect.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ $ARGUMENTS
2525

2626
You **MUST** consider the user input before proceeding (if not empty).
2727

28+
**Examples of User Input**:
29+
30+
- `init "B2B SaaS platform for supply chain management"`
31+
- `map "Django monolith with PostgreSQL, React frontend, AWS deployment"`
32+
- `update "Migrated to microservices, added event sourcing and Kafka"`
33+
- `review "Focus on security compliance and performance scalability"`
34+
35+
When users provide context like this, use it to inform your architecture work. This context helps you understand system scope, constraints, and focus areas without needing to ask basic questions.
36+
2837
## Outline
2938

3039
The text the user typed after `/speckit.architect` in the triggering message **is** the architecture action (init/map/update/review) and context. Assume you always have it available in this conversation even if `{ARGS}` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
@@ -106,6 +115,10 @@ The command supports four actions:
106115

107116
**Objective**: Establish stakeholders, concerns, and system scope
108117

118+
**If user provided context in {ARGS}**: Parse it for system description, scope, and constraints. Use this to skip basic questions and focus on clarifying details.
119+
120+
**If user provided minimal/no context**: Follow full discovery process below.
121+
109122
1. **Identify Stakeholders**:
110123
- Read `memory/constitution.md` if it exists
111124
- Prompt user to identify key stakeholders (Product Owner, Operations, Security, End Users)

0 commit comments

Comments
 (0)