@warpgogol/forge 2.21.3 → 2.21.5
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.
- package/README.md +88 -0
- package/README.uk.md +88 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -359,6 +359,94 @@ 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
|
+
|
|
362
450
|
## Stack profiles
|
|
363
451
|
|
|
364
452
|
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,94 @@ 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
|
+
|
|
353
441
|
## Профілі стеку
|
|
354
442
|
|
|
355
443
|
Профіль стеку визначає каркас проєкту: структуру директорій, залежності, конфігурацію CI та перший робочий простір. Оберіть профіль прапорцем `--profile` під час створення проєкту.
|