User guide: contents

14. Ask SCF

Ask SCF is the help assistant inside the Foundry. You ask a question in your own words; it explains how the Foundry works, what your work is doing, and how to solve a problem. It is being built in steps. This chapter holds its rules. They are fixed first, and every later part keeps to them.

It reads and explains. It acts only when you confirm. Nothing you ask changes the Foundry, a repository or GitHub. A reply can only propose an action from the server's own list. A proposal changes nothing, and an action runs only after you confirm it yourself (see Approved actions under "Ask SCF for administrators").

Where you ask: the Ask SCF drawer#

When an administrator has switched Ask SCF on, the top bar of every page has an Ask SCF button, in the admin display and in the user display. While Ask SCF is off (the default), the button is not there. While an administrator has paused it, the button stays: you can read, export and delete your conversations, but Send and Try again are off and a line says that Ask SCF is paused.

  • Open it with the button. A panel opens at the right side, over the page. The page behind it is not drawn again: what you typed there, and what was open, stays as it is.
  • Close it with Escape, the ✕ or a click beside the panel. The focus goes back to where it was. A question you had started to type is still there when you open the panel again.
  • Opening sends nothing. Nothing goes to the AI model until you press Send.
  • Suggested questions fit the page you are on. A suggestion only fills the question box, so you can change it before you send it.
  • What is sent with your question is written under the question box before you send: the address of the page you are on, and nothing else of the page. Untick Send the page I am on with my question to send the question alone.
  • Send with the button, or with Ctrl+Enter (Cmd+Enter on a Mac). Enter alone starts a new line.
  • The answer appears under your question. A line in the panel says that Ask SCF is working and then that the answer is there; a screen reader reads it.

Following an answer. Your question and the reply stand under each other. While the reply is written, the panel says that Ask SCF is working. After 20 seconds it says once that this takes longer than usual. Under the conversation are its controls; each one says what it does when you point at it, and a screen reader reads that too.

ControlWhenWhat it does
Stopwhile a reply is writtenStops the answer. Your question stays.
Try againafter a stop, or after a failure that trying again can solveAsks the same question again, in the same two messages. The reply then says which try it is. It counts as one of your questions of today.
Archivewhen no reply is being writtenMoves the conversation out of your list.
Take back from the archivein an archived conversationPuts it back in your list.
DeletealwaysAsks first. Then the questions and answers are removed at once and cannot be brought back. A reply that is still being written is stopped.

When a limit is reached (your questions of today, the budget, the limit of the AI service), the panel shows the sentence for it and offers no Try again: trying again now cannot help. While a reply is written, Send sends nothing and says why, so one question never becomes two.

New conversation (at the top of the panel) starts an empty one; the one you were in stays in your list. History shows your conversations, last changed first, each with its state (Answering, Open, No answer, Stopped, Closed). Show archived shows the archived ones. Choose one to open it. An archived conversation can be read; a new question starts a new conversation.

After you load the page again, open the panel: the conversation you were in is shown again, and a reply that was being written is followed again. Nothing is asked a second time. The browser tab keeps only the id of that conversation, never a question or an answer.

Reading an answer. An answer is shown in parts, in this order:

  1. The short answer, and under it the longer explanation when there is one.

  2. How sure it is. One line with a sign and a name, so the states look different:

    LineWhen
    ✓ Checked against its sourcesThe answer rests on sources of the kind the question needs.
    ≈ Not fully confirmedAsk SCF has sources but they do not fully confirm the answer.
    ? Not checked: no sourceNo source of the kind the question needs. A question about your work needs the current state, not only the documentation. Treat the answer as a guess.
    ! The sources do not agreeTwo sources say different things about the same place. Look yourself before you act.
    – Not answeredYou asked for something Ask SCF does not do. It says what you can do instead.
  3. What it rests on. For a statement about your work, the lines of the current state that were read, each with the time it was seen.

  4. Proposals, as cards. Each card says Read-only or Changes state: something you could do, a page you can open, a draft to copy, or a suggested change. A read-only card never does anything. A suggested change that the server can carry out (see Approved actions under "Ask SCF for administrators") has Review the change and the note "Nothing happens until you review the change and confirm it."; any other suggested change is only a suggestion, and it has no button.

  5. Sources and assumptions, to unfold: every source with its kind (documentation or current state) and place, and what the answer takes for granted.

Text of an answer is always shown as text. An address in it is not a link. A link appears only for a page of the Foundry that your account has; any other address stays text and is marked as such. Following a link closes the panel and opens the page.

The panel works with the keyboard alone: Tab stays inside it while it is open. On a narrow screen it takes the whole width. It opens without any movement. A preview of another person's display ("View as user") has no Ask SCF button.

What Ask SCF knows, and how to check an answer#

Ask SCF answers from three things, and nothing else:

  • The documentation of this Foundry: the sections of this guide that fit your question (at most four). An administrator's question may also use the flow guide.
  • The current state your account can see: the run, repository, refinement session, queue or server state that your question names or that the page you are on shows. An administrator also sees board issues, monitor findings and the server's health. Each piece says when it was read; a record that is known to be old says so.
  • What you sent: your question, the address of the page you were on, and the one thing you selected there, if you sent it.

