Skip to content

P1-003 — Repository, Filesystem And Runtime-Consumer Inventory

  • Status owner: P1-010 final ROADMAP schema — transition evidence only
  • Execution result: IN PROGRESS — CLOUD RO COMPLETE / FRESH LOCAL RO REQUIRED
  • Owning Phase: P1 — Product, Documentation, Benchmark And Repository Foundation
  • Lane: Cloud RO + Local RO
  • Parallel: possible
  • Depends on: none
  • Activation condition: the user's instruction to run P1-003; no dependency
  • Unlocks: P1-008 after the Local RO closure evidence is attached
  • Observation date: 2026-07-30
  • Current Runtime source basis: master@d61b5cba1395d795469dcf9556d902290a633ded
  • Branch reconciliation: observation-time qa was ahead of master only in documentation/Harness surfaces; no Runtime-source delta was present
  • Dated full-checkout baseline: qa@7df7de6e8b114aede69ed56319d4627f73da726e on 2026-07-14
  • Recent remote inventory baseline: qa@adc6df6697075a2f89b3d92b706337b05424f5be on 2026-07-26
  • Product value: current paths are classified by actual caller, loader, build and runtime consumption before any move, deletion or target-tree decision is authorized
  • Stable planning input: ../requirements/CTC_PRODUCT_PLATFORM_AND_DOCUMENTATION_RESET.md
  • Target design: ../DESIGN.md
  • Current Runtime contract: ../../.agents/rules/ARCHITECTURE.md

1. Outcome And Completion Boundary

The following was completed in the Cloud read-only scope of P1-003.

  • Reconfirmed the current HTTP, page, API, job and public-integration entrypoints and dynamic consumers against the current source.
  • Classified the app, frontend, public, config, tests, scripts, scoped Node package, docs-runtime consumer, and vendor/generated/runtime-state boundaries.
  • Stated the freshness boundary instead of copying the 2026-07-14 full-checkout inventory and the 2026-07-26 remote inventory verbatim into the current source.
  • Recorded the current-to-target candidates, but did not treat them as permission to move, rename, delete or create folders.
  • Left the exact path count, untracked/private state, orphan/caller-zero, build parity and deploy/web-root consumers, which cannot be proven on Cloud, as a Local RO closure item.

P1-003 as a whole is not yet COMPLETE. Its lane is Cloud RO + Local RO, and the current full checkout enumeration and the actual build/deploy filesystem consumers could not be verified in a connector-only environment. This document is a transition artifact that separates Cloud-confirmed fact from Local-required evidence so that P1-008 does not build a premature move map.

2. Evidence Classes

Class Meaning Use
CURRENT_SOURCE Runtime/source declaration read directly from the current qa judging the current structure and consumers
CURRENT_DERIVED_DIFF a result that checks the exact prior count together with the current source-only delta used only for items that state their derivation
DATED_LOCAL_BASELINE collected from a 2026-07-14 full checkout with git ls-files for scale and shape reference only; never as a current count
DATED_REMOTE_BASELINE the 2026-07-26 remote source inventory reuse only unchanged items; a changed owner count needs re-verification
CURRENT_CONTRACT a responsibility declared by the current architecture/design owner on a conflict with code, the code has to be re-checked
TARGET_ONLY the desired structure in DESIGN.md not a current implementation and not a move approval
UNKNOWN_LOCAL cannot be closed without the current checkout, filesystem and build/deploy/runtime host no zero/absent/PASS assumption before Local RO evidence

3. Why Previous Counts Are Not Current Authority

3.1 2026-07-14 full-checkout snapshot

../reference/modernization-v1/baseline/01-source-and-system-inventory.md recorded 36,255 tracked paths with git ls-files at the time.

Path Dated tracked paths Boundary
app/ 31,887 mostly vendored dependencies in app/utils/; not a business-code size
public/ 2,243 2,229 paths are in public/assets/; source, vendor, generated and static are mixed
scripts/ 1,026 migration, repair, import, smoke and validation are mixed
reference/ 660 historical YP/MK source copies, not the active Runtime
docs/ 145 106 assets and 34 Markdown at the time; heavily changed since the document reset
frontend/ 115 107 server-rendered page sources at the time
.agents/ 30 rules, references and harness material are mixed
tests/ 6 real verification files also exist under scripts/, so this is not a coverage count

