Library › Book 13 › 1: Pre-Requisites — Discover the Application and Produce Customization Artifacts
1: Pre-Requisites — Discover the Application and Produce Customization Artifacts
0.1🔒Why this chapter existsDo not start a real Playwright automation repo from a generic harness template alone.
0.2🔒Set up Claude Code for discoveryBefore you explore the application, configure Claude Code so it works safely and efficiently during the discovery phase.
0.3🔒End state of this chapterBy the end of this chapter, you must have these files:
0.4🔒Core ruleThe application is the source of truth. The generic template is only the starting shape.
0.5🔒Discovery priority orderWhen learning a product, use the richest source you have. In most cases, use this order:
0.6🔒What Claude Code should learn during discoveryBefore any repo is scaffolded, Claude Code should extract:
0.7🔒Step 1 — Create a discovery workspaceBefore exploring the application, create the following folders locally in your future repo or in a scratch project folder:
0.8🔒Step 2 — Inspect the Site Map, if one existsIf the application has a visible Site Map page, start there. This is often the fastest way to capture the product’s real information…
0.9🔒Step 3 — If there is no Site Map, traverse the app deliberatelyIf no Site Map exists, discover structure from navigation and exploratory traversal.
0.10🔒Step 4 — Discover authentication and session behaviorA Playwright harness becomes much better when auth behavior is understood before scaffolding.
0.11🔒Step 5 — Discover the UI journeys that actually matterA good harness does not start by automating random pages. It starts with meaningful journeys.
0.12🔒Step 6 — Discover the API surfaceThe harness should support API automation from day one, ideally using Playwright APIRequestContext.
0.13🔒Step 7 — Write `docs/specs/product-under-test.md`This file is the highest-level description of the system under test.
0.14🔒Step 8 — Write `docs/specs/ui-journeys.md`This file defines where early UI automation should go. Talk to your product owner/product manager. Capture everything they respond to the…
0.15🔒Step 9 — Write `docs/specs/api-endpoints.md`This file tells the scaffolding step how API clients should be organized.
0.16🔒Step 10 — Generate `playwright-scaffolding.md`This is the most important artifact in the chapter.
0.17🔒Step 11 — Validate the artifacts before moving onBefore you continue to the next chapter, review the artifacts.
0.18🔒What not to do in this chapterDo not:
0.19🔒Deliverables from Chapter 0.1You are ready for the next chapter only when these files exist and are usable:
0.20🔒Mental modelThat custom blueprint is playwright-scaffolding.md.