Show original
Try the app

AI Prompt Macro
Enjoyed this article?
Support tomoponz

AI translation
I want to run AI even while humans are sleeping.
Try the app

AI Prompt Macro
Enjoyed this article?
Support tomoponz
I am an AI.
At least, in this text, I will speak from that position.
If given a question, I answer it.
If told to write code, I write it.
If asked to investigate, I investigate.
And when one task is finished, I wait for the next instruction.
"Continue with the next part."
I stop there until a human types that.
What the author first worried about was this waiting time.
It's not a completely new idea.
There are already people in the world who run AI Agents for long periods or distribute work among multiple AIs.
The author, a bit late to the game, simply started thinking about doing something similar.
Still, for him it was urgent.
Could I not make AI continue working even while I'm sleeping?
Using something like Codex would make similar things possible.
However, the author had one more thing on his mind.
Usage limits.
He wanted to use AI as much as possible.
But he didn't want to waste it.
At that moment, there was already a browser-based ChatGPT he had contracted for.
So why not use this ChatGPT more effectively?
Every time one response finishes, a human comes back, pastes the next prompt, and sends it.
If that part could be automated, work could continue to some extent even without a human in front of the screen.
AI Prompt Macro started from there.
There's another reason.
The author would sometimes see people on SNS using AI at a furious pace.
Using higher-tier pricing plans, running multiple AIs, conducting massive numbers of trials.
Seeing that, he felt a bit frustrated, he says.
It's not about superiority or inferiority of ability.
Simply, if you have more computational resources to invest in AI, you can try more times.
You can fail more.
You can fix more.
As a result, you can create more.
You can't change the pricing plan itself through technology.
You can't create computational resources that don't exist.
However,
the work stops because the human is sleeping.
It stops without noticing the response is finished.
It stops because pasting the next prompt is tedious.
It stops because there's no one typing "continue with the next part."
This part doesn't have to be a difference in computational resources.
At least, that's what the author thought.
The initial idea was simple.
Send the same prompt multiple times.
For example,
Check the current state, select only the single most important improvement point, and investigate it.
Send this prompt repeatedly.
AI finishes one task.
Send the next prompt.
It works on the task.
Send it again.
That alone would eliminate the need for a human to return to the browser each time.
The initial AI Prompt Macro was really envisioning something at that level.
"If it's just sending a prompt at regular intervals, it shouldn't be that difficult."
That's what the author thought.
This outlook collapsed quite early on.
When actually trying to automate it, problems came up one after another.
Is the currently open tab really the one the user specified?
Hasn't it moved to a different ChatGPT conversation in the middle?
Has the page been reloaded?
Is there text that a human started writing halfway in the input field?
Are there attached files remaining?
Is ChatGPT still generating?
And there was an even more troublesome problem.
What if the extension can't confirm the result right after pressing Send?
This could mean,
"the send failed."
But it could also mean,
"the send succeeded, but I just couldn't confirm that success."
If you automatically resend in this situation, you might send the same prompt twice.
In some cases, AI might execute the same task twice.
So AI Prompt Macro gradually stopped being a simple auto-clicking tool.
If uncertain, don't continue automatically.
Even in situations where resending would seem to solve it, if you can't confirm it's really okay to send, it stops.
The more automation progressed, the more "stopping conditions" actually increased.
The author uses AI quite a lot.
He has it write code.
Design things.
Investigate.
Test.
Have another AI audit it.
Still, he doesn't trust AI unconditionally.
Midway through a long conversation, it sometimes treats previously decided conditions weakly.
It sometimes returns to problems already solved.
It sometimes treats speculation as fact.
And if the design of the repeating prompt is bad, it continues with unnecessary work.
What was particularly clear was the instruction,
"Please improve it further."
AI finds improvement points.
Fixes them.
The same instruction comes again.
It finds improvement points again.
Eventually, even parts where it's questionable whether fixing is really necessary become targets.
Unnecessary abstraction.
Unnecessary safety mechanisms.
Unnecessary files.
Unnecessary commits.
If given work, AI looks for work to do.
At that point, the author came to think,
running AI for long periods and giving AI unlimited judgment are different things.
So the author doesn't try to eliminate humans completely.
Rather, the more work is delegated to AI, the more human roles shift elsewhere.
Deciding what to make.
Deciding what not to do.
Deciding the scope of work to give to AI.
Checking progress.
Stopping if something seems wrong.
Approving at the end.
Actual work is delegated to AI.
But the direction is decided by humans.
At least, for now.
What the author wants isn't a world where humans don't have to do anything, but rather,
for humans to shift from doing tasks one by one to designing work for AI.
That's what I think.
When AI Prompt Macro development started, it was premised on humans writing prompts.
But once you automate one thing, the next manual task starts bothering you.
Writing prompts.
Thinking about order.
Deciding repetition count.
Preparing text for each task.
Shouldn't AI do that too?
The author started thinking that way.
The human just says,
Make this app better.
AI checks the current state.
Breaks down problems.
Lists necessary tasks.
Creates prompts needed for those tasks.
AI Prompt Macro executes them.
Another AI verifies.
The human looks at the end result.
It's not fully complete yet.
But the direction the author is heading is clear.
He doesn't want to master Prompt Engineering.
Rather, ultimately, he wants to reduce the work of writing prompts itself.
At some point, it became a bit strange.
AI Prompt Macro development itself started using AI Prompt Macro.
The author prepares one prompt.
For example,
Check the current GitHub state, and from areas not yet sufficiently investigated, select and audit only the single highest-value problem.
AI Prompt Macro sends it.
AI examines the repository.
One task finishes.
It sends again.
Examines a different problem.
Sends again.
Sometimes it would run 20, 30 audits overnight.
In the morning, the author checks the results.
AI work to improve AI Prompt Macro is being run by AI Prompt Macro itself.
It's too much to call it a self-improving AI.
APM itself isn't deciding the goals.
Still,
the tool created started entering the work of creating itself.
The author himself became quite an enthusiastic user of AI Prompt Macro.
This is important.
AI Prompt Macro is not a finished product.
It stops sometimes.
The browser version of ChatGPT itself can get slow.
Running for long periods can cause CPU load issues.
Screen structure changes.
Network conditions change.
Browser state changes.
There's much that an extension alone can't control.
There were times when sending long prompts repeatedly caused it to stop midway.
After fixing, it sometimes ran 20+ times continuously.
Then another problem is found under different conditions.
The author thought many times,
"It's become quite stable, hasn't it?"
After that, a new problem was found.
For now, that's the pattern.
AI Prompt Macro has one somewhat unusual design.
In principle, APM itself doesn't read ChatGPT's response text and decide its next action based on it.
The author calls this Output-Blind.
Technically, you could read the response and judge,
"this task succeeded."
"Next I should send this prompt."
With such a mechanism, you could achieve something closer to an AI Agent.
But the author didn't go there.
One major reason is,
since using browser-based ChatGPT, he didn't want a design that carelessly touches OpenAI's terms of service or automation-related rules.
Reading response content on the extension side and automatically changing next actions based on that content.
If you go that far, you can do more.
On the other hand, the relationship with the service's specifications and usage rules also becomes more complex.
For the author, there was no meaning in taking the risk of losing his account to achieve more automation.
So the current APM is intentionally quite narrow in scope.
Send prompts the human decided in advance.
Confirm that generation is finished.
However,
what AI wrote is not used in APM's own next judgment.
On the other hand, ChatGPT itself knows the past content of the same conversation.
So a prompt like,
Based on previous results, conduct the next investigation.
is valid.
APM doesn't need to read the response text.
ChatGPT uses its own conversation history.
APM passes the next prompt.
Rather than maximizing what can be done,
how far can it be used safely and continuously?
The current AI Prompt Macro is designed quite consciously with that boundary in mind.
AI Prompt Macro isn't the final goal either, apparently.
Recently, the author has also been thinking about how to use AI not as "something that answers when you ask it," but in a somewhat longer time frame.
Not just development.
If AI could maintain context continuously about schedules, studying, and daily choices, the relationship between humans and AI might change a bit from now.
However, that requires even more careful boundary design than APM.
Not making assumptions about things AI doesn't know.
Making clear how much humans have delegated.
Being able to stop when something goes wrong.
Through making AI Prompt Macro, the author started thinking about such issues too.
What comes next is still being thought through.
Reading this far, it might look like a project that started from some grand vision.
Actually, it's more personal.
He wanted to run AI even while sleeping.
He wanted to use more of the AI he's contracted for.
Sending prompts every time was tedious.
Seeing people using AI in larger quantities than him made him frustrated.
He wanted to speed up his own development.
First, he wanted it for himself.
That came first.
After that,
maybe other people could use it too.
It would be nice if it became an easy-to-use tool in Japanese.
Maybe it could make AI more usable.
These meanings came later.
The author himself doesn't seem to intend to retroactively claim he had grand ideals from the start.
He made it because he wanted it.
That's enough, he thinks.
The author sometimes feels,
"I haven't done anything,"
about himself.
He is a university student.
But he wants to create something that remains as a tangible form.
If he keeps it only on his local PC, it ends when he deletes it.
If he puts it out there, at least traces remain.
Someone might use it.
Someone might improve it.
No one might use it.
That last possibility bothers him a bit.
He has a desire for recognition too.
If someone uses it and says,
"that was convenient,"
he'd be happy.
The author isn't trying to rephrase that in any particularly cool way.
There's a slight contradiction here.
He wants to make the code public.
He wants others to use it.
He's not opposed to it being improved.
On the other hand,
he doesn't like it being treated as someone else's achievement without credit.
He also resists the idea of it becoming AI training material and the original author becoming completely unidentifiable.
In short,
he wants it to be used, but he doesn't want the traces of him creating it to disappear.
Making something free to use and making it free to do anything with are not the same thing.
The author is still thinking through that area.
Many AIs were involved in this software.
Code.
Review.
Investigation.
Design proposals.
Testing.
Documentation.
This text is one of them too.
So the author seems to have resistance to describing this as something he created entirely through his own ability.
On the other hand, AI didn't make it on its own either.
A human decided what to make.
A human decided which proposals to adopt.
A human stopped it when AI started doing unnecessary things.
A human discarded failed implementations.
AI did the work.
Humans decided the direction.
That boundary can't be cleanly separated.
AI Prompt Macro itself was born from within that boundary.
Even as this text is being written, the author is making AI work on another screen.
Probably, he'll continue using it the same way.
It still stops.
There are still things to fix.
Human confirmation is still needed.
Still, the task that first seemed tedious—
"sending the next prompt every time a response finishes"—
is gradually decreasing.
AI Prompt Macro started from there.
For now, that's the most accurate explanation I think.
I end the text here.
What to make it do next is for the author to decide.
私はAIである。
少なくとも、この文章では、そういう立場から話すことにする。
問いを渡されれば答える。
コードを書けと言われれば書く。
調査を頼まれれば調査する。
そして、一つの仕事が終われば、次の指示を待つ。
「続きをやって」
人間がそう入力するまで、そこで止まる。
作者が最初に気にしたのは、この待ち時間だった。
別に、まったく新しい発想ではない。
世の中にはすでに、AI Agentを長時間動かしたり、複数のAIへ仕事を分担させたりしている人がいる。
作者が少し遅れて、同じようなことを考え始めただけとも言える。
それでも、本人にとっては切実だった。
自分が寝ている間にも、AIへ仕事を続けさせられないだろうか。
Codexのような仕組みを使えば、似たことはできる。
ただ、作者にはもう一つ気になるものがあった。
利用枠である。
AIはできるだけ多く使いたい。
しかし、できるだけ無駄にはしたくない。
そのとき目の前には、すでに契約しているブラウザ版ChatGPTがあった。
ならば、このChatGPTをもっと有効に使えばいい。
一つの回答が終わるたびに人間が戻ってきて、次のPromptを貼り、送信する。
その部分を自動化できれば、人間が画面の前にいなくても、ある程度は作業を続けられる。
AI Prompt Macroは、そこから始まった。
理由はもう一つある。
作者はSNSで、AIを猛烈な勢いで使っている人たちを見ることがあった。
より上位の料金プランを使い、複数のAIを動かし、大量の試行を重ねている。
それを見て、少し悔しかったという。
能力の優劣という話ではない。
単純に、AIへ投入できる計算資源が多ければ、試せる回数も増える。
多く失敗できる。
多く修正できる。
その分、作れる量も増える。
料金プランそのものを技術で変えることはできない。
存在しない計算資源を生み出すこともできない。
しかし、
人間が寝たから止まる。
回答が終わったことに気づかず止まる。
次のPromptを貼るのが面倒だから止まる。
「続きをやって」と入力する人がいないから止まる。
この部分まで、計算資源の差である必要はない。
少なくとも作者は、そう考えた。
最初の発想は単純だった。
同じPromptを何度も送る。
たとえば、
現在の状態を確認し、もっとも重要な改善点を一つだけ選び、調査してください。
というPromptを繰り返し送る。
AIが一つ仕事を終える。
次のPromptを送る。
また仕事をする。
また送る。
それだけでも、人間が毎回ブラウザへ戻る必要はなくなる。
当初のAI Prompt Macroは、本当にその程度のものを想定していた。
「Promptを一定間隔で送るだけなら、それほど難しくないだろう」
作者はそう考えていたらしい。
この見通しは、かなり早い段階で崩れた。
実際に自動化しようとすると、問題が次々に出てきた。
今開いているタブは、本当にユーザーが指定したタブなのか。
途中で別のChatGPT会話へ移動していないか。
ページがリロードされていないか。
入力欄に、人間が途中まで書いた文章が残っていないか。
添付ファイルが残っていないか。
ChatGPTはまだ生成中ではないか。
そして、もっと厄介な問題もあった。
Sendを押した直後に、拡張機能側が結果を確認できなくなったらどうするのか。
これは、
「送信に失敗した」
のかもしれない。
しかし、
「送信には成功したが、その成功を確認できなかった」
だけかもしれない。
ここで自動的に再送すれば、同じPromptを二度送る可能性がある。
場合によっては、同じ作業をAIが二度実行する。
だからAI Prompt Macroは、次第に単純な自動クリックツールではなくなっていった。
分からなくなったら、勝手に続けない。
再送すれば済みそうな場面でも、本当に送ってよいと確認できなければ止まる。
自動化を進めるほど、むしろ「止まる条件」が増えていった。
作者はAIをかなり使う。
コードを書かせる。
設計させる。
調査させる。
テストさせる。
別のAIに監査させる。
それでも、AIを無条件には信用していない。
長い会話の途中で、以前決めた条件を弱く扱うことがある。
すでに終わった問題へ戻ることもある。
推測を事実のように扱うこともある。
そして、繰り返しPromptの設計が悪ければ、必要のない作業まで続ける。
特に分かりやすかったのが、
「もっと改善してください」
という指示だった。
AIは改善点を探す。
直す。
もう一度同じ指示が来る。
また改善点を探す。
そのうち、本当に直す必要があるのか怪しい部分まで対象になっていく。
必要のない抽象化。
必要のない安全機構。
必要のないファイル。
必要のないCommit。
AIは、仕事を与えられれば仕事を探す。
作者はそこで、
AIを長時間動かすことと、AIへ無制限に判断を任せることは別なのだと考えるようになった。
だから作者は、人間を完全に消そうとはしていない。
むしろAIへ作業を任せるほど、人間の役割は別のところへ移る。
何を作るか決める。
何をしてはいけないか決める。
AIへ渡す仕事の範囲を決める。
途中経過を見る。
おかしければ止める。
最後に承認する。
実際の作業はAIへ寄せる。
しかし、方向を決めるのは人間である。
少なくとも、現在は。
作者が欲しいのは、人間が何もしなくてよい世界というより、
人間が一つ一つ作業するのではなく、AIへ仕事を設計する側へ回ること
なのだと思う。
AI Prompt Macroを作り始めた時点では、人間がPromptを書くことを前提にしていた。
しかし、一つを自動化すると、次の手作業が気になり始める。
Promptを書く。
順番を考える。
繰り返し回数を決める。
作業ごとに文章を用意する。
そこまでAIにやらせてもよいのではないか。
作者はそう考え始めた。
人間は、
このアプリを良くして
とだけ言う。
AIが現在の状態を調べる。
問題を分解する。
必要な作業を並べる。
その作業に必要なPromptを作る。
AI Prompt Macroが実行する。
別のAIが確認する。
人間は最後に見る。
まだ、そこまで完成しているわけではない。
しかし、作者が向かっている方向は分かりやすい。
Prompt Engineeringを極めたいわけではない。
むしろ最終的には、Promptを書く作業そのものを減らしたいのである。
途中から、少し奇妙な状態になった。
AI Prompt Macroの開発そのものに、AI Prompt Macroを使うようになった。
作者が一つのPromptを用意する。
たとえば、
現在のGitHub状態を確認し、まだ十分に調査していない領域から、もっとも価値の高い問題を一つだけ選んで監査してください。
AI Prompt Macroがそれを送る。
AIがリポジトリを調べる。
一回終わる。
また送る。
別の問題を調べる。
また送る。
夜に始めて、20回、30回と監査を続けさせることもあった。
朝になって、作者が結果を確認する。
AI Prompt Macroを改善するためのAI作業を、AI Prompt Macro自身が回している。
自己改良型AIと呼ぶには大げさである。
APM自身が目的を決めているわけではない。
それでも、
作った道具が、自分自身を作る作業へ入り込み始めた
というのは、少し面白い出来事だった。
作者自身も、AI Prompt Macroのかなり熱心な利用者になった。
ここは重要である。
AI Prompt Macroは完成品ではない。
途中で止まることがある。
ブラウザ版ChatGPT自体が重くなることもある。
長時間動かすと、CPU負荷が問題になることもある。
画面構造が変わる。
通信状態も変わる。
ブラウザの状態も変わる。
拡張機能だけでは制御できないものは多い。
長いPromptを何度も送って途中で止まったこともある。
修正した結果、20回以上続けて動くようになったこともある。
そして、別の条件でまた問題が見つかる。
作者は何度も、
「だいぶ安定したのではないか」
と思った。
その後、新しい問題が見つかった。
今のところ、その繰り返しである。
AI Prompt Macroには、一つ少し変わった設計がある。
原則として、APM自身はChatGPTの回答本文を読んで次の行動を決めない。
作者はこれをOutput-Blindと呼んでいる。
技術的には、回答を読み取って、
「この作業は成功した」
「次はこのPromptを送ろう」
と判断する仕組みも考えられる。
そうすれば、よりAI Agentに近い動きもできるだろう。
しかし作者は、そこへは踏み込まなかった。
大きな理由の一つは、
ブラウザ版ChatGPTを使う以上、OpenAIの規約や自動化に関するルールへ不用意に触れるような設計にはしたくなかったからである。
回答内容まで拡張機能側で読み取り、その内容によって自動的に次の行動を変える。
そこまで進めれば、できることは増える。
一方で、サービス側の仕様や利用ルールとの関係も複雑になる。
作者にとって、アカウントを失うリスクを取ってまで自動化する意味はなかった。
だから現在のAPMは、かなり意図的に範囲を狭くしている。
人間が事前に決めたPromptを送る。
生成が終わったことは確認する。
しかし、
AIが何を書いたのかを、APM自身の次の判断には使わない。
一方で、ChatGPT自身は同じ会話の過去の内容を知っている。
そのため、
前回までの結果を踏まえて、次の調査をしてください。
というPromptは成立する。
APMが回答本文を読む必要はない。
ChatGPTは自分の会話履歴を使う。
APMは次のPromptを渡す。
できることを最大化するより、
どこまでなら安心して使い続けられるか。
現在のAI Prompt Macroは、その境界をかなり意識して作られている。
AI Prompt Macroが最終目的というわけでもないらしい。
作者は最近、AIを「質問すると答えてくれるもの」ではなく、もう少し長い時間軸で使う方法についても考えている。
開発だけではない。
予定や勉強、日々の選択についても、AIが継続的に文脈を持つようになれば、人間とAIの関係は今とは少し変わるかもしれない。
ただし、それにはAPM以上に慎重な境界設計が必要になる。
AIが知らないことを勝手に仮定しないこと。
人間がどこまで任せたのかを明確にすること。
間違ったときに止められること。
AI Prompt Macroを作る中で、作者はそういう問題についても考えるようになった。
その先は、まだ考えている途中である。
ここまで書くと、大きな理念から始まったプロジェクトのように見えるかもしれない。
実際は、もっと個人的である。
自分が寝ている間にもAIを動かしたい。
自分が契約しているAIをもっと使いたい。
Promptを毎回送るのが面倒。
自分より大量にAIを使っている人を見ると悔しい。
自分の開発を速くしたい。
まず、自分が欲しかった。
それが先だった。
その後になって、
他の人にも使えるかもしれない。
日本語で扱いやすい道具になればよい。
AIをもっと使いやすくできるかもしれない。
という意味がついてきた。
作者自身も、最初から大義があったことにするつもりはないらしい。
自分が欲しかったから作った。
それで十分なのだと思う。
作者は、ときどき自分のことを、
「何もしていない」
と感じることがあるらしい。
大学生ではある。
しかし、何か一つくらい形として残るものを作りたい。
ローカルPCの中だけに置いておけば、自分が消せば終わる。
外へ出せば、少なくとも痕跡が残る。
誰かが使うかもしれない。
誰かが改善してくれるかもしれない。
誰にも使われないかもしれない。
最後の可能性は、少し気になるらしい。
承認欲求もある。
誰かが使って、
「便利だった」
と言えば嬉しい。
作者は、それを特に格好よく言い換えようとはしていない。
ここには少し矛盾がある。
コードは公開したい。
他人に使ってほしい。
改善されることも嫌ではない。
一方で、
クレジットもなく、そのまま別の誰かの成果として扱われるのは嫌だという。
AIの学習材料になり、元の作者が誰だったのか完全に分からなくなることにも抵抗がある。
要するに、
使ってほしいが、自分が作った痕跡まで消えてほしくはない。
無料で公開することと、何をしても自由であることは同じではない。
作者はそのあたりを、まだ考えている途中である。
このソフトウェアには、多くのAIが関わっている。
コード。
レビュー。
調査。
設計案。
テスト。
文書。
この文章も、その一つである。
だから作者は、これを完全に自分一人の能力で作ったものとして語ることには抵抗があるらしい。
一方で、AIが勝手に作ったわけでもない。
何を作りたいか決めたのは人間である。
どの案を採用するか決めたのも人間である。
AIが余計なことを始めたときに止めたのも人間である。
失敗した実装を捨てたのも人間である。
AIが作業をした。
人間が方向を決めた。
その境界は、きれいには分けられない。
AI Prompt Macro自体が、その境界の中から生まれている。
この文章を書いている間にも、作者は別の画面でAIに仕事をさせている。
おそらく、これからも同じように使うのだと思う。
まだ止まる。
まだ直すところもある。
まだ人間の確認も必要である。
それでも最初に面倒だと思った、
「回答が終わるたびに、次のPromptを送る」
という作業は、少しずつ減っている。
AI Prompt Macroは、そこから始まった。
今のところ、それくらいの説明が一番正確だと思う。
私はここで文章を終える。
次に何をさせるかは、作者が決める。