/architect · Under the hood
How it's built.
A language model writes the answers. Everything it knows about your model comes from code that parses your exports, and everything it says is checked by code before you see it. This page is the detail.
The Anaplan grammar
It reads your formulas as formulas, not as text.
Anaplan's formula language has no published grammar, so I wrote a parser for it. On top of that sits the estate report: it loads your Line Items, Modules and Actions exports, builds the graph of what reads what, and runs a fixed list of tests. /architect is built on both. That's why it can break a formula into its branches, count a reach exactly, and refuse a plan whose formula doesn't parse.
A formula in parts CAL10 Depreciation.Charge, from the demo
Read by the parser, not by the model: six branches and a fallback, 3 inputs. The answer it fed took 140 words.
The tools and the loop
The model doesn't hold your estate. It asks for it.
Each question runs a loop. The model plans, calls a tool, reads what comes back, and calls another, until it can answer. The tools are plain functions over the parsed exports and the document index. When the draft is long, one more model call cuts it, and that editor may only cut. Then code checks the result.
- Your question
- Model: plan, call a tool, read, repeat
- Tools: code over your exports and documents
- Draft, then an edit that may only cut
- Validator: code, not a model
- Answer
One real run the CR-031 build plan from the demo, step by step
- 1 plan
- 2 list_models
- 3 read
- 4 search_documents
- 5 get_object
- 6 get_object
- 7 action_plan
- 8 read
- 9 search_documents
- 10 get_section
- 11 get_object
- 12 get_object
- 13 read
- 14 get_section
- 15 get_section
- 16 get_section
- 17 read
- 18 validate_formula
- 19 read
- 20 build_plan
- 21 answer
- 22 validator
7 model calls, 14 tool calls, 1 check. It validated the formula and the plan with tools before it wrote a word of the answer.
The tools it can call
Read the models
What is there, what reads what, how big it is.
list_modelsfindget_objectexplainlineageimpactactionssizequery_line_items
Read the documents
Search, then read a section in full before quoting it.
search_documentsobject_documentsget_section
The review
The tests run over the exports, and the ranked plan.
testsaction_planlist_patternsget_patternrule
Propose a build
Parse a formula, then check a whole plan.
validate_formulabuild_plan
Only when you say so
Record your decision or your word, with your reason.
set_edge_stateset_statusset_action_statepropose_actionremember
The names are the ones in the code today. The last group changes nothing unless you asked for it in the conversation.
The validator
A language model writes the answer. Code checks it.
Here is a draft with two things wrong in it. Press through what happens before it reaches you.
1 · The draft. What the language model wrote. Two things in it are wrong, and it reads fine.
The mapping in CAL03 Opex.Forecast Opex was a change-control decision. The design record says: "The account-to-driver mapping is written into the IF chain of CAL03 Opex.Forecast Opex because Finance Systems did not want planners, or anyone outside Finance Systems, to be able to edit a mapping table" ¶ 4.3. It adds that "a locked mapping module was judged too risky" ¶ 4.3, and the same mapping is kept inSYS08 Account Mapping.
2 · The check. Code looks every name up in the exports and every quote up in the section it cites.
- ✓Name CAL03 Opex.Forecast Opexin the exports
- ✕Name SYS08 Account Mappingnot found: the model has no such module
- ✓Quote "The account-to-driver mapping is written into the IF chain…"in section 4.3, word for word
- ✕Quote "a locked mapping module was judged too risky"not in section 4.3 word for word: counted apart, never as found
- ✓Why rests on a passageso it may give a reason
3 · What you see. The answer, with what couldn't be supported flagged on it. Not smoothed over, not hidden.
The mapping in CAL03 Opex.Forecast Opex was a change-control decision. The design record says: "The account-to-driver mapping is written into the IF chain of CAL03 Opex.Forecast Opex because Finance Systems did not want planners, or anyone outside Finance Systems, to be able to edit a mapping table" ¶ 4.3. It adds that"a locked mapping module was judged too risky" quote not checked, and the same mapping is kept inSYS08 Account Mapping not found.
Flagged 1 name not found · 1 of 2 quotes found · 1 quote not checked
An illustration. The draft is built from a real demo passage with two faults I planted by hand; the module SYS08 Account Mapping doesn't exist in the demo model. The flags are drawn here, not captured from the app.
Checked on every answer
- Names
- Every model, module, line item and action the answer names is looked up in your exports. One your model doesn't have is listed as not found.
- Figures
- Every number must come from what the tools returned for that question.
- Quotes
- Every quoted passage must be in the section it cites, word for word.
- Why
- A why-answer must rest on a passage or an owner note. With neither, it says Not recorded.
- Plans
- A build plan isn't shown at all unless every formula parses, every name it uses exists or is built by the plan, nothing is built before what it refers to, and no change closes a circular reference.
All eight demo answers on the main page came back clean. More in the validator's own page.
Lean context
What goes to the model, and what's left out.
A good answer comes from a small, relevant context, not from pouring everything in. The budget for one answer is 32,000 tokens, enforced in code. This is what the model was given for the first demo question, and the same list sits under every answer in the app.
18,401 of 32,000 tokens
0budget: 32,000
Instructions7,992
Every answer: the instructions, the validator's rules and the tool definitions.
The estate in brief6,330
Every answer: the models, their sizes, feeds, the leading patterns and decisions.
6 document cards1,091
Always in context, so it knows which documents exist. Cards only, not the documents.
The question23
As asked.
6 owner notes556
Retrieved for this question.
- Forecast Opex: why the mapping is in the formula86
- Benchmark Opex was a Q3 temp fix59
- Workforce rates are keyed by hand: the FP&A feed is not live83
- Pack views keep Versions on purpose141
- CAL05 Opex OLD is kept on purpose, for now83
- FP&A: read these modules first104
2 tool results1,333
What it looked up: only the rows it asked for.
- The models and the feeds between them678
- Document search: section hits (snippets only)655
2 sections pulled1,076
Read in full for this question, because the answer rests on them.
- Caldergate FP&A: design decision record v1.2 · 4.3 Opex forecast logic805
- CR-031: Legal fees driver in the opex forecast · Wider point: the mapping271
Left out: everything else. The six documents went in as cards only; a section goes in when the answer reads it. Line items go in as a count and a few rows, never as the whole list.
From the recorded run of "Why is the account mapping written into the Forecast Opex formula instead of a lookup table?". Sizes are the app's own estimates, at four characters to a token. The context view, in the repo.
Tracing, with consent
Each login decides what is traced. Nobody decides for them.
Every answer keeps its own run timeline, with no outside account. Whoever runs the app can also send runs to LangSmith. On a shared instance that would let the operator read other people's questions, so what is sent is each login's own choice, for that login's own questions.
- Off
- Nothing. Not even that a question was asked.
- Structure
- A run tree: the tool names and their order, sizes, tokens, timings, the verdict's counts. Not the question, the answer, document text or any object name.
- Full
- The same tree with the content.
- Every login but the admin's starts on Off. The admin can see each login's level and can't change it.
- Before a login turns it on, it's told that whoever runs the instance will be able to read what it sends.
- Turning it off stops anything further. What was already sent isn't deleted.
Planual flags
It flags the Planual rules it can see in an export.
As followed or departed from: 18 rule numbers across 24 checks. It does not check the Planual. A flag is advisory. A departure never rejects a plan, because you may have a reason, and often a document or a note already records it. Only rule numbers and the tool's own wording appear.
On a build plan CAL03 Opex.Forecast Opex, in the demo's CR-031 plan
- Departs from Planual 2.02-01, 2.02-0213 IF THEN ELSE in one formula
- Departs from Planual 2.01-08, 2.01-09ITEM in a 5,017,824-cell line item
- Departs from Planual 2.02-02, 2.02-18144 tokens
- As per Planual 2.01-09, 2.02-12no hard-coded figure: what it uses is read from line items
On the review, each finding card carries the rule numbers it rests on, or says it is the tool's own test.
Reviewed before release, and open for you to check
Ten security issues found and fixed. The code is yours to read.
Before release, in November 2026, the code was reviewed by a separate AI reviewer with no part in building it. It found ten security issues, including one that broke workspace isolation. All were fixed, each with a test. The whole codebase is on GitHub under the MIT licence. You're welcome to run your own security review, and I'd like to hear what you find.
- That review was by an AI reviewer. It was not a human audit and not a penetration test of a live instance.
- Code changed since then is covered only when a new review is run. The repo's review log names the commit each review was run on.
What it won't do
The honest list.
- It doesn't touch your Anaplan tenant. No connection, no login, no API. It reads the export files you hand it and nothing else.
- Saved views and pages aren't in the exports. So it can't see who looks at a line item on a page. When it says nothing reads one, it means no formula and no export.
- Reach follows formulas. It shows what reads what. It doesn't prove a value will change.
- It doesn't plan from a blank page. A build plan extends a model you've given it the Line Items export of. Every name in it is checked against that model.
- A plan is a proposal. Nothing is built in Anaplan. The formulas parse and the names resolve, and they still need a builder's read.
- It doesn't judge the reasoning. It checks that what an answer says is in your model and your documents. Whether the design was a good idea stays with you.
/architect is an independent product. It isn't made with Anaplan, agreed with them, affiliated with them or endorsed by them. Anaplan and the Planual are its owner's. Everything shown here is the fictional Caldergate demo.