docs: guides, readme and spec for the Divi Library (v0.4.0)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-27 03:33:38 +02:00
co-authored by Claude Opus 5.5
parent 8808a7dcdb
commit 2729e2800e
15 changed files with 320 additions and 30 deletions
+13 -1
View File
@@ -16,6 +16,9 @@ defined('ABSPATH') || exit;
*/
final class InstructionsBuilder
{
/** Tool group of the Divi Library (LibraryAccess::GROUP); its rule needs a writable group. */
private const LIBRARY_GROUP = 'divi-library';
/** @var (callable(): list<string>)|null */
private $postTypeNames;
@@ -63,6 +66,15 @@ final class InstructionsBuilder
]
: [];
$library = str_contains(', ' . $active . ',', ', ' . self::LIBRARY_GROUP . ',')
&& $this->policy->groupWritable(self::LIBRARY_GROUP)
? [
'- Divi-Bibliothek: globale Module (lit-divi-outline zeigt [global <ID>]) im Bibliothekseintrag '
. 'ändern; das wirkt auf alle Seiten und braucht nach dem Probelauf confirm: true '
. '(lit-guide topic "divi-library").',
]
: [];
return implode("\n", array_merge($lines, [
'Regeln:',
'- Vor dem ersten Arbeitsschritt lit-guide (ohne Topic) aufrufen; Details je Thema über lit-guide '
@@ -74,6 +86,6 @@ final class InstructionsBuilder
'- Beim Bearbeiten immer den rev-Wert aus dem letzten Lesevorgang mitgeben (Pflicht).',
'- Löschen und Ersetzen erst nach Rückfrage beim Nutzer (confirm: true).',
'- Fehler enthalten einen hint – ihm folgen, statt blind zu wiederholen.',
], $divi));
], $divi, $library));
}
}