These numbers are a DATED_LOCAL_BASELINE. Because Runtime, frontend, integration, migration, Harness and docs have all changed since 2026-07-14, they are not copied as a current path count.

3.2 2026-07-26 remote inventory

../evidence/evolution/EVO-T01/WP-002-current-runtime-surface-inventory.txt computed the page/module/API registry as a source declaration, but did not confirm the full tree, active callers, packages/vendor, tests, the DB, the browser or the deployed Runtime.

After that, the platform/shared/system route owners, frontend pages and assets, public Twilio endpoints, the frontend build manifest, migrations and the voice gateway all changed. Therefore only unchanged registry paths are used for derivation, and the route declaration total, consumer count and pass state are not reused before a current loader or local scan.

4. Current Repository Responsibility Map

Surface Current responsibility Consumer / trigger Classification P1-003 result
router.php, .htaccess HTTP rewrite, sensitive-path block, real-file bypass, API/legal/QuickBooks/admin/page routing Apache or PHP development server Runtime entry CURRENT_SOURCE; placement and web-root coupling must be preserved
index.php authenticated app shell, role/module guard, page inclusion, shared frontend shell one-segment application route Runtime entry + composition CURRENT_SOURCE; page registry and partials are coupled consumers
login.php, admin-console.php authentication and independent super-admin surface direct route/file Runtime entry owner remains current; detailed caller count is Local follow-up
api/index.php API v2 manifest discovery and dispatch /api/* Runtime entry + dynamic loader fixed platform manifest plus three sorted glob families
cron.php scheduled CLI dispatch, DB work, provider work and logging CLI scheduler Job entry + mixed orchestration eight accepted command names; not a thin job boundary
config/ session/bootstrap, path, page registry, module/access map and runtime defaults root/page/API/job includes Runtime configuration declarative and executable responsibilities coexist
app/platform/ auth, tenant, menu, module, audit, performance, Codex compatibility and platform routes page/API/config consumers First-party platform source preserve current owner; split only by bounded use case
app/shared/ API transport, files, endpoint, sync, table, UI and legacy shared helpers API loader and direct includes First-party technical mechanism business authority must not expand here
app/systems/ YMS/TMS/WMS/OMS/BMS module handlers, helpers and route manifests API/page/job/cross-owner includes First-party business source physical folder, module gate and process owner are not interchangeable
app/addons/ Gmail, reports and optional/integration behavior API loader and jobs First-party add-on source core record mutation must remain with system owner
app/controllers/ specialized compatibility entrypoints direct legacy callers Compatibility entry retire only after exact caller and replacement proof
app/utils/ custom DB/provider/application utilities plus large vendored dependency subtrees broad direct includes Mixed first-party + third-party top-level count is misleading; allowlist/license scan required
frontend/pages/ server-rendered platform/system pages config/page_routes.php + index.php dynamic include First-party presentation source registry, role/module and browser consumer must move atomically
frontend/partials/ global CSS/JS/navbar/app-shell composition index.php Shared runtime composition contains dependency registry and page behavior, not passive templates only
frontend/scss/, frontend/tailwind-runtime.css authored style inputs scoped build packages Authored build input output ownership is separate under public/assets
resources/views/ shared legacy view/components where still used per current Architecture direct includes Current-contract legacy presentation exact current paths/callers are UNKNOWN_LOCAL
public/assets/js/modules/ first-party browser modules, many global/IIFE contracts shared partials and page-local tags Authored source under web root must not be treated as generated assets wholesale
public/assets/vendor/ third-party libraries plus internally maintained KJ compatibility/runtime files shared shell and pages Mixed vendor + internal compatibility + generated vendor path name alone is not provenance
public/assets/css/ authored CSS and generated CSS _css.php, page tags and build manifest Mixed source + generated output generated allowlist exists only for named artifacts
public/gmail/, public/integrations/, public/quickbooks-time/, public/legal/ OAuth, webhook, callback, legal and machine/public endpoints direct HTTP file or explicit rewrite Public Runtime entry authentication, token and deploy reachability are endpoint-specific
scripts/frontend-build/ isolated frontend build command registry and artifact manifest developer/build execution Build orchestration current root workspace remains blocked/inactive
scripts/tailwind-runtime/ Tailwind 3.4.17 build/test/verify scoped npm package Build source + verifier generates one declared CSS artifact
scripts/kj-table-bundle/ Terser-based KJ table bundle build/verify scoped npm package Build source + verifier generates JS bundle and artifact manifest
scripts/migrations/ dated forward/rollback/data repair scripts explicit operator execution Migration/repair exact read/write/tenant/rollback inventory is UNKNOWN_LOCAL
remaining scripts/ import, smoke, operation, repair, validation, analysis and historical task scripts explicit manual/Harness invocation Mixed tooling current classification and effect metadata are incomplete
tests/ PHP unit/integration/integration-db suites scripts/run-php-tests.sh Test source runner only discovers flat *_test.php files at maxdepth 1
voice-gateway/ standalone TypeScript Twilio/WebSocket Runtime npm build/start/test Package-managed Runtime explicitly excluded from frontend build workspace
docs/ product, design, process, manual, evidence, task and historical content humans, agents and in-app manual adapter Documentation; partly Runtime-consumed document move/delete requires consumer classification, not docs-only assumption
.agents/ current rules, Harness and historical reference agent/Harness selection Engineering contract/control source not Runtime business source; private DEV_ENV.md is excluded
reference/ YP/MK historical code/schema reference explicit migration research only Historical reference not active CTC Runtime unless a concrete caller proves otherwise
storage/, media/, temp/, output/, .local/, playwright/, node_modules/ generated/runtime/private/local state Runtime, tests, tools or operator Non-source state tracked/untracked/mount/deploy boundary requires Local inspection
database/ historical schema/migration support in dated inventory explicit tooling only Dated procedure/history current path inventory is UNKNOWN_LOCAL

5. Runtime Entrypoint And Consumer Map

5.1 HTTP routing

HTTP request
  -> Apache .htaccess or router.php
     -> /api/* ----------------------> api/index.php
     -> legal / QuickBooks paths ----> public/* direct entry
     -> /admin-console --------------> admin-console.php
     -> existing file/directory -----> server direct-file handling
     -> one segment -----------------> index.php?page=<slug>
     -> otherwise -------------------> 404

Important boundary:

  • both routing implementations bypass the application rewrite for an existing file or directory;
  • therefore file placement and deploy/web-root configuration can affect reachability;
  • this source fact does not prove that every repository file is publicly reachable in production, because host document root, PHP handler and server restrictions remain UNKNOWN_LOCAL / deployment evidence;
  • P1-008 must not move a file based only on PHP include callers without checking direct HTTP/deploy consumers.

5.2 Page registry and dynamic page include

index.php resolves a slug through config/page_routes.php, applies role/module decisions, resolves a physical path and dynamically includes the file.

Current registry facts:

Fact Current result Evidence
registered page slugs 93 CURRENT_DERIVED_DIFF: 92 at the exact prior registry + one current added ai-voice-history entry, no deletion
unique target files 90 current registry inspection; three duplicate-target alias pairs
duplicate-target alias pairs 3 mk-inbound-orders/mk-doortrade-orders, rate/billing-presets, mk-trade-summary/mk-deal-ledger
module-map entries 88 CURRENT_DERIVED_DIFF: prior 87 + current ai-voice-history mapping
registered slugs intersecting module map 87 new page and new map entry move together
map-only key 1 legacy list key
registered pages without module-map entry 6 access-denied, module-disabled, not-found, pilot, inventory-adjustment, bale-inventory

This registry proves physical page selection, not code ownership, process ownership or business authorization. Examples remain explicit:

  • appointment is physically under TMS/transload but gated by yms.dock-scheduling;
  • inbound-planning is physically under TMS/transload but gated by wms.inbound;
  • ai-voice-history is physically under TMS/transload and gated by tms.transload.

5.3 API manifest discovery

api/index.php loads:

app/platform/api_routes.php
app/shared/*/api_routes.php
app/addons/*/api_routes.php
app/systems/*/*/api_routes.php

