agentleFS
GeoDaoyuGeoDaoyu/arcgis-maps-sdk-js-ai-context/skills/arcgis-editing/AGENTS.md

arcgis-maps-sdk-js-ai-context / arcgis-editing

AGENTS.md0 starsChanged 7 months agoMITView on GitHub

Quick-reference decisions, checklists, and tables for feature editing and versioning.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All expressions use Arcade syntax and must return true/false.

    line 97
  2. Very specific:

    All three can be combined in a single applyEdits() call.

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent Guide: arcgis-editing

Quick-reference decisions, checklists, and tables for feature editing and versioning.

Editor Component vs Core API Decision

  1. Do you need a basic editing UI with default behavior?
    • Yes --> <arcgis-editor slot="top-right"> (Map Component)
    • No, need custom form layout or logic --> Core API Editor widget or FeatureForm
  2. Do you need a standalone form (not inside the Editor panel)?
    • Yes --> FeatureForm widget or <arcgis-feature-form> component
    • No --> Editor handles forms internally
  3. Do you need programmatic edits without any UI?
    • Yes --> featureLayer.applyEdits() directly
  4. Do you need version management?
    • Yes --> VersionManagementService + <arcgis-version-management> component
ApproachUI ProvidedGeometry EditingForm EditingFlexibility
<arcgis-editor> componentFullYesYesLow (defaults)
Editor widget (Core API)FullYesYesHigh (layerInfos config)
<arcgis-feature-form> componentForm onlyNoYesMedium
FeatureForm widgetForm onlyNoYesHigh (custom form layout)
applyEdits()NoneVia codeVia codeMaximum

Edit Workflow Steps

Interactive editing (Editor widget)

  1. Setup -- Add Editor to view with layerInfos config
  2. Create -- User selects template, draws geometry, fills form
  3. Update -- User clicks feature, modifies geometry or attributes
  4. Delete -- User selects feature and deletes

Programmatic editing (applyEdits)

  1. Create Graphic -- Build object with geometry and attributes
  2. Call applyEdits -- layer.applyEdits({ addFeatures: [graphic] })
  3. Handle result -- Check result.addFeatureResults for success/errors
  4. Refresh -- Layer auto-refreshes; call layer.refresh() if needed

Form-based editing (FeatureForm)

  1. Create form -- new FeatureForm({ layer, formTemplate })
  2. Set feature -- form.feature = graphic
  3. User edits -- Form fields are populated and editable
  4. Validate -- Check form.valid before proceeding
  5. Get values -- form.getValues() returns updated attributes
  6. Apply -- layer.applyEdits({ updateFeatures: [graphic] })

Version Management Checklist

Setup

  • Have a branch-versioned feature service
  • Create VersionManagementService with the service URL
  • Await vms.load()

Create and edit in a version

  • Create version: vms.createVersion({ versionName, access: "private" })
  • Switch layer: featureLayer.gdbVersion = version.versionName
  • Refresh layer: await featureLayer.refresh()
  • Start edit session: await vms.startEditing({ versionIdentifier })
  • Apply edits: await featureLayer.applyEdits(edits)
  • Reconcile: await vms.reconcile({ versionIdentifier, conflictResolution: "favorEditVersion" })
  • Check for conflicts: reconcileResult.hasConflicts
  • Post to parent: await vms.post({ versionIdentifier })
  • Stop editing: await vms.stopEditing({ versionIdentifier, saveEdits: true })

Cleanup

  • Switch layer back: featureLayer.gdbVersion = vms.defaultVersionIdentifier
  • Delete temp version: await vms.deleteVersion({ versionName })

Form Element Types

TypePurpose
fieldSingle editable field
groupGroup of fields under a heading
textRead-only instructional text (HTML)
relationshipRelated records from relationships

Field Element Expression Types

Expression PropertyControls
visibilityExpressionWhether the field is visible
editableExpressionWhether the field is editable
requiredExpressionWhether the field is required
valueExpressionComputed default value

All expressions use Arcade syntax and must return true/false.

applyEdits Operations

OperationPropertyValue
Add featuresaddFeaturesArray of Graphics
Update featuresupdateFeaturesArray of Graphics (with existing OID)
Delete featuresdeleteFeaturesArray of Graphics or [{ objectId: N }]

All three can be combined in a single applyEdits() call.

Input Types Quick Reference

Input TypeField TypesUse Case
text-boxString, NumberShort text input
text-areaStringLong text, notes
combo-boxCoded value domainsDropdown selection
radio-buttonsCoded value domainsFew choices visible
switchInteger (0/1)Boolean toggle
date-pickerDateDate-only selection
datetime-pickerDateDate + time selection
time-pickerDateTime-only selection
barcode-scannerStringBarcode/QR scanning

See arcgis-tables-forms for detailed input type configuration.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.