Skip to content

Commit 29f4aff

Browse files
committed
Exercise 14: Updating stakeholder docs to reduce debugging during implementation task. Aligning instructions to reduced app scope - pass 1.
1 parent 3b813a8 commit 29f4aff

File tree

3 files changed

+59
-48
lines changed

3 files changed

+59
-48
lines changed

DownloadableCodeProjects/standalone-lab-projects/sdd-get-started-rss-feed/StakeholderDocuments/ProjectGoals.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ The MVP is complete when:
4141

4242
Test with a known-good RSS feed like <https://devblogs.microsoft.com/dotnet/feed/>.
4343

44+
### Local development checklist
45+
46+
Before testing the MVP, verify:
47+
48+
- [ ] Backend runs without errors and listens on the configured port
49+
- [ ] Frontend runs without errors and loads in the browser
50+
- [ ] Frontend configuration (`wwwroot/appsettings.json`) points to the correct backend URL
51+
- [ ] Backend CORS allows the frontend origin
52+
- [ ] Browser DevTools console shows no connection errors when loading the page
53+
4454
## Future enhancements (post-MVP)
4555

4656
Once the basic demonstration is working, these features could be added:

DownloadableCodeProjects/standalone-lab-projects/sdd-get-started-rss-feed/StakeholderDocuments/TechStack.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,41 @@ These choices make development fast while keeping the architecture clean for fut
4747

4848
## Local development
4949

50-
- The backend API and frontend UI run on separate localhost ports
51-
- The UI needs to know the API URL (configure via `ApiBaseUrl` setting)
50+
### Port configuration
51+
52+
The backend API and frontend UI run on separate localhost ports. **Port consistency is critical** - the ports must be coordinated between three locations:
53+
54+
1. **Backend port** (defined in `backend/RSSFeedReader.Api/Properties/launchSettings.json`):
55+
- Default: `http://localhost:5151`
56+
- This is where the API listens for requests
57+
58+
2. **Frontend port** (defined in `frontend/RSSFeedReader.UI/Properties/launchSettings.json`):
59+
- Default: `http://localhost:5213`
60+
- This is where the Blazor app runs
61+
62+
3. **API base URL** (configured in `frontend/RSSFeedReader.UI/wwwroot/appsettings.json`):
63+
- Must match the backend port from step 1
64+
- Example: `{"ApiBaseUrl": "http://localhost:5151/api/"}`
65+
66+
4. **CORS policy** (configured in `backend/RSSFeedReader.Api/Program.cs`):
67+
- Must allow the frontend port from step 2
68+
- Example: `.WithOrigins("http://localhost:5213", "https://localhost:7025")`
69+
70+
### Configuration best practices
71+
72+
- **Frontend Program.cs**: Read API URL from configuration, don't hardcode:
73+
```csharp
74+
var apiBaseUrl = builder.Configuration["ApiBaseUrl"] ?? "http://localhost:5151/api/";
75+
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(apiBaseUrl) });
76+
```
77+
78+
- **Backend CORS**: Allow the actual frontend ports from launchSettings.json
79+
80+
- **Testing setup**: Before testing, verify:
81+
1. Backend is running and accessible at the configured port
82+
2. Frontend appsettings.json points to the correct backend port
83+
3. CORS allows the frontend origin
84+
5285
- Test with a known-good feed like <https://devblogs.microsoft.com/dotnet/feed/>
5386

5487
## Future enhancements (post-MVP)

