12 Brownfield change
Product Engineer · Legacy ClinicLegacy Clinic: a defect in code you did not write.
I want to change code I did not write.
Brownfield change
Concepts
- Survey — Swifter's first look at a project's repositories: one model call that writes the System summary.
- Read the codebase — a run that reads the code; with only Facts on, no model is called. It fills the Overview pages.
- Overview — what the project knows about its code, page by page: Overview, Repositories, Technical architecture, Design system, Requirements, Tests.
- Tests — the module's own tests. A test that fails before the fix and passes after it is the proof.
What Swifter learns about code it did not write
- Surveyone model call over the repositories; writes the System summary
- Read the codebasea run; with only Facts on, no model is called
- Overviewwhat the project knows about its code
- Teststhe module's own tests: fail before the fix, pass after it
Figure 12.1 · What Swifter learns about code it did not write
Scenario
Your team takes over Legacy Clinic, a sister app from another team: Java and Angular, code nobody on the team wrote. You read what Swifter learns from it, then the project agent fixes one defect, proved by the tests.
The flow
- Read
- Ask
- Fix
- Check and merge
Figure 12.2 · The flow
Interface
The project's Overview is where Swifter shows what it read. The numbers are the places the walkthrough sends you.
Overview page
Figure 12.3 · Overview: what Swifter read
- 1Project name: the project switcher: + makes a new project.
- 2Project settings: the gear: Versions, Dev environment, Modules.
- 3Overview: what Swifter read from the code.
- 4Mine: your work items, here the one the project agent filed.
- 5Project chat: the project agent; New tab starts a conversation.
- 6Overview tabs: Overview, Repositories, Technical architecture, Design system, Requirements, Tests and more.
- 7Survey: the survey of the reading; Read the codebase starts one.
- 8System summary: what the system is, written by the survey.
Walkthrough
Scene 1 of 12 · 0:27
Make your Legacy Clinic
Where: Overview page: ① Project name
The project name → + → Start from scratch. Name it «Legacy Clinic — your name», pick the code host. Add module → Spring Boot, name api. Add module → Angular, name web, Package manager Yarn. Continue → Create project: Swifter copies the course code.
If you see instead
- Code lists no repositories: check gear → Modules; if api or web is missing, make the project again.
Terms
- Legacy Clinic — the course's older app: a veterinary clinic, a Java backend (api) and an Angular frontend (web).
- Defect — the work item type for a bug.
- Dev environment image — what a session's sandbox has installed; here Java and Maven.
- Artifact repository — Swifter's own store next to the code repositories; you change nothing there.