Starter: inherit the reference doctor silences and packageManager; cookieCrawl active in the reference

Same reference/package.json, reference/ipal-doctor.json and ci.yml env lines as claude/ipal-doctor-build,
so the two branches merge cleanly there. ipal-doctor.json of a new site keeps i18n-literals (the /design
styleguide) and audit:collections-present only while posts/caseStudies are in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 16:11:33 +01:00
co-authored by Claude Opus 5.5
parent 0dffb85ec1
commit 01afa6fab8
10 changed files with 59 additions and 12 deletions
+11 -3
View File
@@ -175,11 +175,19 @@ export function renderAgentsMd(reference: string, a: StarterAnswers, ctx: SiteCo
return header + reference.slice(rules, map) + siteMap + start + '\n' + renderDecisions(a, ctx) + reference.slice(to)
}
/** ipal-doctor.json: the domain, not launched yet, and every deliberate difference silenced with its reason. */
export function renderDoctorConfig(a: StarterAnswers, ctx: SiteContext): string {
type DoctorRule = { [key: string]: unknown; off?: boolean; reason: string; until?: string }
/**
* ipal-doctor.json: the domain, not launched yet, and every deliberate difference silenced with its reason —
* the reference site's own silences (`inherited`, from its ipal-doctor.json) while the files they cover are in
* the site, CSP report-only for 28 days, and each module the owner turned off.
*/
export function renderDoctorConfig(a: StarterAnswers, ctx: SiteContext, inherited: Record<string, DoctorRule> = {}): string {
const until = new Date(`${ctx.date}T00:00:00Z`)
until.setUTCDate(until.getUTCDate() + 28)
const rules: Record<string, { off: true; reason: string; until?: string }> = {
const kept = Object.entries(inherited).filter(([id]) => id !== 'audit:collections-present' || a.content.collections.length > 0)
const rules: Record<string, DoctorRule> = {
...Object.fromEntries(kept),
csp: { off: true, reason: 'report-only at the start; switch to enforce once the [csp] reports are clean (security.md → ROLL OUT CSP)', until: until.toISOString().slice(0, 10) },
}
for (const skip of auditSkips(a)) {