IAPL rename, scripted: preferred names in src, bin, scripts, services, tests; bin files and skill folders moved
Replaced by an explicit list of forms only (ten exported names, runtime env names, project file names and marks, commands, skill names, the log prefix, the brand in prose). Package name, import paths, routes, CSS tokens, data attributes, custom keys, context flags, the cookie and kv keys are not touched. package.json keeps the five old bin names beside the five new ones. The old names stop working in this commit and come back as aliases in the next; docs follow. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
414a4702df
commit
0a4f001797
@@ -122,15 +122,15 @@ describe('docs ↔ code', () => {
|
||||
|
||||
test('every top-level plugin option is documented', () => {
|
||||
const src = read('src/types.ts')
|
||||
const body = src.slice(src.indexOf('export type IpalOptions = {'))
|
||||
const body = src.slice(src.indexOf('export type IaplOptions = {'))
|
||||
const keys = [...body.matchAll(/^ {2}(\w+)\??:/gm)].map((m) => m[1])
|
||||
expect(keys.length).toBeGreaterThan(10)
|
||||
const all = docs.map(read).join('\n')
|
||||
expect(keys.filter((key) => !new RegExp(`\\b${key}\\b`).test(all))).toEqual([])
|
||||
})
|
||||
|
||||
test('every IPAL_* env var named in the docs is read by the code', () => {
|
||||
// The plugin, or a script/template shipped in the skills (e.g. IPAL_SEED_ALLOW_PROD_UPDATE).
|
||||
test('every IAPL_* env var named in the docs is read by the code', () => {
|
||||
// The plugin, or a script/template shipped in the skills (e.g. IAPL_SEED_ALLOW_PROD_UPDATE).
|
||||
const shipped = docs.filter((f) => f.startsWith('docs/agent/skills/') && /\.(?:mjs|ts|tsx)$/.test(f))
|
||||
const code = [...srcFiles(), ...shipped].map(read).join('\n')
|
||||
const named = new Set([...docs, 'README.md'].flatMap((f) => [...read(f).matchAll(/\bIPAL_[A-Z0-9_]+/g)].map((m) => m[0])))
|
||||
@@ -185,7 +185,7 @@ describe('docs ↔ code', () => {
|
||||
expect([...contentHelperNames()].filter((name) => !new RegExp(`\\b${name}\\b`).test(page))).toEqual([])
|
||||
})
|
||||
|
||||
test('install commands never tell projects to add packages ipal-kit already depends on', () => {
|
||||
test('install commands never tell projects to add packages IAPL already depends on', () => {
|
||||
const own = Object.keys(JSON.parse(read('package.json')).dependencies)
|
||||
const offending: string[] = []
|
||||
for (const file of ['README.md', 'docs/dev/PROGRAMISTA.md']) {
|
||||
@@ -230,7 +230,7 @@ describe('docs are in English', () => {
|
||||
})
|
||||
|
||||
/**
|
||||
* The agent guide (AGENT.md + the ipal-* skills copied into projects) is all an agent in a
|
||||
* The agent guide (AGENT.md + the iapl-* skills copied into projects) is all an agent in a
|
||||
* consumer project reads. Every export, option and env var must be findable there, or the
|
||||
* agent re-implements what the plugin already does.
|
||||
*/
|
||||
@@ -254,13 +254,13 @@ describe('agent guide covers the whole plugin', () => {
|
||||
return [...body.matchAll(/^\s+(\w+)\??:/gm)].map((m) => m[1])
|
||||
}
|
||||
const keys = [
|
||||
...typeKeys('src/types.ts', 'IpalOptions'),
|
||||
...typeKeys('src/types.ts', 'IaplOptions'),
|
||||
...typeKeys('src/modules/access/types.ts', 'AccessOption'),
|
||||
...typeKeys('src/modules/content/types.ts', 'ContentCollectionOption'),
|
||||
...typeKeys('src/modules/content/types.ts', 'ContentOption'),
|
||||
...typeKeys('src/modules/consent/scanner/types.ts', 'CookieScannerOptions'),
|
||||
...typeKeys('src/modules/consent/scanner/types.ts', 'CookieCrawlOptions'),
|
||||
...typeKeys('src/modules/env/ipalEnvRules.ts', 'IpalEnvFeatures'),
|
||||
...typeKeys('src/modules/env/iaplEnvRules.ts', 'IaplEnvFeatures'),
|
||||
...typeKeys('src/modules/forms/types.ts', 'FormsOption'),
|
||||
...typeKeys('src/modules/i18n/types.ts', 'I18nConfig'),
|
||||
...typeKeys('src/modules/i18n/types.ts', 'LocaleDefinition'),
|
||||
@@ -285,16 +285,16 @@ describe('agent guide covers the whole plugin', () => {
|
||||
|
||||
test('the working rules reach every skill that builds the site', () => {
|
||||
const agent = read('docs/agent/AGENT.md')
|
||||
for (const heading of ['## Ask before you build', '## ipal-kit first', '## Code rules']) {expect(agent).toContain(heading)}
|
||||
const skills = ['ipal-setup', 'ipal-site', 'ipal-block', 'ipal-collection', 'ipal-form']
|
||||
for (const heading of ['## Ask before you build', '## IAPL first', '## Code rules']) {expect(agent).toContain(heading)}
|
||||
const skills = ['iapl-setup', 'iapl-site', 'iapl-block', 'iapl-collection', 'iapl-form']
|
||||
const missing = skills.filter((name) => {
|
||||
const text = read(`docs/agent/skills/${name}/SKILL.md`)
|
||||
return !text.includes('ipal-kit first') || !text.includes('Code rules') || !text.includes('ipal-plugin-gap')
|
||||
return !text.includes('IAPL first') || !text.includes('Code rules') || !text.includes('iapl-plugin-gap')
|
||||
})
|
||||
expect(missing).toEqual([])
|
||||
// Both entry skills start with the architecture questions and wait for the answers.
|
||||
expect(read('docs/agent/skills/ipal-setup/SKILL.md')).toContain('## 0. Architecture questions')
|
||||
expect(read('docs/agent/skills/ipal-site/SKILL.md')).toContain('Architecture questions')
|
||||
expect(read('docs/agent/skills/iapl-setup/SKILL.md')).toContain('## 0. Architecture questions')
|
||||
expect(read('docs/agent/skills/iapl-site/SKILL.md')).toContain('Architecture questions')
|
||||
})
|
||||
|
||||
test('every @/lib/content helper', () => {
|
||||
|
||||
Reference in New Issue
Block a user