The glob results are sorted, included and merged before dispatch.

  • route-manifest path count remains 34 because no manifest path was added or removed after the exact 2026-07-26 file-set baseline;
  • route declaration total is not current-authoritative because multiple route arrays changed after the 507-declaration baseline;
  • method/public/module/strict-principal distributions require the current source-only loader or an equivalent deterministic parser;
  • a folder move can silently remove a route owner from the glob even when direct callers compile, so loader discovery is a migration gate.

5.4 Shared frontend shell

frontend/partials/_css.php and _javascript.php are runtime dependency registries.

Current shell behavior includes:

  • Bootstrap CSS/JS by default;
  • Tailwind runtime CSS on the app shell, with fleet-management disabling Bootstrap;
  • global jQuery plus Fancybox, Selectize, jSignature and QR plugins;
  • Moment, XLSX, Pica, EXIF and PDF libraries;
  • KJ popup/modal/form/planner/calendar/autocomplete compatibility files;
  • numerous first-party shared/module scripts, some emitted through runtime optional-script helper functions;
  • filemtime() and file-existence checks as runtime asset-version/availability consumers;
  • a substantial page-specific dispatch-location behavior implemented inline in the global _javascript.php partial.

Consequences:

  1. frontend/partials is not presentation-only; it owns global dependency selection and behavior.
  2. a first-party JS file can be consumed dynamically even when a literal <script> tag is absent from a page.
  3. Bootstrap removal, jQuery removal, asset relocation and global-script decomposition are separate caller-zero problems.
  4. exact active consumer counts remain UNKNOWN_LOCAL; loading a file globally also does not prove every page invokes its API.