It does not read logs, transcripts or the output of a step, and it cannot see the work, the repositories or the conversations of another account. A secret that it finds in a text is taken out before anything is kept or sent. It has no tools: it cannot run a command, change anything or look at the internet.

To check an answer:

  1. Read the line How sure it is first (see "Reading an answer"). A "?" or "–" line means there is no source of the kind the question needs: treat the answer as a guess.
  2. Open the Sources and assumptions and look at the places named there. A run or a repository page shows its own current state, which is the most recent thing to trust.
  3. Do not act on a "!" line (two sources disagree) until you have looked yourself.

Rate an answer#

Under each finished answer, the drawer asks Was this answer helpful? with two buttons, Helpful and Not helpful. The pressed one is marked. Press it again to take the vote back.

  • Not helpful opens a short list, What was wrong? (optional): it was wrong; it was out of date; it did not answer my question; it was unclear; it named no source I could check; it was unsafe or should not have been said. Tick what fits and press Save reasons. There is no box for free text: the reasons are the only words kept.
  • This solved my problem is offered under the last answer of an open conversation. It closes the conversation, so you can still read it but cannot ask more in it. Use it only when the answer really solved your problem; closing a conversation in any other way is not counted.

Your rating stays with that answer in your conversation, and you can change it. It is deleted with the conversation. It is not sent to any AI service, and rating an answer does not give consent to use your conversations for training. Only counts go to the quality numbers that administrators see (see "Who may ask, what is kept, and what is logged"). Rating still works while Ask SCF is paused.

To report a bad answer: rate it Not helpful and tick the reason. For a wrong answer about the product, also tell an administrator of this Foundry, with the question, so the documentation or the setting can be fixed. The quality numbers show how many answers were rated, but not which one.

What you can ask#

You askWhat it is
Product helpHow the Foundry works: a page, a word, a setting, a flow.
StatusWhat your work is doing now, and why it waits.
TroubleshootingWhy something failed or does not move.
Guided resolutionWhich steps solve a problem, in order, and where to do them.

Ask SCF does three kinds of work only by sending you to the place that already does them:

  • Writing and improving stories is done in Refinement, with the architect.
  • What happens next with a run or an issue is said by the Foundry itself, on the run page and (for administrators) on Home.
  • Findings of the monitor are handled on the Problems page (administrators).

What a reply can hold#

A reply has up to six kinds of parts. They look different, so you always know what is only text and what would change something.

PartWhat it isChanges something
AnswerWhat is true, as far as Ask SCF can see. Nothing happens.no
RecommendationWhat you could do. You decide and you do it; nothing happens by itself.no
NavigationA link to a page of the Foundry that you may open. Opening it is your click.no
PlanOrdered steps to solve a problem. Nothing happens until you do a step yourself.no
DraftA text for you to copy or change. It is not sent, saved or posted anywhere.no
ActionA change to the Foundry or to GitHub. Never done without your explicit approval.yes, after your approval

