performAction(addToPendingTasks(fillOutGasPurchase)) :-
	arrivingAndStayingAt(Agent,Location),
	isa(Location,gasStation),
	sittingStill(minutes(Minutes)),
	Minutes > 1.

performAction(addToPendingTasks(silenceCellPhoneAtMovieTheater)) :-
	arrivingAndStayingAt(Agent,Location),
	isa(Location,movieTheater),
	sittingStill(minutes(Minutes)),
	Minutes > 1.

%% there is a really a long list of such places, churches, mosques,
%% synagogues, temples, etc.  enlarge this.
performAction(addToPendingTasks(unsilenceCellPhoneWhenLeavingMovieTheaters)) :-
	leaving(Agent,Location),
	isa(Location,movieTheater),
	hasPerformedAction(Agent,silenceCellPhoneAtMovieTheater).

performAction(addToPendingTasks(washHands)) :-
	arrivingAndStayingAt(Agent,Location),
	isa(Location,residence),
	sittingStill(minutes(Minutes)),
	Minutes > 1.

performAction(addToPendingTasks(setReminderToEnterNewAppointmentsIntoSchedule)) :-
	leaving(Agent,Location),
	isa(Location,doctorsOffice).

%% AI should detect a person's cell phone approaching, coach us on
%% talking points.
performAction(addToPendingTasks(coach(Host,talkingPointsFn(Guest)))) :-
	location(Host,Location),
	approaching(Guest,Location),
	hasTalkingPointsFor(Host,Guest).

%% if I go to a library, notify me upon arriving and leaving to input due dates of any books I get.
performAction(addToPendingTasks(notifyUser(Agent,addDueDatesOfBooksToSchedule))) :-
	leaving(Agent,Location),
	isa(Location,library).

%% (when (we get home) (tell us to put phone on charger))
performAction(addToPendingTasks(putOn(Agent,phoneFn(Agent),charger))) :-
	after(arriving(Agent,homeFn(Agent))),
	after(senorActivity(roomFn(homeFn(Agent),Agent).))


%% (implies
%%  (car has stopped at a known destination area)
%%  (add to immediate tasks to check and enforce parking rules))


%% performAction/1
%% Talking points before going to interviews and such.


%% When arriving at a hospital, possibly notify people like
%% significant others etc.


%% when the user is going down a track that they only ever use to go
%% to one place, check the hours of the place as soon as you presume
%% this to be their destination, also if they are enroute to several
%% possible locations, check those, once it becomes reasonable