5.5 Build and generated assets

scripts/frontend-build/asset-manifest.json is an ISOLATED_COMPAT registry, not an active root npm workspace.

Unit Authored inputs Declared outputs State
tailwind-runtime frontend/tailwind-runtime.css, scoped config public/assets/css/tailwind-runtime.css scoped package; Tailwind 3.4.17
kj-table-bundle public/assets/js/modules/shared/kj-runtime.js public/assets/vendor/kj/kj-table/kj-table.bundle.min.js, bundle JSON scoped package; Terser 5.48.0
voice-gateway TypeScript package source dist Runtime used by its start command standalone package-managed Runtime; excluded from frontend workspace

Current gaps:

  • root package.json and root lock are ignored and the proposed root workspace is BLOCKED_PENDING_FULL_CHECKOUT_AND_HOST_EVIDENCE;
  • .gitignore still contains an exception for scripts/kj-ui-standard/package.json, but that manifest is absent on current qa; this is a stale-ignore/build-ownership reconciliation item, not proof that the package should be recreated;
  • generated artifact byte parity, Node/npm host version and ignored local root manifests are UNKNOWN_LOCAL;
  • no other file under public/assets may be classified generated merely because it is deployable.

5.6 Scheduled jobs and public integrations

cron.php directly includes config, database, logger, Gmail/provider/application services and TMS/transload/post_helper.php. It accepts eight current command names:

gmail_appt_intake
gmail_appt_watch_register
gmail_appt_watch_replay
gmail_appt_reschedule_auto
telegram_breaks
late
asn
report

late currently invokes no send function because both calls are commented. Other branches can perform DB mutation and provider effects. The file combines dispatch, tenant fallback, SQL, provider calls, logging and output; moving included helpers or reclassifying it as a simple script without effect inventory is unsafe.

