@warpgogol/forge 2.21.3 → 2.21.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +181 -0
  2. package/README.uk.md +181 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -359,6 +359,187 @@ pnpm exec forge rfc.validate
359
359
  pnpm exec forge skill.list
360
360
  ```
361
361
 
362
+ ---
363
+
364
+ ## Working with your AI agent
365
+
366
+ Forge works with any AI agent — Windsurf, Cursor, Claude Code, Codex CLI, or any IDE that supports agent skills. The setup is the same; only the conversation matters. Here are the patterns that make the biggest difference.
367
+
368
+ ### Start with questions, not commands
369
+
370
+ The single most effective habit: before asking the agent to write code, ask it about the codebase. The agent can read files, search git history, and run Forge CLI commands — let it explore first.
371
+
372
+ Good questions to start a session:
373
+
374
+ - "How is this project structured?"
375
+ - "What skills are available and what do they do?"
376
+ - "Walk me through the RFC workflow in this project."
377
+ - "What did we change this week?" (the agent reads git log)
378
+ - "Why does this function have 15 parameters? Check git history."
379
+
380
+ This works for onboarding too — new team members can get up to speed by asking the agent questions instead of reading code manually. The agent reads everything locally; nothing is uploaded or trained on.
381
+
382
+ ### AGENTS.md — your project's persistent memory
383
+
384
+ Forge generates `AGENTS.md` files at the project root and in each workspace directory. The agent reads them automatically at the start of every session — think of them as instructions that survive between conversations.
385
+
386
+ **What to put in AGENTS.md:**
387
+
388
+ - Build and test commands (`pnpm test`, `pnpm run build:check`)
389
+ - Code style conventions ("use 2 spaces, not tabs")
390
+ - Architecture decisions ("the game package owns all scene logic")
391
+ - "Do X, not Y" rules ("use `resolveImage()` for all image props, never raw `src`")
392
+ - Common mistakes to avoid
393
+
394
+ **When the agent makes a mistake**, tell it to update AGENTS.md so it doesn't repeat the error. Over time, AGENTS.md accumulates the team's hard-won knowledge.
395
+
396
+ Forge generates AGENTS.md from `forge.yaml` via `forge.agents.generate`. Hand-written AGENTS.md files (without the generated marker) are preserved. Generated ones are regenerated when you run `forge upgrade` or `forge.agents.generate` — so put your custom rules in `forge.yaml` or in a hand-written AGENTS.md, not in a generated one.
397
+
398
+ ### Describe results, not steps
399
+
400
+ The agent is an autonomous worker, not a typewriter. Tell it what you want, not how to do it.
401
+
402
+ **Bad** (over-specified):
403
+
404
+ > Open src/game/player.ts, add a function called calculateScore that takes a number array, sum it, return the result. Then open src/game/player.test.ts and add a test.
405
+
406
+ **Good** (result-oriented):
407
+
408
+ > Add a scoring system that calculates total points from collected items.
409
+
410
+ For complex work, ask the agent to plan first:
411
+
412
+ > I want to add a multiplayer mode. Make a plan first, show it to me, and wait for my approval before implementing.
413
+
414
+ Forge's `/fo-idea` skill formalizes this: idea → audit → plan → implement → review. You can invoke it explicitly, or the agent will follow the pattern when the task is complex enough.
415
+
416
+ ### Let the agent explore
417
+
418
+ Don't over-explain. The agent knows how to read files, search code, check git history, and run commands. Instead of pointing it to specific files, describe what you want to understand or change:
419
+
420
+ **Instead of:** "Look in the src/game folder for player.ts and check if it has a move function."
421
+
422
+ **Say:** "How does player movement work?"
423
+
424
+ The agent will find the relevant files, trace the call chain, and explain it back to you. If it needs more context, it will ask.
425
+
426
+ ### Parallel work
427
+
428
+ You can run multiple agent sessions simultaneously — in separate IDE windows, terminal tabs, or git worktrees. Each session works independently.
429
+
430
+ This is useful for:
431
+
432
+ - Writing an RFC in one session while implementing a different feature in another
433
+ - Exploring two design approaches in parallel before committing to one
434
+ - Running a long validation in one session while continuing work in another
435
+
436
+ If you use the Werkstatt engine, its mission system keeps work isolated — each mission has its own workpiece directory, so parallel sessions don't conflict.
437
+
438
+ ### Let the agent verify its own work
439
+
440
+ Give the agent criteria for "done" and let it check itself:
441
+
442
+ - "Run the tests after you're done."
443
+ - "Validate the RFC before committing."
444
+ - "Check project health with `forge doctor`."
445
+
446
+ Forge provides the tools — `forge doctor`, `forge rfc.validate`, `forge skill.list`, test runners. Tell the agent to use them. The agent can run commands, read the output, and fix issues without your intervention.
447
+
448
+ ---
449
+
450
+ ## Skill packs
451
+
452
+ Skill packs let you create project-local skills under your own prefix, separate from Forge's portable `fo-` skills. This is useful when your project has domain-specific workflows that don't belong in Forge's portable skill set.
453
+
454
+ ### Declaring a pack
455
+
456
+ Add a `skillPacks` entry to `forge.yaml`:
457
+
458
+ ```yaml
459
+ skillPacks:
460
+ - prefix: wg
461
+ dir: packages/my-skills/skills
462
+ ```
463
+
464
+ - `prefix` — short identifier used as a skill name prefix (e.g. `wg-deploy`, `wg-content-check`). Cannot be `fo` (reserved for Forge).
465
+ - `dir` — directory containing your pack skills. Each skill is a subdirectory with a `SKILL.md` file.
466
+
467
+ ### Pack manifest (`forge.plugin.yaml`)
468
+
469
+ Each pack directory must contain a `forge.plugin.yaml` manifest:
470
+
471
+ ```yaml
472
+ id: my-pack
473
+ version: 1.0.0
474
+ ```
475
+
476
+ - `id` — kebab-case identifier for the pack.
477
+ - `version` — semver version string.
478
+
479
+ `forge init` auto-creates this manifest if it's missing. You can also create it manually.
480
+
481
+ ### Skill structure
482
+
483
+ Skills follow the same structure as Forge skills:
484
+
485
+ ```
486
+ packages/my-skills/skills/
487
+ forge.plugin.yaml # pack manifest
488
+ wg-deploy/
489
+ SKILL.md # skill definition with frontmatter
490
+ wg-content-check/
491
+ SKILL.md
492
+ ```
493
+
494
+ Each `SKILL.md` has standardized frontmatter (name, description, category, concerns, dependsOn) — the same format as Forge's `fo-` skills.
495
+
496
+ ### Validation commands
497
+
498
+ ```sh
499
+ # Validate all pack manifests
500
+ pnpm exec forge plugin.validate
501
+
502
+ # List discovered packs
503
+ pnpm exec forge plugin.discover
504
+
505
+ # Validate individual skills (including pack skills)
506
+ pnpm exec forge skill.validate
507
+
508
+ # List all skills (pack skills annotated with pack:<prefix>)
509
+ pnpm exec forge skill.list
510
+ ```
511
+
512
+ ### Extension points (Compass contract blocks)
513
+
514
+ Packs can declare custom Compass contract blocks — source-file markers that `compass.validate` enforces. This lets your pack define its own `<MY_CONTRACT>` blocks with required tags:
515
+
516
+ ```yaml
517
+ id: my-pack
518
+ version: 1.0.0
519
+ extensionPoints:
520
+ compass:
521
+ contract:
522
+ blocks:
523
+ - blockId: api-contract
524
+ requiredFor:
525
+ - "packages/my-pack/**/*.ts"
526
+ requiredTags:
527
+ - name: purpose
528
+ minWords: 3
529
+ ```
530
+
531
+ `compass.validate` will emit `COMPASS-PLUGIN-01` (missing block), `COMPASS-PLUGIN-02` (missing required tag), and `COMPASS-PLUGIN-03` (tag below minWords) for files matching `requiredFor` that don't carry the block.
532
+
533
+ ### Rules
534
+
535
+ - Pack skill names must start with the pack prefix (e.g. `wg-deploy` for prefix `wg`).
536
+ - Pack skills cannot use the `fo-` prefix (reserved for Forge).
537
+ - Pack skills cannot reference platform RFC/ADR ids or platform names.
538
+ - Pack skills may depend on Forge skills, but Forge skills may not depend on pack skills (preserves portability).
539
+ - If a pack skill name conflicts with a Forge skill name, the pack skill is skipped during sync.
540
+
541
+ ---
542
+
362
543
  ## Stack profiles
363
544
 
364
545
  A stack profile defines the project scaffold: directory structure, dependencies, CI config, and first workspace. Choose a profile with `--profile` when creating a new project.
package/README.uk.md CHANGED
@@ -350,6 +350,187 @@ pnpm exec forge rfc.validate
350
350
  pnpm exec forge skill.list
351
351
  ```