Instructions/Labs/LAB_AK_14_get-started-spec-driven-development.md

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ GitHub Spec Kit is an open-source toolkit that enables Spec-Driven Development (
1010

1111
In this exercise, you learn how to use the GitHub Spec Kit to develop a new greenfield application. You begin by initializing the GitHub Spec Kit for a new .NET project. You then use GitHub Spec Kit workflows to create the constitution, specification, plan, and tasks documents for the new application. Finally, you use GitHub Spec Kit's implementation workflow to implement an initial MVP version of the application.
1212

13-
This exercise should take approximately **75** minutes to complete.
13+
This exercise should take approximately **60** minutes to complete.
1414

1515
> **IMPORTANT**: To complete this exercise, you must provide your own GitHub account and GitHub Copilot subscription. If you don't have a GitHub account, you can <a href="https://github.com/" target="_blank">sign up</a> for a free individual account and use a GitHub Copilot Free plan to complete the exercise. If you have access to a GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business, or GitHub Copilot Enterprise subscription from within your lab environment, you can use your existing GitHub Copilot subscription to complete this exercise.
1616
1717
## Before you start
1818

19-
Your lab environment MUST include the following resources: Git 2.48 or later, .NET SDK 8.0 or later (.NET 10 is the default), Visual Studio Code with the C# Dev Kit and GitHub Copilot Chat extensions, SQLite, Python 3.11 or later, the uv package manager, Specify CLI, and access to a GitHub account with GitHub Copilot enabled.
19+
Your lab environment MUST include the following resources: Git 2.48 or later, .NET SDK 8.0 or later, Visual Studio Code with the C# Dev Kit and GitHub Copilot Chat extensions, Python 3.11 or later, the uv package manager, Specify CLI, and access to a GitHub account with GitHub Copilot enabled.
2020

2121
For help with configuring your lab environment, open the following link in a browser: <a href="https://go.microsoft.com/fwlink/?linkid=2345907" target="_blank">Configure your GitHub Spec Kit lab environment</a>.
2222

2323
## Exercise scenario
2424

25-
You're a software developer working for a consulting firm that's moving to a spec-driven development (SDD) methodology using GitHub Spec Kit and GitHub Copilot in Visual Studio Code. Your firm has asked you to start using the SDD methodology and GitHub Spec Kit as soon as possible. One of your clients, Contoso Corporation, needs you to develop an RSS feed reader app for internal employees. You decide to use the SDD methodology for this greenfield project. Using a SDD methodology with GitHub Spec Kit ensures that an MVP version of the application is delivered quickly, and that additional features can be rolled out seamlessly.
25+
You're a software developer working for a consulting firm that's moving to a spec-driven development (SDD) methodology using GitHub Spec Kit and GitHub Copilot in Visual Studio Code. Your firm has asked you to start using the SDD methodology and GitHub Spec Kit as soon as possible. One of your clients, Contoso Corporation, needs you to develop an RSS feed reader app for internal employees. You decide to use the SDD methodology to create an MVP version of the application that can be used as a proof-of-concept. Using a SDD methodology with GitHub Spec Kit ensures that an MVP version of the application is delivered quickly, and that additional features can be rolled out seamlessly when needed.
2626

2727
Contoso's stakeholders documented the project goals, features, and technical requirements for the RSS feed reader app. This information can be used to help generate the constitution, specification, plan, and tasks documents.
2828

@@ -319,7 +319,7 @@ Use the following steps to complete this task:
319319
1. In the Chat view, to start a constitution workflow using a combination of inline text and stakeholder documents, enter the following command:
320320
321321
```plaintext
322-
/speckit.constitution --text "Code projects emphasize security, privacy, accessibility, performance, reliability, observability, release management, documentation, dependency management, and code quality. Ensure that all principles are specific, actionable, and relevant to the project context." --files StakeholderDocuments/ProjectGoals.md StakeholderDocuments/AppFeatures.md StakeholderDocuments/TechStack.md
322+
/speckit.constitution --text "Code projects emphasize security, privacy, reliability, and code quality. Ensure that all principles are specific, actionable, and relevant to the project context." --files StakeholderDocuments/ProjectGoals.md StakeholderDocuments/AppFeatures.md StakeholderDocuments/TechStack.md
323323
```
324324
325325
> **NOTE**: The /speckit.constitution command can be run multiple times in the same project to refine or extend the constitution.md file. Providing detailed inputs should generate a more accurate and comprehensive constitution.
@@ -337,7 +337,7 @@ Use the following steps to complete this task:
337337
Each principle should be clearly stated and actionable. For example:
338338
339339
- ❌ Vague: "Apply security best practices." is too general.
340-
- ✅ Clear: "HTML content MUST be sanitized before rendering." is specific and actionable.
340+
- ✅ Clear: "Validate feed URLs (reject file://, data:, javascript: schemes)." is specific and actionable.
341341
342342
If any critical requirements are missing or unclear, you can edit the constitution.md file directly to add or modify principles.
343343
@@ -389,10 +389,10 @@ Use the following steps to complete this task:
389389
390390
1. Create a summary description of the RSS Feed Reader app based on the stakeholder documents.
391391
392-
The summary description should be concise (a couple sentences) and capture the core functionality of the RSS Feed Reader app. For example:
392+
The summary description should be concise (a sentence or two) and capture the core functionality of the RSS Feed Reader app. For example:
393393
394394
```plaintext
395-
"MVP RSS reader: a local-first RSS/Atom reader where users can subscribe and manage feeds, add them via URL or website discovery, refresh to see updates, and read items with a clear newest-first, read/unread flow. Data and state persist on the device, with an item view, open-original links, and the ability to mark items (or all) as read. Reliability and safety are core: the system handles common feed issues gracefully, avoids duplicates, shows clear errors, and renders content securely with HTTPS and HTML sanitization."
395+
"MVP RSS reader: a simple RSS/Atom feed reader that demonstrates the most basic capability (subscribe and view items) without the complexity of a production-ready application."
396396
```
397397
398398
1. Close any files that you have open in the editor.
@@ -404,7 +404,7 @@ Use the following steps to complete this task:
404404
1. In the Chat view, to start a specification workflow that generates a spec.md file using information from your stakeholders document, enter the following command:
405405
406406
```plaintext
407-
/speckit.specify --text "MVP RSS reader: a local-first RSS/Atom reader where users can subscribe and manage feeds, add them via URL or website discovery, refresh to see updates, and read items with a clear newest-first, read/unread flow. Data and state persist on the device, with an item view, open-original links, and the ability to mark items (or all) as read. Reliability and safety are core: the system handles common feed issues gracefully, avoids duplicates, shows clear errors, and renders content securely with HTTPS and HTML sanitization." --files StakeholderDocuments/ProjectGoals.md StakeholderDocuments/AppFeatures.md
407+
/speckit.specify --text "MVP RSS reader: a simple RSS/Atom feed reader that demonstrates the most basic capability (subscribe and view items) without the complexity of a production-ready application." --files StakeholderDocuments/ProjectGoals.md StakeholderDocuments/AppFeatures.md
408408
```
409409
410410
If you don't specify the `--text` option, you might be asked to provide a description of the app features before you can continue.
@@ -512,8 +512,6 @@ Use the following steps to complete this task:
512512
513513
For a production scenario, you need to ensure that the plan provides a comprehensive description of the technical context and a clearly defined implementation strategy for the new feature. The research, quickstart, and data model files should complement the plan by providing additional context and details. For this exercise, focus on becoming familiar with the content associated with each of the files.
514514
515-
> **IMPORTANT**: This lab supports environments with .NET 8 or .NET 9 installed. However, .NET 10 is specified as the target framework in the stakeholder documents. If your environment includes .NET 8 or .NET 9 (but not .NET 10), you need to update the plan.md and quickstart.md files accordingly.
516-
517515
1. After reviewing the files, accept the updates.
518516
519517
If the plan omits important details or makes assumptions you disagree with, you can:
@@ -581,24 +579,6 @@ Use the following steps to complete this task:
581579
- Security requirements should have corresponding implementation tasks.
582580
- Performance requirements should have testing tasks.
583581
584-
1. Ensure that each task is specific and actionable:
585-
586-
- ✅ Good: "Implement safe HTTP fetcher (http/https only, timeout, size limits, content-type checks) in backend/src/RssFeedReader.Infrastructure/Http/FeedHttpClient.cs"
587-
- ❌ Vague: "Enforce security and reliability requirements in the HTTP client"
588-
589-
Verify that tasks have reasonable scope:
590-
591-
- Developers should be able to complete individual tasks in a few hours to a day.
592-
- If a task seems too large it might need to be broken down during implementation.
593-
594-
You can add task dependencies or notes if needed. For example:
595-
596-
```markdown
597-
- [ ] T026 Implement refresh pipeline orchestration (fetch -> parse -> sanitize -> persist -> status update) in backend/src/RssFeedReader.Domain/Services/FeedRefreshService.cs
598-
- Depends on: T021, T022, T024, T025
599-
- Note: This task implicitly depends on several earlier foundational tasks (HTTP fetcher, parser, sanitizer, identity hashing)
600-
```
601-
602582
1. Accept the suggested file updates, and then save the **tasks.md** file.
603583
604584
1. Commit the changes and then sync the updates.
@@ -629,7 +609,7 @@ Use the following steps to complete this task:
629609
630610
```plaintext
631611
**Phases**: Setup → Foundation → US1 only
632-
**Tasks**: T001 - T057 (57 tasks)
612+
**Tasks**: T001 - T048 (48 tasks)
633613
**Deliverable**: Users can add a known-good feed URL; refresh; see items; restart and confirm persistence.
634614
```
635615
@@ -701,33 +681,21 @@ Use the following steps to complete this task:
701681
702682
1. Save all updated files.
703683
704-
1. Ask GitHub Copilot to create a VS Code "Run and Debug" launch configuration that you can use to start both apps with one click.
705-
706-
For example, you could enter the following prompt in the Chat view:
684+
1. Start the backend application and then the frontend application.
707685
708-
```plaintext
709-
Create a VS Code "Run and Debug" launch configuration that I can use to start both apps with one click. Provide instructions for running the apps using the launch configuration.
710-
```
686+
Ensure that both applications are running locally without errors.
711687
712-
1. Use the launch configuration to run the backend and frontend applications.
688+
1. Open a browser and navigate to the frontend application.
713689
714-
If you encounter any errors, provide a detailed description of the error message and any relevant logs to GitHub Copilot for assistance. You can launch the backend and frontend separately if needed.
715-
716-
1. Open a browser and navigate to the Subscriptions page of the frontend application.
717-
718-
The frontend URL should be similar to the following: `http://localhost:5239/subscriptions`.
690+
The frontend URL should be similar to the following: `http://localhost:5239`.
719691
720692
1. Take a few minutes to verify the acceptance scenarios for the MVP application.
721693
722694
Here are some feeds that you can use to test the application:
723695
724696
- https://devblogs.microsoft.com/dotnet/feed/ (The .NET Blog)
725697
- https://devblogs.microsoft.com/visualstudio/feed/ (Visual Studio Blog)
726-
- https://devblogs.microsoft.com/powershell/feed/ (PowerShell Team Blog)
727-
- https://devblogs.microsoft.com/azure-sdk/feed/ (Azure SDK Blog)
728-
- https://devblogs.microsoft.com/commandline/feed/ (Windows Command Line / Terminal)
729-
- https://devblogs.microsoft.com/oldnewthing/feed/ (The Old New Thing)
730-
- https://learn.microsoft.com/en-us/shows/feed.xml (Microsoft Learn / Shows)
698+
731699
732700
You can find the acceptance scenarios in the spec.md file. The acceptance scenarios listed under the **User Scenarios & Testing** section.
733701

0 commit comments

Comments
 (0)