Public integration entrypoints include Gmail OAuth/watch surfaces, QuickBooks Time, Twilio callbacks/media/status/tooling and legal pages. Some are explicit rewrite targets; other real files can be served through the existing-file bypass. Each endpoint needs its own auth/token/secret/retry/deploy consumer record.

5.7 Documentation consumed by Runtime

frontend/pages/platform/help/operations-manual.php and operations-manual-content.php make part of docs/ an active Runtime input.

The adapter:

  • extracts docs/ and .agents/ source paths from page metadata;
  • reads source contents to compute signatures;
  • reads source mtimes;
  • parses docs/processes/process-registry.yaml;
  • renders a bounded Markdown/HTML subset;
  • resolves only repository-local docs/ images.

Therefore a document can be both human documentation and a Runtime-consumed content source. P1-001/P1-007 may not move, merge or delete operator/process documents until this consumer and source-signature contract are updated and verified in the same rollback unit.

5.8 Repository metadata consumed by Runtime

getReleaseSha() in config/config.php reads release environment variables first and can then inspect .git/HEAD, refs and packed refs. A deployment without Git metadata returns an empty value. Repository metadata presence is therefore a Runtime observability input in some topologies, not a guaranteed deployment invariant.

5.9 Test discovery

scripts/run-php-tests.sh discovers only:

find tests/unit -maxdepth 1 -name '*_test.php'
find tests/integration -maxdepth 1 -name '*_test.php'
find tests/integration-db -maxdepth 1 -name '*_test.php'

Nested test folders are currently invisible. The target unit/contract/integration/browser/fixtures structure cannot be implemented by moving tests first. Runner discovery, moved files and verification must change atomically, and DB-write tests remain explicitly gated by --allow-db-write.

6. Source, Vendor, Generated And Runtime-State Separation