352
352
 
353
+ ---
354
+
355
+ ## Робота з вашим ШІ-агентом
356
+
357
+ Forge працює з будь-яким ШІ-агентом — Windsurf, Cursor, Claude Code, Codex CLI або будь-яким IDE, що підтримує навички агентів. Налаштування однакове; важлива лише розмова. Ось патерни, які дають найбільший ефект.
358
+
359
+ ### Починайте з питань, а не з команд
360
+
361
+ Найефективніша звичка: перед тим, як просити агента писати код, запитайте його про кодову базу. Агент може читати файли, шукати в історії git та запускати CLI-команди Forge — дайте йому спочатку дослідити.
362
+
363
+ Добрі питання для початку сесії:
364
+
365
+ - "Як структурований цей проєкт?"
366
+ - "Які навички доступні і що вони роблять?"
367
+ - "Проведи мене через RFC робочий процес у цьому проєкті."
368
+ - "Що ми змінили цього тижня?" (агент читає git log)
369
+ - "Чому ця функція має 15 параметрів? Перевір історію git."
370
+
371
+ Це працює і для онбордингу — нові члени команди можуть швидко ввійти в курс справи, запитуючи агента, замість того, щоб вручну читати код. Агент читає все локально; нічого не завантажується та не тренується на вашому коді.
372
+
373
+ ### AGENTS.md — постійна пам'ять вашого проєкту
374
+
375
+ Forge генерує файли `AGENTS.md` в корені проєкту та в кожній директорії робочого простору. Агент читає їх автоматично на початку кожної сесії — сприймайте їх як інструкції, які зберігаються між розмовами.
376
+
377
+ **Що писати в AGENTS.md:**
378
+
379
+ - Команди збірки та тестування (`pnpm test`, `pnpm run build:check`)
380
+ - Угоди стилю коду ("використовуйте 2 пробіли, а не таби")
381
+ - Архітектурні рішення ("пакет гри володіє всією логікою сцен")
382
+ - Правила "роби X, а не Y" ("використовуйте `resolveImage()` для всіх image-пропів, ніколи сирий `src`")
383
+ - Типові помилки, яких слід уникати
384
+
385
+ **Коли агент помиляється**, скажіть йому оновити AGENTS.md, щоб він не повторював помилку. З часом AGENTS.md накопичує здобуті командою знання.
386
+
387
+ Forge генерує AGENTS.md з `forge.yaml` через `forge.agents.generate`. Написані вручну AGENTS.md (без згенерованого маркера) зберігаються. Згенеровані файли регенеруються при запуску `forge upgrade` або `forge.agents.generate` — тому кладіть свої правила в `forge.yaml` або в написаний вручну AGENTS.md, а не в згенерований.
388
+
389
+ ### Описуйте результат, а не кроки
390
+
391
+ Агент — автономний працівник, а не друкарська машинка. Скажіть йому, що ви хочете, а не як це зробити.
392
+
393
+ **Погано** (занадто детально):
394
+
395
+ > Відкрий src/game/player.ts, додай функцію calculateScore, яка приймає масив чисел, сумує його, повертає результат. Потім відкрий src/game/player.test.ts і додай тест.
396
+
397
+ **Добре** (орієнтовано на результат):
398
+
399
+ > Додай систему підрахунку очок, яка обчислює загальні бали за зібрані предмети.
400
+
401
+ Для складних задач просіть агента спочатку спланувати:
402
+
403
+ > Я хочу додати багатокористувацький режим. Спочатку склади план, покажи мені, і чекай на моє схвалення перед реалізацією.
404
+
405
+ Навичка Forge `/fo-idea` формалізує це: ідея → аудит → план → реалізація → рев'ю. Ви можете викликати її явно, або агент буде слідувати цьому патерну, коли задача достатньо складна.
406
+
407
+ ### Дайте агенту дослідити
408
+
409
+ Не пояснюйте занадто детально. Агент вміє читати файли, шукати в коді, перевіряти історію git та запускати команди. Замість того, щоб вказувати на конкретні файли, опишіть, що ви хочете зрозуміти або змінити:
410
+
411
+ **Замість:** "Подивись у папці src/game файл player.ts і перевір, чи є там функція move."
412
+
413
+ **Скажіть:** "Як працює рух гравця?"
414
+
415
+ Агент знайде відповідні файли, простежить ланцюг викликів і пояснить вам. Якщо йому потрібен буде додатковий контекст, він запитає.
416
+
417
+ ### Паралельна робота
418
+
419
+ Ви можете запускати кілька сесій агента одночасно — в різних вікнах IDE, вкладках терміналу або git worktrees. Кожна сесія працює незалежно.
420
+
421
+ Це корисно для:
422
+
423
+ - Написання RFC в одній сесії, паралельно з реалізацією іншої функції в іншій
424
+ - Дослідження двох дизайн-підходів паралельно перед вибором одного
425
+ - Запуску тривалої валідації в одній сесії, продовжуючи роботу в іншій
426
+
427
+ Якщо ви використовуєте рушій Werkstatt, його система місій ізолює роботу — кожна місія має власну директорію workpiece, тому паралельні сесії не конфліктують.
428
+
429
+ ### Дозвольте агенту перевіряти власну роботу
430
+
431
+ Дайте агенту критерії "готово" і дозвольте йому перевірити себе:
432
+
433
+ - "Запусти тести після завершення."
434
+ - "Валідуй RFC перед комітом."
435
+ - "Перевір стан проєкту через `forge doctor`."
436
+
437
+ Forge надає інструменти — `forge doctor`, `forge rfc.validate`, `forge skill.list`, тест-ранери. Скажіть агенту використовувати їх. Агент може запускати команди, читати вивід та виправляти проблеми без вашої втручання.
438
+
439
+ ---
440
+
441
+ ## Пакети навичок
442
+
443
+ Пакети навичок (skill packs) дозволяють створювати навички проєкту під власним префіксом, окремо від портативних `fo-` навичок Forge. Це корисно, коли ваш проєкт має домен-специфічні робочі процеси, які не належать до портативного набору Forge.
444
+
445
+ ### Оголошення пакету
446
+
447
+ Додайте запис `skillPacks` у `forge.yaml`:
448
+
449
+ ```yaml
450
+ skillPacks:
451
+ - prefix: wg
452
+ dir: packages/my-skills/skills
453
+ ```
454
+
455
+ - `prefix` — короткий ідентифікатор, що використовується як префікс імені навички (наприклад `wg-deploy`, `wg-content-check`). Не може бути `fo` (зарезервовано для Forge).
456
+ - `dir` — директорія, що містить навички вашого пакету. Кожна навичка — піддиректорія з файлом `SKILL.md`.
457
+
458
+ ### Маніфест пакету (`forge.plugin.yaml`)
459
+
460
+ Кожна директорія пакету повинна містити маніфест `forge.plugin.yaml`:
461
+
462
+ ```yaml
463
+ id: my-pack
464
+ version: 1.0.0
465
+ ```
466
+
467
+ - `id` — ідентифікатор пакету в kebab-case.
468
+ - `version` — рядок версії у форматі semver.
469
+
470
+ `forge init` автоматично створює цей маніфест, якщо він відсутній. Ви також можете створити його вручну.
471
+
472
+ ### Структура навичок
473
+
474
+ Навички мають ту саму структуру, що й навички Forge:
475
+
476
+ ```
477
+ packages/my-skills/skills/
478
+ forge.plugin.yaml # маніфест пакету
479
+ wg-deploy/
480
+ SKILL.md # визначення навички з frontmatter
481
+ wg-content-check/
482
+ SKILL.md
483
+ ```
484
+
485
+ Кожен `SKILL.md` має стандартизований frontmatter (name, description, category, concerns, dependsOn) — той самий формат, що й у `fo-` навичок Forge.
486
+
487
+ ### Команди валідації
488
+
489
+ ```sh
490
+ # Валідувати всі маніфести пакетів
491
+ pnpm exec forge plugin.validate
492
+
493
+ # Перелічити виявлені пакети
494
+ pnpm exec forge plugin.discover
495
+
496
+ # Валідувати окремі навички (включно з навичками пакетів)
497
+ pnpm exec forge skill.validate
498
+
499
+ # Перелічити всі навички (навички пакетів позначені pack:<prefix>)
500
+ pnpm exec forge skill.list
501
+ ```
502
+
503
+ ### Точки розширення (блоки Compass-контракту)
504
+
505
+ Пакети можуть оголошувати власні блоки Compass-контракту — маркери у вихідних файлах, які `compass.validate` перевіряє. Це дозволяє вашому пакету визначати власні `<MY_CONTRACT>` блоки з обов'язковими тегами:
506
+
507
+ ```yaml
508
+ id: my-pack
509
+ version: 1.0.0
510
+ extensionPoints:
511
+ compass:
512
+ contract:
513
+ blocks:
514
+ - blockId: api-contract
515
+ requiredFor:
516
+ - "packages/my-pack/**/*.ts"
517
+ requiredTags:
518
+ - name: purpose
519
+ minWords: 3
520
+ ```
521
+
522
+ `compass.validate` видаватиме `COMPASS-PLUGIN-01` (відсутній блок), `COMPASS-PLUGIN-02` (відсутній обов'язковий тег) та `COMPASS-PLUGIN-03` (тег з меншою кількістю слів) для файлів, що відповідають `requiredFor`, але не містять блок.
523
+
524
+ ### Правила
525
+
526
+ - Імена навичок пакету повинні починатися з префіксу пакету (наприклад `wg-deploy` для префіксу `wg`).
527
+ - Навички пакету не можуть використовувати префікс `fo-` (зарезервовано для Forge).
528
+ - Навички пакету не можуть посилатися на ідентифікатори платформених RFC/ADR або назви платформи.
529
+ - Навички пакету можуть залежати від навичок Forge, але навички Forge не можуть залежати від навичок пакету (зберігає портативність).
530
+ - Якщо ім'я навички пакету конфліктує з іменем навички Forge, навичка пакету пропускається під час синхронізації.
531
+
532
+ ---
533
+
353
534
  ## Профілі стеку
354
535
 
355
536
  Профіль стеку визначає каркас проєкту: структуру директорій, залежності, конфігурацію CI та перший робочий простір. Оберіть профіль прапорцем `--profile` під час створення проєкту.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warpgogol/forge",
3
- "version": "2.21.3",
3
+ "version": "2.21.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",