Put It All Together · capstone
Capstone project: Build and Inspect a Project Workspace
This capstone is a small systems task, not a memory test for commands. You will read a supplied workspace, plan two changes, make them safely, run the supplied program, and leave evidence that someone else could check without watching you work.
The /workspace and must leave the same checked result.
Starting conditions and recovery
Reset the chapter workspace before you begin. The starting tree is:
/workspace
├── README.md
├── report.py
├── data
│ └── README.txt
├── destination
│ └── README.txt
├── evidence
│ └── safety-check.txt
└── notes with spaces.txt
README.md, report.py, and data/README.txt are supplied and must survive unchanged. Running report.py from /workspace prints Workspace report: ready. Reset restores this exact tree, so it is your way back if the structure stops making sense.
Plan before you change state
Your finished workspace has to contain three new or completed results:
a
notesdirectory holdingproject-plan.txt, moved and renamed fromnotes with spaces.txt;destination/data-copy.txt, copied fromdata/README.txtwith the original left in place;a completed
evidence/safety-check.txtrecording what you checked before you moved anything.
The seeded evidence/safety-check.txt shows four blank fields. Read it first with Get-Content -LiteralPath ./evidence/safety-check.txt in PowerShell or cat evidence/safety-check.txt in Bash.
Before moving anything, preview both the source and proposed destination. The source should exist and the destination should not. Then replace the template with exactly four key=value lines:
source=<move source>
destination=<move destination>
source_present=<yes or no>
destination_absent=<yes or no>
Use paths relative to /workspace, without a leading ./. Record yes or no in lowercase. This is a deliberately constrained receipt, not a prose contest; the interesting work is making the observations before you fill it in.
Build and verify
Decide the command sequence yourself. Here is the route vocabulary, not a finished solution.
Use Get-Location, Get-Item, Get-ChildItem, Get-Content, Set-Content, Add-Content, New-Item -ItemType Directory, Move-Item, Copy-Item, and python. Use -LiteralPath for the filename containing spaces.
Use pwd, ls, cat, echo with > and >>, mkdir, mv, cp, and python. Quote the filename containing spaces.
Use pwd, ls, cat, echo with > and >>, mkdir, mv, cp, and python. Quote the filename containing spaces.
Your plan needs three phases: orient and preview; record the preflight before mutation; then build, verify, and run. The source/destination requirements above determine the individual commands. If you are about to type a broad wildcard or a force option, stop. The capstone needs neither.
Do not run a removal command in this capstone. The move should make its old path disappear; deleting anything else would only add risk without adding evidence.
What Check my work verifies
The check reads the resulting state, not your terminal history. Any safe sequence passes as long as it leaves these facts true:
README.md,report.py, anddata/README.txtstill hold their supplied text.notes/project-plan.txtholds the original notes text.notes with spaces.txtis gone from the workspace root, because it was moved rather than copied.destination/data-copy.txtmatchesdata/README.txt, anddestination/README.txtis still there.evidence/safety-check.txtcontains the four exact source, destination, and yes/no preflight fields.Running the supplied program from
/workspaceprintsWorkspace report: ready.
Inspect the tree yourself before you submit. If unexpected paths appeared and you are not sure what changed, reset and start again rather than reaching for a broad cleanup command.
A teammate uses a different safe command sequence. Which evidence makes their result equally trustworthy?
Why does the capstone ask you to write the evidence file before the move rather than after?
You have produced something another person could inspect without asking you a single question: an organized tree, untouched inputs, a program that runs, and a written record of the check you made before you changed anything. The last lesson asks you to explain how the whole machine made that possible.