Class Confirmed examples Important exception / unresolved boundary
first-party backend source root entries, config, app/platform, app/shared, app/systems, app/addons app/utils cannot be included wholesale
first-party presentation source frontend/pages, frontend/partials, frontend/scss, public/assets/js/modules source currently lives under both frontend and deployable public
internally maintained compatibility source public/assets/vendor/kj/*, app/controllers, legacy query/post/helper paths vendor or controller name does not make it third-party or obsolete
third-party/vendor large app/utils dependency subtrees; external libraries under public/assets/vendor exact package, version, license, maintenance and security inventory pending
generated output declared Tailwind CSS and KJ table bundle/manifest generated allowlist is narrow; do not infer other assets
package-managed Runtime voice-gateway build output, service consumer and deployment unit require Local/host evidence
Runtime/private state ignored storage areas, media, temp, output, .env, credentials, local plugins, node_modules, Playwright state current mounts, permissions, untracked files and deployment copies pending
historical/reference reference/, dated evidence and legacy source copies may still be read by tooling/humans; active Runtime use requires a concrete caller
Runtime-consumed documentation operations/process/manual sources selected by in-app adapter cannot be handled as inert docs or archive-only content

7. Material Findings

F-001 — Raw path count is structurally misleading

app/ and public/ path totals are dominated by dependency/static trees. Business complexity and migration priority must use first-party owner/caller/effect evidence, not directory size alone.

F-002 — Physical path, module access and process authority differ

Current page mappings prove that code owner cannot be inferred from page slug, module key, profile or table. P1-008 needs an explicit owner decision for every move candidate.

F-003 — public currently has at least four roles

It contains public/machine entrypoints, authored first-party browser source, third-party/internal compatibility libraries and generated build output. A blanket public cleanup or asset move is unsafe.

F-004 — app/utils is both legacy first-party and vendored dependency

It contains database/provider/application utilities and large dependency subtrees. A folder-level exclusion would miss active source; a folder-level migration would absorb third-party internals.

F-005 — Dynamic discovery creates hidden move gates

API glob loading, page registry resolution, optional script helpers, file-existence checks, direct includes, real-file HTTP bypass and runtime documentation path parsing are all filesystem consumers. Textual direct-caller count alone is insufficient.

F-006 — The global frontend partial is a behavior owner

_javascript.php is not only an include list. It owns runtime dependency selection, compatibility routing and inline operational UI behavior. It is a high-coupling decomposition candidate, not a simple file relocation candidate.

F-007 — Build ownership is scoped and incomplete

Two frontend build packages have declared inputs/outputs. A root workspace is not active, one stale ignored package path remains, and voice-gateway is a separate Runtime package. P1-008 must not invent one workspace or delete scoped locks without host/artifact parity evidence.

F-008 — Documentation has a Runtime consumer

Operations manual and process sources are read by PHP at render time. Documentation cleanup and repository cleanup cannot be executed as independent assumptions.

F-009 — Current test layout is runner-constrained

Nested target test structure would silently reduce executed tests under the current runner. Test migration starts with discovery-contract change, not directory creation.

F-010 — Script effect classification is not complete

The tree has scoped build packages and dated migration directories, but many root scripts remain mixed by historical Task and technology. File names are not sufficient to determine read/write/provider/production safety.

8. Current-To-Target Candidates — Not Move Permission

Current surface Target candidate from DESIGN.md Required proof before decision
app/systems/{YMS,TMS,WMS,OMS,BMS} app/modules/{yms,tms,scale,inventory,orders,billing,documents} authority/module/process map, public command/query contract, all includes/globs/tests, rollback
app/addons, provider utilities, public integration helpers app/integrations plus explicit public/job entrypoints owning module, credential/config, idempotency/reconciliation, deploy route
app/platform retain platform root with clearer capabilities current caller adoption, no business authority leakage
app/shared retain technical mechanisms only every business helper gets an owner or explicit compatibility disposition
app/controllers explicit compatibility/entrypoint boundary or retirement active caller list, replacement parity, caller-zero
app/utils split first-party infrastructure/adapters from vendor packages provenance allowlist, package/license/update owner, include map
frontend/pages + first-party public/assets/js/modules frontend/modules, frontend/shared, frontend/entrypoints page/API/state/lifecycle contract, asset loader/build/deploy caller map
public/assets deployable static/build output plus explicit public entrypoints authored/generated/vendor allowlist and exact runtime tags/helpers
flat tests/* target test classes runner supports new discovery in same verified unit
mixed scripts/ build/migrations/imports/operations/repairs/validation/fixtures/analysis per-script owner, environment, tenant, effect, dry-run, rollback, evidence
mixed docs paths approved P1-006 hierarchy P1-001 disposition plus in-app/manual/search/link consumer map
reference/ retained bounded historical reference or deletion after absorption no active source/build/runtime/manual consumer and exact retained value

No row authorizes a folder, file or package move. P1-008 owns the move map after Local RO closes current caller/build/deploy unknowns.

9. Local RO Closure Register

ID Required evidence Why Cloud cannot close it Closure output
P1-003-L01 exact current branch, HEAD, staged/dirty/untracked/private-excluded state connector has no checkout/worktree bounded git-state record without secret contents
P1-003-L02 current tracked path count by top-level, extension, source/vendor/generated class GitHub file API cannot recursively enumerate the complete private tree here reproducible count table and scanner command
P1-003-L03 symlink, submodule, case-only collision, executable and oversized-file inventory requires filesystem/git index metadata risk list for moves and cross-platform checkout
P1-003-L04 page files/fragments not in registry and missing registry targets requires full frontend/pages enumeration registered, alias, off-registry, orphan and missing-target matrix
P1-003-L05 complete PHP include/require/glob/dynamic path and legacy query/post/controller caller map code search cannot prove zero or resolve generated strings completely caller graph with unknown patterns retained
P1-003-L06 current loaded API route count and method/public/module/strict-principal distribution route arrays changed after dated count; loader must run in safe source-only mode exact current route registry report
P1-003-L07 exact CSS/JS/global/inline/CDN/remote asset consumers complete lexical scan and sampled browser route needed consumer matrix by page/shell/helper/build
P1-003-L08 manifests, locks, ignored local manifests, package provenance, licenses and stale dependencies full checkout and package metadata required dependency/vendor register; no install/update
P1-003-L09 generated asset byte parity and Node/npm host evidence build outputs and host tools unavailable source-output-owner parity report
P1-003-L10 every script's read/write/provider/tenant/environment/dry-run/rollback class names and remote snippets are insufficient executable script inventory and prohibited-default list
P1-003-L11 complete test inventory, nested undiscovered tests, fixtures and current source-only pass state current runner and filesystem required test discovery matrix and applicable check evidence
P1-003-L12 actual Apache/PHP document root, deploy copy/exclusion rules and direct-file reachability source routing does not prove host topology deployment consumer map without production mutation
P1-003-L13 storage/media/temp/output mounts, ownership and source-vs-state boundaries host filesystem required path/mount/backup/ignore classification; no contents copied
P1-003-L14 largest/multi-purpose first-party files and cross-owner include hotspots complete first-party allowlist and line/size scan required bounded decomposition candidate list
P1-003-L15 local documentation/Harness checks for this exact committed artifact connector cannot execute repository commands exact command/result provenance

9.1 Minimum safe Local command sequence

Run against the latest integrated qa checkout, read-only except for ordinary command caches that are already expected by the repository. Do not install packages, execute migrations, call providers, open production DB connections or expose private file contents.

git fetch origin
git status --short --branch --untracked-files=all
git rev-parse HEAD
git ls-files -z

git ls-files 'frontend/pages/**' 'public/assets/**' 'app/**' 'tests/**' 'scripts/**' 'voice-gateway/**'
git ls-files '*package.json' '*package-lock.json' '*composer.json' '*composer.lock'
git ls-files -s | awk '$1 == 120000 { print }'

php -r '$r=require "config/page_routes.php"; echo count($r),"\n";'
php -r '$r=require "config/modules.php"; echo count($r),"\n";'
node scripts/frontend-build/run.mjs list
node scripts/frontend-build/verify-manifest.mjs
bash scripts/run-php-tests.sh --help

The full scan should be implemented as a deterministic repository script or a captured one-off command with its source included in evidence. It must:

  • read tracked path metadata without reading secret contents;
  • separate exact first-party allowlists from vendor/generated/runtime state;
  • retain unresolved dynamic paths as unknown;
  • report commands and exit status;
  • avoid package installation, DB/provider/browser/production effects;
  • run applicable existing documentation/Harness checks after this committed file is present.

10. Acceptance Criteria

Cloud RO

  • [x] Required P1-003 scope and invalid old status authority were reconciled against the reset.
  • [x] Major current directory responsibilities were classified.
  • [x] HTTP/page/API/job/public integration consumers were mapped from current source.
  • [x] Dynamic include/glob/optional-script/build/docs consumers were recorded.
  • [x] Current page/module registry counts were refreshed with derivation boundaries.
  • [x] Source/vendor/generated/runtime-state classes were separated at the proven category level.
  • [x] Tests and scripts were classified without assuming target directories are active.
  • [x] Current-to-target candidates were marked as non-permission.
  • [x] Unknowns were not converted to zero, absent, safe or passed.
  • [x] No Runtime, path, package, DB, provider, service, deployment or master mutation was made.

Local RO / final P1-003 closure

  • [ ] Current full-tree counts and first-party/vendor/generated allowlists are reproducible.
  • [ ] Local git/private/untracked state is classified without secret disclosure.
  • [ ] Page/API/PHP/JS/CSS/script/test/build/deploy consumers are completely scanned or explicitly unknown.
  • [ ] Generated artifact parity and package/lock ownership are verified.
  • [ ] Test discovery and applicable source-only checks have current command provenance.
  • [ ] Actual document root/deploy filesystem consumer is recorded.
  • [ ] P1-008 receives a reviewed move-input matrix with no implicit authorization.

11. Verification

Check Result Notes
Reset scope/dependency/lane reconciliation PASS P1-003 is dependency-free, parallel, Cloud RO + Local RO.
Current master/qa Runtime-source reconciliation at observation PASS qa-only differences were documentation/Harness surfaces; Runtime basis is master@d61b5cba....
Current router/page/API/config/shell/build/job/test/manual source read PASS Direct GitHub source inspection.
Dated snapshot freshness review PASS Old counts are labeled dated and not promoted to current authority.
Page/module registry derivation PASS Current files and exact add-only deltas reconciled.
API manifest path-set reconciliation PASS 34 manifest files retained; declaration total intentionally remains unknown.
Full current private-repository tree enumeration NOT_RUN No checkout/tree enumeration capability in connector-only environment.
Local untracked/private/deploy/web-root inspection NOT_RUN Requires Local RO; secret contents must remain excluded.
Build/package install or artifact rebuild NOT_RUN Not required or authorized for Cloud RO.
Repository documentation/Harness command NOT_RUN No local checkout; no false PASS claimed.
Runtime/DB/browser/provider/production verification NOT_APPLICABLE Source-tree investigation only; no behavior change.
GitHub read-after-write REQUIRED Performed after publication; resulting commit is reported in the completion response.

12. Runtime / DB / Provider / File / Deployment Impact

  • Repository file added: docs/tasks/P1-003.md
  • Existing source paths moved/renamed/deleted: none
  • Runtime behavior: none
  • Database/schema/data: none
  • Provider/service: none
  • Package/install/build output: none
  • Production/deployment: none
  • master: unchanged
  • qa: one transition research artifact commit

13. Rollback / Fail-Forward

Rollback is a revert of the single P1-003 documentation commit on qa. No Runtime, DB, provider, service, package, generated asset or deployment rollback is required.

Fail-forward after Local RO:

  1. attach exact current enumeration and command provenance to this Task or its P1-006-approved successor;
  2. resolve discrepancies without editing Runtime during inventory;
  3. change execution result to COMPLETE only when all Local closure acceptance items are satisfied;
  4. hand the reviewed current/target/caller/build/deploy matrix to P1-008;
  5. keep P1-008 as decision/move-map work, not automatic filesystem mutation.

14. Evidence And Handoff

P1-008 must receive

  • current path and responsibility class;
  • current owner versus module/process/profile identity;
  • direct and dynamic callers;
  • build input/output owner;
  • public/deploy/runtime-state boundary;
  • vendor/generated provenance;
  • tests and verification route;
  • compatibility window and rollback unit;
  • caller-zero/loader-zero/deploy-zero retirement gate;
  • unresolved Local evidence.

Later Phase inputs

  • P5 module inventory: physical path cannot substitute for business authority.
  • P7 frontend inventory: global shell, optional loaders, authored public JS and generated/vendor assets need separate consumer classes.
  • P8 documentation cleanup: in-app manual makes selected docs Runtime inputs.
  • P9 performance reconciliation: first-party business size and load cost must exclude vendored/static path inflation while preserving global-shell load facts.

Engineering and operation states

Dimension State
Engineering Complete NO — Cloud RO artifact complete; fresh Local RO evidence is required by the declared Lane
Released NO — documentation commit to qa is not a product release
User Accepted PENDING USER REVIEW
Stabilized NOT APPLICABLE
Value Verified PARTIAL — move decisions are now bounded, but current full-tree evidence remains open

15. Progress Log

Date Event
2026-07-30 Confirmed P1-003 from the reset rather than the invalid legacy CTC-007 status surface.
2026-07-30 Reconciled current qa and master and isolated Runtime source from concurrent documentation/Harness work.
2026-07-30 Reviewed current routing, page registry, API glob loader, frontend shell, build manifest, scoped packages, cron, test discovery and in-app manual consumer.
2026-07-30 Classified current paths by responsibility and source/vendor/generated/runtime-state role.
2026-07-30 Derived current page/module registry facts while preserving changed route-declaration totals as unknown.
2026-07-30 Recorded current-to-target candidates without move authorization and defined exact Local RO closure evidence.
---

Source: docs/research/platform-foundation/2026-07-30/raw/repository-filesystem-and-runtime-consumers.md — ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged. A user instruction quoted inside the text is kept in its original language.