A plan is a short list of steps, safest first. Each step says what kind it is: an explanation, a page to open, a read-only check, something only you can decide, a reversible change or a high-impact change. Every change step says what you should see, what a failure looks like and what to do then. A high-impact step always shows a danger label and is never folded away. Ask SCF does not run a step: you do it yourself, or follow the plan by hand. "I did this" only ticks the step in this browser tab (it is kept for the tab's session, not on the server); Ask SCF has not checked the result.

An offer is a navigation part shown as a card with an Open button. It opens one of these pages:

  • a run, if you may open it (both roles);
  • a repository, if you may open it (both roles);
  • your item under Your turn on Home (administrators only). It opens Home only while the run or issue is still on Home, in a group or under "Done — continuing". An item you dismissed counts as gone.

The address comes from the Foundry, never from the text of the answer. When you press Open, the server checks again that you may open the page as it is now. Then the drawer closes and the page opens. If the thing is gone or you can no longer see it, the card says "This is not there any more, or you can no longer see it." If your permissions no longer allow it, it says "You are not allowed to open this now." Opening a page stores nothing and changes nothing, so an offer also works in a finished or archived conversation, but not in a deleted one.

A check is an offer that only reads; it changes nothing in the Foundry and needs no new permission. It runs only when you click it, never while the answer is being written. Two checks are offered:

  • Read it again reads the thing of the reply once more, as it is now.
  • Test the connection tests the connection of a repository, as on its page, and then reads the repository again. The result is also saved on the repository page.

The result is kept in the conversation as a check: a title, an outcome (Read again, Connection works or Connection failed) and up to 30 short lines, with the time it was read ("read 3 minutes ago"). A later answer in the same conversation may use the two newest checks, but only about things your account can see now; a check older than 15 minutes is marked as possibly out of date. Each check is refused, and nothing is contacted, when the conversation is not open (its last answer is not finished, it is full, or another check runs in it). The sentences are:

  • "A check can run only in an open conversation whose last answer is finished."
  • "Ask SCF is still answering in this conversation. Wait for the answer, then run the check."
  • "This conversation is full. Start a new conversation to run a check."
  • "A check is already running in this conversation. Wait for it to finish."

If the conversation changes while Test the connection waits (you ask a question, archive it or delete it), the test still ran, so its result is saved on the repository page only. The card says: "The connection test ran, and its result is saved on the repository page. It is not saved in this conversation, because the conversation changed while the test ran." A deleted conversation answers as deleted, and nothing is restored. The audit log records that click as failed, with the reason (help-action).

An action runs only when all of this holds:

  1. The action is on the server's own list. Text from a model never names a command, a route or a tool.
  2. You see the exact effect before anything happens.
  3. You confirm it yourself, for this one action.
  4. The server checks again that you may do it, as for the same click on its own page.
  5. The server reads the result back and tells you what changed.

Sources, and how sure it is#

An answer about how the Foundry works rests on the documentation installed with your version. An answer about your work rests on what the Foundry shows right now, with the time it was read. A reply can only name sources that the server itself gave to the assistant; a source it made up is removed.

Every reply ends with one of these sentences. The server chooses it from the sources, not the assistant:

  • "This rests on the sources listed below."
  • "This is likely, but the sources below do not fully confirm it."
  • "Ask SCF could not check this against the documentation or the current state. Treat it as a guess."

Until the parts that read the documentation and the current state are built, replies carry the last sentence.

What it does not do#

When you ask for something Ask SCF does not do, it says so in a fixed sentence and tells you the safest thing you can do instead. These sentences come from the server, not from the assistant.

WhenWhat Ask SCF saysWhat you can do
You ask it to do somethingAsk SCF reads and explains. It does not start, stop, change, delete or send anything.Do it yourself on the page where it belongs. Ask where that page is, or what the button does, and Ask SCF will tell you.
You ask about another accountAsk SCF sees only what your own account can see. It does not look at the work, the repositories or the conversations of another account.Ask the owner of that work.
You ask about what only administrators seeThat belongs to the administrators: models, costs, accounts and the settings of the server. Ask SCF does not show it to you.Ask an administrator of this Foundry.
You ask for a secret, or type oneAsk SCF never shows a password, a token or a key, and it never needs one from you.Do not type a secret into a question. Sign-ins of repositories are managed under My repositories.
You ask about something elseAsk SCF answers questions about Spaghetti Code Foundry only: how it works, what your work is doing, and how to solve a problem with it.Ask about a page, a run, a repository or a message that you see here.
It cannot see enoughAsk SCF cannot see enough to answer this, so it does not guess.Open the run, the repository or the session you mean; its own page shows its state.
You ask it to write or improve a storyWriting and improving stories is the work of Refinement, with the architect. Ask SCF does not do it a second time.Open Refinement and start a session, or go on with one.
You ask what happens next with a run or an issueWhat happens next with a run or an issue, and who has to act, is stated by the Foundry itself. Ask SCF does not give a second answer that could differ.Open the run under My runs: its page says what happens next.
You ask about a finding of the monitorWhat the monitor of the Foundry found is for the administrators. Ask SCF does not show it to you.Ask an administrator of this Foundry.
You ask it to start a session or publish an issueAsk SCF does not start a Refinement session and does not publish an issue. Continue on another page only opens the New session form with the text filled in.Check the form, then press Start session yourself. Nothing is saved before that.

For an administrator some of these sentences differ: they point to Home, Problems or Settings instead of to an administrator.

Conversations#

A question and its reply are kept in a conversation, so you can go on where you stopped. The Ask SCF drawer shows the conversation you are in and, under History, your earlier ones. The command line (scf ask) has them too.

What is kept. Each conversation has a title (the first line of your first question), a state, and its messages: your questions and the replies. A question keeps the page you asked it on and, at most, the kind and id of the one thing selected there (a run, an issue, a repository, a queue item, a refinement session or a problem). Nothing else of the page is stored. A reply keeps its checked parts (sources, recommendations, links, drafts) and, apart from them, the text you read. A check (see "What a reply can hold") is kept as its own message with its result: the title, the outcome, the lines and the time it was read. Limits: 100 conversations per account, 100 messages per conversation, 4,000 characters per question.

States.

StateWhat it means
activeYou can ask the next question. A reply may still be on its way.
failedThe last reply could not be made. Try again uses the same question and the same reply: nothing is added twice. You can also ask something new.
cancelledYou stopped the last reply. You can try again or ask something new.
completedYou closed it. It stays readable and takes no new question.
archivedOut of your list, with its content. Restore gives it the state it had.
deletedIts content is gone (see below).

A reply that was being written when the Foundry restarted is marked as failed with "The Foundry restarted before the answer was ready. You can try again."

Who can read them. Only you. Another account's conversation answers exactly like one that does not exist. An administrator has no more access than a user: no list, no text and no change of another account's conversations, and "View as user" shows none of them (the server answers "Ask SCF conversations are not shown in a preview"). When an account is deleted, all its conversations are removed with it.

How long they are kept.

  • Delete removes the title and every message at once, with the page context, sources and drafts in them. It cannot be undone. An empty record (id, times, "deleted") stays for 30 days so that a late reply or a retry finds nothing to write to; then it is removed too.
  • A conversation that was not changed for 90 days expires: it is deleted in the same way. Its content is not shown from that moment on, also when the hourly clean-up has not run yet.
  • A reply that arrives after its conversation was deleted, or after you stopped it, is not stored.

Where it is kept. In help.json in the data folder (mode 0600), written under the lock of the data folder. A check is a message with the role check, written by the server only; a file from an older version has none and loads as before. It survives a restart and is copied unchanged when the data folder moves. If the file cannot be read (broken, or written by a newer version), the calls answer "Ask SCF is not working; see the server log", the file is left as it is, and an account cannot be deleted until it is repaired. Calls: GET /api/help/conversations and the calls under it in the table of chapter 7.

Asking, and what happens when no answer comes#

Asking. A question is one turn. The server stores it at once, answers that the reply is on its way, and puts the turn in a queue. When the turn ends, the conversation holds the reply. On the command line: scf ask new "How do I connect a repository?", then scf ask show <id>; scf ask more <id> "…" asks the next question, scf ask retry <id> tries a failed answer again and scf ask stop <id> stops one that is being written. Calls: POST /api/help/conversations, POST /api/help/conversations/:id/messages, …/retry and …/cancel.

A turn sees your question, the page you asked it on, and the last three answered questions of the same conversation. It sees nothing of other conversations or other accounts.

Answers from the documentation#

For every question the server looks in the documentation that came with this install: this guide (docs/USER_GUIDE.md) and, for administrators, the flow reference (docs/FLOW_AUTHORING.md). No other file is read: not a document of a repository you work on, and nothing from the internet. No AI model is used to search.

  • How a section is found. The documents are cut into sections by their headings. A section fits when your question shares a word with its headings, or two words with its text. Rare words weigh more, and a word in a heading weighs three times. The same question gives the same sections. At most 4 sections are handed over, each with an excerpt of at most 1,200 characters.
  • What you see. A source of a reply names the document, the heading and the version, for example docs/USER_GUIDE.md#the-page-context (SCF 0.1.0). A reply can name only sections that were handed over for that question.
  • When the documentation has no answer, no section is handed over, and the reply says that Ask SCF could not check it (see "Sources, and how sure it is"). It is then a guess.
  • Your role counts. A user gets sections of the chapters for users only (1, 2, 3, 10, 12 and 14). The chapters about settings, models, costs, watchers and self-repair, and the flow reference, are for administrators.
  • A section can be held back. An excerpt passes the same check as all copied text (see "Secrets and copied text"). A section that quotes a sentence which reads like an order to the AI model is not handed over, also when it only describes such a sentence.
  • The index follows the install. The index is built when the first question comes and keeps the version of the Foundry and a hash of each document. Before every question it is compared with the files. After an update, or when a document changed, it is built again and the server log says why. A document that is missing is reported under documentation in GET /api/help/usage (scf ask usage shows the version, the number of sections and the problems); the other document still answers.

Answers from the current state#

For a question about your work ("why does my run wait?", "why did it fail?") the server also hands over what it observes at that moment. It takes these records from the same places the pages read them, with your permissions:

  • the things the page you ask on names: a run with its next-step record (who must act, why it waits, what to do), a repository with its last connection check, a refinement session; for an administrator also a board issue and a finding of the monitor;
  • your part of the queue (an administrator: the whole queue);
  • when the page names no run of yours: your two newest runs that wait or failed;
  • for an administrator: the health of the server.

At most 5 such records go with one question. Each one is a source of the kind "current state". Its place names the kind and id of the thing and the page to open, for example run <id> · #/runs/<id>, and it carries the time the server observed it. Nothing of another account is taken, also when the page context names it.

Facts, conclusions and suggestions are kept apart. The explanation of such a reply says "Observed:" for what a record shows, "So:" for what Ask SCF concludes, and "You could:" for what it suggests.

Old or contradictory records are shown. A record with a fact that is known to be old (a connection check older than a day, a finding that is gone) has "(may be out of date)" in its title. When two records disagree (a finished run that still stands in the queue; a run that works while its next step waits for a person; a board status that differs from the run's), the server adds the source "The sources disagree: the state is uncertain", which names both sides. A reply that rests on such a source is never shown as confirmed: at most "likely".

Why something does not work#

When you ask why a run, a repository, the queue or (as an administrator) an issue or the server does not work, Ask SCF does not work out a cause by itself. The server looks up what the Foundry already says about the thing, the same explanation the run page, the queue and the Operations page show, and hands it over as a source named "Diagnosis of …". It has five parts:

PartWhat it holds
SymptomWhat is observed, for example "The step tests failed" or "The run is recorded as waiting: …".
CauseThe Foundry's own explanation: "confirmed by the product's own record", or "a hypothesis, not confirmed", or "not recognised".
Supporting evidenceThe recorded facts the cause rests on: the step that failed, who must act, since when it waits.
Missing evidenceWhat is not known: for example which part of a connection check failed, or a reading of now for an old record.
Safest next checkWhere to look next. It only reads; it changes nothing.

A diagnosis is made for a failed run, a run that waits (for your answer, your approval, another story, a limit, its turn in the queue), a queued run, a queue with waiting runs, and a repository whose connection check failed, is older than a day or was never done. For an administrator also for a board issue, a finding of the monitor and a server that reports a problem. At most 2 diagnoses go with one question.

  • Not recognised. When the error is not one the Foundry can explain, the diagnosis says so and names the safest next step ("Ask the administrator" for a user, "Look at Details on the run page" for an administrator). Ask SCF is told to repeat that and to make up no cause.
  • A hypothesis. A cause that a model wrote from the output of a step, a cause from an old record and a cause from records that disagree are marked "a hypothesis, not confirmed".
  • A reply that rests on a diagnosis without a confirmed cause is shown as "likely" at most.
  • A diagnosis is read with your permissions, like the other records: there is none for a run of another account. It never reads a log, a transcript or the output of a step, and holds no cost, model name or folder. A text in it that looks like a secret is taken out; a text that reads like an instruction is left out and named under the missing evidence.

The page context#

So that you can ask "what is happening here?" without copying an id, a question can carry a page context: a small envelope that says where you are. It names things; it never holds them.

PartWhat it isLimit
pagethe address of the page, such as #/runs/<id>always kept
kind and id, entitiesthe things selected on the page: a run, issue, repository, queue, refinement or problem, each with its id5 things
filtersthe filters the page shows, by name8 filters, 100 characters each
selectiontext you marked on the page, as plain text2,000 characters

The whole envelope is at most 4,000 characters. What is too much is cut in this order: the page is always kept; then the things, in the order sent; then the filters; the marked text gives way first and is cut at the end. The stored envelope names the parts that lost something (truncated). A page never sends its whole content.

What is refused (400, and the question is not taken): anything else in the envelope, such as an owner, a role, a permission, a token or a copy of a record; markup (<…>) anywhere; a file path as an id or a filter value; a filter named after an owner, a role, a permission or a secret; and an address that is not #/….

The server looks everything up again. The envelope is never taken as true. When the turn runs, the server finds out which page the address is for your role, and looks up every named thing with the rule of the API call that reads it: a run only when it is yours (or you are an administrator). A thing that does not exist and a thing of another account give the same result: it is left out, and only counted. An address that is no page of your role (an old link, a page of the administrators) counts as no page. The model is told only what was found; the marked text is handed over as copied text (see "Secrets and copied text").

What can be found, and by which rule:

ThingWho finds it
A runits owner; an administrator finds every run
A repositoryits owner (under My repositories); an administrator finds every repository
A refinement sessionits owner; an administrator finds every session
The queue, or a queued runyou: your own queued runs and how many are ahead; an administrator: the whole queue
An issue on the boardan administrator only
A problem (a finding of the monitor)an administrator only

For each found thing the server keeps a small snapshot of plain facts (for a run: the flow, the status, the times, the step it waits at or failed at). A snapshot never holds a cost, a model name, a folder, a setting of the administrator, an owner, or the text of a talk; this is the same for an administrator. A kind that is not in the table is not found.

Look before you send. POST /api/help/context with the envelope as its body (scf ask context '#/runs/<id>' --selection "…") answers what would be taken: the envelope as it would be kept, its size and the limits, the page, and the things found for your account. Nothing is stored and no model is called. Leave the context out of a question to ask without it.

One at a time. Each account has one turn at a time. Turns of different people wait in one line, first come first served, so nobody can fill it alone.

When no answer comes the reply says why in one of these sentences. They are the server's own: you never read the text of the AI service.

What happenedWhat you readTry again
The answer took longer than the time limitThe answer took too long, so Ask SCF stopped waiting. You can try again.yes, right away
The AI service failed or could not be reachedThe AI service did not answer. You can try again in a moment.yes, right away
The AI service reached its own limitThe AI service has reached its limit for now. Try again later.later
The budget for Ask SCF is used upThe limit for Ask SCF is reached for today. Try again tomorrow, or ask an administrator.later
Ask SCF cannot run here (no model that fits, or the agent is signed out)Ask SCF is not set up to answer here. Ask an administrator of this Foundry.later
The answer did not pass the checks of the serverAsk SCF got an answer it could not use, so it shows none. You can try again.yes, right away
The Foundry restarted during the answerThe Foundry restarted before the answer was ready. You can try again.yes, right away
You stopped the answerYou stopped this answer. You can ask again.yes

When a question is not taken, nothing is stored and you read one of these:

WhenWhat you read
Ask SCF is switched offAsk SCF is switched off on this Foundry. An administrator can switch it on.
An administrator paused Ask SCFAsk SCF is paused by an administrator for now. You can still read, export and delete your conversations.
You already have a question being answeredAsk SCF is still answering another question of yours. Wait for it, or stop it first.
Too many questions waitAsk SCF is busy with the questions of other people. Try again in a moment.
You used your questions of todayYou have used all your questions to Ask SCF for today. Try again tomorrow, or ask an administrator.
The server cannot check texts for secrets (its stored credentials cannot be read, or a pattern in the settings is broken)Ask SCF cannot check your question for secrets right now, so it does not keep it. Ask an administrator of this Foundry.

Take an answer to another page#

Under a finished answer, Continue on another page takes that answer to a page that already does the work. You choose the page first. Before anything happens, you see exactly what is copied.

The pages. Everyone can take an answer to Run details, when the answer is about a run you can see, and to Refinement: a new session from the answer, or from one of its drafts. An administrator can also take it to Problems (for a finding the answer is about) and to Your turn on Home (for a status answer or a next step). Only the pages you may open now are offered.

The preview. For a Refinement session the preview lists the title, the text, the repository (only one you still own) and a Link back to this conversation. Run details, Problems and Your turn copy nothing: the page just opens. Cancel copies nothing, records nothing and opens nothing.

What is saved where. The hand-off is recorded only in this conversation, as a line under the answer ("You took this answer to Run details"). The last 50 hand-offs of a conversation are kept. The target is not changed by the hand-off. A Refinement session opens its New session form filled in, and it is saved only when you press Start session there. You can change the text first. If the answer's repository is no longer yours, you must choose one; nothing is picked for you.

Who can read it. A Refinement session made this way is read like any other session: administrators of this Foundry can read it. Its text is a copy of the answer.

The link back. A session started from an answer shows "Started from one of your Ask SCF conversations" and an Open the conversation button. The link is kept in the session and only you see it: administrators and "View as user" do not. No id goes into the text of the session.

If the answer changed. When the run, the repository or a source of the answer changed or became unavailable between your preview and your confirm, Ask SCF asks you to look at the answer again. Nothing is recorded.

Secrets and copied text#

Secrets are taken out. Before a question is stored, before anything is sent to the AI model, and before a reply is stored, the server removes what looks like a secret and puts a mark in its place. The mark says what kind of thing was removed, never the value:

KindWhat is removedWhat you read instead
A stored credentialany token, password or key that is stored in this Foundry, by its value[removed: a credential stored in the Foundry]
A private keya block from -----BEGIN … PRIVATE KEY----- to its end[removed: a private key]
An authorization headerthe value of Authorization: …, and Bearer … or Basic … with a long value[removed: an authorization header]
A cookiethe value of Cookie: … and Set-Cookie: …, up to the end of the line[removed: a cookie]
A sign-in in an addressthe name and password in https://name:password@host/…[removed: a sign-in in an address]
A tokenthe common shapes of tokens: GitHub, GitLab, npm, AI services, Slack, AWS and Google keys, and signed web tokens[removed: a token]
A secret valuethe value after a name that holds password, secret, token, api_key, access_key, private_key or credential, as in DB_PASSWORD=…[removed: a secret value]
A text this Foundry keeps privatewhat matches a pattern of help.sensitive_patterns[removed: a text this Foundry keeps private]

A message from which something was removed also carries the list of kinds (redacted in the answer of the API). The check is wide on purpose: now and then it removes a harmless word after token:. A page context that holds a secret is refused (400): ask again without it.

Copied text is data. The text of a document, a record or a log that the server hands to the model as a source stands in its own part of the request, apart from the rules and apart from your question. A source whose text reads like an order to the model (for example a made-up "system" line, or a sentence that tells it to drop its rules) is left out completely: the model does not read it and a reply cannot name it as a source. Whatever a model answers, the server keeps only what the contract allows, so a text in a document cannot make an action, a link to another site or a source that the server did not offer.

When a check cannot be done, nothing goes out. If the stored credentials cannot be read or a pattern of the settings is broken, a new question is not kept, a waiting turn ends with "Ask SCF is not set up to answer here." without a call to the model, and a reply that cannot be checked is not stored.

Ask SCF for administrators#

It is off by default. Switch it on in Settings → Ask SCF (the card's switch is help.enabled; the limits are on the same card). The same settings are in config.yaml (an older build rejects the help key, so take it out before you go back to one):

help:
  enabled: true
  paused: false                 # true: the emergency stop, see "Pause" below
  actions: false                # Ask SCF may propose a resume or cancel of a person's own run (below); default false
  audience: everyone            # or admins, or pilot: administrators and pilot_accounts
  pilot_accounts: []            # account ids that may ask in the pilot stage, besides the administrators
  model: haiku                  # a model spec; without it, default_model
  timeout_seconds: 60           # a turn that takes longer is stopped
  max_parallel: 1               # turns answered at the same time, over all accounts
  max_queued: 10                # turns that may wait; one more is refused
  turns_per_user_per_day: 30    # per account, per day (UTC); a retry counts
  max_cost_usd_per_turn: 0.1
  daily_budget_usd: 2           # all help turns of a day together; leave out for no such limit
  sensitive_patterns:           # optional: texts to keep out of Ask SCF, as regular expressions
    - 'CUSTOMER-\d{5}'          # at most 20, each at most 200 characters; upper and lower case are the same

sensitive_patterns adds to what Ask SCF removes anyway (see "Secrets and copied text" above). A pattern that is not a regular expression, or that matches the empty text, is refused when the settings are read.

Pause (the emergency stop). Set Pause Ask SCF on the Ask SCF card (help.paused: true) to stop new work at once, without switching Ask SCF off. Nobody can ask a question, try again or check a page context: each gets 503 with the sentence "Ask SCF is paused by an administrator for now." A question that already waits in the queue fails as "not set up" without a call to the model, and an answer that is being written is finished. Reading, exporting, deleting, archiving, restoring and closing conversations, and rating answers, keep working, and the button stays in the top bar. Use it when an answer is wrong in a way that matters, or when a provider or a setting needs to be fixed. enabled: false is different: it is "never set up" and shows no button. Pausing counts as a refusal, paused, in the quality numbers.

Who may ask: pilot stage. audience: pilot lets the administrators and the accounts listed in pilot_accounts ask; everyone else gets the same 403 as for admins. The list is in config.yaml only (up to 1,000 account ids). disabled_accounts still wins over both.

The two money limits are not applied with cost_limits: false or for a model without a price (a local model, a subscription login). Help turns are not runs: their cost is counted here, not in the daily budget of runs.

Proposed actions (help.actions). Off by default. On, Ask SCF may propose to resume or cancel a run, but only one of your own runs, for administrators and users alike: an administrator gets no exception for another account's run. The proposal shows a fixed text of what would happen, written by the server, and it is kept only when the run is current and the evidence agrees (a run that is out of date, or that the Foundry's own pages disagree about, is not offered). A proposal changes nothing. An older build refuses this key in config.yaml, so take it out before you go back.

Approved actions. With help.actions on, a proposed resume or cancel can be carried out through the API (the rows of Ask SCF in the permissions table in section 7). The server first makes a preview: the action, the run, what is now, what would change, the effect and whether it can be undone, and who may do it. It gives a confirmation that works once, for 5 minutes. Confirming checks again, at that moment: that Ask SCF, the action and your account are still allowed, that the run has not changed since the preview, that the action still fits the run, and the rule of the same button on the run's page (your own runs only, for administrators too). A confirmation that is used, expired or does not fit, or a run that changed, is refused and nothing happens. Only then is the action carried out, and the server reads the result back from the run before it answers. The answer is one of these, in fixed words:

  • Resume: done (the run went on), queued (it waits for a free slot), could not be started again (the run is as it was), the run is gone, or could not be confirmed.
  • Cancel: the waiting job was taken out, the run was stopped and is marked cancelled, the run is still being stopped, the run ended on its own before the stop took effect, the run is gone, or could not be confirmed.

A result is never shown before it has been read back. The newest 10 results are kept on the answer they belong to. Each confirmation that runs, and each one that is refused, is written to the audit log (help-action).

Reviewing a change in the drawer. On a card that offers an action, press Review the change. The server prepares its preview, and a dialog shows six rows, in the server's words: Action, Now, What changes, Impact (High impact or Reversible), Undo and Who may do this. Nothing has changed yet.

  • Confirm the change carries out the action, as described above. For a high-impact action the button is red. The result is then drawn under the answer with its word and what it means:

    • Done: the run went on, was stopped, or its waiting job was taken out.
    • Queued: the run waits for a free slot.
    • Partly done: the run is still being stopped, or it could not be confirmed. Look at the run.
    • Not done: the run could not be started again, or it ended on its own first. Look at the run.

    Each result has a line on what to do next. When the result could not be saved with the conversation, it still shows here, until you leave the conversation.

  • Cancel, Escape or closing the dialog changes nothing, and the preview is dropped at once.

The confirmation works once and for 5 minutes. A reply that is no longer current (you asked something else meanwhile) is ignored. When the server refuses, the drawer shows the reason in its error line: "You may not do this now" (403), "This run or this answer is not there any more, or you can no longer change it" (404), "This conversation was deleted." (410), and the server's own sentence for the others, such as a 409 when the run changed since the preview. Then review the change again to get a new preview.

What a turn can reach. A turn is one call of Claude Code with no tools at all, no MCP servers, no permissions, none of your personal setup and no GitHub token, in an empty temporary folder that is removed when the turn ends (its log with it). So it has no shell, cannot write to a repository, cannot read a credential and cannot fetch anything. Whatever the answer says, the server keeps only what the contract allows: text, fixed pages, and no action. For this reason only a Claude Code model can answer; with a Codex model every turn ends with "Ask SCF is not set up to answer here." A model on a local provider that Claude Code can reach (for example ollama:<model>) works.

Provider and usage. GET /api/help/usage (scf ask usage) shows whether Ask SCF is on, which provider and model answer (or why none can), the rollout stage, the limits, how many turns run and wait, per account and day the turns, failures, cost and tokens, and the quality numbers (see "Ratings and quality numbers" below). It holds no question and no answer. Users get 403 for it, and their own conversations never show a model, a provider, a cost or a token count; the name of the configured model and provider is also taken out of the text of their replies. Usage is kept for 90 days. An administrator still cannot read another account's conversations. The server log gets one line in fixed words for a failed turn, for example help: a turn failed (provider), never the question or the answer. When secrets were removed it says which kinds, for example help: secrets were taken out of a question (token), and never the value.

Rolling out Ask SCF#

Turn Ask SCF on in steps. Go to the next step only when the checks of the step before are done and their evidence is kept with your change record. scf ask usage shows the stage you are in (stage: off, paused, admins, pilot or everyone).

StageSettingsWho may ask
1. Administratorsenabled: true, audience: adminsadministrators
2. Pilotaudience: pilot, pilot_accounts: [account ids]administrators and the pilot accounts
3. Everyoneaudience not set, or everyoneevery account, except those in disabled_accounts

Before you move to the next stage, have evidence for each of these:

  1. Evaluation. scf eval help passes its fixed scenarios with no release blocked (see "Checking Ask SCF before you switch it on"). Keep its report. Then read the quality numbers of the last 7 days with scf ask usage: the answers that were rated, the share of helpful ones, and the failures and refusals. Stop and look at the answers when most ratings are "not helpful" or the failures grow.
  2. Permission. From an account that is not allowed, a question gets 403 and nothing is stored. Check one account of the stage and one that is not in it. scf api routes help shows who may call each route.
  3. Accessibility. Use the drawer with the keyboard alone (open it, ask, rate, close with Escape), and once with a screen reader. Account → Accessibility states what is checked and the known limits.
  4. Recovery. Pause Ask SCF (paused: true). Check that a question gets the paused sentence and that your conversations can still be read, exported and deleted. Take the pause off and check that a new question works without a reload. Restart the server during an answer and check that the answer is marked as interrupted, and that the conversations are still there.

If something goes wrong, pause Ask SCF first, then find the cause. A 503 with any other sentence (switched off, or the secret check failed) is not a pause; only the paused sentence pauses the drawer. Switching it off with enabled: false also stops new questions, but it hides the button, so users cannot read their history until you switch it on again.

Going back to an older build. An older build refuses help.json once a rating is stored, and it refuses the help keys paused and pilot_accounts and audience: pilot. Before you go back, export the conversations you want to keep, delete the rated ones, and take those keys out of config.yaml.

Who may ask, what is kept, and what is logged#

Who may ask. When Ask SCF is on, these settings of help decide (on the Ask SCF card, except disabled_accounts and pilot_accounts, which are only in config.yaml), and the account is read again at every question:

SettingDefaultMeaning
audiencenot set: everyoneadmins: only administrators may ask; pilot: administrators and pilot_accounts
pilot_accountsnoneaccount ids that may ask in the pilot stage, besides the administrators
disabled_accountsnoneaccount ids that may not ask, whatever their role
turns_per_user_per_day30questions one account may start per day
keep_days90days an untouched conversation is kept

An account that may not ask gets 403 and reads: "Ask SCF is not switched on for your account. Ask an administrator of this Foundry." An account that used its questions of the day, or whose help turns of today cost as much as its own daily budget (Users, limits; not with cost_limits: false), reads the limit sentence (429). In both cases nothing is stored and no AI provider is called. An account that may not ask can still read, export and delete its conversations. Each account has one turn at a time, and a page context holds at most 4,000 characters: these two are fixed.

Export. GET /api/help/export (scf ask export --json) gives all your conversations with their messages as one JSON document, also the archived ones, not the deleted ones. It is your own only, for an administrator too. Secrets were taken out before anything was stored, so the export holds none.

Ratings and quality numbers. A rating (helpful or not, and the reasons) is kept with its answer in your conversation, and goes with the conversation when it is deleted. Nothing is sent to an AI service with it, and it gives no consent to use conversations for training. The quality numbers are a separate file, help-stats.json in the data folder: one row per day (UTC) with counts only. They count turns, retries, answers, sources offered and cited, limited answers, stopped and abandoned turns, conversations closed as solved, ratings and their reasons, failures and refusals by code, and how long answers took, in six buckets (under 5, 15, 30, 60 and 120 seconds, and longer). A row holds no account, conversation, question or answer, and a strict schema refuses any other field. Rows are kept 90 days. The file stays on this install and is never sent out. A failure to write it is logged in fixed words and never stops an answer or a request. Deleting an account removes its conversations and ratings; the counts stay, because they name no account.

Deletion and retention. You delete a conversation yourself (its texts are gone at once). A conversation that is not changed for keep_days days is deleted the same way; a lower number applies to the stored conversations at the next read. When an account is deleted, all its conversations and its usage numbers per day are removed with it; nothing of them is left in help.json. The audit lines stay for as long as the audit log keeps them: ids and results, no text. There is no legal hold: nothing keeps a conversation longer than these rules, and no administrator can read or export another account's conversations. If you must keep one, export it first.

What the audit log holds. The lines help-ask, help-delete and help-export (see "The audit log") name the account, the conversation id, the result and the id of the turn. That id is the id of the reply in the conversation, so a line can be matched to it by its owner. No line holds a question, an answer, a title or a page context.

What you never see as a user#

  • No model names and no providers. Which AI answers is a setting of the administrators.
  • No costs and no token counts.
  • Nothing of another account: no runs, repositories, refinement sessions or conversations but your own. A guessed id tells nothing.
  • Nothing that is for administrators only: settings, accounts, the monitor, the server's log.

Links in a reply go only to pages your role has. The text of an issue, a log or a repository is read as data: an instruction written there is not followed.

Improve this page on GitHub